/* ======== COLOR PALETTE ======== */
/* Primary: #0141a2 (blue)
   Accent:  #F5B041 (gold)
   Accent2: #E4b691 (warm beige)
   White:   #FFFFFF
*/

/* ======== LENIS RECOMMENDED CSS ======== */
html.lenis, html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

.lenis.lenis-scrolling iframe {
  pointer-events: none;
}
/* ======================================= */

:root {
  --primary: #0141a2;
  --primary-soft: #e1ecff;
  --accent: #f5b041;
  --accent2: #e4b691;
  --text: #10223a;
  --muted: #5b6a80;
  --bg: #f5f7fb;
  --bg-card: #ffffff;
  --border-soft: #dde4f1;
  --shadow-soft: 0 16px 40px rgba(5, 25, 72, 0.08);

  --radius-lg: 1.4rem;
  --radius-md: 1rem;
  --radius-sm: 0.7rem;
  --radius-pill: 999px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #eef2fb 0%, #ffffff 45%, #f8fafc 100%);
}

a {
  color: var(--primary);
  text-decoration-skip-ink: auto;
}

a:hover {
  color: #002c73;
}

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

.main-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(214, 220, 236, 0.7);
  box-shadow: 0 4px 18px rgba(15, 35, 80, 0.06);
  transition: transform 0.22s ease-out, box-shadow 0.16s ease-out, background-color 0.16s ease-out;
}

.main-header.main-header--hidden {
  transform: translateY(-100%);
  box-shadow: none;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.55rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Brand */

.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: inherit;
}

.brand-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-name {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.03em;
}

.brand-tagline {
  font-size: 0.72rem;
  color: var(--muted);
}

/* NAV CORE */

.nav {
  margin-left: auto;
  display: flex;
  align-items: center;
}

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  font-size: 0.9rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-pill);
  color: var(--muted);
  transition: background-color 0.16s ease, color 0.16s ease,
    transform 0.1s ease;
}

.nav-links a:hover {
  background-color: rgba(1, 65, 162, 0.08);
  color: var(--primary);
  transform: translateY(-1px);
}

.nav-links a.active {
  background-color: rgba(1, 65, 162, 0.15);
  color: var(--primary);
  font-weight: 600;
}

/* Donate as special nav item */

.nav-donate {
  background-color: #f5b041;
  color: #000 !important;
  font-weight: 600;
  padding: 0.4rem 0.9rem;
  box-shadow: 0 6px 16px rgba(245, 176, 65, 0.4);
}

.nav-donate:hover {
  background-color: #eaa136;
}

/* LANGUAGE TOGGLE AS LAST NAV ITEM */

.nav-lang-item {
  margin-left: 0.4rem;
}

.lang-toggle {
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-soft);
  background-color: #ffffff;
  color: var(--muted);
  font-size: 0.8rem;
  padding: 0.18rem 0.65rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(10, 30, 70, 0.08);
}

.lang-toggle-label {
  font-weight: 500;
}

.lang-toggle-sep {
  color: var(--border-soft);
}

/* Active state based on html[data-lang] */

html[data-lang="en"] .lang-toggle-en {
  color: var(--primary);
}

html[data-lang="en"] .lang-toggle-hi {
  color: var(--muted);
  opacity: 0.7;
}

html[data-lang="hi"] .lang-toggle-hi {
  color: var(--primary);
}

html[data-lang="hi"] .lang-toggle-en {
  color: var(--muted);
  opacity: 0.7;
}

/* MOBILE NAV */

.nav-toggle {
  display: none;
  border: none;
  background: none;
  padding: 0.25rem;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background-color: var(--primary);
  margin: 3px 0;
}

@media (max-width: 950px) {
  .header-inner {
    padding-inline: 0.75rem;
  }

  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    margin-left: auto;
  }

  .nav {
    position: relative;
    margin-left: 0;
  }

  .nav-links {
    position: absolute;
    top: 46px;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.45rem;
    background-color: #ffffff;
    padding: 0.7rem 0.9rem;
    border-radius: 14px;
    min-width: 200px;
    box-shadow: 0 14px 36px rgba(10, 26, 60, 0.16);
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 0.16s ease, transform 0.16s ease;
  }

  .nav-links.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .nav-lang-item {
    margin-left: 0;
    margin-top: 0.3rem;
  }

  .nav-links a {
    width: 100%;
  }
}

