/* =============================================
   AMFE - Homepage Styles (Complete + Upgraded)
   ============================================= */

:root {
  --green-dark: #2d5a3d;
  --green-mid: #3d7a52;
  --green-light: #e8f3ec;
  --text-dark: #1f2d1f;
  --text-muted: #6b6b6b;
  --border: #e6e6e6;
}

/* =========================
   NAVBAR
========================= */
.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 2px solid var(--green-dark);
  flex-shrink: 0;
}
.brand-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* =========================
   SHARED UTILITIES
========================= */
.section-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--green-dark);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
  display: block !important;
  text-align: center;
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.9rem;
  text-align: center;
  color: var(--text-dark);
  margin-bottom: 32px;
}

.about-section,
.vm-section,
.values-section,
.programs-section,
.gallery-section,
.timeline-section,
.awards-section {
  padding: 0 0 48px;
}

/* =========================
   BUTTONS
========================= */
.btn-primary-green {
  background: var(--green-dark);
  color: #fff;
  padding: 10px 18px;
  border-radius: 6px;
  text-decoration: none;
  transition: 0.3s ease;
  display: inline-block;
  font-size: 14px;
}
.btn-primary-green:hover {
  background: var(--green-mid);
  color: #fff;
}

.btn-outline-green {
  border: 2px solid var(--green-dark);
  color: var(--green-dark);
  padding: 10px 18px;
  border-radius: 6px;
  text-decoration: none;
  transition: 0.3s ease;
  display: inline-block;
  font-size: 14px;
}
.btn-outline-green:hover {
  background: var(--green-dark);
  color: #fff;
}

/* =========================
   1. HERO SECTION
========================= */
.hero-section {
  background: #fff;
  border-radius: 16px;
  margin: 24px 0;
  padding: 60px 56px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.05);
}

.hero-section h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.25;
}

.hero-subtitle {
  font-size: 13px;
  font-weight: 600;
  color: var(--green-dark);
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.hero-location {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.hero-description {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 28px;
}

.hero-img-wrap {
  background: var(--green-light);
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  display: flex;
}
.hero-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* =========================
   2. ABOUT SECTION
========================= */
.about-wrapper {
  background: #fff;
  border-radius: 16px;
  padding: 48px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.05);
  display: flex;
  gap: 48px;
  align-items: flex-start;
}

.about-text { flex: 1; min-width: 0; }

.about-text h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.9rem;
  color: var(--text-dark);
  margin-bottom: 16px;
}

.about-text p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 12px;
  text-align: justify;
}

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  min-width: 260px;
  flex-shrink: 0;
  align-self: center;
}

/* All homepage stat-card rules are scoped to .about-stats so they don't
   leak into the portal pages (admin/farmer/entrepreneur) which also use
   .stat-card / .stat-label with a different layout. */
.about-stats .stat-card:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  max-width: 50%;
  margin: 0 auto;
}

.about-stats .stat-card {
  background: #e8f3ec;
  border-radius: 12px;
  padding: 20px 12px;
  text-align: center;
  display: block;
  border: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: default;
}
.about-stats .stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(45,90,61,0.15);
}

.about-stats .stat-number {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--green-dark);
  line-height: 1.1;
  margin-bottom: 6px;
}

.about-stats .stat-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

/* =========================
   3. VISION & MISSION
========================= */
.vm-section h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.9rem;
  text-align: center;
  margin-bottom: 32px;
  color: var(--text-dark);
}

.vm-card {
  background: #fff;
  border-radius: 14px;
  padding: 28px 28px 24px;
  border: 1.5px solid var(--border);
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.vm-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 28px rgba(45,90,61,0.12);
}

.vm-icon {
  width: 52px;
  height: 52px;
  background: var(--green-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  transition: background 0.2s ease, transform 0.2s ease;
}
.vm-icon i {
  font-size: 22px;
  color: var(--green-dark);
}
.vm-card:hover .vm-icon {
  background: var(--green-dark);
  transform: scale(1.1);
}
.vm-card:hover .vm-icon i {
  color: #fff;
}

.vm-card h4 {
  font-weight: 700;
  font-size: 20px;
  margin-bottom: 12px;
}

.vm-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0;
  text-align: justify;
}

