/*
 * ঘণ্টিকা — স্কুলের পাবলিক সাইট, থিম "ফিতা · দপ্তর" (Omar-এর বাছাই, ২৭ সেপ্টেম্বর ২০২৬:
 * সাইটও প্যানেলের থিমে — docs/redesign-themes.md, প্রশ্ন ৪)। ধাপ ১.৪ক।
 *
 * ময়ূরকণ্ঠী শিরোনাম-পট্টি আর ট্যাবের সারি (প্যানেলের মতো), পিতলের ছোঁয়া। স্কুলের নিজের রঙ
 * (--gh-school, --gh-school-ink) কেবল লোগোর ঘর আর মূল বোতামে — layout-এ inline বসে।
 * সব রঙ নিচের টোকেনে; গাঢ় থিম দর্শকের যন্ত্রের পছন্দে (prefers-color-scheme)।
 * কোনো JavaScript নেই: ফোনের মেনু <details>।
 */

:root {
    --gh-ground: #F2F5F4;
    --gh-surface: #FFFFFF;
    --gh-title: #0A4E55;
    --gh-tabs: #0E6770;
    --gh-ribbon: #E3EFEE;
    --gh-ink: #122A2E;
    --gh-ink-soft: #46605F;
    --gh-line: #CFDDDB;
    --gh-brass: #946419;
    --gh-brass-light: #D9A441;
    --gh-on-title: #FFFFFF;
    --gh-tab-ink: #D7ECEA;
    --gh-link: #0E6770;
    --gh-hero-veil: rgba(6, 40, 44, 0.62);
    --gh-shadow: 0 1px 2px rgba(10, 78, 85, 0.08), 0 4px 16px rgba(10, 78, 85, 0.06);
    --gh-school: #946419;
    --gh-school-ink: #FFFFFF;
    color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
    :root {
        --gh-ground: #0E1B1D;
        --gh-surface: #13272A;
        --gh-title: #06363B;
        --gh-tabs: #0A454C;
        --gh-ribbon: #16353A;
        --gh-ink: #E3EFEE;
        --gh-ink-soft: #A7C4C1;
        --gh-line: #2A4D51;
        --gh-tab-ink: #C9E3E0;
        --gh-link: #7CC2BA;
        --gh-hero-veil: rgba(3, 20, 22, 0.72);
        --gh-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    }
}

/* ---------- ভিত্তি ---------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--gh-ground);
    color: var(--gh-ink);
    font-family: "Noto Sans Bengali", "Outfit", system-ui, sans-serif;
    font-size: 1.0625rem;
    line-height: 1.75;
    overflow-wrap: anywhere;
}

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

a { color: var(--gh-link); text-underline-offset: 0.18em; }

a:focus-visible, summary:focus-visible, .btn:focus-visible {
    outline: 3px solid var(--gh-brass-light);
    outline-offset: 2px;
    border-radius: 6px;
}

h1, h2, h3 { line-height: 1.35; margin: 0 0 0.6rem; }
h1 { font-size: clamp(1.6rem, 5vw, 2.4rem); }
h2 { font-size: clamp(1.25rem, 3.4vw, 1.6rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1rem; }

.wrap {
    width: 100%;
    max-width: 68rem;
    margin: 0 auto;
    padding: 0 1rem;
}

.skip {
    position: absolute;
    left: -999px;
    top: 0.5rem;
    background: var(--gh-surface);
    color: var(--gh-ink);
    padding: 0.5rem 1rem;
    z-index: 10;
}
.skip:focus { left: 0.5rem; }

/* ---------- শিরোনাম-পট্টি ---------- */

.site-bar { background: var(--gh-title); color: var(--gh-on-title); }

.site-bar .wrap {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 4rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    color: inherit;
    text-decoration: none;
    min-width: 0;
    flex: 1;
}

