:root {
    --green-dark: #0b4d34;
    --green: #0f6b46;
    --green-light: #e7f3ec;
    --gold: #f5a623;
    --red: #d13b3b;
    --text: #1f2d27;
    --muted: #5c6b64;
    --bg: #ffffff;
    --card-bg: #ffffff;
    --border: #dfe7e2;
    --heading-color: #0b4d34;
    --soft-bg: #e7f3ec;
    --soft-text: #0b4d34;
    --radius: 10px;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --text: #e6efe9;
        --muted: #9db3a8;
        --bg: #101713;
        --card-bg: #182420;
        --border: #2a3a32;
        --heading-color: #6fd6a3;
        --soft-bg: #16261f;
        --soft-text: #7fd9ab;
    }
}
:root[data-theme="dark"] {
    --text: #e6efe9;
    --muted: #9db3a8;
    --bg: #101713;
    --card-bg: #182420;
    --border: #2a3a32;
    --heading-color: #6fd6a3;
    --soft-bg: #16261f;
    --soft-text: #7fd9ab;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Hind Siliguri', 'Segoe UI', sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
    transition: background-color .2s ease, color .2s ease;
}

a { color: inherit; text-decoration: none; }

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}
.container.narrow { max-width: 760px; }

/* Header */
.site-header {
    background: var(--green-dark);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 50;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    gap: 16px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
}
.logo { height: 48px; width: 48px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.3; }
.brand-text small { color: #cfe6da; font-weight: 400; }

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
}

.header-utils { display: flex; align-items: center; gap: 8px; }
.util-btn {
    background: rgba(255,255,255,0.12);
    border: none;
    color: #fff;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
.util-btn:hover { background: rgba(255,255,255,0.22); }

.main-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.main-nav a {
    color: #e8f3ee;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 15px;
    white-space: nowrap;
    display: inline-block;
}
.main-nav a:hover, .main-nav a.active {
    background: rgba(255,255,255,0.15);
    color: #fff;
}
.main-nav a.nav-cta {
    background: var(--gold);
    color: #3a2a00;
    font-weight: 600;
    margin-left: 6px;
}
.main-nav a.nav-cta:hover {
    background: #e0951a;
    color: #3a2a00;
}

/* নেভবার ড্রপডাউন গ্রুপ */
.nav-group { position: relative; display: inline-block; }
.nav-group > summary {
    list-style: none;
    cursor: pointer;
    color: #e8f3ee;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 15px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-group > summary::after { content: "▾"; font-size: 11px; }
.nav-group:hover > summary, .nav-group[open] > summary { background: rgba(255,255,255,0.15); color: #fff; }
.nav-group .nav-dropdown { display: flex; flex-direction: column; }
.nav-group .nav-dropdown a { color: #e8f3ee; padding: 8px 14px; border-radius: 6px; font-size: 14px; }
.nav-group .nav-dropdown a:hover { background: rgba(255,255,255,0.15); color: #fff; }

@media (min-width: 781px) {
    .nav-group .nav-dropdown {
        position: absolute;
        top: calc(100% + 6px);
        left: 0;
        background: var(--green-dark);
        min-width: 200px;
        padding: 6px;
        border-radius: 10px;
        box-shadow: 0 12px 28px rgba(0,0,0,.25);
        z-index: 60;
    }
}

/* Hero */
.hero {
    position: relative;
    background: linear-gradient(135deg, var(--green-dark), var(--green));
    color: #fff;
    padding: 90px 0;
    text-align: center;
    overflow: hidden;
    isolation: isolate;
}
.hero-slider {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.8s ease-in-out;
}
.hero-slide.active { opacity: var(--slide-opacity, 0.35); }
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(11,77,52,.9), rgba(15,107,70,.85));
    z-index: 1;
}
.hero-content {
    position: relative;
    z-index: 2;
}
.hero h1 { font-size: 32px; max-width: 800px; margin: 0 auto 16px; }
.hero p { max-width: 640px; margin: 0 auto 28px; color: #dcefe4; font-size: 17px; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid transparent;
    font-size: 15px;
}
.btn-primary { background: var(--gold); color: #3a2a00; }
.btn-primary:hover { background: #e0951a; }
.btn-outline { background: transparent; border-color: currentColor; color: inherit; }
.btn-outline:hover { background: rgba(0,0,0,0.05); }
.hero .btn-outline { color: #fff; border-color: #fff; }
.hero .btn-outline:hover { background: rgba(255,255,255,0.12); }

/* Sections */
.section { padding: 56px 0; }
.section.alt-bg { background: var(--soft-bg); }
.section-title, .page-title {
    font-size: 26px;
    margin-bottom: 24px;
    color: var(--heading-color);
    border-bottom: 3px solid var(--gold);
    display: inline-block;
    padding-bottom: 6px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    text-align: center;
}
.stat-card {
    background: var(--soft-bg);
    border-radius: var(--radius);
    padding: 28px 12px;
}
.stat-number { display: block; font-size: 32px; font-weight: 700; color: var(--heading-color); }
.stat-label { color: var(--muted); }

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 22px;
}
.card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--card-bg);
}
.card img { width: 100%; height: 160px; object-fit: cover; display: block; }
.card-body { padding: 16px; }
.card-body h3 { margin: 6px 0; font-size: 18px; }
.badge {
    display: inline-block;
    background: var(--soft-bg);
    color: var(--soft-text);
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 999px;
    font-weight: 600;
}
.date { color: var(--muted); font-size: 13px; margin-left: 8px; }

.people-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.person-card {
    text-align: center;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 12px;
    background: var(--card-bg);
}
.person-card img {
    width: 96px; height: 96px; border-radius: 50%;
    object-fit: cover; margin: 0 auto 12px; display: block;
    border: 3px solid var(--soft-bg);
}
.person-card h3 { margin: 4px 0; font-size: 16px; }
.person-card p { margin: 2px 0; color: var(--muted); font-size: 14px; }
.person-card a.card-link { display: block; }
.person-card .btn-sm-link {
    display: inline-block;
    margin-top: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--green);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}
.gallery-grid figure { margin: 0; border-radius: var(--radius); overflow: hidden; }
.gallery-grid img { width: 100%; height: 180px; object-fit: cover; display: block; }
.gallery-grid figcaption { padding: 6px 8px; font-size: 13px; color: var(--muted); }

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin: 24px 0;
}
.info-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    background: var(--soft-bg);
}
.note { font-size: 13px; }