/* =========================
   4. CORE VALUES
   with leaf pattern background
========================= */
.values-section {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cpath d='M40 10 Q55 25 40 40 Q25 25 40 10Z' fill='%232d5a3d' fill-opacity='0.04'/%3E%3Cpath d='M15 45 Q25 55 15 65 Q5 55 15 45Z' fill='%232d5a3d' fill-opacity='0.03'/%3E%3Cpath d='M65 20 Q75 30 65 40 Q55 30 65 20Z' fill='%232d5a3d' fill-opacity='0.03'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 80px 80px;
  padding-top: 48px;
  padding-bottom: 48px;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 12px;
}

.value-card {
  background: #fff;
  border-radius: 14px;
  padding: 20px 10px;
  text-align: center;
  border: 1.5px solid var(--border);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.value-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 28px rgba(45,90,61,0.12);
  border-color: var(--green-mid);
}

.value-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--green-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  transition: background 0.2s ease, transform 0.2s ease;
}
.value-icon i {
  font-size: 22px;
  color: var(--green-dark);
}
.value-card:hover .value-icon {
  background: var(--green-dark);
  transform: scale(1.1);
}
.value-card:hover .value-icon i {
  color: #fff;
}

.value-card h6 {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0;
  line-height: 1.4;
}

/* =========================
   5. PROGRAMS
   with dot pattern background
========================= */
.programs-section {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Ccircle cx='20' cy='20' r='3' fill='%232d5a3d' fill-opacity='0.05'/%3E%3Ccircle cx='80' cy='60' r='5' fill='%232d5a3d' fill-opacity='0.04'/%3E%3Cpath d='M60 10 Q70 20 60 30 Q50 20 60 10Z' fill='%232d5a3d' fill-opacity='0.04'/%3E%3Cpath d='M10 70 Q20 80 10 90 Q0 80 10 70Z' fill='%232d5a3d' fill-opacity='0.03'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 100px 100px;
  padding-top: 48px;
  padding-bottom: 48px;
}

.program-card {
  background: #fff;
  border-radius: 14px;
  padding: 22px 16px;
  text-align: center;
  border: 1.5px solid var(--border);
  height: 100%;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.program-card:hover {
  transform: translateY(-5px);
  border-color: var(--green-mid);
  box-shadow: 0 10px 28px rgba(45,90,61,0.12);
}

.program-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--green-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  transition: background 0.2s ease, transform 0.2s ease;
}
.program-icon i {
  font-size: 22px;
  color: var(--green-dark);
}
.program-card:hover .program-icon {
  background: var(--green-dark);
  transform: scale(1.1);
}
.program-card:hover .program-icon i {
  color: #fff;
}

.program-card h6 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 6px;
}

.program-card p {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

/* =========================
   CTA BANNER
========================= */
.cta-banner {
  background: #dcebdd;
  width: 100vw;
  margin-inline: calc(50% - 50vw);
  padding: clamp(32px, 4vw, 64px) 0;
  text-align: center;
  margin-bottom: 48px;
  border-radius: 0;
  position: relative;
  overflow: hidden;
}
.cta-banner > .container {
  position: relative;
  z-index: 1;
  width: min(100% - (2 * var(--page-gutter)), 900px);
  max-width: 900px;
  margin-inline: auto;
  padding-inline: 0;
}
.cta-banner::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: clamp(120px, 13vw, 220px); height: clamp(120px, 13vw, 220px);
  border-radius: 50%;
  background: rgba(45,90,61,0.06);
  pointer-events: none;
}
.cta-banner::after {
  content: '';
  position: absolute;
  bottom: -100px; left: -60px;
  width: clamp(145px, 16vw, 260px); height: clamp(145px, 16vw, 260px);
  border-radius: 50%;
  background: rgba(45,90,61,0.06);
  pointer-events: none;
}

