/* =====================================================================
   Asha Foundation — "Hope Green & Gold" identity
   green #1E8A52 · gold #E0A52E · deep evergreen #14322A · cream #F7F9F4
   Fraunces (display serif) + Inter (body) + Hind Siliguri (Bengali)
   Leaf / sapling motif. Warm, optimistic, trustworthy.
   ===================================================================== */

:root {
    --hg-green: #1E8A52;
    --hg-green-dark: #14322A;
    --hg-green-soft: #E8F3EC;
    --hg-gold: #E0A52E;
    --hg-gold-soft: #FBF3DF;
    --hg-cream: #F7F9F4;
    --hg-surface: #FFFFFF;
    --hg-ink: #1C2B24;
    --hg-muted: #5C6B62;
    --hg-line: #E4EBE3;

    /* Injected/overridable from SiteSettings */
    --primary: #1E8A52;
    --accent: #E0A52E;
    --dark: #14322A;

    --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
    --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --bengali: 'Hind Siliguri', 'Noto Sans Bengali', var(--sans);

    --radius: 16px;
    --radius-sm: 10px;
    --shadow-sm: 0 2px 10px rgba(20, 50, 42, .06);
    --shadow: 0 12px 34px rgba(20, 50, 42, .10);
    --shadow-lg: 0 26px 60px rgba(20, 50, 42, .16);
}

/* ---- Base ---- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--sans);
    color: var(--hg-ink);
    background: var(--hg-cream);
    line-height: 1.65;
    overflow-x: clip; /* §31 safety net — clip, never hidden */
    margin: 0;
}

body.bn, .bangla, [lang="bn"] { font-family: var(--bengali); }

h1, h2, h3, h4, h5, .serif { font-family: var(--serif); font-weight: 600; color: var(--hg-green-dark); line-height: 1.18; }
body.bn h1, body.bn h2, body.bn h3, body.bn h4 { font-family: var(--bengali); font-weight: 700; }

a { color: var(--hg-green); text-decoration: none; transition: color .2s; }
a:hover { color: var(--hg-green-dark); }

img { max-width: 100%; height: auto; }

.container { width: 100%; max-width: 1200px; }

/* §12.1 mobile safety-net */
img, svg, video, iframe { max-width: 100%; }
table { max-width: 100%; }
.container, .container-fluid { overflow-wrap: break-word; }
h1, h2, h3, h4, p, a, span, li { overflow-wrap: break-word; }

/* ---- Section rhythm ---- */
.section { padding: 88px 0; position: relative; }
.section-sm { padding: 56px 0; }
.section.alt { background: var(--hg-surface); }
.section.green { background: var(--hg-green-dark); color: #DDEAE1; }
.section.green h1, .section.green h2, .section.green h3 { color: #fff; }
.section.cream { background: var(--hg-cream); }

.eyebrow {
    display: inline-flex; align-items: center; gap: .5rem;
    font-family: var(--sans); font-size: .76rem; font-weight: 700; letter-spacing: .14em;
    text-transform: uppercase; color: var(--hg-green);
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--hg-gold); display: inline-block; }

.section-head { margin-bottom: 3rem; }
.display-head { font-size: clamp(1.9rem, 3.6vw, 3rem); letter-spacing: -.01em; }
.lead-text { font-size: 1.18rem; color: var(--hg-muted); }

/* ---- Leaf / sapling underline motif ---- */
.leaf-underline { position: relative; display: inline-block; }
.leaf-underline::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -.42em; height: .42em;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='12' viewBox='0 0 120 12'%3E%3Cpath d='M2 8 Q30 2 60 7 T118 6' fill='none' stroke='%23E0A52E' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center/contain;
}
.leaf-tag { color: var(--hg-gold); }
.leaf-tag::before { content: "\F2D6"; font-family: "bootstrap-icons"; margin-right: .35rem; }

