@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400;1,600&family=DM+Sans:wght@300;400;500;600&display=swap');

:root {
  --saffron: #E8621A;
  --deep: #1A0F00;
  --gold: #C8941A;
  --cream: #FAF5ED;
  --warm: #F5ECD7;
  --muted: #7A6553;
  --white: #FFFFFF;
  --border: rgba(200,148,26,0.22);
  --shadow: 0 8px 32px rgba(26,15,0,0.09);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'DM Sans', sans-serif; background: var(--cream); color: var(--deep); overflow-x: hidden; }

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  background: rgba(250,245,237,0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 5vw; height: 72px;
}
.nav-brand {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.12rem; font-weight: 700;
  color: var(--deep); text-decoration: none;
}
.nav-brand span { color: var(--saffron); }
.nav-links { display: flex; gap: 1.6rem; list-style: none; align-items: center; }
.nav-links a {
  font-size: 0.78rem; font-weight: 500; color: var(--muted);
  text-decoration: none; letter-spacing: 0.07em; text-transform: uppercase;
  transition: color 0.2s; padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover, .nav-links a.active { color: var(--saffron); border-bottom-color: var(--saffron); }
.nav-donate {
  background: var(--saffron); color: var(--white);
  border: none; border-radius: 2px;
  padding: 9px 20px; font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer;
  transition: background 0.2s, transform 0.15s; text-decoration: none;
  white-space: nowrap;
}
.nav-donate:hover { background: var(--deep); }

/* Hamburger for mobile */
.nav-hamburger {
  display: none; flex-direction: column; gap: 5px; cursor: pointer;
  background: none; border: none; padding: 4px;
}
.nav-hamburger span {
  display: block; width: 22px; height: 2px; background: var(--deep);
  transition: all 0.3s;
}
.nav-mobile {
  display: none; position: fixed; top: 64px; left: 0; right: 0;
  background: var(--cream); border-bottom: 1px solid var(--border);
  padding: 20px 5vw; z-index: 199;
  flex-direction: column; gap: 14px;
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  font-size: 0.9rem; font-weight: 500; color: var(--deep);
  text-decoration: none; padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

/* ── PAGE HERO (inner pages) ── */
.page-hero {
  padding: 120px 5vw 60px;
  background:
    radial-gradient(ellipse 70% 60% at 80% 50%, rgba(232,98,26,0.07) 0%, transparent 60%),
    var(--cream);
  border-bottom: 1px solid var(--border);
}
.page-hero-tag {
  font-size: 0.72rem; font-weight: 500; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--saffron); margin-bottom: 12px;
}
.page-hero h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 700; line-height: 1.08; color: var(--deep);
}
.page-hero h1 em { color: var(--saffron); font-style: italic; }
.page-hero p {
  margin-top: 1rem; font-size: 1rem; font-weight: 300;
  line-height: 1.75; color: var(--muted); max-width: 520px;
}