.cta-banner h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  color: var(--text-dark);
  margin-bottom: 8px;
  position: relative;
}
.cta-banner p {
  font-size: 15px;
  color: var(--green-dark);
  max-width: 520px;
  margin: 0 auto 20px;
  line-height: 1.55;
  position: relative;
}
.cta-btns {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  position: relative;
}
.btn-cta-white {
  background: var(--green-dark);
  color: #fff;
  padding: 10px 22px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  display: inline-block;
  transition: 0.2s ease;
}
.btn-cta-white:hover {
  background: var(--green-mid);
  color: #fff;
}
.btn-cta-outline {
  border: 2px solid var(--green-dark);
  color: var(--green-dark);
  padding: 10px 22px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  display: inline-block;
  transition: 0.2s ease;
}
.btn-cta-outline:hover {
  background: var(--green-dark);
  color: #fff;
}

/* =========================
   6. PHOTO GALLERY (see NEW FEATURE 2 block below for carousel styles)
========================= */

/* =========================
   7. TIMELINE (base - overridden below)
========================= */
.timeline-wrapper {
  position: relative;
  padding-left: 40px;
  border-left: 3px solid var(--green-light);
  max-width: 720px;
  margin: 0 auto;
}

.timeline-item {
  position: relative;
  margin-bottom: 36px;
  padding-left: 8px;
}
.timeline-item:last-child { margin-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: -49px;
  top: 4px;
  width: 16px;
  height: 16px;
  background: var(--green-dark);
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px var(--green-dark);
}

.timeline-year {
  font-size: 12px;
  font-weight: 800;
  color: var(--green-dark);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.timeline-content h5 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 4px;
}
.timeline-content p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0;
}

/* =========================
   8. AWARDS & RECOGNITION
========================= */
.awards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 720px;
  margin: 0 auto;
}

