/* =========================================================
   Deulpur Sishu Kalyan Samity — bilingual + documents styles
   Every translatable string is a pair:
   <span data-l="bn">বাংলা</span><span data-l="en">English</span>
   ========================================================= */
html[data-lang="bn"] [data-l="en"],
html[data-lang="en"] [data-l="bn"] { display: none !important; }
html[data-lang="bn"] {
  --font-head: "Noto Serif Bengali", "Merriweather", Georgia, serif;
  --font-body: "Hind Siliguri", "Poppins", system-ui, sans-serif;
  --font-hand: "Caveat", "Hind Siliguri", cursive;
}
html[data-lang="bn"] body { line-height: 1.8; }
html[data-lang="bn"] h1, html[data-lang="bn"] h2, html[data-lang="bn"] h3 { line-height: 1.4; letter-spacing: 0; }
html[data-lang="bn"] .hero__badge, html[data-lang="bn"] .splash__tag { font-family: var(--font-body); font-weight: 600; font-size: clamp(1rem, 2vw, 1.3rem); }

.lang-switch {
  display: inline-flex; padding: 3px; border-radius: var(--radius-pill); background: var(--green-100);
  border: 1px solid var(--green-200); flex-shrink: 0;
}
.lang-switch button {
  border: 0; background: transparent; cursor: pointer;
  font: 600 .86rem/1 "Hind Siliguri", "Poppins", sans-serif;
  color: var(--green-900); padding: 8px 11px; border-radius: var(--radius-pill); min-height: 34px;
  transition: background .2s, color .2s;
}
.lang-switch button[aria-pressed="true"] { background: var(--green-900); color: var(--white); }
.header-tools { display: flex; align-items: center; gap: 10px; margin-left: auto; }
@media (max-width: 991px) { .brand__text { font-size: .95rem; } }

@media (min-width: 992px) and (max-width: 1365px) {
  .nav__list { gap: 16px !important; }
  .nav__list .nav__link { font-size: .93rem !important; white-space: nowrap; }
  .brand__text { font-size: 1.05rem !important; white-space: nowrap; }
  .nav__ico { display: none; }
  .header-donate { padding-inline: 14px; }
}

/* ===== STORY / FOUNDER ===== */
.prose { max-width: 78ch; }
.prose p { font-size: 1.04rem; }
.lead-quote {
  font-family: var(--font-head); font-size: clamp(1.1rem, 2.2vw, 1.4rem); color: var(--green-900);
  border-left: 5px solid var(--gold-500); padding: 6px 0 6px 20px; margin: 0 0 1.4em; line-height: 1.7;
}
.story-points { display: grid; gap: 18px; }
.story-point {
  background: var(--white); border-radius: var(--radius-card); box-shadow: var(--shadow);
  padding: 24px; display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: start;
}
.story-point h3 { margin-bottom: .35em; }
.story-point p { margin: 0; }
@media (max-width: 520px) { .story-point { grid-template-columns: 1fr; } }
.memorial {
  margin-top: 16px; background: linear-gradient(135deg, #6b6255, #4c463d); color: #F4EEDF;
  border-radius: 14px; padding: 18px 20px; font-family: var(--font-head); text-align: center;
  box-shadow: inset 0 0 0 3px rgba(255,255,255,.08); line-height: 1.75; font-size: .98rem;
}
.memorial small { display: block; font-family: var(--font-body); opacity: .75; margin-top: 6px; font-size: .8rem; }

.partner-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.partner {
  background: var(--white); border-radius: var(--radius-card); padding: 22px; box-shadow: var(--shadow);
  border-top: 4px solid var(--green-500); display: flex; flex-direction: column; gap: 8px;
}
.partner--intl { border-top-color: var(--gold-500); }
.partner--wb { border-top-color: var(--orange-500); }
.partner__tag {
  align-self: flex-start; font-size: .76rem; font-weight: 600; letter-spacing: .03em;
  background: var(--green-100); color: var(--green-900); padding: 3px 10px; border-radius: var(--radius-pill);
}
.partner--intl .partner__tag { background: var(--gold-100); color: #6d5000; }
.partner--wb .partner__tag { background: #FDEBD8; color: #8a4a0c; }
.partner h3 { margin: 0; font-size: 1.1rem; }
.partner p { margin: 0; font-size: .96rem; }
.partner__link { margin-top: auto; padding-top: 6px; font-weight: 600; font-size: .92rem; display: inline-flex; gap: 6px; align-items: center; }
.partner__link svg { width: 16px; height: 16px; }

.summary-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius-card); overflow: hidden; box-shadow: var(--shadow); }
.summary-table th, .summary-table td { text-align: left; padding: 14px 18px; vertical-align: top; border-bottom: 1px solid var(--green-100); }
.summary-table th { width: 32%; background: var(--green-100); color: var(--green-900); font-weight: 600; }
.summary-table tr:last-child th, .summary-table tr:last-child td { border-bottom: 0; }
@media (max-width: 600px) { .summary-table th, .summary-table td { display: block; width: 100%; } .summary-table th { padding-bottom: 6px; } }

.closing {
  background: var(--green-900); color: #DCE8D4; border-radius: 24px; padding: clamp(28px, 5vw, 48px);
  position: relative; overflow: hidden;
}
.closing h2 { color: var(--white); }
.closing p { font-size: 1.08rem; margin: 0; position: relative; z-index: 1; }
.closing::after { content: ""; position: absolute; right: -60px; bottom: -60px; width: 220px; height: 220px; border-radius: 50%; background: rgba(232,178,30,.14); }

.facility-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.facility { background: var(--white); border-radius: var(--radius-card); padding: 24px; box-shadow: var(--shadow); }
.facility .card__icon { margin-bottom: 14px; }
.facility h3 { font-size: 1.08rem; }
.facility p { margin: 0; font-size: .96rem; }
.facility--wide { grid-column: 1 / -1; display: grid; gap: 18px; grid-template-columns: auto 1fr; align-items: center; background: var(--gold-100); }
.facility--wide .big { font-family: var(--font-head); font-size: clamp(2.4rem, 6vw, 3.6rem); font-weight: 900; color: var(--green-900); line-height: 1; }
@media (max-width: 520px) { .facility--wide { grid-template-columns: 1fr; } }

/* ===== TRUST FIGURES ===== */
.trust-figures { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); margin-bottom: 34px; }
.trust-fig { background: var(--white); border-radius: var(--radius-card); padding: 20px 22px; box-shadow: var(--shadow); border-left: 4px solid var(--gold-500); }
.trust-fig strong { display: block; font-family: var(--font-head); color: var(--green-900); font-size: clamp(1.4rem, 2.6vw, 1.8rem); line-height: 1.25; }
.trust-fig span { display: block; font-size: .93rem; margin-top: 4px; }
.trust-fig em { font-style: normal; display: block; font-size: .8rem; color: var(--green-700); font-weight: 600; margin-top: 8px; }