.well {
    flex: none;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 10px;
    background: var(--gh-school);
    color: var(--gh-school-ink);
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 1.2rem;
    overflow: hidden;
}
.well img { width: 100%; height: 100%; object-fit: contain; background: #FFFFFF; padding: 3px; }

.brand-name { font-weight: 700; font-size: 1.1rem; line-height: 1.3; }
.brand-name small {
    display: block;
    font-weight: 400;
    font-size: 0.8rem;
    color: var(--gh-tab-ink);
}

/* ফোনের মেনু — <details>, JavaScript ছাড়া */
.menu { position: relative; flex: none; }
.menu summary {
    list-style: none;
    cursor: pointer;
    padding: 0.45rem 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 8px;
    font-size: 0.95rem;
}
.menu summary::-webkit-details-marker { display: none; }
.menu nav {
    position: absolute;
    right: 0;
    top: calc(100% + 0.5rem);
    z-index: 5;
    min-width: 13rem;
    background: var(--gh-surface);
    border: 1px solid var(--gh-line);
    border-radius: 10px;
    box-shadow: var(--gh-shadow);
    padding: 0.4rem;
    display: grid;
}
.menu nav a {
    color: var(--gh-ink);
    text-decoration: none;
    padding: 0.55rem 0.8rem;
    border-radius: 6px;
}
.menu nav a[aria-current="page"] { background: var(--gh-ribbon); font-weight: 700; }

/* কম্পিউটারের ট্যাব-সারি — প্যানেলের ট্যাবের মতো */
.tabs { background: var(--gh-tabs); display: none; }
/* আটটি পাতা — মাঝারি পর্দায় সারিটি নিজেই পাশে সরে, পুরো পাতা চওড়া হয় না */
.tabs .wrap { display: flex; gap: 0.25rem; min-height: 0; overflow-x: auto; scrollbar-width: thin; }
.tabs a {
    white-space: nowrap;
    color: var(--gh-tab-ink);
    text-decoration: none;
    padding: 0.55rem 1rem 0.5rem;
    border-radius: 8px 8px 0 0;
    font-size: 0.97rem;
}
.tabs a:hover { color: var(--gh-on-title); }
.tabs a[aria-current="page"] {
    background: var(--gh-ground);
    color: var(--gh-ink);
    font-weight: 700;
}

@media (min-width: 48rem) {
    .menu { display: none; }
    .tabs { display: block; }
}

/* ---------- মূল অংশ ---------- */

main { padding: 0 0 3rem; }

.page-head { padding: 2rem 0 1rem; }
.page-head p { color: var(--gh-ink-soft); }

.card {
    background: var(--gh-surface);
    border: 1px solid var(--gh-line);
    border-radius: 14px;
    padding: 1.25rem;
    box-shadow: var(--gh-shadow);
}

.stack > * + * { margin-top: 1rem; }

.grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
}

.muted { color: var(--gh-ink-soft); }

.soon {
    background: var(--gh-ribbon);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    color: var(--gh-ink-soft);
}

/* ---------- বোতাম ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 2.9rem;
    padding: 0.55rem 1.2rem;
    border-radius: 10px;
    font-weight: 700;
    text-decoration: none;
    border: 2px solid transparent;
}
.btn-main { background: var(--gh-school); color: var(--gh-school-ink); }
.btn-quiet { border-color: currentColor; color: inherit; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* ---------- হোমের মাথা ---------- */

