/* ==========================================================================
   মাদ্রাসায়ে ইমাম আবু হানিফা খুলনা — Design System
   Single source of truth. No page-level <style> blocks, no inline styles.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. DESIGN TOKENS
   -------------------------------------------------------------------------- */
:root {
    /* Emerald — institutional, trustworthy */
    --green-900: #06301f;
    --green-800: #0a4630;
    --green-700: #0e5c3f;
    --green-600: #147551;
    --green-100: #e7f1eb;
    --green-50:  #f2f8f4;

    /* Gold — warm accent, used sparingly */
    --gold-700: #9a6b15;
    --gold-600: #b8851f;
    --gold-500: #d4a437;
    --gold-300: #ebcb7a;
    --gold-100: #fbf3dc;

    /* Neutrals — warm paper, not cold grey */
    --paper:    #faf8f3;
    --surface:  #ffffff;
    --ink:      #16211c;
    --ink-soft: #43554c;
    --ink-mute: #6e8076;
    --line:     #e3e8e4;

    /* Semantic aliases */
    --primary:      var(--green-700);
    --primary-dark: var(--green-900);
    --primary-soft: var(--green-50);
    --accent:       var(--gold-500);

    /* Fluid type scale */
    --fs-xs:   0.9375rem;   /* 15px — small notes, chips, top bar */
    --fs-sm:   1.0625rem;   /* 17px — card text, menu, buttons */
    --fs-base: 1.125rem;    /* 18px — main paragraphs */
    --fs-md:   1.1875rem;   /* 19px — lead text */
    --fs-lg:   clamp(1.25rem, 0.5vw + 1.1rem, 1.4rem);
    --fs-xl:   clamp(1.4rem, 1vw + 1.1rem, 1.75rem);
    --fs-2xl:  clamp(1.6rem, 2vw + 1rem, 2.1rem);
    --fs-3xl:  clamp(2rem, 3.2vw + 1rem, 3rem);

    /* Bengali needs more leading than Latin — conjuncts and matras stack */
    --lh-body: 1.8;
    --lh-head: 1.35;

    --space-section: clamp(3.5rem, 7vw, 6rem);
    --gutter: clamp(1rem, 4vw, 2.5rem);

    --r-sm: 8px;
    --r-md: 14px;
    --r-lg: 22px;
    --r-pill: 999px;

    --sh-sm: 0 1px 3px rgba(6, 48, 31, .06), 0 4px 14px rgba(6, 48, 31, .05);
    --sh-md: 0 4px 12px rgba(6, 48, 31, .07), 0 12px 32px rgba(6, 48, 31, .07);
    --sh-lg: 0 10px 28px rgba(6, 48, 31, .1), 0 24px 60px rgba(6, 48, 31, .1);

    --ease: cubic-bezier(.4, 0, .2, 1);
    --t: .28s var(--ease);

    /* Islamic 8-point star lattice, used as a subtle overlay */
    --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.07' stroke-width='1.1'%3E%3Cpath d='M40 6l9.9 24.1L74 40l-24.1 9.9L40 74l-9.9-24.1L6 40l24.1-9.9z'/%3E%3Ccircle cx='40' cy='40' r='13'/%3E%3C/g%3E%3C/svg%3E");
}

/* --------------------------------------------------------------------------
   2. RESET & BASE
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

* { margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    /* Sticky header offset for anchor jumps */
    scroll-padding-top: 150px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Hind Siliguri', system-ui, sans-serif;
    font-size: var(--fs-base);
    line-height: var(--lh-body);
    color: var(--ink);
    background: var(--paper);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
/* Components set display:flex/grid, which would otherwise override the hidden attribute */
[hidden] { display: none !important; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
/* Long addresses (e.g. the email) must wrap instead of overflowing narrow cards */
a[href^="mailto:"] { overflow-wrap: anywhere; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: none; cursor: pointer; }

h1, h2, h3, h4 {
    font-family: 'Noto Serif Bengali', 'Hind Siliguri', serif;
    line-height: var(--lh-head);
    font-weight: 700;
    color: var(--primary-dark);
    text-wrap: balance;
}

p { text-wrap: pretty; }

.ar {
    font-family: 'Amiri', serif;
    letter-spacing: .4px;
    direction: rtl;
}

/* Accessibility ---------------------------------------------------------- */
:focus-visible {
    outline: 3px solid var(--gold-500);
    outline-offset: 3px;
    border-radius: 3px;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 1rem;
    z-index: 2000;
    background: var(--primary-dark);
    color: #fff;
    padding: .75rem 1.25rem;
    border-radius: 0 0 var(--r-sm) var(--r-sm);
    font-weight: 600;
    transition: top var(--t);
}
.skip-link:focus { top: 0; }

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

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}