.logo-strip { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 0 auto 36px; max-width: 1000px; }
.logo-strip > span {
  background: var(--white); border: 1px solid var(--green-200); border-radius: var(--radius-pill);
  padding: 8px 16px; font-weight: 600; font-size: .9rem; color: var(--green-900);
}
.logo-strip > span small { color: var(--text-600); font-weight: 500; }

/* ===== DOCUMENT CARDS ===== */
.doc-grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); }
.doc-card {
  background: var(--white); border-radius: var(--radius-card); box-shadow: var(--shadow); overflow: hidden;
  display: flex; flex-direction: column; transition: transform .3s var(--ease), box-shadow .3s;
}
.doc-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.doc-card.is-hidden { display: none; }
.doc-card__open {
  appearance: none; border: 0; width: 100%; cursor: zoom-in; display: block; position: relative;
  background: linear-gradient(160deg, #EFE9DA, #E2D9C3); padding: 18px 18px 0; height: 290px; overflow: hidden;
}
.doc-card__open:focus-visible { outline: 3px solid var(--gold-500); outline-offset: -3px; }
.doc-card__open img {
  width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 4px 4px 0 0;
  box-shadow: 0 8px 22px rgba(60, 45, 20, .25); transition: transform .5s var(--ease); background: #fff;
}
.doc-card:hover .doc-card__open img { transform: scale(1.03); }
.doc-card__year {
  position: absolute; top: 10px; left: 10px; z-index: 2; background: var(--green-900); color: var(--white);
  font: 700 .85rem/1 var(--font-body); padding: 7px 11px; border-radius: var(--radius-pill); box-shadow: 0 4px 10px rgba(0,0,0,.2);
}
.doc-card__pages {
  position: absolute; top: 10px; right: 10px; z-index: 2; background: var(--gold-500); color: var(--green-900);
  font: 700 .78rem/1 var(--font-body); padding: 7px 10px; border-radius: var(--radius-pill);
}
.doc-card__zoom {
  position: absolute; right: 14px; bottom: 14px; z-index: 2; width: 42px; height: 42px; border-radius: 50%;
  background: rgba(255,255,255,.95); color: var(--green-900); display: grid; place-items: center; box-shadow: 0 6px 16px rgba(0,0,0,.2);
}
.doc-card__zoom svg { width: 20px; height: 20px; }
.doc-card__body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.doc-card__issuer { font-size: .8rem; font-weight: 600; color: var(--green-700); letter-spacing: .02em; }
.doc-card__body h3 { margin: 0; font-size: 1.05rem; }
.doc-card__body p { margin: 0; font-size: .93rem; }
.doc-card__amount {
  align-self: flex-start; margin-top: 4px; background: var(--gold-100); color: #6d5000; font-weight: 700; font-size: .88rem;
  padding: 4px 10px; border-radius: 8px;
}
.doc-card__btn {
  margin-top: auto; padding: 10px 0 0; font: 600 .92rem/1.3 var(--font-body); color: var(--green-700);
  background: none; border: 0; cursor: pointer; text-align: left; display: inline-flex; gap: 6px; align-items: center;
}
.doc-card__btn svg { width: 16px; height: 16px; }
.doc-card--featured { outline: 2px solid var(--gold-500); outline-offset: -2px; }

.doc-filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 32px; }
.doc-note { margin-top: 30px; text-align: center; font-size: .92rem; }