/* ── UTILITY ── */
.section-tag {
  font-size: 0.72rem; font-weight: 500; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--saffron); margin-bottom: 10px;
}
.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 700; line-height: 1.1; color: var(--deep); margin-bottom: 1rem;
}
.section-body {
  font-size: 0.96rem; font-weight: 300; line-height: 1.8;
  color: var(--muted); max-width: 560px;
}
.btn-primary {
  display: inline-block; background: var(--saffron); color: var(--white);
  border: 2px solid var(--saffron); border-radius: 2px;
  padding: 13px 34px; font-size: 0.88rem; font-weight: 600;
  letter-spacing: 0.07em; text-transform: uppercase;
  cursor: pointer; text-decoration: none;
  transition: all 0.2s;
}
.btn-primary:hover { background: var(--deep); border-color: var(--deep); }
.btn-outline {
  display: inline-block; background: transparent; color: var(--deep);
  border: 2px solid rgba(26,15,0,0.2); border-radius: 2px;
  padding: 13px 34px; font-size: 0.88rem; font-weight: 600;
  letter-spacing: 0.07em; text-transform: uppercase;
  cursor: pointer; text-decoration: none; transition: all 0.2s;
}
.btn-outline:hover { border-color: var(--saffron); color: var(--saffron); }
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── FOOTER ── */
footer {
  background: var(--deep); color: rgba(255,255,255,0.45);
  padding: 48px 5vw 28px;
}
.footer-top {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px; padding-bottom: 36px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 24px;
}
.footer-brand {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem; font-weight: 700; color: var(--white);
  margin-bottom: 10px; display: block;
}
.footer-brand span { color: var(--saffron); }
.footer-desc { font-size: 0.82rem; line-height: 1.7; }
.footer-col h4 {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: rgba(255,255,255,0.6);
  margin-bottom: 14px;
}
.footer-col a {
  display: block; font-size: 0.84rem; color: rgba(255,255,255,0.45);
  text-decoration: none; margin-bottom: 8px; transition: color 0.2s;
}
.footer-col a:hover { color: var(--gold); }
.footer-social { display: flex; gap: 10px; margin-top: 16px; }
.social-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 2px;
  font-size: 0.78rem; font-weight: 500; text-decoration: none;
  transition: opacity 0.2s;
}
.social-btn:hover { opacity: 0.85; }
.social-fb { background: #1877F2; color: #fff; }
.social-wa { background: #25D366; color: #fff; }
.footer-copy {
  font-size: 0.74rem; text-align: center; color: rgba(255,255,255,0.3);
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .footer-top { grid-template-columns: 1fr; gap: 28px; }
}

/* ── LANGUAGE TOGGLE ── */
#langToggle {
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: 100px;
  padding: 6px 14px;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--deep);
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: all 0.2s;
  white-space: nowrap;
  font-family: 'Noto Sans Kannada', 'DM Sans', sans-serif;
  margin-right: 8px;
}
#langToggle:hover {
  background: var(--saffron);
  border-color: var(--saffron);
  color: var(--white);
}

/* Kannada font loading */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Kannada:wght@300;400;500;600;700&display=swap');

/* Kannada line-height boost */
[lang="kn"] body,
body:lang(kn) {
  line-height: 1.9;
}

/* ── CTA STRIP (was missing background — white on white) ── */
.cta-strip {
  padding: 72px 5vw;
  background: var(--deep);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-strip::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 50%, rgba(232,98,26,.13), transparent 60%);
}
.cta-strip > * { position: relative; }
.cta-strip h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 700; color: var(--white); margin-bottom: 1rem;
}
.cta-strip p { color: rgba(255,255,255,.65); max-width: 480px; margin: 0 auto 2rem; line-height: 1.7; }
.cta-btns { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; }

/* ── FOUNDER PHOTO — graceful fallback if image missing ── */
.founder-photo-frame img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center top;
  position: absolute; inset: 0; z-index: 1;
  display: block;
}
.founder-photo-frame img.error,
.founder-photo-frame img[src=""],
.founder-photo-frame img:not([src]) {
  display: none;
}

/* ── NAV DONATE + 80G badge wrapper ── */
.nav-donate-wrap {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  margin-left: 8px;
}
.nav-tax-badge {
  font-size: .58rem; font-weight: 600;
  color: var(--saffron); letter-spacing: .06em;
  text-transform: uppercase; white-space: nowrap;
  opacity: .85;
}

/* ── IMAGE PLACEHOLDER (when photos not yet uploaded) ── */
.img-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(145deg, rgba(232,98,26,.12), rgba(200,148,26,.08)), var(--warm);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  font-size: 4rem; color: var(--muted);
  position: absolute; inset: 0;
}
.img-placeholder span {
  font-family: 'DM Sans', sans-serif;
  font-size: .72rem; color: var(--muted);
  margin-top: 8px; letter-spacing: .04em;
}

/* ── GLOBAL GRID OVERFLOW FIX ── */
/* Prevents any grid/flex child from overflowing its container */
.about > div,
.contact-section > div,
.founder-layout > div,
.services-intro > div,
.fac-enquiry-inner > div,
.community-hero-ext > div {
  min-width: 0;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* Ensure all sections have consistent horizontal padding */
section, .about, .mission, .impact, .contact-section,
.founder-layout, .services-intro, .fac-enquiry-section,
.platforms, .volunteer-section, .community-voices {
  box-sizing: border-box;
  width: 100%;
}
