/*
 * Hero Sections
 * Covers homepage full-viewport hero and interior page heroes.
 * Tekvera Initiative Theme
 */

/* ══════════════════════════════════════════════════════════════
 * HOMEPAGE HERO — Full viewport
 * ══════════════════════════════════════════════════════════════ */
.tv-home-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: 5rem;
  background-color: var(--tv-green-800);
  overflow: hidden;
}

/* Background image layer */
.tv-home-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.tv-home-hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Gradient overlays — stacked for depth (IDEO.org inspired) */
.tv-home-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient( ellipse 65% 50% at 72% 30%, rgba(57, 173, 130, 0.12) 0%, transparent 65% ), linear-gradient( 180deg, rgba(6, 28, 19, 0.2) 0%, rgba(6, 28, 19, 0.44) 50%, rgba(8, 41, 19, 0.92) 100% );
}

/* Subtle dot grid (IDEO-inspired architectural texture) */
.tv-home-hero__grid {
  position: absolute;
  inset: 0;
  z-index: 2;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.032) 1px, transparent 1px);
  background-size: 52px 52px;
  pointer-events: none;
}

/* Decorative SVG circle motif */
.tv-home-hero__deco {
  position: absolute;
  right: 5%;
  top: 12%;
  opacity: 0.055;
  pointer-events: none;
  z-index: 2;
}

/* Spacer for fixed nav */
.tv-home-hero__spacer {
  height: var(--tv-nav-height);
}

/* Content */
.tv-home-hero__content {
  position: relative;
  z-index: 3;
  padding-top: clamp(4rem, 8vw, 7rem);
}

/* Pill label */
.tv-home-hero__pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: var(--tv-radius-full);
  padding: 0.4rem 0.95rem;
  font-size: var(--tv-text-xs);
  font-weight: 500;
  letter-spacing: var(--tv-tracking-wide);
  color: rgba(255, 255, 255, 0.68);
  margin-bottom: 1.75rem;
}

/* Hero headline */
.tv-home-hero__title {
  font-size: clamp(2.8rem, 6vw, 5.5rem);
  font-weight: 300;
  color: var(--tv-white);
  max-width: 860px;
  letter-spacing: var(--tv-tracking-tight);
  line-height: 1.06;
  margin-bottom: 1.5rem;
}

.tv-home-hero__title em {
  font-style: italic;
  color: var(--tv-amber-300);
}
.tv-home-hero__title strong {
  font-weight: 600;
}

/* Description */
.tv-home-hero__desc {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.58);
  max-width: 560px;
  line-height: var(--tv-leading-loose);
  margin-bottom: 2.25rem;
}

/* CTA row */
.tv-home-hero__actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Scroll indicator */
.tv-home-hero__scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  color: rgba(255, 255, 255, 0.28);
  font-size: 0.62rem;
  letter-spacing: var(--tv-tracking-widest);
  text-transform: uppercase;
  z-index: 3;
}

/* ══════════════════════════════════════════════════════════════
 * PAGE HERO — Interior pages (About, Programs, etc.)
 * ══════════════════════════════════════════════════════════════ */
.tv-page-hero {
  position: relative;
  min-height: 62vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: 5rem;
  background-color: var(--tv-green-800);
  overflow: hidden;
}

/* Background image */
.tv-page-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.tv-page-hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.tv-page-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient( ellipse 80% 55% at 80% 20%, rgba(57, 173, 130, 0.08) 0%, transparent 60% ), linear-gradient( 180deg, rgba(6, 28, 19, 0.52) 0%, rgba(11, 63, 31, 0.85) 100% );
}

.tv-page-hero__grid {
  position: absolute;
  inset: 0;
  z-index: 2;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 52px 52px;
  pointer-events: none;
}

/* Large decorative letter (unique per page) */
.tv-page-hero__letter {
  position: absolute;
  right: -0.04em;
  top: 50%;
  transform: translateY(-52%);
  font-family: var(--tv-font-serif);
  font-size: min(42vw, 520px);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.026);
  line-height: 1;
  pointer-events: none;
  user-select: none;
  z-index: 2;
}

.tv-page-hero__spacer {
  height: var(--tv-nav-height);
}

.tv-page-hero__content {
  position: relative;
  z-index: 3;
  padding-top: clamp(3rem, 6vw, 5.5rem);
}

/* Breadcrumb */
.tv-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.73rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.38);
  margin-bottom: 1.5rem;
}

