/* ============================================================
   NIVAM — UI Enhancements
   Shared styles for all 7 interactive enhancements.
   Do NOT modify existing variables, classes, or layout.
   ============================================================ */

/* ─────────────────────────────────────────────────────────────
   1. SCROLL PROGRESS BAR
   ───────────────────────────────────────────────────────────── */
#scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--clr-gold) 0%, var(--clr-green-mid) 100%);
  z-index: 9999;
  border-radius: 0 2px 2px 0;
  transition: width 0.08s linear;
  pointer-events: none;
  box-shadow: 0 0 8px rgba(242, 193, 46, 0.5);
}

/* ─────────────────────────────────────────────────────────────
   2. NAVBAR SCROLL BLUR (enhance existing .navbar--solid)
   ───────────────────────────────────────────────────────────── */
.navbar.enh-scrolled {
  backdrop-filter: blur(20px) saturate(200%);
  -webkit-backdrop-filter: blur(20px) saturate(200%);
  box-shadow: 0 2px 32px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(242,193,46,0.08);
}

/* ─────────────────────────────────────────────────────────────
   3. TRUST BAR — INFINITE MARQUEE
   ───────────────────────────────────────────────────────────── */
.trust-bar__inner.marquee-enabled {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  gap: 0;
  overflow: hidden;
  position: relative;
  /* Fade masks on left and right */
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    #000 10%,
    #000 90%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    #000 10%,
    #000 90%,
    transparent 100%
  );
}

.trust-bar__track {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  animation: marquee-scroll 38s linear infinite;
  white-space: nowrap;
  will-change: transform;
  flex-shrink: 0;
}

.trust-bar__inner.marquee-enabled:hover .trust-bar__track {
  animation-play-state: paused;
}

@keyframes marquee-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ─────────────────────────────────────────────────────────────
   4. PROGRAM CARDS — HOVER LIFT
   ───────────────────────────────────────────────────────────── */
.program-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease !important;
  cursor: pointer;
}

.program-card:hover {
  transform: translateY(-8px) !important;
  box-shadow: 0 20px 48px rgba(26, 107, 58, 0.18), 0 4px 16px rgba(0,0,0,0.10) !important;
}

/* ── programs.html detail card hover lift ── */
.program-detail {
  transition: box-shadow 0.3s ease;
  border-radius: var(--radius-xl);
}

/* ── Slide-up overlay on programs.html full detail cards ── */
.program-detail__visual {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
}

.program-detail__visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  border-radius: var(--radius-xl);
}

.program-detail:hover .program-detail__visual img {
  transform: scale(1.04);
}

/* ── .card generic hover lift ── */
.card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 40px rgba(26, 107, 58, 0.14), 0 4px 12px rgba(0,0,0,0.08);
}

/* ─────────────────────────────────────────────────────────────
   5. TIMELINE — VERTICAL ANIMATED
   ───────────────────────────────────────────────────────────── */
.timeline {
  position: relative;
  padding-left: 2.5rem;
  margin-top: var(--sp-6);
}

/*
  The .timeline container must NEVER be hidden by enh-reveal —
  each .timeline-item handles its own opacity/transform animation.
  Hiding the container causes a large invisible blank area.
*/
.timeline.enh-reveal,
.timeline.enh-reveal.enh-visible {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}


/* Vertical connecting line */
.timeline.timeline::before {
  content: '';
  position: absolute;
  left: 13px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--clr-gold), var(--clr-green), var(--clr-gold));
  border-radius: 2px;
  opacity: 1;
}

