/* =====================================================
   Ram Kundan Lal Mahajan NGO — Stylesheet
   Palette: teal + saffron
   Cleaned up + tuned for an "app-like" feel in responsive view
   ===================================================== */

:root {
  /* Color tokens */
  --teal-950: #16302f;
  --teal-900: #1c3b3b;
  --teal-800: #234c49;
  --teal-700: #2c5f5a;
  --saffron-500: #e8952e;
  --saffron-600: #16302f;
  --saffron-100: #fbe6c6;
  --cream-100: #faf7f1;
  --cream-200: #f2ece0;
  --ink-900: #202826;
  --ink-600: #5a6663;
  --ink-300: #b9c1bf;
  --white: #ffffff;
  --line: #e5e0d4;

  /* Type */
  --font-display: "Poppins", "Segoe UI", sans-serif;
  --font-body: "Work Sans", "Segoe UI", sans-serif;

  /* Layout */
  --container: 1300px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-card: 0 14px 34px -18px rgba(20, 40, 38, 0.35);
  --transition: 220ms cubic-bezier(.4,0,.2,1);
  --drishti-logo-size: 250px;

  /* Safe-area insets for notched / gesture-nav phones, with fallback */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);

  /* Reliable "full screen height" on mobile browsers (URL bar aware) */
  --vh100: 100vh;
}
@supports (height: 100dvh) {
  :root { --vh100: 100dvh; }
}

/* Reset */
* { margin: 0; padding: 0; box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  height: 100%;
  overflow-x: hidden;
}
body {
  font-family: var(--font-body);
  color: var(--ink-900);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100%;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; touch-action: manipulation; }
ul { list-style: none; }
button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  touch-action: manipulation; /* removes the ~300ms tap delay on mobile browsers */
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--teal-900);
  line-height: 1.2;
  font-weight: 600;
}
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; width: 100%; }
section { padding: 88px 0; }
@media (max-width: 720px) { section { padding: 56px 0; } }

/* Focus visibility */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--saffron-500);
  outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

/* ---------- Eyebrow / labels ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--saffron-600);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--saffron-500);
  display: inline-block;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition);
  white-space: nowrap;
  min-height: 44px; /* comfortable tap target on touch devices */
}
.btn:active { transform: scale(0.96); } /* native-app tap feedback */
.btn-primary {
  background: var(--saffron-500);
  color: var(--white);
  box-shadow: 0 10px 24px -10px rgba(232, 149, 46, 0.65);
}
.btn-primary:hover { background: var(--saffron-600); transform: translateY(-2px); }
.btn-outline {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255,255,255,0.55);
}
.btn-outline:hover { background: rgba(255,255,255,0.12); border-color: var(--white); }
.btn-dark {
  background: var(--teal-900);
  color: var(--white);
}
.btn-dark:hover { background: var(--teal-800); transform: translateY(-2px); }
.btn-ghost-dark {
  background: transparent;
  color: var(--teal-900);
  border: 1.5px solid var(--line);
}
.btn-ghost-dark:hover { border-color: var(--teal-900); }
.btn-sm { padding: 10px 20px; font-size: 14px; min-height: 40px; }

.btn, .nav-links a, .nav-toggle, .gallery-tab, .curriculum-q, .carousel-nav, .ngal-nav, .footer-social a {
  -webkit-user-select: none;
  user-select: none;
}

/* =========================================================
   SITE LOADER / SPLASH SCREEN
   Shown on first paint: logo centered on the saffron brand
   background, spinner while assets load, then slides up to
   reveal the page (matches a native app cold-start screen).

   Pair with this tiny JS, once the page is ready:
     window.addEventListener('load', () => {
       document.querySelector('.site-loader')?.classList.add('is-hidden');
     });
   ========================================================= */
.site-loader {
  position: fixed;
  inset: 0;
  height: var(--vh100);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, var(--saffron-500), var(--saffron-600));
  transition: opacity 0.6s cubic-bezier(.77,0,.175,1), transform 0.6s cubic-bezier(.77,0,.175,1), visibility 0.6s;
  /* Fallback auto-dismiss: if no JS ever adds .is-hidden, this still
     lifts the overlay off the page after a couple seconds so it can
     never permanently block scrolling/taps underneath it. */
  animation: siteLoaderAutoHide 0.6s ease 2.2s forwards;
}
.site-loader.is-hidden {
  opacity: 0;
  transform: translateY(-6%);
  visibility: hidden;
  pointer-events: none;
}
@keyframes siteLoaderAutoHide {
  to {
    opacity: 0;
    transform: translateY(-6%);
    visibility: hidden;
    pointer-events: none;
  }
}
.site-loader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.site-loader-logo {
  width: 130px;
  height: auto;
  filter: drop-shadow(0 12px 26px rgba(0,0,0,0.25));
  animation: loaderPulse 1.5s ease-in-out infinite;
  background: var(--white);
  border-radius: 50%;
  padding: 14px;
}
.site-loader-ring {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.4);
  border-top-color: var(--white);
  animation: loaderSpin 0.9s linear infinite;
}
@keyframes loaderPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.06); opacity: 0.9; }
}
@keyframes loaderSpin {
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .site-loader-logo { animation: none; }
  .site-loader-ring { animation: none; }
}
@media (max-width: 560px) {
  .site-loader-logo { width: 96px; padding: 10px; }
  .site-loader-ring { width: 32px; height: 32px; }
}