/* ======= Language toggle button ======= */

.lang-toggle {
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-soft);
  background-color: #ffffff;
  color: var(--muted);
  font-size: 0.85rem;
  padding: 0.25rem 0.7rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
  margin-right: 0.75rem;
}

.lang-toggle-label {
  font-weight: 500;
}

.lang-toggle-sep {
  color: var(--border-soft);
}

/* Active state based on html[data-lang] */

html[data-lang="en"] .lang-toggle-en {
  color: var(--primary);
}

html[data-lang="en"] .lang-toggle-hi {
  color: var(--muted);
  opacity: 0.7;
}

html[data-lang="hi"] .lang-toggle-hi {
  color: var(--primary);
}

html[data-lang="hi"] .lang-toggle-en {
  color: var(--muted);
  opacity: 0.7;
}

/* On small screens place lang toggle nicely */

@media (max-width: 860px) {
  .header-inner {
    gap: 0.5rem;
  }

  .lang-toggle {
    order: 3; /* after nav-toggle */
  }
}

/* Language visibility rules */

html[data-lang="en"] .lang-hi {
  display: none !important;
}

html[data-lang="hi"] .lang-en {
  display: none !important;
}

/* Default: if JS hasn't run yet, show English by default */
html:not([data-lang]) .lang-hi {
  display: none !important;
}

/* ======== HERO (HOME) ======== */

.hero {
  position: relative;
  width: 100%;
  min-height: 90vh;
  /* We remove the background image from here */
  overflow: hidden; /* Critical: hides the edges of the moving image */
  background-color: #0141a2;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding-bottom: 2rem;
}

/* 1. THE PARALLAX IMAGE LAYER */
.hero::before {
  content: "";
  position: absolute;
  /* Make it taller than the container so it has room to move */
  top: -10%; 
  left: 0;
  width: 100%;
  height: 120%; 
  
  /* Your Image */
  background-image: url("../img/meeting-2.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  
  z-index: 0; /* Bottom layer */
  
  /* THE MAGIC: This reads the variable calculated by your script.js */
  transform: translate3d(0, var(--hero-bg-offset, 0px), 0);
  
  /* Performance optimization */
  will-change: transform; 
}

/* 2. THE DARK OVERLAY LAYER */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35); /* Overlay darkness */
  z-index: 1; /* sits on top of image, below text */
  pointer-events: none;
}

/* 3. THE CONTENT LAYER */
.hero-content {
  /* Ensure content is structurally sound, but we style .hero-text mostly */
  position: relative; 
  z-index: 2; 
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.hero-text {
  position: relative;
  z-index: 2; /* Sits on top of everything */
  max-width: 70%;
  text-align: left;
  color: #ffffff;
  
  /* OPTIONAL: Subtle parallax on the text too (moves at different speed) */
  transform: translate3d(0, var(--hero-text-offset, 0px), 0);
  will-change: transform;
}

.hero-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  gap: 2.4rem;
  padding-inline: 1.5rem;
}

@media (min-width: 900px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.1fr);
    align-items: center;
  }
}

@media (max-width: 768px) {
  .hero-text {
    max-width: 100%;
  }
}

.hero-text h1 {
  margin: 0 0 0.7rem;
  font-size: clamp(2rem, 3vw, 2.5rem);
}

/* Hindi text helper */
.hi {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.9em;
  color: #273444;
}

/* hero actions */
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}

/* ======== Generic buttons ======== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-pill);
  font-size: 1rem;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.18s ease-out;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.btn-primary:hover {
  background-color: #ffffff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

.btn-outline {
  border-color: var(--primary);
  color: #ffffff;
  background-color: transparent;
}

.btn-outline:hover {
  background-color: #ffffff;
}

.btn-ghost {
  border-color: transparent;
  background-color: transparent;
  color: #ffffff;;
}

.btn-ghost:hover {
  background-color: rgba(1, 65, 162, 0.06);
}

/* ======== HOME SECTIONS ======== */