/* --------------------------------------------------------------------------
   3. LAYOUT PRIMITIVES
   -------------------------------------------------------------------------- */
.container {
    width: min(1200px, 100%);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.container-narrow { width: min(820px, 100%); }

.section { padding-block: var(--space-section); }
.section-tight { padding-block: clamp(2.5rem, 5vw, 4rem); }
.section-alt { background: var(--surface); }
.section-soft { background: var(--green-50); }

.grid { display: grid; gap: clamp(1.25rem, 2.5vw, 1.75rem); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

/* --------------------------------------------------------------------------
   4. SECTION HEADINGS
   -------------------------------------------------------------------------- */
.section-head {
    max-width: 720px;
    margin-inline: auto;
    text-align: center;
    margin-bottom: clamp(2rem, 4vw, 3rem);
}

.section-head.start { text-align: start; margin-inline: 0; }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: var(--gold-100);
    color: var(--gold-700);
    font-size: var(--fs-xs);
    font-weight: 700;
    padding: .4rem 1rem;
    border-radius: var(--r-pill);
    border: 1px solid rgba(184, 133, 31, .25);
    margin-bottom: 1rem;
}

.eyebrow-light {
    background: rgba(212, 164, 55, .18);
    color: var(--gold-300);
    border-color: rgba(212, 164, 55, .35);
}

.section-head h2 { font-size: var(--fs-2xl); margin-bottom: .75rem; }

.section-head p {
    color: var(--ink-soft);
    font-size: var(--fs-md);
}

.rule {
    width: 64px;
    height: 3px;
    background: linear-gradient(90deg, var(--gold-500), var(--gold-300));
    border-radius: 2px;
    margin: 1rem auto 0;
}
.section-head.start .rule { margin-inline: 0; }

/* --------------------------------------------------------------------------
   5. BUTTONS
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    padding: .85rem 1.6rem;
    border-radius: var(--r-sm);
    font-weight: 700;
    font-size: var(--fs-sm);
    line-height: 1.2;
    text-align: center;
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--t);
    white-space: nowrap;
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 14px rgba(14, 92, 63, .28);
}
.btn-primary:hover { background: var(--green-800); box-shadow: 0 8px 22px rgba(14, 92, 63, .34); }

.btn-gold {
    background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
    color: #fff;
    box-shadow: 0 4px 14px rgba(184, 133, 31, .32);
}
.btn-gold:hover { background: linear-gradient(135deg, var(--gold-600), var(--gold-700)); box-shadow: 0 8px 22px rgba(184, 133, 31, .4); }

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

.btn-ghost-light {
    border-color: rgba(255, 255, 255, .55);
    color: #fff;
    background: rgba(255, 255, 255, .08);
    backdrop-filter: blur(6px);
}
.btn-ghost-light:hover { background: #fff; color: var(--primary-dark); border-color: #fff; }

.btn-sm { padding: .6rem 1.15rem; font-size: var(--fs-xs); }
.btn-lg { padding: 1rem 2rem; font-size: var(--fs-md); }
.btn-block { width: 100%; }

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: .85rem;
}
.btn-row.center { justify-content: center; }

/* --------------------------------------------------------------------------
   6. TOP BAR
   -------------------------------------------------------------------------- */
.topbar {
    background: var(--green-900);
    color: #d7e5dd;
    font-size: var(--fs-xs);
    border-bottom: 1px solid rgba(255, 255, 255, .07);
}

.topbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-block: .6rem;
    flex-wrap: wrap;
}