/* =====================================================
   Splash Loader Overlay (Professional Slide-Up)
   Alternate splash treatment: static logo, no spinner,
   exits with a slide-up wipe instead of a fade. Kept as
   a separate option from .site-loader above — use one or
   the other on a given page, don't mix both on one page.
   Toggle by adding class="slide-up" once the page is ready.
   ===================================================== */
.splash-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--vh100);
  background-color: #ffffff;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  /* Smooth, professional easing for the slide-up effect */
  transition: transform 0.8s cubic-bezier(0.77, 0, 0.175, 1);
  /* Fallback auto-dismiss: if no JS ever adds .slide-up, this still
     lifts the overlay off the page after a couple seconds so it can
     never permanently block scrolling/taps underneath it. */
  animation: splashLoaderAutoHide 0.8s cubic-bezier(0.77, 0, 0.175, 1) 2.2s forwards;
}

/* This class pushes the loader up and out of the screen */
.splash-loader.slide-up {
  transform: translateY(-100%);
}
@keyframes splashLoaderAutoHide {
  to {
    transform: translateY(-100%);
    visibility: hidden;
    pointer-events: none;
  }
}

.splash-logo {
  width: 180px;
  height: auto;
  max-width: 60vw; /* keep it from crowding very narrow phones */
}
@keyframes splashPulse {
  0% { transform: scale(0.95); opacity: 0.9; }
  50% { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.9; }
}
@media (prefers-reduced-motion: reduce) {
  .splash-loader { transition: none; }
}
@media (max-width: 560px) {
  .splash-logo { width: 130px; }
}

/* =========================================================
   HEADER / NAV
   ========================================================= */

.site-header {
    background: var(--white);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--line);
    /* respect notch/status-bar area on iOS PWA / fullscreen contexts */
    padding-top: var(--safe-top);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1300px;
    width: 100%;
    margin: 0 auto;
    padding: 10px 35px;
    padding-left: max(35px, var(--safe-left));
    padding-right: max(35px, var(--safe-right));
    min-height: 120px;
}

/* Logo */
.brand {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
    min-width: 0; /* allow text to truncate instead of forcing overflow on tiny screens */
}

.brand img {
    max-height: 90px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.brand-text {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    min-width: 0;
}

.brand-text .full {
    display: block;
    font-size: 21px;
    font-weight: 700;
    color: var(--teal-900);
    white-space: normal;
    word-break: break-word;
}

.brand-text .tag {
    display: block;
     font-family: var(--font-display);
    font-size: 13px;
    letter-spacing: .06em;
    color: var(--saffron-600);
    text-transform: uppercase;
    margin-top: 4px;
    white-space: normal;
    word-break: break-word;
}

/* Navigation */
.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-left: auto;
    margin-right: 25px;
}

.nav-links a {
    font-size: 17px;
    font-weight: 600;
    color: var(--ink-600);
    position: relative;
    padding: 6px 0;
    transition: color var(--transition);
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
    color: var(--saffron-600);
}

.nav-links a[aria-current="page"]::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 2px;
    background: var(--saffron-500);
    border-radius: 2px;
}

/* Right Button */
.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-actions .btn-sm {
    padding: 10px 22px;
    font-size: 14px;
}

/* Mobile Toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;   /* full-size tap target, app-standard */
    height: 44px;
    padding: 6px;
    flex-shrink: 0;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--teal-900);
    border-radius: 2px;
    transition: transform var(--transition), opacity var(--transition);
}

/* Animated hamburger -> X when menu is open (pure CSS, no extra markup needed) */
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Dim + lock the page behind an open mobile menu, like a native drawer.
   Add class="menu-open" to <body> via JS when nav-toggle is expanded. */
body.menu-open { overflow: hidden; }
.nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 26, 25, 0.45);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition);
  z-index: 99;
}
body.menu-open .nav-backdrop { opacity: 1; visibility: visible; }