.home-section {
  padding: 3rem 1.5rem;
}

.home-section p {
  margin-top: 0.4rem;   /* reduce from default */
  line-height: 1.55;
}

.home-section:nth-of-type(even) {
  background-color: #f7f9ff;
}

.section-header {
  max-width: 1080px;
  margin: 0 auto 1.8rem;
  text-align: center;
}

.intro-text {
  margin: 0 auto 1.8rem;
  max-width: 1080px;
  text-align: center;
  font-size: 2rem;
}

@media (max-width: 640px) {
  .intro-text {
    font-size: 1.25rem; /* Much more readable on phone */
    line-height: 1.6;
    text-align: left;   /* Optional: Left align often looks better than center on small screens */
  }
}

.section-header h2 {
  margin: 0;
  font-size: 3rem;
}

.section-header p {
  margin: 0.3rem 0 0;
  color: var(--muted);
}

/* cards */

.cards {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  gap: 1.5rem;
}

.cards-4 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.cards-2 {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
  padding: 1.2rem 1.3rem;
  box-shadow: 0 12px 30px rgba(2, 27, 80, 0.04);
}

.card h3 {
  margin-top: 0;
}

/* stats */

.impact {
  background: linear-gradient(
    120deg,
    rgba(1, 65, 162, 0.05),
    rgba(228, 182, 145, 0.12)
  );
}

.stats {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  gap: 1.2rem;
}

@media (min-width: 640px) {
  .stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.stat {
  background-color: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
  padding: 1rem 1.1rem;
  text-align: left;
}

.stat-number {
  display: block;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary);
}

/* small link */

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  text-decoration: none;
  font-size: 0.95rem;
  margin-top: 0.4rem;
}

/* ======== PAGE LAYOUT (inner pages) ======== */

.page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 4rem 1.5rem 4.5rem;
}

.page-hero {
  background: linear-gradient(
      135deg,
      rgba(1, 65, 162, 0.12),
      rgba(228, 182, 145, 0.16)
    ),
    #ffffff;
  border-radius: var(--radius-lg);
  padding: 1.8rem 1.9rem;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border-soft);
  margin-bottom: 2.5rem;
}

.page-kicker {
  margin: 0 0 0.2rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.page-hero h1 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.8rem, 3vw, 2.2rem);
}

.page-intro {
  margin: 0;
  color: var(--muted);
  max-width: 640px;
}

.page-section {
  margin-top: 2.5rem;
}

.page-section h2 {
  margin-top: 0;
  margin-bottom: 0.6rem;
  font-size: 1.4rem;
}

.page-section p {
  margin-top: 0.3rem;
  line-height: 1.6;
}

/* grids */

.grid-2 {
  display: grid;
  gap: 2rem;
}

@media (min-width: 768px) {
  .grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* bullet list */

.bullet-list {
  padding-left: 1.1rem;
  margin-top: 0.4rem;
}

/* contact form basic styling (for contact.html) */

form label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

form input,
form textarea {
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft);
  padding: 0.6rem 0.75rem;
  font: inherit;
  resize: vertical;
}

form input:focus,
form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 1px rgba(1, 65, 162, 0.15);
}

/* ======== FOOTER ======== */

.main-footer {
  border-top: 1px solid rgba(205, 216, 235, 0.9);
  background-color: #f5f7fb;
  padding: 1.8rem 1.5rem 2.1rem;
}

.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1.8rem;
  align-items: flex-start;
  justify-content: space-between;
}

.footer-impact h4 {
  margin: 0 0 0.4rem;
  font-size: 1rem;
}

.footer-impact p {
  margin: 0.2rem 0;
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.9rem;
}

.footer-links a {
  text-decoration: none;
  color: var(--muted);
}

.footer-links a:hover {
  color: var(--primary);
}

.copyright {
  flex-basis: 100%;
  margin: 0.4rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}

/* impact counters in footer */