.topbar-bismillah {
    color: var(--gold-300);
    font-size: 1.05rem;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.topbar-contact {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.topbar-contact a, .topbar-contact span {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    transition: var(--t);
}
.topbar-contact a:hover { color: var(--gold-300); }
.topbar-contact i { color: var(--gold-500); }

.topbar-cta {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: rgba(212, 164, 55, .16);
    color: var(--gold-300);
    padding: .3rem .85rem;
    border-radius: var(--r-pill);
    border: 1px solid rgba(212, 164, 55, .4);
    font-weight: 700;
    transition: var(--t);
}
.topbar-cta:hover { background: var(--gold-500); color: var(--green-900); }

/* --------------------------------------------------------------------------
   7. HEADER & NAVIGATION
   -------------------------------------------------------------------------- */
.site-header {
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 var(--line), 0 4px 20px rgba(6, 48, 31, .05);
    position: sticky;
    top: 0;
    z-index: 900;
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-block: .5rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: .8rem;
    min-width: 0;
}

/* Site logo — sized so visitors can clearly read "IMAM ABU HANIFA" inside it */
.site-logo {
    width: clamp(96px, 9.5vw, 128px);
    height: auto;
    aspect-ratio: 1;
    flex-shrink: 0;
    object-fit: contain;
    transition: transform var(--t);
}
.brand:hover .site-logo { transform: scale(1.04); }

.brand-text { min-width: 0; }

.brand-text strong {
    display: block;
    font-family: 'Noto Serif Bengali', serif;
    font-size: clamp(1.1rem, 1.9vw, 1.5rem);
    font-weight: 700;
    color: var(--primary);
    line-height: 1.25;
}

.brand-text span {
    display: block;
    font-size: var(--fs-xs);
    color: var(--ink-mute);
    line-height: 1.4;
}

.nav-list {
    display: flex;
    align-items: center;
    gap: clamp(.5rem, 1.6vw, 1.4rem);
}

.nav-list > li > a {
    position: relative;
    display: block;
    font-weight: 600;
    font-size: var(--fs-base);
    padding: .5rem .15rem;
    color: var(--ink-soft);
    transition: var(--t);
}

.nav-list > li > a:hover,
.nav-list > li > a[aria-current="page"] { color: var(--primary); }

.nav-list > li > a:not(.btn)::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    height: 2.5px;
    width: 0;
    background: var(--gold-500);
    border-radius: 2px;
    transition: width var(--t);
}
.nav-list > li > a:not(.btn):hover::after,
.nav-list > li > a:not(.btn)[aria-current="page"]::after { width: 100%; }

.nav-toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--primary);
    padding: .4rem;
    border-radius: var(--r-sm);
}

.nav-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(6, 48, 31, .45);
    backdrop-filter: blur(2px);
    z-index: 880;
}
.nav-backdrop.show { display: block; }

/* --------------------------------------------------------------------------
   8. HERO
   -------------------------------------------------------------------------- */
.hero {
    position: relative;
    color: #fff;
    background:
        linear-gradient(115deg, rgba(6, 48, 31, .95) 15%, rgba(14, 92, 63, .88));
    isolation: isolate;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: var(--pattern);
    opacity: .85;
    z-index: -1;
}

.hero .container {
    padding-block: clamp(3.5rem, 9vw, 7rem);
    display: grid;
    gap: clamp(2rem, 5vw, 4rem);
    grid-template-columns: 1fr;
    align-items: center;
}

@media (min-width: 900px) {
    .hero .container { grid-template-columns: 1.15fr .85fr; }
}

.hero h1 {
    font-size: var(--fs-3xl);
    color: #fff;
    margin-bottom: 1rem;
}
.hero h1 em {
    font-style: normal;
    color: var(--gold-300);
}

.hero-lead {
    font-size: var(--fs-md);
    color: #d9e7e0;
    max-width: 58ch;
    margin-bottom: 1.75rem;
}

.hero-ayah {
    border-inline-start: 3px solid var(--gold-500);
    padding-inline-start: 1rem;
    margin-bottom: 1.75rem;
}
.hero-ayah .ar { font-size: 1.35rem; color: var(--gold-300); }
.hero-ayah small { color: #b9cdc2; font-size: var(--fs-xs); }

/* Hero without a side card — single centred column */
.hero-solo .container {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    max-width: 980px;
}
.hero-solo .hero-lead { margin-inline: auto; }
.hero-solo .btn-row { justify-content: center; }
.hero-solo .hero-ayah {
    border-inline-start: none;
    border-top: 2px solid var(--gold-500);
    padding-inline-start: 0;
    padding-top: 1rem;
    display: inline-block;
}

/* --------------------------------------------------------------------------
   9. TRUST STRIP
   -------------------------------------------------------------------------- */
.trust-strip {
    background: var(--green-900);
    color: #cfe0d7;
    border-top: 1px solid rgba(255, 255, 255, .08);
}

.trust-strip .container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: clamp(1rem, 4vw, 3rem);
    padding-block: 1rem;
    font-size: var(--fs-sm);
}

