/**
 * Theme Name:        Oma Teema
 * Template:          hello-elementor
 * Theme URI:         -
 * Description:       Teema Iidan sivuille
 * Version:           1.0.0
 * Author:            Neea Hölsä
 */

:root {
  --color-text: #4f2302;
  --color-border: #a8e145;
  --color-border-subtle: #4f230242;
  --color-white: #fafafa;
}

.blog-banner {
  display: grid;
  min-height: 40vh;
  place-items: center;
  background-position: center;
  background-size: cover;
  position: relative;
  width: 95vw;
  margin-inline: auto;
  isolation: isolate;
}

.blog-banner::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #505050;
  content: "";
  opacity: 0.55;
}

.blog-banner__content {
  position: relative;
  z-index: 1;
  text-align: center;
}

.blog-banner h1 {
  color: var(--color-white);
  margin: 0;
  font-family: "Roboto", sans-serif;
  font-size: 5.6em;
  font-weight: 700;
}

body:not([class*="elementor-page-"]) .site-main.archive-page {
  width: 100%;
  max-width: none;
  padding-inline: 0;
}

.archive-content {
  width: min(90vw, 1140px);
  margin-inline: auto;
  margin-top: 3rem;
}

/* Archive page: arrange posts in a responsive grid. */
.archive-page .page-content {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
}

.archive-page .section-title {
  font-family: "Nunito Sans", sans-serif;
  font-size: 2em;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 1rem;
}

.archive-page .latest-articles,
.archive-page .recommended-articles {
  margin-bottom: 3rem;
}

.archive-page .post {
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--color-border-subtle);
  border-radius: 0.35rem;
}

.archive-page .post .post-date {
  margin-top: auto;
  padding: 0 1rem 1rem;
  font-family: "Nunito Sans", sans-serif;
  font-size: 1em;
  font-weight: 600;
  color: var(--color-text);
}

.archive-page .post img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.archive-page .post .entry-title {
  padding: 0 1rem;
  font-family: "Nunito Sans", sans-serif;
  font-size: 1.5em;
  font-weight: 700;
  color: var(--color-text);
  margin-top: 0.8rem;
  margin-bottom: 0.8rem;
  overflow-wrap: break-word;
}

/* Single post: one wrapper controls the title and article width. */
.single-post main.site-main {
  width: min(50vw, 800px);
  margin: 3rem auto;
  padding: 2em 4em;
  border: 1px solid var(--color-border);
  font-family: "Nunito Sans", sans-serif;
  color: var(--color-text);
}

.single-post .page-header,
.single-post .page-content {
  width: auto;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

.single-post .page-header {
  margin-bottom: 2rem;
}

.single-post .entry-title {
  font-size: 3.5em;
  font-weight: 700;
  padding-inline: 0;
  overflow-wrap: break-word;
}

.single-post h2 {
	font-weight: 600;
}

.single-post .post-meta {
  display: flex;
  align-items: flex-start;
  font-size: 1.1em;
  margin-bottom: 1rem;
  gap: 1rem;
}

/* Single post: style paragraph blocks inside the article. */
.single-post .wp-block-paragraph {
  font-size: 1.1em;
}

/* Responsive archive grid and single-post spacing. */

@media (max-width: 1024px) {
  .archive-page .page-content {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .single-post main.site-main {
    width: 80vw;
    margin: 2rem auto;
    padding: 1em 2em;
  }
  .single-post .entry-title {
    font-size: 3em;
  }
  .blog-banner h1 {
    font-size: 4.5em;
  }
}

@media (max-width: 768px) {
  .single-post main.site-main {
    width: 90vw;
    margin: 1rem auto;
    padding: 0.5em 1em;
  }
  .archive-page .page-content {
    grid-template-columns: 1fr;
  }

  .single-post .entry-title {
    font-size: 2em;
  }
  .blog-banner h1 {
    font-size: 2.8em;
  }
}