.tv-breadcrumb a {
  color: rgba(255, 255, 255, 0.48);
  transition: color var(--tv-duration-fast);
  text-decoration: none;
}

.tv-breadcrumb a:hover {
  color: rgba(255, 255, 255, 0.78);
}
.tv-breadcrumb__sep {
  opacity: 0.4;
}
.tv-breadcrumb__cur {
  color: rgba(255, 255, 255, 0.65);
}

/* Page hero label pill */
.tv-page-hero__pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--tv-radius-full);
  padding: 0.36rem 0.9rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: var(--tv-tracking-wider);
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
  margin-bottom: 1.5rem;
}

/* Title */
.tv-page-hero__title {
  font-size: clamp(2.6rem, 5.5vw, 5rem);
  font-weight: 300;
  color: var(--tv-white);
  max-width: 780px;
  letter-spacing: var(--tv-tracking-tight);
  line-height: 1.08;
  margin-bottom: 1.5rem;
}

.tv-page-hero__title em {
  font-style: italic;
  color: var(--tv-amber-300);
}

/* Subtitle */
.tv-page-hero__subtitle {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.55);
  max-width: 560px;
  line-height: var(--tv-leading-loose);
  margin-bottom: 1.75rem;
}

.tv-page-hero__actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ── Meta row (dot + text bullet list) ──────────────────────────────────── */
.tv-page-hero__meta {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
  margin-bottom: 2rem;
}

.tv-page-hero__meta-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.42);
}

.tv-page-hero__meta-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--tv-amber-400);
  flex-shrink: 0;
}

/* ── Stats row (big serif amber number + small label) ───────────────────── */
.tv-page-hero__stats {
  display: flex;
  gap: 2.5rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
  margin-bottom: 2rem;
}

.tv-page-hero__stat {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.tv-page-hero__stat-n {
  font-family: var(--tv-font-serif);
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--tv-amber-300);
  line-height: 1;
}

.tv-page-hero__stat-plus {
  font-size: 1rem;
  font-weight: 300;
  margin-left: 0.05em;
}

.tv-page-hero__stat-l {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.42);
  font-weight: 500;
  letter-spacing: 0.25px;
}

/* ══════════════════════════════════════════════════════════════
 * HOMEPAGE HERO — Two-column layout with image slider
 * Replaces single-column layout. Text left (55%), slider right (45%).
 * ══════════════════════════════════════════════════════════════ */

/* Override: flex-direction column, no justify-content: flex-end */
.tv-home-hero {
  justify-content: flex-start;
  padding-bottom: 0;
}

/* Background — gradient only (no bg image on hero itself) */
.tv-home-hero__bg {
  background: linear-gradient(
    135deg,
    #061c13 0%,
    #0c3d2e 40%,
    #1e7254 70%,
    #155740 100%
  );
}

/* Two-column body wrapper */
.tv-home-hero__body {
  display: grid;
  grid-template-columns: 55% 45%;
  gap: 4rem;
  align-items: center;
  padding-top: clamp(4rem, 7vw, 7rem);
  padding-bottom: 5.5rem;
  flex: 1;
  position: relative;
  z-index: 3;
}

/* Tighten max-width on text columns for two-col layout */
.tv-home-hero__title {
  max-width: 600px;
}
.tv-home-hero__desc {
  max-width: 540px;
}

/* ── Image slider panel ────────────────────────────────────── */
.tv-home-hero__slider {
  position: relative;
  width: 100%;
  height: 68vh;
  min-height: 400px;
  max-height: 580px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow:
    0 28px 72px rgba(0, 0, 0, 0.48),
    0 6px 20px rgba(0, 0, 0, 0.28);
  outline: 1px solid rgba(255, 255, 255, 0.08);
  align-self: flex-start;
  margin-top: 0;
}

/* Individual slides — all stacked, slide 1 on top.
   Default opacity:1 so the slide below is always visible behind the active one.
   Each animation fades the active slide OUT, revealing the one beneath — no gap. */
.tv-hero-slide {
  position: absolute;
  inset: 0;
  opacity: 1;
  will-change: opacity;
}

/* Slide 1 sits on top; each subsequent slide one level lower.
   When the top slide fades to 0 the next one is already there at opacity:1. */
.tv-hero-slide:nth-child(1) {
  z-index: 5;
}
.tv-hero-slide:nth-child(2) {
  z-index: 4;
}
.tv-hero-slide:nth-child(3) {
  z-index: 3;
}
.tv-hero-slide:nth-child(4) {
  z-index: 2;
}
.tv-hero-slide:nth-child(5) {
  z-index: 1;
}