.trust-strip span {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
}
.trust-strip i { color: var(--gold-500); }

/* --------------------------------------------------------------------------
   10. STATS
   -------------------------------------------------------------------------- */
.stat {
    text-align: center;
    padding: clamp(1.25rem, 3vw, 2rem) 1rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    box-shadow: var(--sh-sm);
    transition: var(--t);
}
.stat:hover { transform: translateY(-4px); box-shadow: var(--sh-md); }

.stat i {
    font-size: 1.9rem;
    color: var(--gold-600);
    margin-bottom: .6rem;
}

.stat b {
    display: block;
    font-family: 'Noto Serif Bengali', serif;
    font-size: var(--fs-2xl);
    color: var(--primary);
    line-height: 1.1;
}

.stat span {
    display: block;
    font-size: var(--fs-sm);
    color: var(--ink-soft);
    font-weight: 600;
    margin-top: .3rem;
}

/* --------------------------------------------------------------------------
   11. CARDS
   -------------------------------------------------------------------------- */
.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: clamp(1.5rem, 3vw, 2rem);
    box-shadow: var(--sh-sm);
    transition: var(--t);
    display: flex;
    flex-direction: column;
    gap: .75rem;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--sh-md); }

.card h3 { font-size: var(--fs-lg); }
.card p { color: var(--ink-soft); font-size: var(--fs-base); }
.card .btn { align-self: flex-start; margin-top: auto; }

.card-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--r-md);
    display: grid;
    place-items: center;
    background: var(--green-50);
    color: var(--primary);
    font-size: 1.5rem;
    border: 1px solid var(--green-100);
}

.card-top-accent { border-top: 4px solid var(--primary); }
.card-top-accent:hover { border-top-color: var(--gold-500); }

/* Appeal card — image + body, used for programs and departments */
.appeal {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    overflow: hidden;
    box-shadow: var(--sh-sm);
    transition: var(--t);
    display: flex;
    flex-direction: column;
}
.appeal:hover { transform: translateY(-5px); box-shadow: var(--sh-md); }

.appeal-body {
    padding: 1.4rem;
    display: flex;
    flex-direction: column;
    gap: .6rem;
    flex: 1;
}
.appeal-body h3 { font-size: var(--fs-lg); }
.appeal-body p { font-size: var(--fs-base); color: var(--ink-soft); }
.appeal-actions {
    display: flex;
    gap: .6rem;
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: .5rem;
}

/* Value / feature list card */
.value-card { text-align: center; align-items: center; }
.value-card .card-icon { margin-inline: auto; }
.value-card .btn { align-self: center; }

/* Feature list with check marks */
.check-list { display: grid; gap: .6rem; }
.check-list li {
    display: flex;
    gap: .65rem;
    align-items: flex-start;
    font-size: var(--fs-sm);
    color: var(--ink-soft);
}
.check-list i { color: var(--green-600); margin-top: .45rem; flex-shrink: 0; font-size: .8rem; }

/* --------------------------------------------------------------------------
   12. PAGE BANNER & BREADCRUMB
   -------------------------------------------------------------------------- */
.page-banner {
    position: relative;
    color: #fff;
    text-align: center;
    background:
        linear-gradient(120deg, rgba(6, 48, 31, .96), rgba(14, 92, 63, .9));
    isolation: isolate;
}
.page-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: var(--pattern);
    opacity: .8;
    z-index: -1;
}

.page-banner .container { padding-block: clamp(2.75rem, 6vw, 4.5rem); }

.page-banner h1 {
    font-size: var(--fs-2xl);
    color: #fff;
    margin-bottom: .6rem;
}
.page-banner h1 em { font-style: normal; color: var(--gold-300); }

.page-banner p {
    color: #cfe0d7;
    max-width: 60ch;
    margin-inline: auto;
    font-size: var(--fs-sm);
}