/* Mobile */
@media (max-width: 940px) {

    .site-header .container {
        min-height: 72px;
        padding: 8px 20px;
        padding-left: max(20px, var(--safe-left));
        padding-right: max(20px, var(--safe-right));
    }

        .brand img {
        max-height: 52px;
        flex-shrink: 0;
    }

    .brand {
        align-items: flex-start;
    }

        .brand-text .full {
        font-size: 15px;
        max-width: none;
        white-space: normal;
    }

    .brand-text .tag {
        font-size: 10px;
        max-width: none;
        white-space: normal;
    }

    .nav-links {
        position: fixed;
        top: var(--safe-top, 0px);
        right: 0;
        left: auto;
        width: min(84vw, 340px);
        height: calc(100% - var(--safe-top, 0px));
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        padding: 24px 24px;
        padding-top: max(24px, var(--safe-top));
        padding-bottom: max(24px, var(--safe-bottom));
        background: var(--white);
        border-left: 1px solid var(--line);
        box-shadow: -18px 0 40px -20px rgba(20,40,38,0.35);
        margin: 0;
        max-height: none;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        transform: translateX(100%);
        transition: transform 280ms cubic-bezier(.4,0,.2,1);
        z-index: 100;
    }

    .nav-links.open {
        display: flex;
        transform: translateX(0);
    }

    .nav-toggle {
        display: flex;
    }

    .nav-links a {
        width: 100%;
        padding: 14px 4px;
        font-size: 16px;
        border-bottom: 1px solid var(--cream-200);
    }

    .nav-links .header-actions {
      width: 100%;
      margin-top: 14px;
    }
    .nav-links .header-actions .btn { width: 100%; }

    .site-header .container {
        flex-wrap: nowrap;
        align-items: center;
        padding: 8px 16px;
    }

    /* header-actions (donate/member CTA) stays visible on mobile next to
       the hamburger — do not hide this container, the nav-toggle button
       may live inside it and would disappear too. */
    .header-actions {
        gap: 8px;
    }
    .header-actions .btn-sm {
        padding: 8px 14px;
        font-size: 12.5px;
    }
}
/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  color: var(--white);
  min-height: 78vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20,42,40,0.55), rgba(18,32,31,0.85)), var(--teal-900);
  background-size: cover;
  background-position: center;
  z-index: 0;
}
.hero-bg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; opacity: 0.55; }
.hero .container { position: relative; z-index: 1; text-align: center; max-width: 880px; }
.hero .eyebrow { color: var(--saffron-500); justify-content: center; }
.hero .eyebrow::before { display: none; }
.hero h1 {
  color: var(--white);
  font-size: clamp(34px, 5.4vw, 58px);
  font-weight: 700;
  margin-bottom: 20px;
}
.hero h1 em { color: var(--saffron-500); font-style: normal; }
.hero p {
  color: rgba(255,255,255,0.86);
  font-size: 17px;
  max-width: 640px;
  margin: 0 auto 32px;
}
.hero-ctas { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

@media (max-width: 960px) {
  .hero {
    min-height: auto;
    padding: 64px 0 56px;
  }
  .action-strip { margin-top: 20px; }
  .action-strip .container { grid-template-columns: 1fr; gap: 18px; }
}

@media (max-width: 760px) {
  .hero {
    padding: 48px 0 36px;
  }
  .hero .container {
    max-width: 100%;
    padding: 0 12px;
  }
  .hero p {
    font-size: 16px;
    margin-bottom: 28px;
  }
}

/* =========================================================
   MEMORIAL CARD
   ========================================================= */
.memorial-section {
  background: var(--cream-100);
  padding: 56px 0 88px;
}

.memorial-card {
  max-width: 980px;
  margin: 0 auto;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

.memorial-heading {
  padding: 48px 72px 0;
  text-align: center;
}

.memorial-heading .eyebrow {
  justify-content: center;
  margin-bottom: 16px;
}

.memorial-heading h2 {
  max-width: 720px;
  margin: 0 auto;
  font-size: clamp(30px, 4vw, 40px);
  line-height: 1.18;
}

.memorial-copy {
  padding: 26px 72px 0;
  color: var(--ink-600);
  font-size: 16px;
  line-height: 1.7;
}

.memorial-copy p {
  margin-bottom: 18px;
}

.memorial-copy strong {
  color: var(--ink-900);
  font-weight: 600;
}

.memorial-copy strong2 {
  color: var(--white);
  font-weight: 600;
}

.memorial-quote {
  margin: 30px 0 0;
  padding: 24px 32px;
  background: var(--teal-900);
  color: var(--white);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(18px, 2.3vw, 23px);
  line-height: 1.4;
}

@media (max-width: 760px) {
  .memorial-section {
    padding: 48px 0 56px;
  }

  .memorial-heading {
    padding: 36px 28px 0;
  }

  .memorial-copy {
    padding: 22px 28px 0;
    font-size: 15px;
  }

  .memorial-quote {
    padding: 20px 22px;
  }
}

@media (max-width: 560px) {
  .memorial-heading {
    padding: 30px 20px 0;
  }

  .memorial-heading h2 {
    font-size: 27px;
  }

  .memorial-copy {
    padding: 20px 20px 0;
    font-size: 14.5px;
    line-height: 1.65;
  }

  .memorial-copy p {
    margin-bottom: 16px;
  }

  .memorial-quote {
    margin-top: 24px;
    padding: 18px 16px;
    font-size: 17px;
  }
}

.partner-highlight {
  background: #f6fafc;
}
.partner-highlight .container {
  display: grid;
  place-items: center;
  text-align: center;
  padding: 0;
}
.partner-highlight-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 72px 0;
}
.partner-highlight .partner-label {
  display: none;
}
.partner-highlight h2 {
  font-size: clamp(32px, 4vw, 44px);
  margin-bottom: 18px;
  color: var(--teal-900);
}
.partner-highlight p {
  max-width: 680px;
  margin: 0 auto 34px;
  font-size: 17px;
  color: var(--ink-700);
}
.partner-card {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 100px;
  padding: 15px 15px;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-card);
  max-width: 100%;
}
.partner-card-icon {
  width: calc(var(--drishti-logo-size) * 0.9);
  height: calc(var(--drishti-logo-size) * 0.9);
  min-width: calc(var(--drishti-logo-size) * 0.9);
  border-radius: 0;
  background: var(--cream-100);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 8px;
}
.partner-card-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.partner-card h3 {
  margin: 0;
  font-size: 22px;
  color: var(--teal-900);
}
.partner-card p {
  margin: 4px 0 0;
  color: var(--ink-700);
  font-weight: 600;
}
.partner-highlight .btn {
  margin-top: 14px;
}
.doc-downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 24px;
}
.doc-downloads .btn {
  padding: 12px 22px;
}