/* CSS keyframe animations — 35s total loop, 7s per slide (6s visible + 1s fade)
   Percentages: 6/35 = 17%, 7/35 = 20%
   Hold at opacity:1, fade out, stay gone, return just before next cycle.
   The slide beneath is always visible so the transition is seamless. */
@keyframes tvHeroFade {
  0% {
    opacity: 1;
  }
  17% {
    opacity: 1;
  }
  20% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}
/* Slide 1 only: returns to opacity:1 at the end so it's ready when slide 5 fades. */
@keyframes tvHeroFade1 {
  0% {
    opacity: 1;
  }
  17% {
    opacity: 1;
  }
  20% {
    opacity: 0;
  }
  96% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

.tv-hero-slide:nth-child(1) {
  animation: tvHeroFade1 35s 0s linear infinite;
}
.tv-hero-slide:nth-child(2) {
  animation: tvHeroFade 35s 7s linear infinite;
}
.tv-hero-slide:nth-child(3) {
  animation: tvHeroFade 35s 14s linear infinite;
}
.tv-hero-slide:nth-child(4) {
  animation: tvHeroFade 35s 21s linear infinite;
}
.tv-hero-slide:nth-child(5) {
  animation: tvHeroFade 35s 28s linear infinite;
}

/* Background image layer with subtle Ken Burns zoom */
.tv-hero-slide__img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-color: var(--tv-green-800); /* fallback until ACF image set */
  animation: tvKenBurns 30s ease-in-out infinite alternate;
}
@keyframes tvKenBurns {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.06);
  }
}

/* Dark overlay — 22% keeps images from overpowering headline */
.tv-hero-slide__overlay {
  position: absolute;
  inset: 0;
  background: rgba(6, 28, 19, 0.22);
}

/* Caption strip at slide bottom */
.tv-hero-slide__cap {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  padding: 2.5rem 1.4rem 1.1rem;
  background: linear-gradient(
    0deg,
    rgba(6, 28, 19, 0.78) 0%,
    rgba(6, 28, 19, 0.28) 60%,
    transparent 100%
  );
}
.tv-hero-slide__cap strong {
  display: block;
  font-size: 0.76rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 0.04em;
  margin-bottom: 0.18rem;
}
.tv-hero-slide__cap span {
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.48);
}

/* Dot indicators */
.tv-hero-slider-dots {
  position: absolute;
  bottom: 1.1rem;
  right: 1.1rem;
  z-index: 10;
  display: flex;
  gap: 0.42rem;
  align-items: center;
}
.tv-hero-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.tv-hero-dot.is-active {
  width: 20px;
  border-radius: 3px;
  background: var(--tv-amber-400);
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .tv-home-hero__body {
    grid-template-columns: 1fr;
    gap: 3rem;
    padding-bottom: 6rem;
  }
  .tv-home-hero__slider {
    height: 55vw;
    max-height: 420px;
  }
  .tv-home-hero__title {
    max-width: none;
  }
  .tv-home-hero__desc {
    max-width: none;
  }
}

@media (max-width: 768px) {
  .tv-home-hero__pill {
    font-size: 0.85rem;
  }
}

@media (max-width: 768px) {
  .tv-breadcrumb {
    font-size: 0.85rem;
  }
}

@media (max-width: 768px) {
  .tv-home-hero__title {
    font-size: 2.4rem;
  }
  .tv-page-hero__title {
    font-size: 2.2rem;
  }
  .tv-home-hero__deco {
    display: none;
  }
  .tv-page-hero__letter {
    display: none;
  }
  .tv-home-hero {
    padding-bottom: 4rem;
  }
  .tv-page-hero {
    padding-bottom: 3.5rem;
    min-height: 55vh;
  }
  .tv-page-hero__stat-l {
    font-size: 0.88rem;
    letter-spacing: 0.25px;
  }
}

@media (max-width: 560px) {
  .tv-home-hero__slider {
    height: 78vw;
    max-height: 360px;
  }
}

@media (max-width: 480px) {
  .tv-home-hero__title {
    font-size: 2.6rem;
  }
  .tv-page-hero__title {
    font-size: 2.25rem;
  }
  .tv-home-hero__desc,
  .tv-page-hero__subtitle {
    font-size: 1.05rem;
    line-height: 1.55;
  }
}