.breadcrumb {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: .5rem;
    font-size: var(--fs-xs);
    color: #b9cdc2;
    margin-top: 1rem;
}
.breadcrumb a { color: var(--gold-300); }
.breadcrumb a:hover { text-decoration: underline; }

/* --------------------------------------------------------------------------
   13. NOTICES
   -------------------------------------------------------------------------- */
.notice {
    display: flex;
    gap: 1.1rem;
    align-items: flex-start;
    background: var(--surface);
    border: 1px solid var(--line);
    border-inline-start: 4px solid var(--primary);
    border-radius: var(--r-md);
    padding: 1.15rem 1.35rem;
    box-shadow: var(--sh-sm);
    transition: var(--t);
}
.notice:hover { transform: translateX(4px); box-shadow: var(--sh-md); border-inline-start-color: var(--gold-500); }

.notice.urgent { border-inline-start-color: #c0392b; }

.notice-date {
    flex-shrink: 0;
    text-align: center;
    background: var(--green-50);
    border: 1px solid var(--green-100);
    border-radius: var(--r-sm);
    padding: .5rem .7rem;
    min-width: 62px;
    line-height: 1.2;
}
.notice-date b { display: block; font-size: 1.2rem; color: var(--primary); font-family: 'Noto Serif Bengali', serif; }
.notice-date span { font-size: .72rem; color: var(--ink-mute); }

.notice-body h3 { font-size: var(--fs-md); margin-bottom: .3rem; }
.notice-body p { font-size: var(--fs-sm); color: var(--ink-soft); }

.notice-meta {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    margin-top: .6rem;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .72rem;
    font-weight: 700;
    padding: .25rem .7rem;
    border-radius: var(--r-pill);
    background: var(--green-50);
    color: var(--primary);
    border: 1px solid var(--green-100);
}
.chip-gold { background: var(--gold-100); color: var(--gold-700); border-color: rgba(184, 133, 31, .25); }
.chip-red { background: #fdecea; color: #a5281b; border-color: #f5c6c0; }

/* Hadith / quote block */
.quote-box {
    position: relative;
    background: linear-gradient(140deg, var(--green-800), var(--green-600));
    color: #fff;
    border-radius: var(--r-md);
    padding: clamp(1.75rem, 3.5vw, 2.5rem);
    overflow: hidden;
    isolation: isolate;
}
.quote-box::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: var(--pattern);
    opacity: .9;
    z-index: -1;
}
.quote-box h3 { color: var(--gold-300); font-size: var(--fs-lg); margin-bottom: .9rem; }
/* Bengali has no true italic — the browser fakes a slant that hurts readability */
.quote-box p { font-size: var(--fs-md); color: #e4efe9; margin-bottom: .8rem; }
.quote-box cite { font-style: normal; font-size: var(--fs-xs); color: var(--gold-300); }

/* --------------------------------------------------------------------------
   14. FILTER BUTTONS (notices)
   -------------------------------------------------------------------------- */
.filter-bar {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: .6rem;
    margin-bottom: 2rem;
}

.filter-btn {
    padding: .5rem 1.15rem;
    border: 1.5px solid var(--line);
    background: var(--surface);
    border-radius: var(--r-pill);
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--ink-soft);
    transition: var(--t);
}
.filter-btn:hover { border-color: var(--primary); color: var(--primary); }
.filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* --------------------------------------------------------------------------
   15. FORMS
   -------------------------------------------------------------------------- */
.field { margin-bottom: 1.1rem; }

.field label {
    display: block;
    font-size: var(--fs-sm);
    font-weight: 600;
    margin-bottom: .45rem;
}
.field label .req { color: #c0392b; }

.input, .select, .textarea {
    width: 100%;
    padding: .8rem 1rem;
    border: 1.5px solid var(--line);
    border-radius: var(--r-sm);
    background: var(--surface);
    font-size: var(--fs-sm);
    transition: var(--t);
}
.input:focus, .select:focus, .textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(14, 92, 63, .1);
}
.textarea { resize: vertical; min-height: 130px; }

.field-row {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.form-note {
    font-size: var(--fs-xs);
    color: var(--ink-mute);
    margin-top: .8rem;
}

/* --------------------------------------------------------------------------
   16. DONATION COMPONENTS
   -------------------------------------------------------------------------- */
.tier {
    position: relative;
    background: var(--surface);
    border: 1.5px solid var(--line);
    border-radius: var(--r-md);
    padding: 1.75rem 1.4rem;
    text-align: center;
    box-shadow: var(--sh-sm);
    transition: var(--t);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}
.tier:hover { transform: translateY(-5px); box-shadow: var(--sh-md); border-color: var(--primary); }

.tier.featured {
    border-color: var(--gold-500);
    background: linear-gradient(170deg, #fffdf7, var(--surface));
    box-shadow: var(--sh-md);
}

.tier-flag {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gold-500);
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    padding: .25rem .9rem;
    border-radius: var(--r-pill);
    white-space: nowrap;
}

.tier i { font-size: 2rem; color: var(--primary); }
.tier.featured i { color: var(--gold-600); }
.tier h3 { font-size: var(--fs-md); }
.tier .amount {
    font-family: 'Noto Serif Bengali', serif;
    font-size: var(--fs-xl);
    font-weight: 700;
    color: var(--primary);
}
.tier.featured .amount { color: var(--gold-700); }
.tier p { font-size: var(--fs-xs); color: var(--ink-soft); }
.tier .btn { margin-top: auto; width: 100%; }

/* Amount pills */
.pill-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: .6rem;
    margin-bottom: 1rem;
}

.pill {
    padding: .7rem .4rem;
    border: 1.5px solid var(--line);
    border-radius: var(--r-sm);
    background: var(--paper);
    font-weight: 700;
    font-size: var(--fs-sm);
    transition: var(--t);
}
.pill:hover { border-color: var(--primary); color: var(--primary); }
.pill.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* Payment account rows */
.account {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: 1rem 1.2rem;
    transition: var(--t);
}
.account:hover { border-color: var(--primary); box-shadow: var(--sh-sm); }

.account-id { display: flex; align-items: center; gap: .85rem; min-width: 0; }

.account-logo {
    width: 44px; height: 44px;
    flex-shrink: 0;
    border-radius: var(--r-sm);
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 1.2rem;
}
.logo-bkash  { background: #e2136e; }
.logo-nagad  { background: #ec1c24; }
.logo-rocket { background: #8c3494; }
.logo-bank   { background: var(--green-700); }

.account-id b { display: block; font-size: var(--fs-sm); }
/* Only the caption under the provider name — not the coloured logo box */
.account-id span span { display: block; font-size: var(--fs-xs); color: var(--ink-mute); }

.account-num {
    font-family: ui-monospace, 'Courier New', monospace;
    font-weight: 700;
    font-size: var(--fs-sm);
    letter-spacing: .5px;
    color: var(--primary-dark);
}

.copy-btn {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    background: var(--green-50);
    border: 1px solid var(--green-100);
    color: var(--primary);
    padding: .35rem .8rem;
    border-radius: var(--r-sm);
    font-size: var(--fs-xs);
    font-weight: 700;
    transition: var(--t);
}
.copy-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Split panel: form beside accounts */
.split {
    display: grid;
    gap: clamp(1.5rem, 3vw, 2.5rem);
    grid-template-columns: 1fr;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: clamp(1.5rem, 3.5vw, 2.5rem);
    box-shadow: var(--sh-md);
}
@media (min-width: 900px) {
    .split { grid-template-columns: 1.05fr .95fr; }
}

/* --------------------------------------------------------------------------
   17. CTA BAND
   -------------------------------------------------------------------------- */
.cta-band {
    position: relative;
    background: linear-gradient(135deg, var(--green-900), var(--green-700));
    color: #fff;
    text-align: center;
    isolation: isolate;
}
.cta-band::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: var(--pattern);
    opacity: .9;
    z-index: -1;
}
.cta-band h2 { color: var(--gold-300); font-size: var(--fs-2xl); margin-bottom: .8rem; }
.cta-band p {
    color: #d3e3db;
    max-width: 62ch;
    margin: 0 auto 1.75rem;
    font-size: var(--fs-md);
}

/* --------------------------------------------------------------------------
   18. FOOTER
   -------------------------------------------------------------------------- */
.site-footer {
    background: var(--green-900);
    color: #b9cdc2;
    border-top: 4px solid var(--gold-500);
}

.footer-grid {
    display: grid;
    gap: clamp(1.75rem, 4vw, 2.75rem);
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    padding-block: clamp(2.5rem, 5vw, 4rem);
}

.footer-brand { display: flex; align-items: center; gap: .7rem; margin-bottom: .9rem; }
.footer-logo {
    width: 110px;
    height: 110px;
    flex-shrink: 0;
    background: #fff;
    border-radius: var(--r-md);
    padding: 4px;
    object-fit: contain;
}
.footer-brand strong {
    font-family: 'Noto Serif Bengali', serif;
    color: var(--gold-300);
    font-size: var(--fs-md);
}

.site-footer h4 {
    color: var(--gold-300);
    font-size: var(--fs-md);
    margin-bottom: 1rem;
    padding-bottom: .5rem;
    position: relative;
}
.site-footer h4::after {
    content: '';
    position: absolute;
    left: 0; bottom: 0;
    width: 34px; height: 2px;
    background: var(--gold-500);
}

.site-footer p { font-size: var(--fs-sm); margin-bottom: .7rem; }

.footer-links { display: grid; gap: .55rem; }
.footer-links a {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: var(--fs-sm);
    transition: var(--t);
}
.footer-links a:hover { color: var(--gold-300); transform: translateX(4px); }
.footer-links i { color: var(--gold-500); font-size: .7rem; }

.footer-contact { display: grid; gap: .65rem; }
.footer-contact li {
    display: flex;
    gap: .7rem;
    align-items: flex-start;
    font-size: var(--fs-sm);
}
.footer-contact i { color: var(--gold-500); margin-top: .4rem; flex-shrink: 0; }


.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .1);
    padding-block: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: var(--fs-xs);
    color: #8fa89c;
}

/* --------------------------------------------------------------------------
   19. FLOATING ACTIONS, TOAST
   -------------------------------------------------------------------------- */
.fab-stack {
    position: fixed;
    bottom: 1.5rem;
    inset-inline-end: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: .7rem;
    z-index: 850;
}

.fab {
    width: 52px; height: 52px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 1.35rem;
    box-shadow: 0 6px 18px rgba(6, 48, 31, .3);
    transition: var(--t);
}
.fab:hover { transform: scale(1.1); }
.fab-call { background: linear-gradient(135deg, var(--green-600), var(--green-800)); }
.fab-donate { background: linear-gradient(135deg, var(--gold-500), var(--gold-600)); }

#toast {
    position: fixed;
    bottom: 1.75rem;
    left: 50%;
    transform: translateX(-50%) translateY(150%);
    background: var(--green-900);
    color: #fff;
    padding: .85rem 1.5rem;
    border-radius: var(--r-pill);
    border: 1px solid var(--gold-500);
    font-size: var(--fs-sm);
    font-weight: 600;
    box-shadow: var(--sh-lg);
    z-index: 2000;
    opacity: 0;
    transition: transform .35s var(--ease), opacity .35s var(--ease);
    pointer-events: none;
    max-width: calc(100vw - 2rem);
    text-align: center;
}
#toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

