/* front-page header bar
   Default: white bg, dark text (always readable even if JS fails)
   .at-top: transparent bg, white text (only when JS confirms at top of page) */

/* at-top state — transparent over hero, white text */
.header-bar.at-top {
    background-color: transparent;
    box-shadow: none;
}

.header-bar.at-top a,
.header-bar.at-top a:visited {
    color: var(--color-white);
}

.header-bar.at-top a:hover {
    color: var(--color-accent);
}

/* hero */

.index-page-header {
  margin: 0 14px;
  height: 80vh;
  min-height: 450px;
  max-height: 800px;
  background-size: cover;
  background-position: center;
  display: grid;
  align-items: center;
  justify-items: center;
  position: relative;
  border-radius: 0 0 12px 12px;
  overflow: hidden;
}

.index-page-header::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.15);
  pointer-events: none;
}

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

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.index-header-text h3 {
  color: var(--color-white);
  margin: 0 0 10px 0;
  font-weight: 300;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  opacity: 0;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.2);
  animation: fadeIn 0.8s ease forwards;
  animation-delay: 0.6s;
}

.index-header-text h1 {
  color: var(--color-white);
  margin: 0;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
  opacity: 0;
  animation: fadeIn 0.8s ease forwards;
  animation-delay: 0.8s;
}

@media (prefers-reduced-motion: reduce) {
  .index-header-text h3,
  .index-header-text h1 {
    opacity: 1;
    animation: none;
  }
}

.index-page-header h1 {
  font-size: 2.2rem;
}

@media screen and (min-width: 768px) {
  .index-page-header {
    margin: 0 20px;
  }
  .index-page-header h1 {
    font-size: 2.8rem;
  }
}

/* page content overlaps up into hero */

.page-cont {
  position: relative;
  z-index: 2;
  background: var(--color-white);
}

/* subscribe */

#section-subscribe {
  background: var(--color-black);
  border-radius: 0;
  margin: 0;
}

#section-subscribe * {
  color: var(--color-white);
}

#section-subscribe {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-gap: 5rem;
}

#section-subscribe > div {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

div.wpforms-container.wpforms-container-full {
  width: 100%;
}

@media screen and (min-width: 768px) {
  #section-subscribe {
    padding-left: 20%;
    padding-right: 20%;
  }
}

/* welcome section (about) */

.exp-post {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 50px;
}

.exp-post .post-content {
  width: 100%;
  padding: 15px 5px;
}

#section-welcome .post-content img {
  border-radius: 6px;
  aspect-ratio: 3 / 4;
  height: auto;
  min-height: auto;
  max-height: 330px;
}

.exp-post .post-content:first-child {
  display: flex;
  justify-content: center;
}

@media screen and (min-width: 768px) {
  .exp-post {
    flex-wrap: nowrap;
    gap: 30px;
  }

  .exp-post .post-content {
    width: 50%;
    max-width: 500px;
    padding: 0 20px;
  }

  .exp-post .post-content:first-child {
    display: block;
  }

  #section-welcome .exp-post .post-content:last-child {
    align-self: center;
  }
}

/* featured posts */

.post-content img {
  border-radius: 4px;
  aspect-ratio: 3 / 4;
  max-height: 240px;
}

.exp-post .post-categories a {
  color: var(--color-accent);
  background: transparent;
  border: none;
  padding: 0;
  border-radius: 0;
  font-weight: 400;
  font-size: 0.65rem;
  letter-spacing: 0.14em;
}

.exp-post .post-categories a:hover {
  color: var(--color-accent);
}

#section-index-featured .exp-post .post-content p {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media screen and (min-width: 768px) {
  #section-index-featured .exp-post .post-content:first-child {
    width: 30%;
  }

  #section-index-featured .exp-post .post-content:last-child {
    width: 50%;
    align-self: center;
  }

  #section-index-featured .exp-post:nth-of-type(even) {
    flex-direction: row-reverse;
  }
}

/* misc */

#section-welcome {
  padding-top: 80px;
}

#section-welcome h2,
#section-index-carousel h2,
#section-index-featured h2 {
  font-size: 1rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-text);
  margin-bottom: 24px;
}

#section-welcome h2,
#section-index-featured h2 {
  text-align: center;
}

#section-index-carousel {
  padding-right: 0;
}

@media screen and (min-width: 768px) {
  #section-index-carousel {
    padding: 80px 0;
  }
}