/* Inner page hero (shorter banner) */
.page-hero {
  position: relative;
  color: var(--white);
  padding: 30px 0;
  overflow: hidden;
  min-height: 30px;
}
.page-hero-bg { position: absolute; inset: 0; background: var(--teal-900); z-index: 0; }
.page-hero-bg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.4; }
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { color: var(--white); font-size: clamp(28px, 4vw, 42px); }
.breadcrumb { font-size: 14px; color: var(--saffron-500); font-weight: 600; margin-top: 10px; }
.breadcrumb a { color: rgba(255,255,255,0.75); }
.breadcrumb a:hover { color: var(--white); }

/* =========================================================
   SERVICE / ACTION STRIP (Send Donation / Become Member / Send Donation)
   ========================================================= */
.action-strip {
  position: relative;
  z-index: 2;
  margin-top: -64px;
}
.action-strip .container { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; box-shadow: var(--shadow-card); border-radius: var(--radius-md); overflow: hidden; }
.action-card {
  padding: 34px 30px;
  color: var(--white);
  background: var(--teal-900);
}
.action-card.is-accent { background: var(--saffron-500); }
.action-card h3 { color: var(--white); font-size: 20px; margin-bottom: 10px; }
.action-card p { font-size: 14px; color: rgba(255,255,255,0.82); margin-bottom: 22px; }
.action-card .btn { background: var(--white); color: var(--teal-900); }
.action-card.is-accent .btn { background: var(--teal-900); color: var(--white); }
@media (max-width: 960px) { .action-strip .container { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .action-card { padding: 24px 20px; }
}

/* =========================================================
   ABOUT SNIPPET / SPLIT SECTION
   ========================================================= */

.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}
.split > * { min-width: 0; }

.split.reverse .split-media {
    order: 2;
}

.split-media {
    position: relative;
    display: inline-block;
    width: 100%;
}

.split-media img {
    width: 100%;
    height: auto;
    max-height: 520px;
    object-fit: cover;
    display: block;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
}

.split-media .badge {
    position: absolute;
    left: 24px;
    bottom: 24px;
    background: var(--saffron-500);
    color: var(--white);
    padding: 18px 22px;
    border-radius: var(--radius-md);
    box-shadow: 0 14px 30px rgba(0,0,0,.22);
    z-index: 5;
}

.split-media .badge .num {
    display: block;
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
}

.split-media .badge .lbl {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .06em;
    line-height: 1.2;
}

.split-body h2 {
    font-size: clamp(26px, 3.4vw, 36px);
    margin-bottom: 18px;
}

.split-body p {
    color: var(--ink-600);
    margin-bottom: 16px;
}

.split-body .btn {
    margin-top: 10px;
}

@media (max-width: 880px) {
    .split,
    .split.reverse {
        grid-template-columns: 1fr;
        gap: 36px;
    }
    .split.reverse .split-media { order: 0; }
    .split-media { margin-bottom: 0; }
    .split-media img { max-height: 420px; }
    .split-media .badge { left: 18px; bottom: 18px; padding: 14px 18px; }
    .split-media .badge .num { font-size: 22px; }
    .split-media .badge .lbl { font-size: 10px; }
}

/* =========================================================
   IMPACT COUNTERS
   ========================================================= */

.impact { background: var(--teal-900); color: var(--white); }
.impact-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 32px; text-align: center; }
.impact-item .counter {
  font-family: var(--font-display);
  font-size: clamp(32px,4.4vw,48px);
  font-weight: 700;
  color: var(--saffron-500);
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
}
.impact-item p { color: rgba(255,255,255,.8); font-size: 14.5px; margin-top: 6px; }
@media (max-width: 820px) { .impact-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 560px) { .impact-grid { grid-template-columns: repeat(2,1fr); gap: 22px; } }
@media (max-width: 380px) { .impact-grid { grid-template-columns: 1fr; } }