/* --------------------------------------------------------------------------
   20. REVEAL ANIMATION
   -------------------------------------------------------------------------- */
.reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.reveal.visible { opacity: 1; transform: none; }

/* --------------------------------------------------------------------------
   21. UTILITIES
   -------------------------------------------------------------------------- */
.text-center { text-align: center; }
.mt-auto { margin-top: auto; }
.stack { display: grid; gap: 1rem; }
.prose p { margin-bottom: 1rem; color: var(--ink-soft); }
.prose h3 { font-size: var(--fs-lg); margin: 1.5rem 0 .6rem; }
.prose h3:first-child { margin-top: 0; }

/* --------------------------------------------------------------------------
   22. HOME — MANIFEST PANEL, INDEXED CARDS, LEDGER ACCORDION, WHY-GRID
   -------------------------------------------------------------------------- */
.manifest {
    background: var(--surface);
    color: var(--ink);
    border-radius: var(--r-md);
    box-shadow: var(--sh-lg);
    overflow: hidden;
}
.manifest-head {
    background: var(--green-900);
    color: var(--gold-300);
    padding: 1rem 1.35rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    font-size: var(--fs-xs);
    letter-spacing: .04em;
}
.manifest-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: .95rem 1.35rem;
    border-top: 1px solid var(--line);
    font-size: var(--fs-sm);
}
.manifest-row span:first-child { color: var(--ink-soft); }
.manifest-row span:last-child {
    font-family: 'Noto Serif Bengali', serif;
    font-weight: 700;
    color: var(--primary);
}