.hero {
    position: relative;
    color: #FFFFFF;
    background: linear-gradient(135deg, var(--gh-tabs), var(--gh-title));
    background-size: cover;
    background-position: center;
}
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--gh-hero-veil);
}
.hero.plain::before { background: transparent; }
.hero .wrap { position: relative; padding-top: 3rem; padding-bottom: 3rem; }
.hero h1 { color: #FFFFFF; }
.hero .tagline { font-size: 1.15rem; max-width: 40rem; }
.hero .facts { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; font-size: 0.95rem; opacity: 0.92; margin-bottom: 1.4rem; }
.hero .btn-quiet { color: #FFFFFF; }

/* ---------- প্রধান শিক্ষকের বাণী ---------- */

.message { display: grid; gap: 1.25rem; }
.message .who { display: flex; align-items: center; gap: 0.9rem; }
.portrait {
    flex: none;
    width: 5.5rem;
    height: 5.5rem;
    border-radius: 50%;
    object-fit: cover;
    background: var(--gh-ribbon);
    display: grid;
    place-items: center;
    font-size: 1.8rem;
    font-weight: 700;
    /* --gh-link: হালকায় গাঢ় ময়ূরকণ্ঠী, গাঢ়তে হালকা — দুই থিমেই পড়া যায় */
    color: var(--gh-link);
}
.message .who strong { display: block; font-size: 1.1rem; }

@media (min-width: 48rem) {
    .message { grid-template-columns: 12rem 1fr; align-items: start; }
    .message .who { flex-direction: column; text-align: center; }
    .portrait { width: 8rem; height: 8rem; }
}

.section { padding-top: 2rem; }
.section h2 { border-left: 4px solid var(--gh-brass); padding-left: 0.7rem; }

/* ---------- যোগাযোগ ---------- */

.contact-list { margin: 0; display: grid; gap: 1rem; }
.contact-list dt { font-weight: 700; color: var(--gh-ink-soft); font-size: 0.92rem; }
.contact-list dd { margin: 0.1rem 0 0; font-size: 1.1rem; }

/* ---------- পাদটীকা ---------- */

.site-foot {
    background: var(--gh-title);
    color: var(--gh-tab-ink);
    padding: 2rem 0 1.5rem;
    font-size: 0.95rem;
}
.site-foot a { color: var(--gh-on-title); }
.site-foot .cols { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
.site-foot strong { color: var(--gh-on-title); }
.site-foot nav { display: grid; gap: 0.2rem; }
.powered {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}
.powered span { display: inline-flex; align-items: center; gap: 0.4rem; }
.powered img { width: 1.2rem; height: 1.2rem; }

/* ---------- ঘণ্টিকার ছোট পাতা (/) ---------- */

.product {
    min-height: 100vh;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 2rem 1rem;
}
.product img { width: 4.5rem; height: 4.5rem; margin: 0 auto 1rem; }
.product h1 { color: var(--gh-title); }
@media (prefers-color-scheme: dark) { .product h1 { color: var(--gh-ink); } }
.product .actions { justify-content: center; margin-top: 1.5rem; }
.product .btn-main { background: var(--gh-brass); color: #FFFFFF; }

/* ---------- নোটিশ (ধাপ ১.৪খ) ---------- */

.notice-list { list-style: none; margin: 0; padding: 0.25rem 1.25rem; }
.notice-row {
    display: grid;
    gap: 0.15rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--gh-line);
}
.notice-row:last-child { border-bottom: 0; }
.notice-row > a { font-weight: 700; text-decoration: none; color: var(--gh-ink); }
.notice-row > a:hover { color: var(--gh-link); text-decoration: underline; }
.notice-meta { color: var(--gh-ink-soft); font-size: 0.92rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.badge {
    display: inline-block;
    background: var(--gh-brass);
    color: #FFFFFF;
    border-radius: 999px;
    padding: 0 0.6rem;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.6;
}
.pager { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; margin-top: 1.25rem; }

/* ---------- আমাদের শিক্ষক (ধাপ ১.৪গ) ---------- */

.people {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
}
.person { display: flex; align-items: center; gap: 0.9rem; }
.person > div { min-width: 0; }
/* হোমের বাণীর বড় ছবি নয় — কার্ডে ছোট, যাতে নাম এক লাইনে ধরে */
.person .portrait { width: 4.5rem; height: 4.5rem; font-size: 1.4rem; }
.person strong { display: block; font-size: 1.05rem; }
.person .muted { display: block; }
.subjects { display: block; font-size: 0.9rem; color: var(--gh-link); }

/* ---------- গ্যালারি (ধাপ ১.৪গ) ---------- */

.albums {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr));
}
.album-card { padding: 0 0 1rem; overflow: hidden; }
.album-card a { display: block; color: var(--gh-ink); text-decoration: none; }
.album-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--gh-ribbon); }
.album-card strong { display: block; padding: 0.75rem 1rem 0; }
.album-card .muted { display: block; padding: 0.15rem 1rem 0; font-size: 0.92rem; }

.photos {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.6rem;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr));
}
.photos img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 10px;
    background: var(--gh-ribbon);
}

/* ---------- অভিভাবকের পাতা (ধাপ ১.৭) — ফোনে আগে ---------- */

.narrow { max-width: 30rem; margin-inline: auto; }
.field { display: block; margin-top: 1rem; }
.field > span { display: block; font-weight: 700; margin-bottom: 0.35rem; }
.field input {
    width: 100%;
    min-height: 2.9rem;
    padding: 0.55rem 0.8rem;
    font: inherit;
    font-size: 1.1rem;
    color: var(--gh-ink);
    background: var(--gh-ground);
    border: 1px solid var(--gh-line);
    border-radius: 10px;
}
.field input:focus { outline: 2px solid var(--gh-tabs); outline-offset: 1px; }
.field small { display: block; color: var(--gh-ink-soft); margin-top: 0.3rem; }
.btn-block { width: 100%; margin-top: 1.2rem; font: inherit; font-weight: 700; cursor: pointer; }
.msg { border-radius: 10px; padding: 0.75rem 0.9rem; }
.msg-ok { background: var(--gh-ribbon); }
.msg-err { background: #FCEDEC; color: #8E2B2B; }
@media (prefers-color-scheme: dark) { .msg-err { background: #3A1F1F; color: #F5B5B5; } }
.child-link { display: flex; gap: 0.9rem; align-items: center; text-decoration: none; color: inherit; }
.child-link:hover h3 { text-decoration: underline; }
.child-link h3 { margin: 0; font-size: 1.15rem; }
.child-photo {
    flex: 0 0 3.5rem;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    object-fit: cover;
    background: var(--gh-ribbon);
    display: grid;
    place-items: center;
    font-weight: 700;
    color: var(--gh-title);
}
.kv { display: grid; grid-template-columns: minmax(7rem, auto) 1fr; gap: 0.45rem 1rem; margin: 0; }
.kv dt { color: var(--gh-ink-soft); }
.kv dd { margin: 0; font-weight: 600; }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: var(--gh-link); text-decoration: underline; cursor: pointer; }