.impact-light { background: var(--cream-200); border-radius: var(--radius-lg); padding: 40px; }
.impact-light .impact-item .counter { color: var(--saffron-600); }
.impact-light .impact-item p { color: var(--ink-600); }

/* =========================================================
   PROGRAM CARDS
   ========================================================= */
.programs-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.program-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition);
}
.program-card:hover { transform: translateY(-6px); }
.program-card img { width: 100%; height: auto; max-height: 420px; object-fit: cover; display: block; }
.program-card-body { padding: 30px; }
.program-tag {
  display: inline-block;
  background: var(--saffron-100);
  color: var(--saffron-600);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.program-card h3 { font-size: 22px; margin-bottom: 10px; }
.program-card p { color: var(--ink-600); font-size: 14.5px; margin-bottom: 18px; }
.program-meta { display: flex; gap: 18px; font-size: 13.5px; color: var(--ink-600); margin-bottom: 20px; flex-wrap: wrap; }
.program-meta span { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--teal-800); }
@media (max-width: 820px) { .programs-grid { grid-template-columns: 1fr; } }

/* Curriculum accordion (Programs detail page) */
.curriculum { border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.curriculum-item { border-bottom: 1px solid var(--line); }
.curriculum-item:last-child { border-bottom: none; }
.curriculum-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 26px;
  text-align: left;
  background: var(--white);
  transition: background var(--transition);
  min-height: 44px;
}
.curriculum-q:hover { background: var(--cream-100); }
.curriculum-q .idx { color: var(--saffron-600); font-family: var(--font-display); font-weight: 700; margin-right: 10px; }
.curriculum-q .title { font-weight: 600; color: var(--teal-900); flex: 1; }
.curriculum-q .plus {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  position: relative;
  flex-shrink: 0;
}
.curriculum-q .plus::before, .curriculum-q .plus::after { content: ""; position: absolute; background: var(--teal-900); }
.curriculum-q .plus::before { width: 10px; height: 1.5px; }
.curriculum-q .plus::after { width: 1.5px; height: 10px; transition: transform var(--transition); }
.curriculum-item.open .plus::after { transform: rotate(90deg) scaleY(0); }
.curriculum-a { max-height: 0; overflow: hidden; transition: max-height var(--transition); background: var(--cream-100); }
.curriculum-item.open .curriculum-a { max-height: 340px; }
.curriculum-a-inner { padding: 4px 26px 22px 62px; color: var(--ink-600); font-size: 14.5px; }
.curriculum-a-inner p.todo { color: var(--saffron-600); font-style: italic; }

@media (max-width: 560px) {
  .curriculum-q { padding: 16px 18px; gap: 12px; }
  .curriculum-a-inner { padding: 4px 18px 18px 18px; }
}

/* =========================================================
   DRISHTI PARTNERSHIP BANNER
   ========================================================= */

.partner-banner {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  display: grid;
  grid-template-columns: 38% 62%;
  align-items: center;
  padding: 50px 60px;
  gap: 0;
}
.partner-banner > * { position: relative; z-index: 2; }
.partner-banner-bg { display: none; }

.partner-logos { display: flex; justify-content: center; align-items: center; padding-right: 50px; }
.partner-logos .plate { background: transparent; padding: 0; border: none; box-shadow: none; }
.partner-banner .partner-logos img { width: 200px; height: auto; display: block; }

.drishti-inline {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 30px 36px;
  border-radius: 16px;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  justify-content: center;
  margin-top: 26px;
  min-width: 380px;
}
.drishti-inline img { height: calc(var(--drishti-logo-size) * 0.60); width: auto; display: block; }
.drishti-inline span { color: var(--ink-900); font-weight: 700; font-size: 22px; }

@media (max-width: 720px) {
  .drishti-inline { padding: 16px 20px; min-width: 0; margin-top: 14px; }
  .drishti-inline img { height: calc(var(--drishti-logo-size) * 0.45); }
}

.partner-logos .x { display: none; }

#drishti .partner-logos { display: flex; align-items: center; justify-content: center; gap: 28px; }
#drishti .partner-logos .plate { background: transparent; padding: 0; border: none; box-shadow: none; }
#drishti .partner-logos .plate img { width: calc(var(--drishti-logo-size) * 0.9); height: auto; display: block; }
#drishti .partner-logos .x { display: flex; align-items: center; justify-content: center; font-size: 34px; color: var(--ink-600); font-weight: 700; }

.partner-banner { padding-left: 55px; }
.partner-banner .eyebrow { color: var(--saffron-600); margin-bottom: 14px; }
.partner-banner h2 { color: var(--teal-900); font-size: clamp(30px,3vw,38px); margin-bottom: 18px; }
.partner-banner p { color: var(--ink-600); font-size: 17px; line-height: 1.75; }

