/* বাণী তীর্থ গ্রন্থাগার — পাবলিক সাইটের স্টাইল
   একটাই স্টাইলশিট: পেজের ভেতরে আর আলাদা <style> নেই */

:root {
    --red: #8B0000;
    --red-deep: #5E0A0A;
    --red-hover: #A31212;
    --gold: #D4AF37;
    --gold-hover: #E3C25A;
    --cream: #FFFAF5;
    --blush: #FFE8D9;
    --ink: #2B2220;
    --muted: #6A5E59;
    --line: #EADFD6;
    --white: #fff;
    --footer-bg: #2A1112;
    --ok-bg: #E6F4EA;
    --ok-ink: #14532D;
    --err-bg: #FDE8E8;
    --err-ink: #7A1212;
    --radius: 16px;
    --font-body: 'Hind Siliguri', 'Noto Sans Bengali', 'SolaimanLipi', system-ui, sans-serif;
    --font-display: 'Tiro Bangla', 'Hind Siliguri', 'Noto Serif Bengali', serif;
}

/* ---------- বেস ---------- */
*, *::before, *::after { box-sizing: border-box; }

[hidden] { display: none !important; }

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

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.75;
    color: var(--ink);
    background: var(--cream);
}

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

h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 400;
    line-height: 1.4;
    color: var(--red);
    margin: 0 0 .6em;
}

h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.85rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; }

a { color: var(--red); text-underline-offset: 3px; }
a:hover { color: var(--red-hover); }

:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 2px;
    border-radius: 4px;
}

.container {
    width: 100%;
    max-width: 1140px;
    margin-inline: auto;
    padding-inline: 20px;
}

.section { padding-block: 56px; }

.skip-link {
    position: absolute;
    left: 12px;
    top: -60px;
    z-index: 3000;
    background: var(--red);
    color: var(--white);
    padding: 10px 16px;
    border-radius: 8px;
    text-decoration: none;
}
.skip-link:focus { top: 12px; color: var(--white); }

/* ---------- বাটন ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4em;
    min-height: 44px;
    padding: .55em 1.5em;
    border: 2px solid transparent;
    border-radius: 999px;
    font: inherit;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
    cursor: pointer;
    background: var(--red);
    color: var(--white);
    transition: background-color .2s, color .2s, border-color .2s;
}
.btn:hover { background: var(--red-hover); color: var(--white); }

.btn--gold { background: var(--gold); color: var(--red); }
.btn--gold:hover { background: var(--gold-hover); color: var(--red); }

.btn--ghost { background: transparent; color: var(--white); border-color: var(--gold); }
.btn--ghost:hover { background: rgba(212, 175, 55, .18); color: var(--white); }

.btn--block { display: flex; width: 100%; }
.btn--sm { min-height: 38px; padding: .3em 1.1em; font-size: .95rem; }

.link-more {
    display: inline-block;
    margin-top: auto;
    padding-top: .75em;
    font-weight: 600;
}

/* ---------- হেডার ও মেনু ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: linear-gradient(135deg, #fff5e6 0%, var(--blush) 100%);
    border-bottom: 3px solid var(--gold);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-block: 10px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--red);
    min-width: 0;
}
.brand-logo { width: 48px; height: 48px; object-fit: contain; border-radius: 50%; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.brand-name { font-family: var(--font-display); font-size: 1.35rem; color: var(--red); }
.brand-sub { font-size: .8rem; color: var(--muted); }

.site-nav { display: flex; align-items: center; gap: 12px; }
.site-nav ul { display: flex; list-style: none; gap: 2px; }
.site-nav ul a {
    display: block;
    padding: 8px 14px;
    border-radius: 999px;
    color: var(--ink);
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color .2s, color .2s;
}
.site-nav ul a:hover,
.site-nav ul a.active { background: var(--red); color: var(--white); }

.menu-toggle {
    display: none;
    min-height: 44px;
    padding: 6px 16px;
    border: 0;
    border-radius: 10px;
    background: var(--red);
    color: var(--white);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

@media (max-width: 1020px) {
    .header-inner { flex-wrap: wrap; }
    .menu-toggle { display: inline-flex; align-items: center; gap: 6px; }

    .site-nav {
        display: none;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        padding: 12px 0 8px;
        border-top: 1px solid var(--line);
    }
    .site-nav.is-open { display: flex; }
    .site-nav ul { flex-direction: column; gap: 4px; }
    .site-nav ul a { text-align: center; padding: 12px; }
    .nav-cta { width: 100%; }
}

/* ---------- হিরো (হোমপেজ) ---------- */
.hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding-block: clamp(64px, 11vw, 120px);
    text-align: center;
    color: var(--white);
    background: var(--red-deep);
}
.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -2;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        repeating-radial-gradient(circle at 50% 135%, rgba(212, 175, 55, .22) 0 2px, transparent 2px 44px),
        linear-gradient(180deg, rgba(94, 10, 10, .86) 0%, rgba(139, 0, 0, .9) 100%);
}
.hero-content { max-width: 760px; margin-inline: auto; }
.hero h1 {
    color: var(--white);
    font-size: clamp(2rem, 6vw, 3.4rem);
    margin-bottom: .35em;
}
.hero p { color: rgba(255, 255, 255, .9); font-size: 1.15rem; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 28px; }