.card-idx {
    display: inline-block;
    font-size: var(--fs-xs);
    font-weight: 700;
    color: var(--gold-700);
    letter-spacing: .03em;
}

.card-features {
    display: grid;
    gap: .45rem;
    margin-top: .3rem;
}
.card-features li {
    font-size: var(--fs-xs);
    color: var(--ink-soft);
    padding-inline-start: 1rem;
    position: relative;
}
.card-features li::before {
    content: '›';
    position: absolute;
    inset-inline-start: 0;
    color: var(--gold-500);
    font-weight: 700;
}

.ledger {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    overflow: hidden;
    box-shadow: var(--sh-sm);
}
.ledger-group { border-top: 1px solid var(--line); }
.ledger-group:first-child { border-top: none; }
.ledger-group summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 1.35rem;
    font-weight: 700;
    font-size: var(--fs-sm);
    color: var(--primary-dark);
}
.ledger-group summary::-webkit-details-marker { display: none; }
.ledger-group summary .count { color: var(--gold-700); font-weight: 700; }
.ledger-group summary .chev { color: var(--ink-mute); transition: transform var(--t); }
.ledger-group[open] summary .chev { transform: rotate(90deg); }

.ledger-rows { padding: 0 1.35rem 1.1rem; display: grid; gap: 0; }
.ledger-rows div {
    display: flex;
    justify-content: space-between;
    gap: .75rem;
    padding: .65rem 0;
    border-top: 1px dashed var(--line);
    font-size: var(--fs-sm);
}
.ledger-rows div span:first-child { color: var(--ink); }
.ledger-rows div .tag {
    font-size: var(--fs-xs);
    color: var(--ink-mute);
    white-space: nowrap;
}