@media (max-width:900px) {
  .partner-banner { grid-template-columns: 1fr; padding: 40px 25px; }
  .partner-logos { border-right: none; border-bottom: 1px solid var(--line); padding: 0 0 30px; margin-bottom: 30px; }
  .partner-banner { padding-left: 0; text-align: center; }
  .partner-banner .partner-logos img { width: 180px; }
}

/* =========================================================
   GALLERY / CAROUSEL (tabbed carousel — gallery.html)
   ========================================================= */
.gallery-tabs { display: flex; gap: 12px; margin-bottom: 34px; flex-wrap: wrap; }
.gallery-tab {
  padding: 10px 22px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  font-weight: 600;
  font-size: 14px;
  color: var(--ink-600);
  transition: all var(--transition);
  min-height: 40px;
}
.gallery-tab.active, .gallery-tab:hover { background: var(--teal-900); color: var(--white); border-color: var(--teal-900); }

.carousel { position: relative; touch-action: pan-y; }
.carousel-track-wrap { overflow: hidden; border-radius: var(--radius-lg); box-shadow: var(--shadow-card); background: var(--cream-100); }
.carousel-track { display: flex; transition: transform 480ms cubic-bezier(.4,0,.2,1); }
.carousel-slide {
  min-width: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cream-100);
  padding: 18px;
}
.carousel-slide img {
  width: auto;
  max-width: 100%;
  max-height: 600px;
  height: auto;
  object-fit: contain;
  object-position: center;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  display: block;
  margin: 0 auto;
}
.carousel-caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 22px 28px;
  background: linear-gradient(0deg, rgba(20,40,38,0.82), transparent);
  color: var(--white);
  font-weight: 600;
}
.carousel-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: var(--shadow-card);
  display: flex; align-items: center; justify-content: center;
  color: var(--teal-900);
  font-size: 18px;
  z-index: 3;
  transition: background var(--transition), color var(--transition);
}
.carousel-nav:hover { background: var(--saffron-500); color: var(--white); }
.carousel-prev { left: 18px; }
.carousel-next { right: 18px; }
.carousel-dots { display: flex; gap: 8px; justify-content: center; margin-top: 20px; }
.carousel-dots button { width: 9px; height: 9px; border-radius: 50%; background: var(--line); transition: background var(--transition), width var(--transition); }
.carousel-dots button.active { background: var(--saffron-500); width: 24px; border-radius: 999px; }

.gallery-panel { display: none; }
.gallery-panel.active { display: block; }

@media (max-width: 640px) {
  .carousel-slide { padding: 12px; }
  .carousel-slide img { max-height: 300px; }
  .carousel-nav { width: 38px; height: 38px; font-size: 15px; }
}

/* =========================================================
   NEW GALLERY (auto-sliding, fade carousel)
   ========================================================= */
.ngal-carousel { position: relative; width: 100%; border-radius: var(--radius-lg); touch-action: pan-y; }
.ngal-track-wrap {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--cream-100);
  box-shadow: var(--shadow-card);
  min-height: 220px;
  padding: 14px;
}
.ngal-slide { display: none; width: 100%; }
.ngal-slide.active { display: block; animation: ngalFadeIn 0.9s ease; }
.ngal-slide img {
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: contain;
  object-position: center;
  display: block;
  margin: 0 auto;
  border-radius: var(--radius-md);
}
@keyframes ngalFadeIn { from { opacity: 0; } to { opacity: 1; } }
.ngal-dots { display: flex; justify-content: center; gap: 8px; margin-top: 14px; }
.ngal-dots button { width: 10px; height: 10px; border-radius: 50%; border: none; background: var(--line); cursor: pointer; padding: 0; position: relative; }
.ngal-dots button::after { content: ""; position: absolute; inset: -14px; }
.ngal-dots button.active { background: var(--saffron-500); }
.ngal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(20,40,38,0.55);
  color: var(--white);
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}
.ngal-nav:hover { background: var(--saffron-500); }
.ngal-prev { left: 24px; }
.ngal-next { right: 24px; }

@media (max-width: 640px) {
  .ngal-track-wrap { min-height: 170px; padding: 8px; }
  .ngal-slide img { max-height: 260px; }
  .ngal-nav { width: 38px; height: 38px; font-size: 17px; }
  .ngal-prev { left: 14px; }
  .ngal-next { right: 14px; }
}

/* =========================================================
   TESTIMONIAL / CTA STRIP
   ========================================================= */
.cta-band {
  background: var(--saffron-500);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 50px 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
}
.cta-band h2 { color: var(--white); font-size: 26px; max-width: 480px; }
.cta-band .btn-dark:hover { background: var(--teal-950); }
@media (max-width: 760px) {
  .cta-band { padding: 30px 24px; flex-direction: column; align-items: stretch; }
  .cta-band h2 { max-width: 100%; font-size: 22px; }
}

/* =========================================================
   CONTACT PAGE
   ========================================================= */