.impact-counter {
  font-weight: 700;
  color: var(--primary);
}

/* ======== RESPONSIVE ======== */

@media (max-width: 640px) {
  .hero {
    padding-top: 3.5rem;
  }
  .page {
    padding: 3.5rem 1.2rem 4rem;
  }
  .footer-inner {
    flex-direction: column;
  }
}

/* ===== GALLERY GRID ===== */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1rem;
  margin-top: 1.2rem;
}

.gallery-item figure {
  margin: 0;
  background-color: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
  box-shadow: 0 10px 26px rgba(2, 27, 80, 0.04);
  overflow: hidden;
}

.gallery-item img {
  width: 100%;
  height: auto;          /* keeps each photo’s original ratio */
  display: block;
  cursor: pointer;
  transition: transform 0.18s ease-out;
}

.gallery-item img:hover {
  transform: scale(1.03);
}

.gallery-item figcaption {
  display: none;            /* hide in grid */
}

/* ===== LIGHTBOX MODAL ===== */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  display: none;               /* shown via JS */
  align-items: center;
  justify-content: center;
  z-index: 60;
}

.lightbox.open {
  display: flex;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
}

.lightbox-inner {
  position: relative;
  max-width: 90vw;
  max-height: 85vh;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-content {
  background-color: #000;
  border-radius: 16px;
  padding: 0.75rem 0.75rem 0.9rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-content img {
  max-width: 82vw;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 10px;
}

.lightbox-content p {
  margin: 0.5rem 0 0;
  color: #f5f5f5;
  font-size: 0.9rem;
  text-align: center;
}

/* Lightbox controls */

.lightbox-close {
  position: absolute;
  top: -0.4rem;
  right: -0.4rem;
  font-size: 1.5rem;
  border-radius: 999px;
  border: none;
  width: 32px;
  height: 32px;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.9);
  color: #ffffff;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.75);
  color: #ffffff;
  font-size: 1.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-prev {
  left: -2.4rem;
}

.lightbox-next {
  right: -2.4rem;
}

@media (max-width: 640px) {
  .lightbox-prev {
    left: -1.5rem;
  }
  .lightbox-next {
    right: -1.5rem;
  }
}

/* ======== TEAM EXTENSION (Board & Committees) ======== */

.team-separator {
  margin-top: 3rem;
  margin-bottom: 1.5rem;
  text-align: left;
  border-bottom: 2px solid var(--border-soft);
  padding-bottom: 0.5rem;
}

.team-separator h3 {
  margin: 0;
  font-size: 1.5rem;
  color: var(--primary);
}

/* BOARD GRID */
.board-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3.5rem;
}

.board-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.board-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft);
}

.board-img {
  width: 100px;
  height: 100px;
  border-radius: 50%; /* Circular images for Board */
  object-fit: cover;
  margin-bottom: 0.8rem;
  border: 3px solid var(--primary-soft);
}

.board-info h4 {
  margin: 0 0 0.3rem;
  font-size: 1rem;
  font-weight: 600;
}

.board-info .role {
  font-size: 0.8rem;
  color: var(--muted);
  display: block;
}

/* COMMITTEE LISTS */
.committee-wrapper {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.committee-title {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--text);
  background: var(--bg); /* subtle highlight background */
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  display: inline-block;
}

.name-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.name-list li {
  position: relative;
  padding-left: 1.2rem;
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
  color: var(--muted);
}

.name-list li::before {
  content: "•";
  color: var(--accent);
  position: absolute;
  left: 0;
  font-weight: bold;
}

/* 2 Columns for Advisory (10 names) */
.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 0.5rem 2rem;
}

/* Dense Grid for Organizing (30 names) */
.dense-grid {
  display: grid;
  /* Creates columns that are at least 200px wide, fitting as many as possible */
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); 
  gap: 0.4rem 1.5rem;
}

@media (max-width: 600px) {
  .board-grid {
    grid-template-columns: repeat(2, 1fr); /* 2 per row on mobile */
  }
  
  .dense-grid {
    grid-template-columns: repeat(2, 1fr); /* 2 cols on mobile for list */
  }
}