.award-card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  border: 1.5px solid var(--border);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.award-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.1);
}
.award-card img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  background: var(--green-light);
}
.award-info {
  padding: 16px;
  text-align: center;
}
.award-info h5 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 4px;
}
.award-info p {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

/* =========================
   FOOTER
========================= */
footer {
  background: var(--green-dark);
  color: #fff;
  padding: 40px 20px 24px;
}
footer h5 { font-weight: 700; margin-bottom: 6px; }
footer p  { font-size: 13px; opacity: 0.85; margin-bottom: 4px; }

.footer-divider {
  border-color: rgba(255,255,255,0.2);
  margin: 20px 0;
}
.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.footer-links a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.2s;
}
.footer-links a:hover { color: #fff; }
.footer-copy { font-size: 12px; opacity: 0.6; }

/* ==========================================
   RESPONSIVE — TABLETS (max 991px)
========================================== */
@media (max-width: 991px) {
  .hero-section { padding: 40px 30px; }
  .hero-section h1 { font-size: 2rem; text-align: center; }
  .hero-subtitle, .hero-location, .hero-description { text-align: center; }
  .hero-section .d-flex { justify-content: center; }

  .about-wrapper { flex-direction: column; padding: 32px 28px; gap: 28px; }
  .about-stats { min-width: unset; width: 100%; align-self: auto; }
  .about-text p { text-align: justify; }

  .values-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ==========================================
   RESPONSIVE — MOBILE (max 768px)
========================================== */
@media (max-width: 768px) {
  .hero-section { margin: 12px 0; padding: 25px 20px; }
  .hero-section h1 { font-size: 1.7rem; line-height: 1.3; }
  .hero-image { width: 100%; height: auto; max-height: 300px; }

  .section-title { font-size: 1.5rem; }
  .vm-section h2 { font-size: 1.5rem; }
  .about-wrapper { padding: 24px 18px; }

  .values-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }

  .awards-grid { grid-template-columns: 1fr; }

  .cta-banner p { font-size: 13px; }
}

/* ==========================================
   RESPONSIVE — SMALL PHONES (max 576px)
========================================== */
@media (max-width: 576px) {
  .hero-section { padding: 20px 15px; margin: 8px 0; }
  .hero-section h1 { font-size: 1.4rem; }
  .hero-description { font-size: 13px; }
  .hero-section .d-flex { flex-direction: column; gap: 10px !important; }
  .btn-primary-green, .btn-outline-green { width: 100%; text-align: center; }

  .section-title { font-size: 1.4rem; }
  .stat-number { font-size: 1.4rem; }
  .values-grid { grid-template-columns: repeat(2, 1fr); }
  .program-card { padding: 16px 12px; }
  .vm-card p { font-size: 13px; }

  .footer-links { gap: 16px; }
}

@media (max-width: 479.98px) {
  .cta-btns {
    width: min(100%, 360px);
    margin-inline: auto;
    flex-direction: column;
  }
  .btn-cta-white,
  .btn-cta-outline { width: 100%; text-align: center; margin: 0; }
}

/* ==========================================
   RESPONSIVE — VERY SMALL (max 360px)
========================================== */
@media (max-width: 360px) {
  .hero-section h1 { font-size: 1.2rem; }
  .hero-description { font-size: 13px; }
  .section-title { font-size: 1.2rem; }
  .about-text h2 { font-size: 1.3rem; }
  .values-grid { grid-template-columns: repeat(2, 1fr); }
  .brand-icon { width: 40px; height: 40px; }
  .timeline-section .container { padding-left: 20px; padding-right: 18px; }
  .timeline-wrapper { padding-left: 20px; }
  .timeline-dot { left: -26px; width: 12px; height: 12px; }
  .timeline-content h5 { font-size: 13.5px; }
  .timeline-content p { font-size: 13px; }
}



/* ===========================================================
   NEW FEATURE 2 — "LIFE AT AMFE" GALLERY CAROUSEL
   Single image at a time, same fixed size for every photo,
   navigated with prev/next arrows (+ swipe, + dots).
=========================================================== */
.gallery-carousel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.gallery-viewport {
  flex: 0 1 640px;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  border-radius: 16px;
  outline: none;
}

.gallery-track {
  display: flex;
  transition: transform 0.45s cubic-bezier(0.22, 0.7, 0.3, 1);
}

.gallery-slide {
  flex: 0 0 100%;
  /* every photo gets the exact same frame size, matching the AMFE Farm shot */
  aspect-ratio: 16 / 10;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: var(--green-light);
}
.gallery-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.3, 1), filter 0.4s ease;
}
.gallery-slide:hover img {
  transform: scale(1.04);
  filter: brightness(0.7);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(180deg, rgba(45,90,61,0) 45%, rgba(20,40,28,0.7) 100%);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s ease, transform 0.35s ease;
  text-align: center;
  padding: 16px;
}
.gallery-slide:hover .gallery-overlay {
  opacity: 1;
  transform: translateY(0);
}
.gallery-overlay p {
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  margin: 0;
  letter-spacing: 0.3px;
}
.gallery-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
  transform: scale(0.85);
  transition: transform 0.3s ease, background 0.3s ease;
}
.gallery-slide:hover .gallery-icon {
  transform: scale(1);
  background: rgba(255,255,255,0.15);
}

.gallery-arrow {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: #fff;
  color: var(--green-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.gallery-arrow:hover:not(:disabled) {
  background: var(--green-dark);
  color: #fff;
  border-color: var(--green-dark);
  transform: scale(1.06);
}
.gallery-arrow:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.gallery-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}
.gallery-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: var(--border);
  padding: 0;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease, width 0.25s ease;
}
.gallery-dot.active {
  background: var(--green-dark);
  width: 22px;
  border-radius: 5px;
}