@media (max-width: 560px) {
    .hero-actions .btn { width: 100%; }
}

/* ---------- হোমপেজ কার্ড ---------- */
.quick-info {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    padding-block: 56px;
}
@media (max-width: 760px) { .quick-info { grid-template-columns: 1fr; } }

.info-card {
    display: flex;
    flex-direction: column;
    padding: 26px;
    background: var(--white);
    border: 1px solid var(--line);
    border-top: 4px solid var(--gold);
    border-radius: var(--radius);
}
.info-card h2 { font-size: 1.35rem; margin-bottom: .5em; }
.info-card p { color: var(--muted); }

.info-card--accent {
    background: var(--red);
    border-color: var(--red);
    border-top-color: var(--gold);
    color: var(--white);
}
.info-card--accent h2 { color: var(--white); }
.info-card--accent p { color: rgba(255, 255, 255, .9); }

.time-list { list-style: none; margin: 4px 0 12px; }
.time-list li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
}
.time-list li:last-child { border-bottom: 0; }
.time-list .time { color: var(--red); font-weight: 600; white-space: nowrap; }

.gallery-preview {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 12px;
}
.gallery-preview img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 10px;
}

.event-badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 18px; list-style: none; }
.event-badges li {
    padding: 2px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .16);
    font-size: .9rem;
}

.contact-lines { margin-bottom: 8px; }
.contact-lines p { margin-bottom: .4em; }

/* ---------- ভেতরের পেজের শিরোনাম ---------- */
.page-head {
    padding-block: 40px 28px;
    background: linear-gradient(135deg, #fff5e6 0%, var(--blush) 100%);
    border-bottom: 1px solid var(--line);
}
.page-head h1 { margin-bottom: .2em; }
.page-head p { margin: 0; color: var(--muted); max-width: 60ch; }

/* ---------- ইতিহাস ---------- */
.founder-info {
    display: flex;
    align-items: center;
    gap: 32px;
    margin-bottom: 32px;
}
.founder-image { flex: 0 0 240px; }
.founder-image img { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); }
.founder-details h2 { margin-bottom: .2em; }
.established { color: var(--muted); font-weight: 600; margin: 0; }

.history-content { max-width: 70ch; margin-bottom: 40px; }

.timeline {
    list-style: none;
    position: relative;
    margin: 12px 0 0;
    padding-left: 28px;
    border-left: 2px solid var(--gold);
}
.timeline li { position: relative; padding: 0 0 22px 18px; }
.timeline li::before {
    content: "";
    position: absolute;
    left: -37px;
    top: .55em;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--red);
    border: 3px solid var(--cream);
    box-shadow: 0 0 0 2px var(--gold);
}
.timeline .year { display: block; color: var(--red); font-weight: 700; }
.timeline .event { color: var(--ink); }

@media (max-width: 640px) {
    .founder-info { flex-direction: column; align-items: flex-start; }
    .founder-image { flex-basis: auto; width: min(260px, 100%); }
}

