:root {
  --primary: #2563eb;
  --secondary: #3b82f6;
  --accent: #1d4ed8;
  --dark: #1e3a8a;
  --text: #1e3a5f;
  --muted: #5b7c99;
  --surface: #f4f8ff;
  --panel-bg: #f9fbff;
  --panel-strong: #eef6ff;
  --border: rgba(30, 58, 138, 0.12);
  --shadow: 0 20px 45px rgba(30, 58, 138, 0.12);
}

html { scroll-behavior: smooth; }
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background: linear-gradient(135deg, #f4f8ff 0%, #eef6ff 60%, #f8fbff 100%);
  line-height: 1.45;
}
main { overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { width: min(1120px, calc(100% - 2rem)); margin: 0 auto; }
.page-shell { min-height: 100vh; }
.topbar { position: sticky; top: 0; z-index: 999; backdrop-filter: blur(16px); background: linear-gradient(90deg, #1d4ed8 0%, #2563eb 45%, #3b82f6 100%); color: white; border-bottom: 1px solid rgba(255,255,255,0.14); box-shadow: 0 10px 30px rgba(29, 78, 216, 0.2); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; padding: 1rem 0; }
.brand { display: inline-flex; align-items: center; font-weight: 800; font-size: 1.2rem; color: white; }
  .brand-logo { width: auto; height: 56px; border-radius: 0.45rem; object-fit: contain; display: block; }
.topnav { display: flex; gap: 1rem; align-items: center; }
.topnav a, .nav-dropdown-toggle { padding: 0.6rem 0.8rem; border-radius: 999px; color: #0f172a; font-weight: 800; transition: background .25s ease, color .25s ease, transform .25s ease; }
.topnav a.active, .topnav a:hover, .nav-dropdown-toggle.active, .nav-dropdown-toggle:hover { color: #0f172a; background: rgba(255,255,255,0.95); transform: translateY(-1px); box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12); }
.nav-dropdown { position: relative; }
.nav-dropdown-toggle { border: 0; background: transparent; cursor: pointer; font: inherit; }
.nav-dropdown-menu { position: absolute; top: calc(100% + 0.5rem); left: 0; display: none; min-width: 180px; padding: 0.6rem; border-radius: 1rem; background: #ffffff; box-shadow: var(--shadow); border: 1px solid rgba(37, 99, 235, 0.16); z-index: 20; }
.nav-dropdown:hover .nav-dropdown-menu, .nav-dropdown:focus-within .nav-dropdown-menu { display: grid; gap: 0.3rem; }
.nav-dropdown-menu a { display: block; padding: 0.6rem 0.7rem; border-radius: 0.8rem; color: #0f172a; font-weight: 800; }
.nav-dropdown-menu a:hover, .nav-dropdown-menu a.active { background: #eff6ff; color: #1d4ed8; }
.topbar .topnav > a,
.topbar .topnav > .nav-dropdown > .nav-dropdown-toggle,
.topbar .nav-dropdown-menu a {
  color: #0f172a !important;
}
.topbar .topnav > a:hover,
.topbar .topnav > a.active,
.topbar .topnav > .nav-dropdown > .nav-dropdown-toggle:hover,
.topbar .topnav > .nav-dropdown > .nav-dropdown-toggle.active,
.topbar .nav-dropdown-menu a:hover,
.topbar .nav-dropdown-menu a.active {
  color: #1d4ed8 !important;
  background: #eff6ff !important;
}
.topbar-tools { display: flex; gap: 0.75rem; align-items: center; }
.nav-toggle { display: none; border: none; background: transparent; cursor: pointer; width: 44px; height: 44px; padding: 0; align-items: center; justify-content: center; }
.nav-toggle span { display: block; width: 22px; height: 2px; margin: 4px 0; border-radius: 99px; background: white; transition: transform 0.2s ease, opacity 0.2s ease; }
.theme-toggle, .social-link { font-size: 0.95rem; color: white; background: rgba(255,255,255,0.14); border: 1px solid rgba(255,255,255,0.2); border-radius: 999px; padding: 0.55rem 0.85rem; cursor: pointer; }
.theme-toggle:hover, .social-link:hover { color: white; background: rgba(255,255,255,0.22); border-color: rgba(255,255,255,0.3); }
.social-links { display: flex; gap: 1rem; margin-top: 1.5rem; justify-content: center; }
.social-links a { display: inline-flex; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem; background: rgba(255,255,255,0.1); color: white; border-radius: 50%; font-size: 1.4rem; text-decoration: none; transition: background 0.3s ease, transform 0.3s ease, color 0.3s ease; font-weight: bold; }
.social-links a:hover { background: rgba(255,255,255,0.25); transform: scale(1.1); color: #ffffff; }
.hero-banner { position: relative; padding: 0; color: white; overflow: hidden; }
.hero-banner::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15, 23, 42, 0.22), rgba(15, 23, 42, 0.35)); pointer-events: none; }
.slider-wrapper { position: relative; width: 100%; min-height: 600px; overflow: hidden; display: grid; place-items: center; }
.slider-wrapper .slider { position: absolute; inset: 0; }
.slider-wrapper .item { position: absolute; inset: 0; opacity: 0; visibility: hidden; background-position: center; background-size: cover; background-repeat: no-repeat; transition: opacity 0.8s ease, visibility 0.8s ease; }
.slider-wrapper .item.active { opacity: 1; visibility: visible; }
.slider-wrapper .item::before { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, 0.24); z-index: 0; }
.slider-wrapper .item .content { position: relative; z-index: 1; width: min(30vw, 420px); max-width: calc(100% - 2rem); position: absolute; top: 50%; left: 3rem; transform: translateY(-50%); font: 400 0.9rem Inter, system-ui, sans-serif; color: white; text-shadow: 0 3px 8px rgba(0, 0, 0, 0.55); opacity: 0; transition: opacity 0.45s ease, transform 0.45s ease; }
.slider-wrapper .item.active .content { opacity: 1; transform: translateY(-50%) translateX(0); animation: heroSlideIn 0.6s ease-out; }
.slider-wrapper .content .title { font-family: 'Arial Black', 'Arial Bold', sans-serif; text-transform: uppercase; font-size: 1.1rem; letter-spacing: 0.06em; }
.slider-wrapper .content .description { line-height: 1.75; margin: 1rem 0 1.5rem; font-size: 0.85rem; }
.slider-wrapper .content button { width: fit-content; background-color: rgba(255, 255, 255, 0.12); color: white; border: 2px solid rgba(255, 255, 255, 0.85); border-radius: 0.35rem; padding: 0.85rem 1.1rem; cursor: pointer; }
@keyframes heroSlideIn { 0% { opacity: 0; transform: translateY(-45%) translateX(-8px); } 100% { opacity: 1; transform: translateY(-50%) translateX(0); } }
.slider-wrapper .nav { position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%); z-index: 5; user-select: none; }
.slider-wrapper .nav .btn { background-color: rgba(255, 255, 255, 0.65); color: rgba(15, 23, 42, 0.9); border: 2px solid rgba(15, 23, 42, 0.16); margin: 0 0.25rem; padding: 0.85rem; border-radius: 50%; cursor: pointer; }
.slider-wrapper .nav .btn:hover { background-color: rgba(255, 255, 255, 0.85); }
@media (max-width: 900px) { .slider-wrapper .content .title { font-size: 1rem; } .slider-wrapper .content .description { font-size: 0.75rem; } .slider-wrapper .content button { font-size: 0.8rem; } }
@media (max-width: 650px) { .slider-wrapper .content { left: 1rem; width: calc(100% - 2rem); } .slider-wrapper .content .title { font-size: 0.95rem; } .slider-wrapper .content .description { font-size: 0.72rem; } .slider-wrapper .content button { font-size: 0.75rem; } .slider-wrapper { min-height: 380px; } }
.section { padding: 3.2rem 0; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.3rem; }
.section-title h2 { font-size: 1.9rem; margin: 0; color: #0b1220; font-weight: 800; letter-spacing: -0.01em; }
.section-title p { color: var(--muted); margin: 0; }

/* Stronger, theme-aligned section headings and subheadings */
.section-shell { padding: 4rem 0; }
.section-kicker {
  display: inline-block;
  margin-bottom: 0.5rem;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.section-heading h2,
.section h2 { font-size: clamp(1.5rem, 2.2vw, 2.2rem); color: #0b1220; font-weight: 800; margin: 0 0 0.6rem; line-height: 1.15; }

.panel h3,
.program-card h3,
.section h3 { color: #0b1220; font-weight: 700; font-size: 1.15rem; margin: 0 0 0.5rem; }

/* Keep hero eyebrow white, but use accent color for section eyebrow labels */
.hero .eyebrow { color: #ffffff; }
.section .eyebrow { color: var(--accent); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.card { background: var(--panel-bg); border-radius: 1.4rem; padding: 1rem; box-shadow: var(--shadow); border: 1px solid var(--border); transition: transform .25s ease, box-shadow .25s ease; }
.card:hover { transform: translateY(-4px); box-shadow: 0 30px 60px rgba(15, 23, 42, 0.14); }
.stats { background: linear-gradient(135deg, #2a2a2a 0%, #1f1f1f 55%, #0f0f0f 100%); color: white; border-radius: 2rem; padding: 2.5rem; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.stat-item strong { font-size: 2rem; display: block; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: center; }
.muted { color: var(--muted); }
.progress-list { display: grid; gap: 1rem; }
.progress-bar { background: var(--surface); border-radius: 999px; overflow: hidden; height: 12px; }
.progress-bar span { display: block; height: 100%; background: linear-gradient(135deg, var(--primary), var(--accent)); }
.form-card { background: var(--panel-bg); border-radius: 1.5rem; padding: 1.4rem; box-shadow: var(--shadow); }
.form-group { margin-bottom: 1rem; display: grid; gap: 0.4rem; }
input, select, textarea { width: 100%; border: 1px solid var(--border); border-radius: 0.9rem; padding: 0.85rem 1rem; font: inherit; }
textarea { min-height: 120px; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(37, 99, 235, 0.16); border-color: var(--primary); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: var(--panel-bg); border-radius: 1rem; overflow: hidden; }
th, td { padding: 0.9rem 0.8rem; border-bottom: 1px solid var(--border); }
th { text-align: left; background: var(--panel-strong); }
.badge { display: inline-block; padding: 0.35rem 0.75rem; border-radius: 999px; font-size: 0.85rem; font-weight: 700; background: rgba(37, 99, 235, 0.12); color: var(--accent); }
.alert { padding: 1rem 1.2rem; border-radius: 1rem; margin: 1rem auto 0; width: min(1120px, calc(100% - 2rem)); }
.alert-success { background: rgba(37, 99, 235, 0.14); color: #1d4ed8; }
.alert-error { background: rgba(37, 99, 235, 0.14); color: #1e40af; }
.flash-stack { margin-top: 1rem; }
.footer { margin-top: 3rem; background: linear-gradient(180deg, rgba(15,23,42,0.98), rgba(10,18,31,0.98)); color: white; padding: 3rem 0; text-align: center; display: flex; flex-direction: column; align-items: center; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 2rem; align-items: start; justify-items: center; width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 2rem; }
.footer h3,
.footer h4 { margin-bottom: 1rem; color: #f8fafc; }
.footer p { max-width: 40rem; line-height: 1.8; color: rgba(255,255,255,0.82); margin: 0; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.65rem; }
.footer ul li { color: rgba(255,255,255,0.95); }
.footer ul li a { color: rgba(255,255,255,0.98); text-decoration: none; transition: color 0.2s ease; cursor: pointer; }
.footer ul li a:hover { color: var(--primary); }
.footer-bottom { margin-top: 2.5rem; border-top: 1px solid rgba(255,255,255,0.09); padding-top: 1.5rem; display: flex; flex-direction: column; justify-content: center; gap: 1rem; align-items: center; width: 100%; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; font-size: 0.95rem; color: rgba(255,255,255,0.88); justify-content: center; }
.footer-legal a { color: rgba(255,255,255,0.95); text-decoration: none; padding: 0.4rem 0.6rem; border-radius: 0.75rem; transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease; }
.footer-legal a:hover { color: white; background: rgba(255,255,255,0.08); transform: translateY(-1px); }
.footer-credit { font-size: 0.95rem; color: rgba(255,255,255,0.88); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }
.developer-contact { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.5rem; justify-content: center; }
.developer-contact a { color: rgba(255,255,255,0.95); text-decoration: none; transition: color 0.2s ease; }
.developer-contact a:hover { color: var(--accent); }
.newsletter-form { display: grid; gap: 0.75rem; margin-top: 0.75rem; }
.newsletter-form input { background: rgba(255,255,255,0.95); color: var(--text); border: 0; }
.newsletter-form button { border: 0; border-radius: 999px; padding: 0.8rem 1rem; background: var(--primary); color: white; font-weight: 700; cursor: pointer; }
@keyframes fadeInOut {
  0% { opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { opacity: 0; }
}
.hero-banner { position: relative; padding: 0; color: white; overflow: hidden; }
.hero-banner::before { content: ""; position: absolute; inset: 0; background: rgba(15, 23, 42, 0.18); pointer-events: none; }
.hero-banner-content { position: relative; z-index: 2; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 2rem; align-items: center; }
.hero-banner-copy { background: rgba(0, 0, 0, 0.42); padding: 2rem; border-radius: 1rem; backdrop-filter: blur(8px); }
.hero-banner-copy h1 { font-size: clamp(2.2rem, 4.8vw, 3.6rem); line-height: 1.1; margin: 0.35rem 0 0.8rem; }
.hero-banner-copy p { font-size: 1.05rem; color: rgba(255,255,255,0.95); max-width: 620px; }
.eyebrow { display: inline-block; font-size: 0.85rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: #ffffff; margin-bottom: 0.5rem; }
.hero-highlight { display: grid; gap: 1rem; }


/* Site-wide visibility improvements for headings and body text */
main h2, main h3, .section h2, .section h3, .card h3, .panel h3, .blog-grid h2, .blog-grid h3 {
  color: #0b1220 !important;
  font-weight: 800;
}

/* Slightly increase sizes for important headings */
main h2, .section h2 { font-size: clamp(1.6rem, 2.6vw, 2.4rem); line-height: 1.12; }
main h3, .section h3, .card h3, .panel h3 { font-size: clamp(1.05rem, 1.6vw, 1.25rem); }

/* Stronger body copy for readability */
main p, .card p, .panel p, .blog-grid p, .program-card p { color: #273444; }

/* Links should use the primary accent to be clearly visible */
a { color: var(--accent); }

/* Ensure small utility text remains readable */
.muted, .small { color: #6b7f95; }

/* Improve contrast in lists and stats */
.stat-item strong { color: #0b1220; }

/* Improve visibility for section content and cards */
.panel, .program-card {
  background: var(--panel-bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 1.25rem;
  border-radius: 1rem;
}

.program-card p, .panel p, .section p {
  color: #223143; /* strong, readable body text */
  line-height: 1.6;
}

.program-grid .program-card h3 {
  font-size: 1.15rem;
  color: #0b1220;
}

/* Make muted utility slightly darker for readability */
.muted { color: #6b7f95; }

/* Ensure eyebrow labels in sections use accent color and are visible */
.section .eyebrow { color: var(--accent); }

/* Slightly reduce hero overlay darkness so section text contrasts better */
.hero-banner-copy { background: rgba(0, 0, 0, 0.42); }
.hero-highlight img { border-radius: 1.25rem; width: 100%; min-height: 320px; object-fit: cover; box-shadow: 0 20px 45px rgba(15, 23, 42, 0.24); }
.hero-highlight-card { background: rgba(255,255,255,0.9); color: var(--text); border-radius: 1.1rem; padding: 1rem 1.2rem; box-shadow: var(--shadow); }
.hero-highlight-card h3 { margin: 0 0 0.4rem; }
.hero-highlight-card p { margin: 0; color: var(--muted); }
.section-heading { max-width: 760px; margin-bottom: 1.2rem; }
.section-heading h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0.25rem 0 0; color: #333333; }
.program-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.program-card, .panel, .impact-card, .gallery-card, .blog-card { background: rgba(255,255,255,0.92); border-radius: 1.4rem; padding: 1.3rem; box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08); border: 1px solid rgba(37, 99, 235, 0.12); }
.program-card:hover, .panel:hover, .gallery-card:hover, .blog-card:hover { transform: translateY(-4px); box-shadow: 0 24px 60px rgba(15, 23, 42, 0.12); }
.program-card h3, .panel h3, .gallery-card h3, .blog-card h3 { margin-top: 0; margin-bottom: 0.5rem; color: var(--dark); }
.program-card p, .panel p, .gallery-card p, .blog-card p { margin: 0; color: var(--muted); line-height: 1.65; }
.gallery-card { padding: 0; overflow: hidden; }
.gallery-zoom-btn { width: 100%; display: block; padding: 0; border: 0; background: transparent; cursor: zoom-in; text-align: left; }
.gallery-zoom-btn img { width: 100%; height: 220px; object-fit: cover; border-radius: 0.9rem; margin-bottom: 0; transition: transform 0.25s ease; }
.gallery-zoom-btn:hover img { transform: scale(1.04); }
.gallery-description { padding: 0.75rem 0.2rem 0; color: var(--muted); font-size: 0.95rem; line-height: 1.5; }
.section-soft { background: rgba(37, 99, 235, 0.05); }
.split-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.impact-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.impact-card strong { display: block; font-size: 2rem; color: #333333; margin-bottom: 0.35rem; }
.impact-card span { color: var(--muted); }
.gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.gallery-card img { width: 100%; height: 220px; object-fit: cover; border-radius: 0.9rem; margin-bottom: 0.8rem; }
.blog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.programs-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.program-card { position: relative; overflow: hidden; padding-top: 1.4rem; display: flex; flex-direction: column; gap: 0.75rem; min-height: 100%; }
.program-card::before { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(37, 99, 235, 0.06), rgba(59, 130, 246, 0.02)); pointer-events: none; }
.program-icon { display: inline-flex; align-items: center; justify-content: center; width: 5rem; height: 5rem; border-radius: 1rem; font-weight: 800; font-size: 0.95rem; margin-bottom: 0.1rem; color: white; background: linear-gradient(135deg, var(--primary), var(--secondary)); box-shadow: 0 10px 24px rgba(37, 99, 235, 0.2); }
.program-highlights { list-style: none; padding: 0; margin: 0.35rem 0 0; display: grid; gap: 0.45rem; }
.program-highlights li { position: relative; padding-left: 1rem; color: #334155; font-size: 0.95rem; }
.program-highlights li::before { content: '•'; position: absolute; left: 0; color: var(--primary); font-weight: 700; }
.health-icon { background: linear-gradient(135deg, #2563eb, #0ea5e9); }
.wash-icon { background: linear-gradient(135deg, #0f766e, #14b8a6); }
.peace-icon { background: linear-gradient(135deg, #7c3aed, #a78bfa); }
.section-subtitle { margin: 0.35rem 0 0; color: var(--muted); max-width: 680px; line-height: 1.6; }
.story-shell { display: grid; grid-template-columns: 220px 1fr; gap: 1rem; align-items: start; }
.story-tabs { display: grid; gap: 0.7rem; }
.story-tab { border: 1px solid rgba(37, 99, 235, 0.14); background: white; color: var(--text); padding: 0.9rem 1rem; border-radius: 999px; font-weight: 700; cursor: pointer; transition: all .2s ease; }
.story-tab:hover { transform: translateY(-2px); box-shadow: 0 10px 20px rgba(37, 99, 235, 0.12); }
.story-tab.active { background: linear-gradient(135deg, var(--primary), var(--secondary)); color: white; box-shadow: 0 12px 24px rgba(37, 99, 235, 0.2); }
.story-panels { position: relative; min-height: 220px; }
.story-panel { display: none; background: linear-gradient(145deg, #ffffff, #f4f8ff); border: 1px solid rgba(37, 99, 235, 0.12); border-radius: 1.4rem; padding: 1.5rem; box-shadow: 0 20px 45px rgba(15, 23, 42, 0.08); }
.story-panel.active { display: block; animation: fadeInUp .35s ease; }
.story-panel h3 { font-size: 1.35rem; margin-bottom: 0.6rem; color: var(--dark); }
.story-panel p { font-size: 1rem; line-height: 1.8; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.stat-item { background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.14); border-radius: 1.2rem; padding: 1.2rem; text-align: center; backdrop-filter: blur(10px); transition: transform .25s ease, background .25s ease; }
.stat-item:hover { transform: translateY(-4px); background: rgba(255,255,255,0.2); }
.stat-item h3 { font-size: 1.7rem; margin: 0 0 0.35rem; color: white; }
.stat-item p { margin: 0; color: rgba(255,255,255,0.82); }
.gallery-container { display: grid; grid-template-columns: 0.95fr 1.05fr; gap: 1.4rem; align-items: center; }
.gallery-description { background: linear-gradient(145deg, #ffffff, #f4f8ff); border: 1px solid rgba(37, 99, 235, 0.12); padding: 1.6rem; border-radius: 1.4rem; box-shadow: 0 20px 45px rgba(15, 23, 42, 0.08); }
.gallery-description h2 { margin-top: 0.2rem; font-size: 1.8rem; }
.gallery-slider { width: 100%; }
.gallery-grid-cards { position: relative; min-height: 460px; }
.gallery-card-item { position: absolute; inset: 0; overflow: hidden; border-radius: 1.25rem; background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(15, 23, 42, 0.06)); box-shadow: 0 18px 36px rgba(15, 23, 42, 0.12); border: 1px solid rgba(37, 99, 235, 0.12); opacity: 0; visibility: hidden; transform: scale(0.98); transition: opacity .8s ease, transform .8s ease, visibility .8s ease; }
.gallery-card-item.active { opacity: 1; visibility: visible; transform: scale(1); }
.gallery-card-item::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(2, 6, 23, 0.02) 0%, rgba(2, 6, 23, 0.18) 100%); pointer-events: none; }
.gallery-card-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease, filter .35s ease; }
.gallery-card-item:hover img { transform: scale(1.05); filter: brightness(1.04); }
.gallery-card-featured { min-height: auto; }
.gallery-controls { display: flex; align-items: center; justify-content: center; gap: 0.75rem; margin-top: 1rem; }
.gallery-control-btn, .gallery-dot { border: 0; cursor: pointer; }
.gallery-control-btn { width: 2.6rem; height: 2.6rem; border-radius: 999px; background: linear-gradient(135deg, var(--primary), var(--secondary)); color: white; box-shadow: 0 10px 20px rgba(37, 99, 235, 0.2); font-size: 1rem; }
.gallery-dots { display: flex; align-items: center; gap: 0.45rem; }
.gallery-dot { width: 0.8rem; height: 0.8rem; border-radius: 999px; background: rgba(37, 99, 235, 0.25); padding: 0; }
.gallery-dot.active { background: var(--primary); transform: scale(1.1); }
.view-gallery-btn, .read-more, .view-more-blog a { display: inline-flex; align-items: center; justify-content: center; margin-top: 1rem; padding: 0.8rem 1.1rem; border-radius: 999px; background: linear-gradient(135deg, var(--primary), var(--secondary)); color: white; font-weight: 700; box-shadow: 0 12px 24px rgba(37, 99, 235, 0.2); transition: transform .2s ease, box-shadow .2s ease; }
.view-gallery-btn:hover, .read-more:hover, .view-more-blog a:hover { transform: translateY(-2px); box-shadow: 0 16px 28px rgba(37, 99, 235, 0.25); }
.blog-card .blog-image img { width: 100%; height: 200px; object-fit: cover; border-radius: 1rem; margin-bottom: 0.9rem; }
.blog-detail-image { width: 100%; height: 260px; object-fit: cover; border-radius: 1rem; margin-bottom: 1rem; box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12); }
.blog-card .blog-content h3 { font-size: 1.15rem; }
.blog-card .blog-meta { font-size: 0.9rem; color: var(--accent); font-weight: 700; margin-bottom: 0.6rem; }
.view-more-blog { display: flex; justify-content: center; margin-top: 1.3rem; }

/* Enhanced carousel animation */
@keyframes carouselScaleFade {
  0% { opacity: 0; transform: scale(1.05); filter: brightness(0.9); }
  10% { opacity: 1; transform: scale(1); filter: brightness(1); }
  90% { opacity: 1; transform: scale(1); filter: brightness(1); }
  100% { opacity: 0; transform: scale(1.05); filter: brightness(0.9); }
}
.carousel-image { animation: carouselScaleFade 15s ease-in-out infinite; }
.carousel-image.active { animation-delay: 0s; }
.carousel-image:nth-child(2) { animation-delay: -3s; }
.carousel-image:nth-child(3) { animation-delay: -6s; }
.carousel-image:nth-child(4) { animation-delay: -9s; }
.carousel-image:nth-child(5) { animation-delay: -12s; }

/* Team and partners styles */
.testimonial-carousel { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: 1.2rem; }
.testimonial-card { background: var(--surface); border: 1px solid var(--border); border-radius: 1.35rem; box-shadow: var(--shadow); padding: 1.4rem; text-align: center; display: flex; flex-direction: column; gap: 0.85rem; animation: testimonialFadeIn 0.7s ease both; transition: transform 0.25s ease, box-shadow 0.25s ease; }
.testimonial-card:hover { transform: translateY(-6px); box-shadow: 0 20px 40px rgba(15, 23, 42, 0.16); }
.testimonial-card:nth-child(2) { animation-delay: 0.15s; }
.testimonial-card:nth-child(3) { animation-delay: 0.3s; }
.testimonial-card p { margin: 0; color: var(--muted); line-height: 1.8; }
.testimonial-card h3 { margin: 0; font-size: 1.08rem; }
.testimonial-card span { color: var(--primary); font-weight: 700; font-size: 0.95rem; }
.testimonial-photo { width: 92px; height: 92px; border-radius: 50%; object-fit: cover; margin: 0 auto; border: 4px solid rgba(37, 99, 235, 0.12); box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12); }
.team-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.team-card { text-align: center; padding: 1rem 1rem 1.1rem; background: var(--surface); border: 1px solid var(--border); border-radius: 1.25rem; box-shadow: var(--shadow); }
.team-card img { width: 140px; height: 140px; object-fit: cover; border-radius: 0.8rem; margin: 0 auto 0.45rem; box-shadow: none; }
.team-card h3 { margin: 0 0 0.35rem; font-size: 1.1rem; }
.team-card p { margin: 0; color: var(--muted); }
.team-socials { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem; margin-top: 1rem; }
.team-socials__link { color: var(--primary); background: rgba(37, 99, 235, 0.08); border: 1px solid rgba(37, 99, 235, 0.16); padding: 0.45rem 0.85rem; border-radius: 999px; font-size: 0.88rem; transition: background .2s ease, transform .2s ease, color .2s ease; text-decoration: none; }
.team-socials__link:hover { background: rgba(37, 99, 235, 0.16); transform: translateY(-1px); }
.partners-grid { display: flex; gap: 1rem; align-items: center; justify-content: center; flex-wrap: wrap; }
.partners-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  align-items: center;
  justify-items: center;
}
.partner-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  transition: none;
  width: auto;
  max-width: none;
  text-align: center;
  justify-self: center;
}
.partner-pill:hover {
  transform: none;
  box-shadow: none;
  border-color: transparent;
}
.partner-pill:focus-within {
  outline: none;
}
.partner-pill img {
  width: auto;
  height: 48px;
  object-fit: contain;
  border-radius: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
  display: block;
}
.partner-pill span {
  font-weight: 800;
  color: var(--dark);
  font-size: 0.95rem;
  display: block;
}

/* Entrance animation and logo float */
@keyframes partnerEntry {
  from { opacity: 0; transform: translateY(18px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes logoFloat {
  0% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
  100% { transform: translateY(0); }
}

.partner-pill {
  opacity: 0;
  transform: translateY(18px) scale(0.98);
  will-change: transform, opacity;
}

.partner-pill.in-view {
  opacity: 1;
  animation: partnerEntry 640ms cubic-bezier(.2,.9,.3,1) both;
  animation-delay: var(--delay, 0ms);
}

.partner-pill img {
  animation: logoFloat 4.2s ease-in-out infinite;
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.partner-pill:hover img {
  transform: translateY(-6px) scale(1.04);
  animation-play-state: paused;
}

/* Slight 3D tilt fallback handled by JS; ensure smoothness */
.partner-pill[data-tilt] {
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

@media (prefers-reduced-motion: reduce) {
  .partner-pill img { animation: none !important; }
  .partner-pill.in-view { animation: none !important; opacity: 1; transform: none !important; }
}
.partner-card img { max-width: 160px; height: auto; display: block; object-fit: contain; padding: 0.6rem; background: white; border-radius: 0.6rem; box-shadow: var(--shadow); }

/* Gallery empty state */
.gallery-empty { grid-column: 1 / -1; background: var(--panel-bg); border: 1px dashed var(--border); padding: 2rem; text-align: center; border-radius: 0.75rem; }

@media (max-width: 900px) {
  .testimonial-carousel { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .program-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery-grid { grid-template-columns: 1fr; }
  .programs-grid, .gallery-container, .blog-grid, .stats-grid { grid-template-columns: 1fr; }
  .gallery-grid-cards { grid-template-columns: 1fr; }
  .gallery-card-featured { grid-row: auto; min-height: 260px; }
  .story-shell { grid-template-columns: 1fr; }
  .story-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-shell { padding: 3rem 0; }

  /* partners grid tablet */
  .partners-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.blog-card a { display: inline-block; margin-top: 0.8rem; color: var(--primary); font-weight: 700; }
.back-to-top { position: fixed; bottom: 1.5rem; right: 1.5rem; width: 48px; height: 48px; border-radius: 999px; border: 0; background: #333333; color: white; box-shadow: var(--shadow); cursor: pointer; display: none; }
.breadcrumbs { display: flex; gap: 0.5rem; color: var(--muted); padding: 1rem 0; flex-wrap: wrap; }
.breadcrumbs a { color: var(--primary); }
.page-hero { padding: 3rem 0 1rem; }
.page-hero h1 { margin-bottom: 0.5rem; }
.list { display: grid; gap: 1rem; }
.faq-item { background: var(--panel-bg); border-radius: 1rem; padding: 0.9rem 1rem; box-shadow: var(--shadow); }
.faq-item h4 { margin: 0 0 0.4rem; }
.grid-2 { display: grid; gap: 0.9rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dashboard-grid { display: grid; gap: 1rem; grid-template-columns: 280px 1fr; align-items: start; }
.partner-card, .partners-card, .testimonial-card { display: flex; flex-direction: column; gap: 1rem; }
.team-card { display: flex; flex-direction: column; gap: 0.6rem; }
.partner-card img, .partners-card img, .testimonial-card img { border-radius: 1rem; max-height: 180px; object-fit: contain; }
.team-photo { width: 100%; height: 220px; border-radius: 1.2rem; object-fit: contain; background: var(--surface); }
.team-socials { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }
.team-socials a { color: var(--primary); background: rgba(37, 99, 235, 0.08); border: 1px solid rgba(37, 99, 235, 0.12); padding: 0.4rem 0.75rem; border-radius: 999px; font-size: 0.9rem; transition: background .2s ease, transform .2s ease, border-color .2s ease, color .2s ease; }
.team-socials a:hover { background: rgba(37, 99, 235, 0.16); transform: translateY(-1px); }
.team-carousel-wrap { position: relative; margin: 2rem 0; }
.team-carousel { display: flex; gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 0.5rem; scroll-behavior: smooth; cursor: grab; }
.team-carousel.dragging { cursor: grabbing; }
.team-carousel::-webkit-scrollbar { height: 10px; }
.team-carousel::-webkit-scrollbar-track { background: rgba(15, 23, 42, 0.04); border-radius: 999px; }
.team-carousel::-webkit-scrollbar-thumb { background: rgba(37, 99, 235, 0.35); border-radius: 999px; }
.team-carousel .card { min-width: 320px; flex: 0 0 auto; scroll-snap-align: start; transition: transform .3s ease, box-shadow .3s ease; }
.team-carousel .card:hover { transform: translateY(-6px); box-shadow: 0 30px 60px rgba(15, 23, 42, 0.18); }
.carousel-control { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border: none; border-radius: 50%; background: rgba(255,255,255,0.95); color: var(--primary); font-size: 1.5rem; cursor: pointer; box-shadow: var(--shadow); display: flex; align-items: center; justify-content: center; transition: transform .2s ease, background .2s ease; }
.carousel-control:hover { transform: translateY(-50%) scale(1.05); background: white; }
.carousel-prev { left: -14px; }
.carousel-next { right: -14px; }
@media (max-width: 900px) {
  .team-carousel .card { min-width: 280px; }
}
@media (max-width: 640px) {
  .carousel-control { width: 40px; height: 40px; font-size: 1.3rem; }
  .team-carousel .card { min-width: 260px; }
}
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes testimonialFadeIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
body.dark-mode {
  --primary: #60a5fa;
  --secondary: #3b82f6;
  --accent: #1d4ed8;
  --dark: #0f172a;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --surface: #0f172a;
  --border: rgba(148, 163, 184, 0.15);
  --shadow: 0 25px 50px rgba(15, 23, 42, 0.25);
  background: #020617;
  color: var(--text);
}
/* Stronger header contrast in dark mode */
body.dark-mode .topbar {
  background: linear-gradient(90deg, #071026 0%, #081327 100%);
  border-color: rgba(255,255,255,0.04);
  box-shadow: 0 12px 30px rgba(2,6,23,0.7);
}
body.dark-mode .topbar .brand,
body.dark-mode .topbar .brand-logo {
  color: #e6f2ff;
}
body.dark-mode .topnav a,
body.dark-mode .nav-dropdown-toggle,
body.dark-mode .nav-dropdown-menu a,
body.dark-mode .topbar .topnav > a,
body.dark-mode .topbar .topnav > .nav-dropdown > .nav-dropdown-toggle,
body.dark-mode .topbar .nav-dropdown-menu a {
  color: #ffffff !important;
  font-weight: 700;
}
body.dark-mode .topnav a.active,
body.dark-mode .topnav a:hover,
body.dark-mode .nav-dropdown-toggle.active,
body.dark-mode .nav-dropdown-toggle:hover,
body.dark-mode .nav-dropdown-menu a:hover,
body.dark-mode .nav-dropdown-menu a.active,
body.dark-mode .topbar .topnav > a:hover,
body.dark-mode .topbar .topnav > a.active,
body.dark-mode .topbar .topnav > .nav-dropdown > .nav-dropdown-toggle:hover,
body.dark-mode .topbar .topnav > .nav-dropdown > .nav-dropdown-toggle.active,
body.dark-mode .topbar .nav-dropdown-menu a:hover,
body.dark-mode .topbar .nav-dropdown-menu a.active {
  color: #ffffff !important;
  background: rgba(255,255,255,0.10) !important;
}
body.dark-mode .topbar-tools .theme-toggle,
body.dark-mode .topbar-tools .social-link {
  background: rgba(255,255,255,0.08);
  color: #ffffff;
  border-color: rgba(255,255,255,0.12);
}
body.dark-mode .topbar-tools .theme-toggle:hover,
body.dark-mode .topbar-tools .social-link:hover {
  background: rgba(255,255,255,0.14);
  color: #ffffff;
}
body.dark-mode .nav-dropdown-menu {
  background: rgba(8, 12, 20, 0.98);
  border-color: rgba(255,255,255,0.04);
  box-shadow: 0 18px 40px rgba(2,6,23,0.7);
}
body.dark-mode .nav-dropdown-menu a { color: #ffffff !important; }
body.dark-mode .nav-dropdown-menu a:hover, body.dark-mode .nav-dropdown-menu a.active {
  background: rgba(255,255,255,0.10) !important;
  color: #ffffff !important;
}
body.dark-mode .topbar { background: rgba(15, 23, 42, 0.95); border-color: rgba(148, 163, 184, 0.12); }
body.dark-mode .card, body.dark-mode .form-card, body.dark-mode table, body.dark-mode .footer { background: #111827; border-color: rgba(148, 163, 184, 0.12); }
body.dark-mode .topnav a { color: var(--text); }
body.dark-mode .topnav a.active, body.dark-mode .topnav a:hover { background: rgba(59, 130, 246, 0.16); color: var(--primary); }
body.dark-mode .nav-dropdown-menu { background: #111827; border-color: rgba(148, 163, 184, 0.15); }
body.dark-mode .nav-dropdown-menu a { color: var(--text); }
body.dark-mode .nav-dropdown-menu a:hover, body.dark-mode .nav-dropdown-menu a.active { background: rgba(96, 165, 250, 0.16); color: var(--primary); }
body.dark-mode .alert-success { background: rgba(37, 99, 235, 0.15); color: #dbeafe; }
body.dark-mode .alert-error { background: rgba(37, 99, 235, 0.16); color: #dbeafe; }
body.dark-mode .brand, body.dark-mode .brand span { color: var(--primary); }
.sidebar { background: linear-gradient(180deg, #111827, #060816); color: white; border-radius: 1.5rem; padding: 1.2rem; box-shadow: var(--shadow); }
.sidebar h3 { margin: 0 0 0.25rem; font-size: 1.08rem; }
.sidebar .muted { color: rgba(255,255,255,0.7); margin-bottom: 1rem; }
.sidebar a { display: block; padding: 0.75rem 0.85rem; color: rgba(255,255,255,0.9); border-radius: 0.8rem; margin-bottom: 0.5rem; transition: background .2s ease, transform .2s ease; }
.sidebar a.active, .sidebar a:hover { background: rgba(255,255,255,0.12); transform: translateX(2px); }
.card .table-wrap table tbody tr:hover { background: rgba(37, 99, 235, 0.06); }
.page-tip { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; color: var(--muted); }
.avatar { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; margin-bottom: 1rem; }
@media (max-width: 900px) {
  .grid-3, .grid-2, .about-grid, .stat-grid, .footer-grid, .hero, .hero-banner-content, .split-grid, .program-grid, .impact-grid, .gallery-grid, .blog-grid { grid-template-columns: 1fr; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: center; }
  .footer-legal { justify-content: center; }
  .topnav { display: none; position: absolute; top: 72px; right: 1rem; background: var(--panel-bg); padding: 1rem; border-radius: 1rem; box-shadow: var(--shadow); flex-direction: column; align-items: flex-start; }
  .topnav.open { display: flex; }
  .nav-dropdown { width: 100%; }
  .nav-dropdown-toggle { width: 100%; text-align: left; color: var(--text); }
  .nav-dropdown-menu { position: static; display: none; min-width: 100%; margin-top: 0.4rem; background: rgba(37, 99, 235, 0.04); border: 0; box-shadow: none; }
  .nav-dropdown:hover .nav-dropdown-menu, .nav-dropdown:focus-within .nav-dropdown-menu { display: grid; }
  .nav-toggle { display: block; }
}

@media (max-width: 640px) {
  .hero { padding-top: 3rem; }
  .section-title { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-banner { padding: 4rem 0; }
  .story-tabs { grid-template-columns: 1fr; }
  .program-card, .gallery-description, .blog-card { padding: 1.15rem; }

  /* partners grid mobile */
  .partners-row { grid-template-columns: 1fr; }
}
/* Footer Contact Information */
.footer-contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-contact-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
    line-height: 1.5;
}

.footer-contact-list .contact-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    min-width: 24px;
    font-size: 17px;
    line-height: 1;
}

.footer-contact-list a {
    text-decoration: none;
}

.footer-contact-list a:hover {
    text-decoration: underline;
}

.footer-contact-list .contact-location {
    align-items: flex-start;
}

.footer-contact-list .contact-location strong {
    display: inline-block;
    margin-bottom: 2px;
}