.contact-wrap { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 0; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-card); }
.contact-info { background: var(--teal-900); color: var(--white); padding: 52px 44px; }
@media (max-width: 900px) {
  .contact-info, .contact-form-panel { padding: 34px 24px; }
  .contact-info h2 { font-size: 26px; }
  .contact-info-ctas { gap: 10px; }
}
.contact-info .eyebrow { color: var(--saffron-500); }
.contact-info h2 { color: var(--white); font-size: 30px; margin-bottom: 14px; }
.contact-info > p { color: rgba(255,255,255,0.78); margin-bottom: 34px; font-size: 15px; }
.contact-item { display: flex; gap: 16px; margin-bottom: 26px; }
.contact-item .icon {
  width: 44px; height: 44px; flex-shrink: 0;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--saffron-500);
  font-size: 18px;
}
.contact-item .lbl { font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.05em; color: rgba(255,255,255,0.6); margin-bottom: 3px; }
.contact-item .val { font-weight: 600; }
.contact-item .val a:hover { color: var(--saffron-500); }
.contact-info-ctas { display: flex; gap: 12px; margin-top: 36px; flex-wrap: wrap; }

.contact-form-panel { background: var(--cream-100); padding: 52px 44px; }
.contact-form-panel h3 { font-size: 22px; margin-bottom: 6px; }
.contact-form-panel > p { color: var(--ink-600); margin-bottom: 28px; font-size: 14.5px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.form-field { display: flex; flex-direction: column; gap: 8px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { font-size: 13px; font-weight: 600; color: var(--teal-900); }
.form-field input, .form-field select, .form-field textarea {
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  font-family: var(--font-body);
  font-size: 14.5px;
  background: var(--white);
  transition: border-color var(--transition);
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: var(--saffron-500); outline: none; }
.form-field textarea { resize: vertical; min-height: 120px; }
.contact-form-panel .btn { width: 100%; margin-top: 6px; }
@media (max-width: 900px) {
  .contact-wrap { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
}

/* iOS Safari auto-zooms any input under 16px on focus — force 16px on small screens */
@media (max-width: 560px) {
  .form-field input, .form-field select, .form-field textarea { font-size: 16px; }
}

.map-section { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-card); }
.map-section iframe { width: 100%; height: 420px; border: 0; display: block; }
.map-note { font-size: 13px; color: var(--ink-600); background: var(--cream-200); padding: 12px 18px; border-top: 1px solid var(--line); }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  background: var(--teal-950);
  color: rgba(255,255,255,0.75);
  padding-bottom: var(--safe-bottom); /* clears home-indicator area on iOS */
}
.footer-top { padding: 64px 0 40px; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; }
.footer-brand .brand-text .full { color: var(--white); }
.footer-brand p { margin: 16px 0 20px; font-size: 14px; line-height: 1.7; max-width: 320px; }
.footer-col h4 { color: var(--white); font-size: 15px; margin-bottom: 18px; }
.footer-col ul li { margin-bottom: 12px; }
.footer-col a { font-size: 14px; transition: color var(--transition); }
.footer-col a:hover { color: var(--saffron-500); }
.footer-social { display: flex; gap: 10px; margin-top: 18px; }
.footer-social a {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition), border-color var(--transition);
}
.footer-social a:hover { background: var(--saffron-500); border-color: var(--saffron-500); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding: 22px 0;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; flex-wrap: wrap; gap: 10px;
}
@media (max-width: 820px) { .footer-top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-top { grid-template-columns: 1fr; } .footer-bottom { flex-direction: column; align-items: flex-start; gap: 8px; } }

/* =========================================================
   MISC PAGE-SPECIFIC BLOCKS
   ========================================================= */
.section-head { max-width: 640px; margin: 0 auto 48px; text-align: center; }
.section-head p { color: var(--ink-600); margin-top: 12px; }
.section-head.left { margin-left: 0; text-align: left; }

.value-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.value-card { background: var(--cream-100); border-radius: var(--radius-md); padding: 32px 28px; border: 1px solid var(--line); }
.value-card .icon { width: 52px; height: 52px; border-radius: 14px; background: var(--saffron-100); color: var(--saffron-600); display: flex; align-items: center; justify-content: center; font-size: 22px; margin-bottom: 18px; }
.value-card h3 { font-size: 18px; margin-bottom: 8px; }
.value-card p { color: var(--ink-600); font-size: 14.5px; }
@media (max-width: 820px) { .value-grid { grid-template-columns: 1fr; } }

.timeline { border-left: 2px solid var(--line); padding-left: 30px; display: flex; flex-direction: column; gap: 34px; }
.timeline-item { position: relative; }
.timeline-item::before {
  content: ""; position: absolute; left: -37px; top: 4px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--saffron-500); border: 3px solid var(--cream-200);
}
.timeline-item .yr { font-family: var(--font-display); color: var(--saffron-600); font-weight: 700; font-size: 14px; }
.timeline-item h4 { margin: 4px 0 6px; }
.timeline-item p { color: var(--ink-600); font-size: 14.5px; }

.bg-cream { background: var(--cream-200); }