/* ---------- কমিটি ---------- */
.committee-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr));
    gap: 24px;
}
.member-card {
    overflow: hidden;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.member-image, .no-image { aspect-ratio: 1; }
.member-image img { width: 100%; height: 100%; object-fit: cover; }
.no-image {
    display: grid;
    place-items: center;
    background: var(--blush);
    color: var(--muted);
}
.member-info { padding: 16px 18px 20px; text-align: center; }
.member-info h3 { margin-bottom: .1em; font-size: 1.15rem; }
.designation { margin: 0; color: var(--muted); font-weight: 600; }

/* ---------- খালি অবস্থা ---------- */
.empty-note {
    grid-column: 1 / -1;
    padding: 40px 20px;
    text-align: center;
    color: var(--muted);
    background: var(--white);
    border: 1px dashed var(--line);
    border-radius: var(--radius);
}

/* ---------- পূজা সময়সূচী ---------- */
.table-wrap {
    overflow-x: auto;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.schedule-table { width: 100%; border-collapse: collapse; min-width: 480px; }
.schedule-table th,
.schedule-table td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--line); }
.schedule-table th { background: var(--red); color: var(--white); font-weight: 600; }
.schedule-table tbody tr:nth-child(even) { background: var(--cream); }
.schedule-table tbody tr:last-child td { border-bottom: 0; }

.special-events { margin-top: 56px; }
.events-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: 20px;
}
.event-card {
    padding: 22px;
    background: var(--white);
    border: 1px solid var(--line);
    border-left: 4px solid var(--gold);
    border-radius: var(--radius);
}
.event-card h3 { margin-bottom: .1em; }
.event-card .date { color: var(--red); font-weight: 600; margin-bottom: .3em; }
.event-card .description { margin: 0; color: var(--muted); }

/* ---------- গ্যালারি ---------- */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
    gap: 16px;
}
.gallery-item {
    padding: 0;
    border: 0;
    overflow: hidden;
    cursor: zoom-in;
    background: var(--blush);
    border-radius: 12px;
}
.gallery-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    transition: transform .3s;
}
.gallery-item:hover .gallery-image { transform: scale(1.04); }

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: grid;
    place-items: center;
    padding: 56px 16px 24px;
    background: rgba(0, 0, 0, .92);
}
.lightbox-content { max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox-close {
    position: absolute;
    top: 8px;
    right: 14px;
    width: 48px;
    height: 48px;
    border: 0;
    background: transparent;
    color: var(--white);
    font-size: 2.5rem;
    line-height: 1;
    cursor: pointer;
}
.lightbox-close:hover { color: var(--gold); }

/* ---------- ফর্ম (বুকিং, দান, যোগাযোগ) ---------- */
.form-page { max-width: 800px; margin-inline: auto; }

.form-card {
    padding: 30px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
@media (max-width: 640px) {
    .form-row { grid-template-columns: 1fr; }
    .form-card { padding: 20px; }
}

.form-group { margin-bottom: 20px; }
.form-group > label,
.form-group > .label { display: block; margin-bottom: 6px; font-weight: 600; }

.form-group input:not([type="checkbox"]),
.form-group select,
.form-group textarea {
    width: 100%;
    min-height: 46px;
    padding: 10px 14px;
    border: 1px solid #D8CBC0;
    border-radius: 10px;
    background: var(--white);
    color: var(--ink);
    font: inherit;
}
.form-group textarea { min-height: 120px; resize: vertical; }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, .35);
}
.form-hint { margin: 6px 0 0; font-size: .9rem; color: var(--muted); }

.checkbox { display: flex; align-items: flex-start; gap: 10px; font-weight: 400 !important; }
.checkbox input { flex: none; width: 20px; height: 20px; margin-top: 5px; accent-color: var(--red); }

.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.chip {
    min-height: 40px;
    padding: 4px 20px;
    border: 1px solid #D8CBC0;
    border-radius: 999px;
    background: var(--white);
    color: var(--ink);
    font: inherit;
    cursor: pointer;
    transition: background-color .2s, border-color .2s;
}
.chip:hover { background: var(--blush); }
.chip[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: var(--red); font-weight: 700; }