.center-cta { text-align: center; }
.cta-band { background: var(--green-dark); color: #fff; }
.cta-band h2 { margin-top: 0; }
.cta-band p { color: #dcefe4; margin-bottom: 20px; }

.check-list { list-style: none; padding: 0; }
.check-list li { padding-left: 28px; position: relative; margin-bottom: 8px; }
.check-list li::before {
    content: "✓";
    position: absolute; left: 0; top: 0;
    color: var(--green); font-weight: 700;
}

.filter-bar { display: flex; gap: 10px; margin-bottom: 24px; flex-wrap: wrap; }
.filter-bar input {
    padding: 10px 14px; border: 1px solid var(--border); border-radius: 999px;
    font-family: inherit; background: var(--card-bg); color: var(--text);
}

.form { display: flex; flex-direction: column; gap: 16px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; color: var(--text); }
.form input, .form textarea, .form select {
    font-family: inherit;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-weight: 400;
    font-size: 15px;
    background: var(--card-bg);
    color: var(--text);
}
.form button { align-self: flex-start; border: none; }

.alert { padding: 14px 18px; border-radius: 8px; margin-bottom: 20px; }
.alert-success { background: #e3f6e9; color: #1c6b3d; }
.alert-error { background: #fdecec; color: #a12a2a; }
.alert ul { margin: 0; padding-left: 20px; }

.muted { color: var(--muted); }

.blog-body { font-size: 16px; line-height: 1.9; }
.blog-body img { max-width: 100%; border-radius: 8px; }

/* প্রোফাইল পেজ (এলামনাই/শিক্ষক) */
.profile-header {
    display: flex;
    gap: 24px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 30px;
}
.profile-header img {
    width: 140px; height: 140px; border-radius: 50%;
    object-fit: cover; border: 4px solid var(--soft-bg);
}
.profile-header h1 { margin: 0 0 6px; border: none; padding: 0; }
.profile-meta { color: var(--muted); }
.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
}
.profile-field {
    background: var(--soft-bg);
    border-radius: var(--radius);
    padding: 16px 18px;
}
.profile-field h4 { margin: 0 0 6px; font-size: 14px; color: var(--soft-text); }
.profile-field p { margin: 0; white-space: pre-line; }
.profile-field.full { grid-column: 1 / -1; }

/* Footer */
.site-footer { background: var(--green-dark); color: #dcefe4; margin-top: 40px; }
.footer-inner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    padding: 40px 20px;
}
.footer-inner a { display: block; margin: 4px 0; color: #cfe6da; }
.footer-inner h4 { color: #fff; margin-bottom: 10px; }
.footer-bottom {
    text-align: center;
    padding: 16px;
    border-top: 1px solid rgba(255,255,255,0.15);
    font-size: 13px;
}

/* সেকশন হেডার রো (শিরোনাম + বাটন পাশাপাশি) */
.section-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 8px;
}
.section-header-row .page-title { margin-bottom: 0; }

/* পরিষদ ক্যাটাগরি */
.committee-category { margin-bottom: 40px; }
.committee-category-title {
    font-size: 18px;
    color: var(--heading-color);
    margin-bottom: 16px;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--soft-bg);
}

/* পাবলিকেশন্স / ডকুমেন্ট কার্ড */
.doc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}
.doc-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    background: var(--card-bg);
}
.doc-card:hover { border-color: var(--green); }
.doc-icon { font-size: 28px; }
.doc-cover { width: 56px; height: 72px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }
.doc-info { display: flex; flex-direction: column; gap: 4px; }
.doc-desc { color: var(--muted); font-size: 13px; }
.doc-download { color: var(--green); font-weight: 600; font-size: 13px; margin-top: 4px; }

/* ফটোফ্রেম গ্যালারি */
.frame-card img { background: var(--soft-bg); object-fit: contain; }

/* ফটোফ্রেম এডিটর */
.frame-editor {
    display: flex;
    gap: 26px;
    flex-wrap: wrap;
    align-items: flex-start;
    margin-top: 20px;
}
.frame-canvas-wrap {
    position: relative;
    flex: 1 1 320px;
    max-width: 480px;
    background: var(--soft-bg);
    border-radius: var(--radius);
    overflow: hidden;
}
.frame-canvas-wrap canvas {
    width: 100%;
    height: auto;
    display: block;
    touch-action: none;
    cursor: grab;
}
.frame-empty-hint {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    color: var(--muted);
    pointer-events: none;
    font-size: 14px;
}
.frame-controls {
    flex: 1 1 240px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.frame-upload-btn {
    display: inline-block;
    text-align: center;
    background: var(--green);
    color: #fff;
    padding: 12px 20px;
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
}
.frame-upload-btn input[type="file"] { display: none; }
.frame-zoom-label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-weight: 600;
    font-size: 14px;
}
.frame-drag-hint { font-size: 13px; }

.frame-result-overlay {
    position: fixed;
    inset: 0;
    background: rgba(11, 77, 52, 0.92);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.frame-result-box {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 20px;
    max-width: 420px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.frame-result-box img {
    width: 100%;
    border-radius: 8px;
    -webkit-touch-callout: default;
}
.frame-result-box p { margin: 0; font-size: 14px; color: var(--muted); }

/* ইভেন্ট */
.event-countdown {
    font-weight: 700;
    color: var(--heading-color);
    font-size: 14px;
    margin: 6px 0;
}
.event-countdown-large { font-size: 22px; margin: 16px 0; }
.upcoming-event-teaser { text-align: center; }

/* এলামনাই ফটোকার্ড এডিটর (অ্যাডমিন) */
#cardEditorWrap {
    position: relative;
    display: inline-block;
    max-width: 100%;
    touch-action: none;
}
#cardEditorWrap img { max-width: 100%; display: block; border-radius: 8px; }
.card-marker {
    position: absolute;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(245, 166, 35, 0.9);
    border: 2px solid #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: #3a2a00;
    cursor: grab;
    box-shadow: 0 2px 6px rgba(0,0,0,.35);
    user-select: none;
}
.card-marker:active { cursor: grabbing; }

.card-photo-picker {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--soft-bg);
    border-radius: var(--radius);
    padding: 16px;
    margin-top: 14px;
    flex: 1 1 240px;
}
.card-photo-picker label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 14px;
}
.card-photo-status { font-size: 13px; color: var(--primary, #0b4d34); }

.share-buttons {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}
.share-label { font-weight: 600; font-size: 14px; color: var(--text-muted, #5c6b64); }
.share-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform .15s ease, opacity .15s ease;
}
.share-icon-btn:hover { opacity: 0.88; transform: translateY(-2px); }
.share-fb { background: #1877f2; }
.share-wa { background: #25d366; }
.share-ig { background: radial-gradient(circle at 30% 110%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%); }
.share-copy { background: #5c6b64; }
.share-native { background: var(--primary, #0b4d34); }
.share-status {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary, #0b4d34);
}

/* কমেন্ট সেকশন */
.comments-list { display: flex; flex-direction: column; gap: 14px; margin-bottom: 24px; }
.comment-item {
    background: var(--soft-bg);
    border-radius: var(--radius);
    padding: 14px 16px;
}
.comment-meta { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.comment-text { margin: 0; white-space: pre-line; }

@media (max-width: 780px) {
    .nav-toggle { display: block; }
    .main-nav {
        display: none;
        flex-direction: column;
        width: 100%;
        background: var(--green-dark);
        padding: 10px 0;
    }
    .main-nav.open { display: flex; }
    .header-inner { flex-wrap: wrap; }
    .stats-grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: 26px; }
}