/* ── Lightbox — modern frosted-glass design ────────────────────────────── */
.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  background: rgba(6, 14, 9, 0.94);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s ease;
  padding: max(20px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  overflow: hidden;
  user-select: none;
}
.gallery-lightbox.open {
  opacity: 1;
  visibility: visible;
}
/* Hide scroll-to-top when lightbox is open */
body.lightbox-active .scroll-to-top-btn {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
/* Subtle ambient glow */
.lightbox-backdrop {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 50%, rgba(45,106,79,0.18) 0%, rgba(6,14,9,0.4) 70%, transparent 100%);
  z-index: 0;
}
/* ── Top bar ── */
.lightbox-topbar {
  width: 100%;
  max-width: 1200px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 12px;
  z-index: 10;
  pointer-events: auto;
}
.lightbox-brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #b7e4c7;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.lightbox-brand-pill i { font-size: 14px; color: #52b788; }
.lightbox-top-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.lightbox-shortcut-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  font-weight: 500;
}
.lightbox-shortcut-hint kbd {
  display: inline-block;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 700;
  font-family: inherit;
  color: #e2e8f0;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.lightbox-close {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.10);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fff;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16,1,0.3,1);
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}
.lightbox-close:hover {
  background: rgba(239,68,68,0.25);
  border-color: rgba(248,113,113,0.5);
  color: #fca5a5;
  transform: rotate(90deg) scale(1.05);
}
.lightbox-close:active { transform: rotate(90deg) scale(0.95); }
/* ── Stage: arrows + image ── */
.lightbox-stage {
  flex: 1;
  width: 100%;
  max-width: 1240px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  gap: clamp(14px, 2.5vw, 36px);
  padding: 8px 16px;
  min-height: 0;
  z-index: 5;
}
.lightbox-media-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  max-width: min(960px, calc(100vw - 160px));
  max-height: calc(100dvh - 190px);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 30px 80px -12px rgba(0,0,0,0.85), 0 0 0 1px rgba(255,255,255,0.12);
  background: #0d1710;
}
.gallery-lightbox img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100dvh - 190px);
  object-fit: contain;
  display: block;
  border-radius: 16px;
  cursor: pointer;
  transform: scale(0.96);
  transition: transform 0.28s cubic-bezier(0.16,1,0.3,1), opacity 0.2s ease;
  user-select: none;
}
.gallery-lightbox.open img { transform: scale(1); }
.gallery-lightbox img:hover { opacity: 0.96; }
/* ── Nav arrows ── */
.lightbox-arrow {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.10);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #fff;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  transition: all 0.22s cubic-bezier(0.16,1,0.3,1);
  user-select: none;
  touch-action: manipulation;
}
.lightbox-arrow:hover {
  background: rgba(45,106,79,0.75);
  border-color: rgba(116,198,157,0.6);
  color: #e8f5e9;
  transform: scale(1.08);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 0 20px rgba(82,183,136,0.3);
}
.lightbox-arrow:active { transform: scale(0.94); }
/* ── Bottom dock ── */
.lightbox-bottombar {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 4px 16px;
  z-index: 10;
  pointer-events: auto;
}
.lightbox-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background: rgba(16,32,22,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.15);
  box-shadow: 0 16px 40px rgba(0,0,0,0.5);
  border-radius: 999px;
  padding: 10px 28px;
  max-width: min(650px, 92vw);
}
.lightbox-info-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
.lightbox-caption {
  margin: 0;
  color: #f1faee;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.2px;
  line-height: 1.35;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 440px;
}
.lightbox-counter-pill {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(45,106,79,0.6);
  border: 1px solid rgba(116,198,157,0.4);
  color: #b7e4c7;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: 0.6px;
}
/* Dot indicators */
.lightbox-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.lightbox-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16,1,0.3,1);
}
.lightbox-dot:hover {
  background: rgba(255,255,255,0.6);
  transform: scale(1.2);
}
.lightbox-dot.active {
  width: 24px;
  border-radius: 10px;
  background: #52b788;
  box-shadow: 0 0 10px rgba(82,183,136,0.6);
}
/* ── Responsive overrides for Tablets / iPad ── */
@media (max-width: 991px) and (min-width: 768px) {
  .lightbox-stage {
    gap: clamp(12px, 2vw, 24px);
    padding: 8px 12px;
  }
  .lightbox-media-wrap {
    max-width: min(840px, calc(100vw - 140px));
    max-height: calc(100dvh - 190px);
  }
  .gallery-lightbox img {
    max-height: calc(100dvh - 190px);
  }
  .lightbox-arrow {
    width: 48px;
    height: 48px;
    font-size: 19px;
  }
}
/* ── Responsive overrides for Mobile Phones ── */
@media (max-width: 767px) {
  .gallery-lightbox {
    padding: max(12px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
  }
  .lightbox-topbar {
    padding: 2px 4px;
  }
  .lightbox-shortcut-hint {
    display: none;
  }
  .lightbox-close {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
  .lightbox-stage {
    gap: 0;
    padding: 6px 0;
    position: relative;
    width: 100%;
  }
  .lightbox-media-wrap {
    max-width: 100%;
    max-height: calc(100dvh - 175px);
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.1);
  }
  .gallery-lightbox img {
    max-width: 100%;
    max-height: calc(100dvh - 175px);
    border-radius: 14px;
  }
  .lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    font-size: 18px;
    background: rgba(10, 24, 15, 0.78);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-color: rgba(255, 255, 255, 0.28);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.5);
    z-index: 20;
  }
  .lightbox-arrow:hover {
    transform: translateY(-50%) scale(1.08);
    background: rgba(45, 106, 79, 0.85);
  }
  .lightbox-arrow:active {
    transform: translateY(-50%) scale(0.92);
  }
  .lightbox-arrow-prev {
    left: max(8px, env(safe-area-inset-left));
  }
  .lightbox-arrow-next {
    right: max(8px, env(safe-area-inset-right));
  }
  .lightbox-card {
    border-radius: 999px;
    padding: 8px 18px;
    width: auto;
    max-width: min(92vw, 480px);
    gap: 8px;
  }
  .lightbox-info-row {
    gap: 10px;
  }
  .lightbox-caption {
    font-size: 13.5px;
    max-width: calc(100vw - 120px);
  }
}
/* ── Responsive overrides for Short Viewports / Mobile Landscape ── */
@media (max-height: 520px) {
  .gallery-lightbox {
    padding: max(6px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  }
  .lightbox-topbar {
    padding: 0 4px;
  }
  .lightbox-brand-pill {
    display: none;
  }
  .lightbox-close {
    width: 34px;
    height: 34px;
    font-size: 14px;
  }
  .lightbox-stage {
    padding: 2px 0;
  }
  .lightbox-media-wrap,
  .gallery-lightbox img {
    max-height: calc(100dvh - 84px);
  }
  .lightbox-arrow {
    width: 38px;
    height: 38px;
    font-size: 16px;
  }
  .lightbox-bottombar {
    padding: 0 8px;
  }
  .lightbox-card {
    padding: 4px 14px;
    gap: 4px;
  }
  .lightbox-caption {
    font-size: 12px;
  }
}

/* ===========================================================
   NEW FEATURE 3 — TIMELINE SCROLL-FILL PROGRESS
   The vertical line + dots fill green as you scroll past them.
=========================================================== */
.timeline-wrapper {
  position: relative;
  padding-left: 40px;
  padding-right: 12px;
  max-width: 720px;
  margin: 0 auto;
  border-left: none;
}

/* track line (light) */
.timeline-wrapper::before {
  content: '';
  position: absolute;
  left: -3px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--green-light);
  border-radius: 4px;
}