.placeholder-note {
  font-size: 12.5px;
  color: var(--saffron-600);
  background: var(--saffron-100);
  border-radius: 6px;
  padding: 6px 10px;
  display: inline-block;
  margin-top: 8px;
}

/* =========================================================
   RESPONSIVE BREAKPOINTS — general tuning
   ========================================================= */
@media (max-width: 760px) {
  .container { padding: 0 18px; }
  section { padding: 48px 0; }
  .hero h1 { font-size: clamp(28px, 8vw, 42px); }
  .hero p, .partner-highlight p, .section-head p, .contact-info > p { font-size: 15px; }
  .partner-card { flex-direction: column; gap: 24px; }
  .partner-card-icon { width: 180px; height: 180px; min-width: unset; }
  .cta-band { padding: 30px 20px; }
  .cta-band h2 { font-size: 22px; }
  .contact-info, .contact-form-panel { padding: 34px 20px; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .split-body,
  .split-media { min-width: 0; }
  .split-body p,
  .split-body h2,
  .quote-block,
  .quote-block b { max-width: 100%; overflow-wrap: anywhere; }
}

@media (max-width: 560px) {
  section { padding: 40px 0; }
  .site-header .container { padding: 8px 14px; justify-content: space-between; }
  .brand img { max-height: 46px; }
  .brand-text .full { font-size: 14.5px; }
  .brand-text .tag { font-size: 9.5px; }
  .hero { min-height: auto; }
  .hero .container { padding: 0 10px; }
  .hero-ctas { flex-direction: column; }
  .hero-ctas .btn { width: 100%; }
  .page-hero { padding: 22px 0; }
  .page-hero .container { padding: 0 12px; }
  .action-card { padding: 22px 16px; }
  .contact-info .contact-item { flex-direction: column; align-items: flex-start; }
  .contact-info .contact-item .icon { margin-bottom: 10px; }
  .contact-info-ctas { flex-direction: column; }
  .contact-info-ctas .btn { width: 100%; }
  .contact-form-panel { padding: 28px 18px; }
  .form-row { gap: 14px; }
  .footer-top { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: stretch; gap: 10px; }
  .footer-social { flex-wrap: wrap; }
  .program-tag { font-size: 12px; padding: 5px 10px; }
  .name-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .name-row span {
    max-width: 100%;
    padding-right: 0;
    overflow-wrap: anywhere;
  }
  .name-row span:not(:last-child)::after { display: none; }
  .quote-block {
    padding: 16px 16px 16px 20px;
  }
  .quote-block b {
    display: block;
    font-size: 15px;
  }
  .partner-banner {
    padding: 28px 18px;
  }
  #drishti .partner-logos {
    gap: 14px;
    flex-wrap: wrap;
  }
  #drishti .partner-logos .plate img {
    width: min(34vw, 130px);
  }
  #drishti .partner-logos .x { font-size: 24px; }
  .footer-brand .brand {
    max-width: 100%;
  }
  .footer-brand .brand-text .full {
    overflow-wrap: anywhere;
  }
}

/* Note: full-width stacked buttons are scoped to hero/contact/action
   groups above rather than every .btn — icon or inline buttons
   elsewhere (nav, cards) should stay their natural width. */

/* =========================================================
   VERY SMALL / COMPACT PHONES (≤380px, e.g. iPhone SE, older Androids)
   ========================================================= */
@media (max-width: 380px) {
  .container { padding: 0 14px; }
  .hero h1 { font-size: 26px; }
  .hero p { font-size: 14px; }
  .btn { padding: 12px 20px; font-size: 14px; }
  .brand-text .full { font-size: 13px; }
  .brand-text .tag { font-size: 9px; }
  .action-card h3 { font-size: 18px; }
  .program-card-body { padding: 20px; }
  .partner-card { padding: 20px; }
  .partner-card-icon { width: 140px; height: 140px; }
  .drishti-inline { min-width: 0; padding: 14px 16px; }
  .ngal-track-wrap { min-height: 140px; padding: 6px; }
  .ngal-slide img { max-height: 190px; }
}

/* =========================================================
   LANDSCAPE PHONES (short viewport height — keep hero from
   pushing content off-screen like a native app would handle it)
   ========================================================= */
@media (max-height: 480px) and (orientation: landscape) {
  .hero { min-height: auto; padding: 60px 0 40px; }
  section { padding: 40px 0; }
  .nav-links { width: min(60vw, 320px); }
}

/* =========================================================
   TABLET RANGE (arguably the most-broken zone in "responsive
   view" testing — sits between the desktop grid and the phone
   drawer nav). Tightens spacing so 2/3/4-col grids don't feel
   like a squeezed desktop layout.
   ========================================================= */
@media (min-width: 561px) and (max-width: 940px) {
  .container { padding: 0 22px; }
  .value-grid { grid-template-columns: repeat(2, 1fr); }
  .impact-grid { grid-template-columns: repeat(2, 1fr); }
  .programs-grid { grid-template-columns: 1fr; gap: 24px; }
  .partner-banner { padding: 40px 34px; }
  .contact-wrap { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
}