.timeline .timeline-item {
  display: block;
  position: relative;
  margin-bottom: var(--sp-5);
  padding-bottom: 0;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.timeline .timeline-item.timeline-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Dot marker */
.timeline .timeline-dot {
  position: absolute;
  left: -2.5rem;
  top: 6px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--grad-gold);
  border: 2px solid var(--clr-white);
  box-shadow: 0 0 0 2px var(--clr-gold), var(--shadow-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--clr-bg-darkest);
  z-index: 2;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline .timeline-item:hover .timeline-dot {
  transform: scale(1.15);
  box-shadow: 0 0 0 5px rgba(242, 193, 46, 0.3), var(--shadow-gold);
}

.timeline .timeline-dot .lucide-icon {
  width: 14px;
  height: 14px;
}

.timeline .timeline-body {
  background: var(--clr-white);
  border: 1px solid var(--clr-border-green);
  border-radius: var(--radius-md);
  padding: var(--sp-4) var(--sp-6);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.timeline .timeline-item:hover .timeline-body {
  box-shadow: var(--shadow-md);
  transform: translateX(4px);
}

.timeline .timeline-year {
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--clr-gold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--sp-1);
}

.timeline .timeline-title {
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--clr-green);
  margin-bottom: var(--sp-2);
}

.timeline .timeline-text {
  font-size: var(--fs-sm);
  color: var(--clr-text-muted-dark);
  line-height: 1.7;
}

/* ─────────────────────────────────────────────────────────────
   6. TESTIMONIALS — CAROUSEL
   ───────────────────────────────────────────────────────────── */
.testimonials-carousel-wrapper {
  position: relative;
  overflow: hidden;
  width: 100%;
}

.testimonials-track {
  display: flex;
  transition: transform 0.5s ease;
  will-change: transform;
}

.testimonials-track .testimonial-card {
  flex: 0 0 33.333%;
  min-width: 33.333%;
  box-sizing: border-box;
  padding: 0 var(--sp-3);
}

/* Carousel navigation arrows */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--clr-white);
  border: 2px solid var(--clr-border-green);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--clr-green);
  font-size: 1.2rem;
  z-index: 10;
  transition: all 0.2s ease;
}

.carousel-btn:hover {
  background: var(--clr-green);
  color: var(--clr-white);
  border-color: var(--clr-green);
  box-shadow: var(--shadow-md);
}

.carousel-btn--prev { left: -22px; }
.carousel-btn--next { right: -22px; }

/* Carousel dots */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: var(--sp-3);
  margin-top: var(--sp-8);
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--clr-border-green);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
}

.carousel-dot.active {
  background: var(--clr-gold);
  transform: scale(1.3);
  box-shadow: 0 0 8px rgba(242, 193, 46, 0.5);
}

/* Responsive: 1 card on mobile, 2 on tablet, 3 on desktop */
@media (max-width: 900px) {
  .testimonials-track .testimonial-card {
    flex: 0 0 50%;
    min-width: 50%;
  }
}

@media (max-width: 600px) {
  .testimonials-track .testimonial-card {
    flex: 0 0 100%;
    min-width: 100%;
  }
  .carousel-btn--prev { left: 0; }
  .carousel-btn--next { right: 0; }
}

/* ─────────────────────────────────────────────────────────────
   7. SECTION REVEAL — ENHANCED
   ───────────────────────────────────────────────────────────── */
.enh-reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.enh-reveal.enh-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered children */
.enh-stagger > * {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.55s var(--ease-out), transform 0.55s var(--ease-out);
}

.enh-stagger.enh-visible > *:nth-child(1) { transition-delay: 0ms;   opacity: 1; transform: translateY(0); }
.enh-stagger.enh-visible > *:nth-child(2) { transition-delay: 100ms; opacity: 1; transform: translateY(0); }
.enh-stagger.enh-visible > *:nth-child(3) { transition-delay: 200ms; opacity: 1; transform: translateY(0); }
.enh-stagger.enh-visible > *:nth-child(4) { transition-delay: 300ms; opacity: 1; transform: translateY(0); }
.enh-stagger.enh-visible > *:nth-child(5) { transition-delay: 400ms; opacity: 1; transform: translateY(0); }
.enh-stagger.enh-visible > *:nth-child(6) { transition-delay: 500ms; opacity: 1; transform: translateY(0); }
.enh-stagger.enh-visible > *:nth-child(n+7) { transition-delay: 600ms; opacity: 1; transform: translateY(0); }

/* ─────────────────────────────────────────────────────────────
   HERO COUNTER — ensure animated counters look right
   ───────────────────────────────────────────────────────────── */
.hero__stat-num {
  display: inline-block;
  min-width: 3ch;
}