.why-grid {
    display: grid;
    gap: clamp(1.5rem, 3vw, 2.5rem);
    grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 840px) { .why-grid { grid-template-columns: 1fr; } }
.why-item .num {
    font-family: 'Noto Serif Bengali', serif;
    font-size: var(--fs-2xl);
    font-weight: 700;
    color: var(--gold-500);
}
.why-item h3 { font-size: var(--fs-lg); margin-top: .4rem; }
.why-item p { margin-top: .5rem; font-size: var(--fs-sm); color: var(--ink-soft); }

/* --------------------------------------------------------------------------
   23. RESPONSIVE — mobile navigation
   -------------------------------------------------------------------------- */
@media (max-width: 1080px) {
    .topbar-contact { display: none; }

    .nav-toggle { display: block; }

    .nav-list {
        position: fixed;
        top: 0;
        inset-inline-end: 0;
        transform: translateX(105%);
        width: min(320px, 82vw);
        height: 100dvh;
        background: var(--surface);
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: .25rem;
        padding: 5.5rem 1.5rem 2rem;
        box-shadow: var(--sh-lg);
        transition: transform .32s var(--ease);
        z-index: 890;
        overflow-y: auto;
    }
    .nav-list.open { transform: translateX(0); }

    .nav-list > li > a {
        padding: .85rem .25rem;
        font-size: var(--fs-md);
        border-bottom: 1px solid var(--line);
    }
    .nav-list > li:last-child > a { border-bottom: none; }
    .nav-list > li > a.btn { margin-top: 1rem; justify-content: center; }
    .nav-list > li > a:not(.btn)::after { display: none; }

    .nav-close {
        position: absolute;
        top: 1.25rem;
        inset-inline-end: 1.25rem;
        font-size: 1.5rem;
        color: var(--primary);
    }
}

@media (min-width: 1081px) {
    .nav-close { display: none; }
}

@media (max-width: 560px) {
    .site-logo { width: 84px; }
    .brand { gap: .55rem; }
    .footer-bottom { justify-content: center; text-align: center; }
    .fab-stack { bottom: 1rem; inset-inline-end: 1rem; }
    .fab { width: 46px; height: 46px; font-size: 1.15rem; }
    .account { justify-content: flex-start; }
}