/* ===== DOCUMENT VIEWER ===== */
.doc-viewer {
  position: fixed; inset: 0; z-index: 300; background: rgba(15, 26, 18, .95); display: flex; flex-direction: column;
  opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s;
}
.doc-viewer.is-open { opacity: 1; visibility: visible; }
.doc-viewer__bar { display: flex; align-items: center; gap: 8px; padding: 10px 12px; color: #E9EFE7; }
.doc-viewer__title { flex: 1; min-width: 0; }
.doc-viewer__title strong { display: block; font-size: 1rem; color: var(--white); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-viewer__title span { display: block; font-size: .84rem; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-viewer__btn {
  width: 44px; height: 44px; border-radius: 12px; border: 0; background: rgba(255,255,255,.12); color: var(--white);
  display: grid; place-items: center; cursor: pointer; flex-shrink: 0;
}
.doc-viewer__btn:hover { background: rgba(255,255,255,.24); }
.doc-viewer__btn svg { width: 22px; height: 22px; }
.doc-viewer__btn[hidden] { display: none; }
.doc-viewer__stage { flex: 1; overflow: auto; display: flex; padding: 6px 12px 12px; -webkit-overflow-scrolling: touch; }
.doc-viewer__img { max-width: min(100%, 900px); max-height: none; height: auto; border-radius: 6px; box-shadow: 0 20px 60px rgba(0,0,0,.5); cursor: zoom-in; background: #fff; margin: 0 auto auto; }
.doc-viewer.is-zoomed .doc-viewer__img { max-width: none; width: min(1500px, 220vw); cursor: zoom-out; }
.doc-viewer__desc { color: #D7E2D3; padding: 0 16px 14px; font-size: .92rem; max-width: 900px; margin: 0 auto; text-align: center; }
.doc-viewer__count { font-size: .85rem; opacity: .85; min-width: 40px; text-align: center; }
.doc-viewer__hint { font-size: .78rem; opacity: .65; }
@media (max-width: 600px) { .doc-viewer__hint { display: none; } }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ===== CENTRE PHOTOS (about) ===== */
.centre-photos { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); margin-bottom: 26px; }
.centre-photo { margin: 0; background: var(--white); border-radius: var(--radius-card); overflow: hidden; box-shadow: var(--shadow); }
.centre-photo img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.centre-photo figcaption { padding: 12px 16px 14px; font-size: .9rem; line-height: 1.55; }

/* ===== HEADER: centre the nav between brand and tools on desktop ===== */
@media (min-width: 992px) {
  .site-header__inner { gap: 24px; }
  .site-header__inner > .nav { margin-inline: auto; }
  .header-tools { margin-left: 0; }
}

/* ===== MOBILE HEADER + HERO FIT ===== */
.hero__grid > * { min-width: 0; }
@media (max-width: 991px) {
  .site-header__inner { gap: 8px; }
  .site-header__inner > .brand { min-width: 0; gap: 8px; }
  .header-tools { gap: 8px; }
}
@media (max-width: 599px) {
  .hero__title .swash { white-space: normal; display: inline; }
  .hero__title .swash .sparks, .hero__title .swash .swash__line { display: none; }
  .hero__title .swash { text-decoration: underline; text-decoration-color: var(--gold-500); text-decoration-thickness: .12em; text-underline-offset: .18em; }
  .eyebrow { white-space: normal; letter-spacing: .04em; font-size: .76rem; max-width: 100%; }
  .hero__actions .btn { width: 100%; }
}
@media (max-width: 420px) {
  .site-header .brand__mark { width: 42px; height: 42px; }
  .site-header .brand__text { font-size: .8rem; }
  .lang-switch button { padding: 7px 9px; font-size: .8rem; min-height: 32px; }
  .nav-toggle { width: 42px !important; height: 42px !important; }
}
@media (max-width: 335px) { .site-header__inner > .brand .brand__text { display: none; } }