.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.alert { margin-bottom: 24px; padding: 14px 18px; border-radius: 12px; }
.alert ul { margin: 0; padding-left: 1.2em; }
.alert--success { background: var(--ok-bg); color: var(--ok-ink); border: 1px solid #BFE0C8; }
.alert--error { background: var(--err-bg); color: var(--err-ink); border: 1px solid #F3C2C2; }

.info-box,
.pay-info {
    margin-top: 28px;
    padding: 20px 24px;
    background: #FFF4DC;
    border-left: 4px solid var(--gold);
    border-radius: 12px;
}
.info-box h2,
.pay-info h2 { font-size: 1.2rem; }
.info-box p:last-child { margin-bottom: 0; }
.pay-info dl { margin: 0; }
.pay-info dt { font-weight: 600; }
.pay-info dd { margin: 0 0 10px; }

/* ---------- যোগাযোগ ---------- */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 28px;
    margin-bottom: 40px;
}
@media (max-width: 860px) { .contact-container { grid-template-columns: 1fr; } }

.contact-info,
.map-container { padding: 28px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.contact-info h2,
.contact-form h2,
.map-container h2 { font-size: 1.35rem; }

.info-item { display: flex; gap: 14px; margin-bottom: 20px; }
.info-item .icon { flex: none; width: 36px; font-size: 1.5rem; line-height: 1.4; }
.info-item strong { display: block; }
.info-item p { margin: 0; color: var(--muted); }

.map { overflow: hidden; border-radius: 12px; }
.map iframe { display: block; width: 100%; height: 400px; border: 0; }


/* ---------- নোটিশ বোর্ড, বাংলা তারিখ ---------- */
.hero-date { font-size: 1rem !important; color: var(--gold) !important; margin-bottom: 0; }

.notice-board {
    margin-top: 40px;
    padding: 22px 26px;
    background: #FFF4DC;
    border: 1px solid #F0DDA8;
    border-left: 5px solid var(--gold);
    border-radius: var(--radius);
}
.notice-board h2 { font-size: 1.3rem; margin-bottom: .5em; }
.notice-board ul { list-style: none; }
.notice-board li { padding: 8px 0; border-bottom: 1px solid #F0DDA8; }
.notice-board li:last-child { border-bottom: 0; }
.notice-board p { margin: .2em 0 0; color: var(--muted); }
.notice-date { margin-left: 10px; font-size: .9rem; color: var(--muted); }

/* ---------- পেমেন্ট মাধ্যম, স্ট্যাটাস ফলাফল ---------- */
.pay-method { margin: 0 0 20px; padding: 0; border: 0; }
.pay-method legend { padding: 0; margin-bottom: 6px; font-weight: 600; }
.radio { display: block; margin-bottom: 6px; font-weight: 400; cursor: pointer; }
.radio input { width: 18px; height: 18px; margin-right: 8px; accent-color: var(--red); vertical-align: -3px; }

.result-box dl { margin: 0; }
.result-box dt { font-weight: 600; color: var(--muted); font-size: .9rem; }
.result-box dd { margin: 0 0 10px; }

/* ---------- ফুটার ---------- */
.site-footer {
    margin-top: 40px;
    padding-top: 48px;
    background: var(--footer-bg);
    color: #E9DDD3;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: 36px;
    padding-bottom: 36px;
}
.footer-col h2 {
    margin-bottom: .6em;
    font-size: 1.2rem;
    color: var(--gold);
}
.footer-col p { margin-bottom: .5em; color: #D9CCC2; }
.footer-col a { color: #F4E6D8; text-decoration-color: rgba(244, 230, 216, .4); }
.footer-col a:hover { color: var(--gold); }
.footer-col .btn--gold,
.footer-col .btn--gold:hover { color: var(--red); text-decoration: none; }

.footer-links { list-style: none; }
.footer-links li { margin-bottom: 6px; }
.footer-links a { text-decoration: none; }

.social-links { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.social-link {
    padding: 6px 18px;
    border-radius: 999px;
    color: var(--white) !important;
    text-decoration: none !important;
}
.social-link--fb { background: #3b5998; }
.social-link--fb:hover { background: #4c69ba; }
.social-link--yt { background: #c4302b; }
.social-link--yt:hover { background: #e0413b; }

.copyright {
    padding: 18px 20px;
    text-align: center;
    font-size: .92rem;
    border-top: 1px solid rgba(255, 255, 255, .12);
    color: #B9A99D;
}
.copyright p { margin: 2px 0; }

/* ---------- উপরে যাওয়ার বাটন ---------- */
.scroll-top {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 900;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    background: var(--red);
    color: var(--white);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
}
.scroll-top:hover { background: var(--red-hover); }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition: none !important; }
}