/* progress line (fills green on scroll) */
.timeline-progress-line {
  position: absolute;
  left: -3px;
  top: 0;
  width: 3px;
  height: 0%;
  background: linear-gradient(180deg, var(--green-mid), var(--green-dark));
  border-radius: 4px;
  transition: height 0.15s linear;
  z-index: 1;
}

.timeline-dot {
  position: absolute;
  left: -49px;
  top: 4px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  border: 3px solid var(--green-light);
  box-shadow: 0 0 0 2px var(--border);
  transition: background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease, transform 0.4s ease;
  z-index: 2;
}
.timeline-dot.filled {
  background: var(--green-dark);
  border-color: #fff;
  box-shadow: 0 0 0 3px var(--green-dark), 0 0 14px rgba(45,90,61,0.45);
  transform: scale(1.15);
}

.timeline-content {
  padding-right: 4px;
}

/* ===========================================================
   NEW FEATURE 4 — PROGRAMS & SERVICES PAGED CAROUSEL
   Shows ~4 cards at a time on desktop, paged with arrow buttons.
   Viewport width is constrained so cards align with the container
   edge (same edge as Core Values cards above).
=========================================================== */
.programs-carousel {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.programs-viewport {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}

.programs-scroll-track {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 4px 2px 6px;
  cursor: grab;
  -webkit-overflow-scrolling: touch;
  user-select: none;

  /* Native scrollbar hidden — the custom .programs-progress-track below
     is the single scroll indicator, so we don't show two bars at once. */
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.programs-scroll-track::-webkit-scrollbar {
  display: none;
  height: 0;
}
.programs-scroll-track:active {
  cursor: grabbing;
}

.programs-scroll-track .program-card {
  flex: 0 0 calc(25% - 13.5px); /* 4 cards per view on desktop, matches gap math */
  scroll-snap-align: start;
}

.programs-arrow {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: #fff;
  color: var(--green-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.programs-arrow:hover:not(:disabled) {
  background: var(--green-dark);
  color: #fff;
  border-color: var(--green-dark);
  transform: scale(1.06);
}
.programs-arrow:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.programs-progress-track {
  height: 4px;
  background: var(--green-light);
  border-radius: 4px;
  margin-top: 6px;
  overflow: hidden;
  max-width: 240px;
  margin-left: auto;
  margin-right: auto;
}
.programs-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--green-mid);
  border-radius: 4px;
  transition: width 0.2s ease;
}

/* ===========================================================
   RESPONSIVE OVERRIDES FOR NEW FEATURES
=========================================================== */

/* ---- Programs carousel: cards-per-view steps down with screen size ---- */
@media (max-width: 1199px) {
  .programs-scroll-track .program-card { flex-basis: calc(33.333% - 12px); } /* ~3 per view */
}

@media (max-width: 991px) {
  .programs-scroll-track .program-card { flex-basis: calc(33.333% - 12px); } /* ~3 per view */
  .programs-arrow { width: 38px; height: 38px; font-size: 15px; }
}

@media (max-width: 768px) {
  .timeline-section .container { padding-left: 28px; padding-right: 28px; }
  .timeline-wrapper { padding-left: 26px; padding-right: 4px; }
  .timeline-wrapper::before,
  .timeline-progress-line { left: -2px; }
  .timeline-dot { left: -34px; width: 14px; height: 14px; }
  .timeline-content { padding-right: 8px; }
  .timeline-content h5 { font-size: 14px; }
  .timeline-content p { font-size: 12.5px; }

  .programs-carousel { gap: 8px; }
  .programs-scroll-track { gap: 14px; }
  .programs-scroll-track .program-card { flex-basis: calc(50% - 7px); } /* ~2 per view */
  .programs-arrow { width: 36px; height: 36px; font-size: 14px; }

  .gallery-viewport { flex-basis: 100%; }
  .gallery-slide { aspect-ratio: 4 / 3; }
  .gallery-overlay p { font-size: 13px; }
  .gallery-icon { width: 36px; height: 36px; font-size: 14px; }
  .gallery-arrow { width: 38px; height: 38px; font-size: 15px; }
}

@media (max-width: 576px) {
  .timeline-section .container { padding-left: 22px; padding-right: 20px; }
  .timeline-wrapper { padding-left: 22px; padding-right: 2px; }
  .timeline-wrapper::before,
  .timeline-progress-line { left: -2px; }
  .timeline-dot { left: -29px; width: 13px; height: 13px; }
  .timeline-content { padding-right: 6px; }
  .timeline-item { padding-left: 4px; margin-bottom: 28px; }

  /* Show ~1.15 cards so it visually reads as swipeable, not a hidden grid */
  .programs-scroll-track .program-card { flex-basis: 84%; max-width: 270px; }
  .programs-carousel { gap: 6px; }
  .programs-arrow { width: 34px; height: 34px; font-size: 13px; }

  .gallery-carousel { gap: 8px; }
  .gallery-slide { aspect-ratio: 4 / 3; }
  .gallery-arrow { width: 34px; height: 34px; font-size: 14px; }
  .gallery-dots { margin-top: 12px; }
}

@media (hover: none) {
  /* touch devices: show captions without needing hover */
  .gallery-overlay {
    opacity: 1;
    transform: none;
    background: linear-gradient(180deg, rgba(45,90,61,0) 55%, rgba(20,40,28,0.72) 100%);
  }
  .gallery-slide img { filter: none; }
  .gallery-icon { display: none; }
}