/* ---- Buttons ---- */
.btn { font-weight: 600; border-radius: 999px; padding: .62rem 1.5rem; transition: all .22s ease; border: 1.5px solid transparent; }
.btn-cta, .btn-primary { background: var(--hg-green); color: #fff; box-shadow: 0 8px 20px rgba(30, 138, 82, .26); }
.btn-cta:hover, .btn-primary:hover { background: var(--hg-green-dark); color: #fff; transform: translateY(-2px); box-shadow: 0 14px 30px rgba(30, 138, 82, .34); }
.btn-donate { background: var(--hg-gold); color: var(--hg-green-dark); font-weight: 700; box-shadow: 0 8px 20px rgba(224, 165, 46, .32); }
.btn-donate:hover { background: #cf9526; color: var(--hg-green-dark); transform: translateY(-2px); }
.btn-outline-cta { border-color: var(--hg-green); color: var(--hg-green); background: transparent; }
.btn-outline-cta:hover { background: var(--hg-green); color: #fff; }
.btn-light-cta { background: #fff; color: var(--hg-green-dark); }
.btn-light-cta:hover { background: var(--hg-gold-soft); }
.btn-lg { padding: .82rem 2rem; font-size: 1.02rem; }

/* ---- Header / navbar ---- */
.site-header { position: sticky; top: 0; z-index: 1030; background: rgba(247, 249, 244, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--hg-line); transition: box-shadow .25s, padding .25s; }
.site-header.scrolled { box-shadow: var(--shadow-sm); background: rgba(255, 255, 255, .96); }
.navbar-brand { min-width: 0; display: flex; align-items: center; gap: .6rem; }
.brand-mark { width: 42px; height: 42px; border-radius: 12px; background: var(--hg-green); color: #fff; display: grid; place-items: center; font-size: 1.3rem; flex: none; }
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 1.32rem; color: var(--hg-green-dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: calc(100vw - 200px); line-height: 1.05; }
.brand-name small { display: block; font-family: var(--sans); font-size: .62rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--hg-gold); }
body.bn .brand-name { font-family: var(--bengali); }
.navbar-nav .nav-link { font-weight: 600; color: var(--hg-ink); padding: .5rem .85rem; border-radius: 8px; position: relative; }
.navbar-nav .nav-link:hover, .navbar-nav .nav-link.active { color: var(--hg-green); }
.navbar-nav .nav-link.active::after { content: ""; position: absolute; left: .85rem; right: .85rem; bottom: .2rem; height: 2px; background: var(--hg-gold); border-radius: 2px; }
.lang-toggle { font-weight: 700; font-size: .82rem; border: 1.5px solid var(--hg-line); border-radius: 999px; padding: .35rem .8rem; color: var(--hg-green-dark); background: #fff; }
.lang-toggle:hover { border-color: var(--hg-green); color: var(--hg-green); }

/* ---- Hero ---- */
.hero { position: relative; overflow: hidden; background: var(--hg-green-dark); color: #fff; }
.hero-slide { position: relative; min-height: 86vh; display: flex; align-items: center; }
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.hero-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, rgba(20, 50, 42, .92) 8%, rgba(20, 50, 42, .68) 48%, rgba(20, 50, 42, .35) 100%); }
.hero-content { position: relative; z-index: 2; padding: 80px 0; max-width: 680px; }
.hero-content h1 { color: #fff; font-size: clamp(2.1rem, 5vw, 3.7rem); margin-bottom: 1rem; }
.hero-content p { font-size: 1.22rem; color: #DCEAE0; margin-bottom: 1.8rem; }
.hero-eyebrow { color: var(--hg-gold); }
.hero-eyebrow::before { background: var(--hg-gold); }

/* ---- Cards ---- */
.card { border: 1px solid var(--hg-line); border-radius: var(--radius); background: var(--hg-surface); box-shadow: var(--shadow-sm); }

.card-cause { border: 1px solid var(--hg-line); border-radius: var(--radius); overflow: hidden; background: #fff; box-shadow: var(--shadow-sm); transition: transform .26s, box-shadow .26s; display: flex; flex-direction: column; }
.card-cause:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.card-cause .ci-media { position: relative; aspect-ratio: 16/10; overflow: hidden; }
.card-cause .ci-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card-cause:hover .ci-media img { transform: scale(1.06); }
.card-cause .ci-tag { position: absolute; top: .8rem; left: .8rem; background: rgba(255, 255, 255, .94); color: var(--hg-green-dark); font-size: .72rem; font-weight: 700; padding: .28rem .7rem; border-radius: 999px; }
.card-cause .ci-urgent { position: absolute; top: .8rem; right: .8rem; background: #D9534F; color: #fff; font-size: .7rem; font-weight: 700; padding: .28rem .7rem; border-radius: 999px; }
.card-cause .ci-body { padding: 1.2rem 1.25rem 1.4rem; display: flex; flex-direction: column; flex: 1; }
.card-cause .ci-body h3 { font-size: 1.18rem; margin-bottom: .5rem; }
.card-cause .ci-summary { color: var(--hg-muted); font-size: .94rem; margin-bottom: 1rem; flex: 1; }

/* progress */
.progress-cause { height: 9px; background: var(--hg-green-soft); border-radius: 999px; overflow: hidden; margin-bottom: .5rem; }
.progress-cause > span { display: block; height: 100%; background: linear-gradient(90deg, var(--hg-green), var(--hg-gold)); border-radius: 999px; }
.cause-figures { display: flex; justify-content: space-between; font-size: .86rem; margin-bottom: 1rem; }
.cause-figures b { color: var(--hg-green-dark); font-size: 1rem; }
.cause-figures .raised b { color: var(--hg-green); }

/* program / feature cards */
.program-card { background: #fff; border: 1px solid var(--hg-line); border-radius: var(--radius); padding: 1.6rem 1.4rem; height: 100%; transition: transform .26s, box-shadow .26s, border-color .26s; }
.program-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.program-ic { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; font-size: 1.6rem; color: #fff; background: var(--hg-green); margin-bottom: 1rem; }
.program-card h3 { font-size: 1.2rem; margin-bottom: .5rem; }
.program-card p { color: var(--hg-muted); font-size: .94rem; margin: 0; }

/* stat band */
.stat-band { background: var(--hg-green-dark); color: #fff; border-radius: var(--radius); }
.stat-item { text-align: center; padding: 1.4rem 1rem; }
.stat-item .stat-ic { color: var(--hg-gold); font-size: 1.7rem; }
.stat-count { font-family: var(--serif); font-size: clamp(2rem, 4vw, 2.9rem); font-weight: 700; color: #fff; display: inline-block; }
.stat-suffix { font-family: var(--serif); font-size: 1.8rem; font-weight: 700; color: var(--hg-gold); }
.stat-item .stat-label { color: #BFD4C6; font-size: .92rem; margin-top: .2rem; }

/* story / testimonial */
.story-card, .testi-card { background: #fff; border: 1px solid var(--hg-line); border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow-sm); height: 100%; }
.story-card .quote { font-family: var(--serif); font-size: 1.08rem; color: var(--hg-green-dark); font-style: italic; }
.testi-card .stars { color: var(--hg-gold); }
.avatar { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; }

/* team */
.team-card { text-align: center; background: #fff; border: 1px solid var(--hg-line); border-radius: var(--radius); padding: 1.4rem; height: 100%; transition: transform .26s, box-shadow .26s; }
.team-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.team-photo { width: 116px; height: 116px; border-radius: 50%; object-fit: cover; border: 4px solid var(--hg-green-soft); }

/* page hero (interior) */
.page-hero { background: var(--hg-green-dark); color: #fff; padding: 84px 0 64px; position: relative; }
.page-hero h1 { color: #fff; font-size: clamp(1.8rem, 4vw, 2.8rem); }
.page-hero .crumbs, .page-hero .crumbs a { color: #B6CDBE; font-size: .9rem; }
.page-hero .crumbs a:hover { color: var(--hg-gold); }

/* donate band */
.donate-band { background: linear-gradient(120deg, var(--hg-green) 0%, var(--hg-green-dark) 100%); color: #fff; border-radius: var(--radius); padding: 2.6rem; }
.pay-chip { display: inline-flex; align-items: center; gap: .5rem; background: #fff; color: var(--hg-green-dark); border-radius: 12px; padding: .7rem 1rem; font-weight: 700; }

/* ---- Forms ---- */
.form-control, .form-select { border: 1.5px solid var(--hg-line); border-radius: var(--radius-sm); padding: .62rem .9rem; }
.form-control:focus, .form-select:focus { border-color: var(--hg-green); box-shadow: 0 0 0 .2rem rgba(30, 138, 82, .15); }
.form-label { font-weight: 600; color: var(--hg-green-dark); font-size: .92rem; }
.input-card { background: #fff; border: 1px solid var(--hg-line); border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow-sm); }

/* ---- Footer ---- */
.site-footer { background: var(--hg-green-dark); color: #C8DACF; position: relative; }
.site-footer::before { content: ""; display: block; height: 4px; background: linear-gradient(90deg, var(--hg-green) 0 60%, var(--hg-gold) 60% 100%); }
.site-footer h5 { color: #fff; font-family: var(--sans); font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 1.1rem; }
.site-footer a { color: #C8DACF; }
.site-footer a:hover { color: var(--hg-gold); }
.footer-brand .brand-name { color: #fff; }
.footer-social a { width: 38px; height: 38px; border-radius: 50%; background: rgba(255, 255, 255, .08); display: inline-grid; place-items: center; margin-right: .4rem; color: #fff; }
.footer-social a:hover { background: var(--hg-gold); color: var(--hg-green-dark); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); font-size: .86rem; }
.footer-bottom a { color: var(--hg-gold); font-weight: 600; }

/* ---- Floating actions ---- */
.float-stack { position: fixed; right: 18px; bottom: 18px; z-index: 1040; display: flex; flex-direction: column; gap: .6rem; }
.float-btn { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 1.4rem; box-shadow: var(--shadow); transition: transform .2s; }
.float-btn:hover { transform: scale(1.08); color: #fff; }
.float-wa { background: #25D366; }
.float-call { background: var(--hg-green); }
.fa-top { background: var(--hg-gold); color: var(--hg-green-dark); cursor: pointer; opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s, transform .2s; }
.fa-top.show { opacity: 1; visibility: visible; }

/* ---- Notice bar ---- */
.notice-bar { font-size: .9rem; font-weight: 500; text-align: center; padding: .5rem 1rem; }
.notice-bar a { color: inherit; text-decoration: underline; }

/* ---- Utilities ---- */
.text-green { color: var(--hg-green) !important; }
.text-gold { color: var(--hg-gold) !important; }
.bg-cream { background: var(--hg-cream) !important; }
.bg-green-soft { background: var(--hg-green-soft) !important; }
.divider-leaf { text-align: center; color: var(--hg-gold); font-size: 1.3rem; margin: 1rem 0; }
.chip { display: inline-block; background: var(--hg-green-soft); color: var(--hg-green-dark); font-size: .76rem; font-weight: 700; padding: .26rem .7rem; border-radius: 999px; }

/* equal-height ONLY inside grid columns (§9.21) */
.row > [class*="col"] > .card.h-100,
.row > [class*="col"] > .program-card,
.row > [class*="col"] > .team-card,
.row > [class*="col"] > .card-cause { height: 100%; }

/* ===== Responsive (tablet 991 / mobile 767 / phone 480) ===== */
@media (max-width: 1199.98px) {
    .row.g-5, .row.gx-5 { --bs-gutter-x: 1.5rem; } /* §31 */
}
@media (max-width: 991.98px) {
    .section { padding: 64px 0; }
    .hero-slide { min-height: 70vh; }
    .brand-name { font-size: 1.15rem; max-width: calc(100vw - 150px); }
    .site-header .navbar-collapse { background: #fff; border: 1px solid var(--hg-line); border-radius: var(--radius); padding: 1rem; margin-top: .6rem; box-shadow: var(--shadow); }
}
@media (max-width: 767px) {
    .section, .page-hero { padding: 44px 0; }
    .page-hero h1 { font-size: clamp(1.6rem, 6vw, 2.2rem); }
    .donate-band { padding: 1.6rem; }
    .float-btn { width: 46px; height: 46px; font-size: 1.2rem; }
}
@media (max-width: 480px) {
    .display-head { font-size: 1.7rem; }
    .hero-content p { font-size: 1.05rem; }
}

@media print {
    .site-header, .site-footer, .float-stack, .notice-bar { display: none !important; }
    body { background: #fff; }
}
