@import url('https://fonts.googleapis.com/css2?family=Baloo+Da+2:wght@500;600;700;800&family=Hind+Siliguri:wght@400;500;600;700&family=Tiro+Bangla&display=swap');

:root {
    --bg: #F4F6F0;
    --surface: #FFFFFF;
    --ink: #16241C;
    --muted: #5B6B60;
    --primary: #1F4D3A;
    --primary-dark: #123326;
    --primary-tint: #E7EFE9;
    --accent: #C99A3B;
    --accent-tint: #FBF1DC;
    --secondary: #7A1F2B;
    --line: #DCE3D6;
    --radius: 14px;
    --shadow: 0 10px 30px -12px rgba(18, 51, 38, 0.25);
    --font-display: 'Baloo Da 2', 'Hind Siliguri', sans-serif;
    --font-body: 'Hind Siliguri', sans-serif;
    --font-serif: 'Tiro Bangla', serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--ink);
    line-height: 1.7;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 {
    font-family: var(--font-display);
    color: var(--primary-dark);
    line-height: 1.3;
    margin: 0 0 .5em;
}
.container { width: 92%; max-width: 1160px; margin: 0 auto; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
    html { scroll-behavior: auto; }
}

/* ---------- Top bar ---------- */
.topbar {
    background: var(--primary-dark);
    color: #DDE8DF;
    font-size: .85rem;
}
.topbar .container { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; flex-wrap: wrap; gap: 6px; }
.topbar a { opacity: .9; }
.topbar a:hover { opacity: 1; text-decoration: underline; }
.topbar .contact-links span { margin-right: 18px; white-space: nowrap; }
.lang-switch { display: flex; align-items: center; gap: 6px; font-weight: 600; }
.lang-switch a { opacity: .75; }
.lang-switch a.active { opacity: 1; color: var(--accent); text-decoration: underline; }
.lang-switch span { opacity: .5; }

/* ---------- Header / nav ---------- */
header.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    position: sticky; top: 0; z-index: 50;
}
.header-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand .logo-badge {
    width: 52px; height: 52px; border-radius: 50%;
    background: var(--primary); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display); font-weight: 700; font-size: 1.3rem;
    flex-shrink: 0; box-shadow: var(--shadow);
}
.brand img.logo-img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; }
.brand-text .site-name { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; color: var(--primary-dark); }
.brand-text .site-tagline { font-size: .8rem; color: var(--muted); }

nav.main-nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; flex-wrap: wrap; }
nav.main-nav a {
    display: block; padding: 10px 14px; border-radius: 999px;
    font-weight: 600; color: var(--primary-dark); font-size: .95rem;
}
nav.main-nav a:hover, nav.main-nav a.active { background: var(--primary-tint); color: var(--primary); }
.nav-cta { background: var(--accent); color: #fff !important; padding: 10px 18px !important; border-radius: 999px; }
.nav-toggle { display: none; background: none; border: none; font-size: 1.6rem; cursor: pointer; color: var(--primary-dark); }

@media (max-width: 880px) {
    .nav-toggle { display: block; }
    nav.main-nav { width: 100%; display: none; }
    nav.main-nav.open { display: block; }
    nav.main-nav ul { flex-direction: column; border-top: 1px solid var(--line); padding-top: 10px; }
    .header-row { flex-wrap: wrap; }
}

/* ---------- Homepage slider ---------- */
.hero-slider {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 7;
    max-height: 560px;
    min-height: 260px;
    overflow: hidden;
    background: var(--primary-dark);
}
.hero-slider .slide {
    position: absolute; inset: 0;
    opacity: 0; visibility: hidden;
    transition: opacity .6s ease;
}
.hero-slider .slide.active { opacity: 1; visibility: visible; }
.hero-slider .slide img,
.hero-slider .slide video {
    width: 100%; height: 100%; object-fit: cover; display: block;
}
.hero-slider .slide::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(0deg, rgba(18,51,38,.78) 0%, rgba(18,51,38,.15) 45%, rgba(18,51,38,.05) 100%);
    pointer-events: none;
}
.hero-slider .slide-caption {
    position: absolute; left: 0; right: 0; bottom: 0;
    padding: 26px 6% 44px;
    color: #fff; z-index: 2;
}
.hero-slider .slide-caption h2 { color: #fff; font-size: clamp(1.3rem, 3vw, 2rem); margin-bottom: 8px; }
.hero-slider .slide-caption p { max-width: 56ch; opacity: .92; margin: 0 0 16px; }
.hero-slider .slide-caption .btn { padding: 10px 22px; font-size: .88rem; }

.hero-slider .nav-arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 42px; height: 42px; border-radius: 50%;
    background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.4);
    color: #fff; font-size: 1.2rem; cursor: pointer; z-index: 3;
    display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(2px);
}
.hero-slider .nav-arrow:hover { background: rgba(255,255,255,.32); }
.hero-slider .nav-prev { left: 16px; }
.hero-slider .nav-next { right: 16px; }

.hero-slider .dots {
    position: absolute; right: 6%; bottom: 20px; z-index: 3;
    display: flex; gap: 8px;
}
.hero-slider .dot {
    width: 9px; height: 9px; border-radius: 50%;
    background: rgba(255,255,255,.5); border: none; cursor: pointer; padding: 0;
}
.hero-slider .dot.active { background: var(--accent); width: 22px; border-radius: 5px; }

@media (max-width: 700px) {
    .hero-slider { aspect-ratio: 4 / 5; max-height: 460px; }
    .hero-slider .nav-arrow { width: 34px; height: 34px; font-size: 1rem; }
    .hero-slider .dots { right: 50%; transform: translateX(50%); }
}

/* ---------- Hero + Notice board (signature element) ---------- */
.hero {
    background: linear-gradient(180deg, var(--primary-tint) 0%, var(--bg) 100%);
    padding: 56px 0 70px;
    overflow: hidden;
}
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.hero-eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--accent-tint); color: var(--secondary);
    font-weight: 600; font-size: .8rem; padding: 6px 14px; border-radius: 999px;
    margin-bottom: 16px;
}
.hero h1 { font-size: clamp(1.9rem, 4vw, 2.9rem); }
.hero p.lead { color: var(--muted); font-size: 1.08rem; max-width: 46ch; }
.hero-actions { display: flex; gap: 14px; margin-top: 26px; flex-wrap: wrap; }
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 13px 26px; border-radius: 999px; font-weight: 700; font-size: .95rem;
    border: 2px solid transparent; cursor: pointer; font-family: var(--font-body);
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { border-color: var(--primary); color: var(--primary); background: transparent; }
.btn-outline:hover { background: var(--primary-tint); }
.btn-accent { background: var(--accent); color: #fff; }

.corkboard { position: relative; min-height: 320px; }
.pin-card {
    background: #FFFDF6;
    border-radius: 4px;
    padding: 18px 20px 16px;
    box-shadow: 0 14px 26px -10px rgba(18,51,38,.35);
    position: relative;
    max-width: 320px;
    font-family: var(--font-serif);
}
.pin-card::before {
    content: '';
    position: absolute; top: -9px; left: 26px;
    width: 16px; height: 16px; border-radius: 50%;
    background: var(--secondary);
    box-shadow: 0 3px 4px rgba(0,0,0,.35);
}
.pin-card .pin-label { font-family: var(--font-body); font-weight: 700; color: var(--secondary); font-size: .75rem; letter-spacing: .04em; }
.pin-card h4 { font-family: var(--font-body); font-size: 1.02rem; margin: 6px 0 4px; }
.pin-card .pin-date { font-family: var(--font-body); font-size: .78rem; color: var(--muted); }
.pin-1 { transform: rotate(-4deg); margin-bottom: 26px; }
.pin-2 { transform: rotate(3deg); margin-left: 46px; }
.pin-3 { transform: rotate(-2deg); margin-left: 14px; margin-top: -14px; }
@media (max-width: 880px) {
    .hero-grid { grid-template-columns: 1fr; }
    .pin-2, .pin-3 { margin-left: 0; }
}

/* ---------- Stats strip ---------- */
.stats-strip { background: var(--primary-dark); color: #fff; padding: 30px 0; }
.stats-strip .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px; text-align: center; }
.stat-item .num { font-family: var(--font-display); font-size: 2rem; color: var(--accent); }
.stat-item .label { font-size: .85rem; opacity: .85; }

/* ---------- Section helpers ---------- */
section { padding: 64px 0; }
.section-head { max-width: 640px; margin: 0 auto 36px; text-align: center; }
.section-eyebrow { color: var(--accent); font-weight: 700; font-size: .82rem; letter-spacing: .06em; }
.section-head h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.section-head p { color: var(--muted); }

/* ---------- Cards grid (programs, faculty, gallery) ---------- */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 560px) { .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 24px; transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card .icon-badge {
    width: 46px; height: 46px; border-radius: 12px; background: var(--primary-tint); color: var(--primary);
    display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 700; margin-bottom: 14px;
}
.card h3 { font-size: 1.08rem; }
.card p { color: var(--muted); font-size: .93rem; margin: 0; }

.faculty-card { text-align: center; }
.faculty-card .photo { width: 108px; height: 108px; border-radius: 50%; object-fit: cover; margin: 0 auto 14px; border: 3px solid var(--primary-tint); }
.faculty-card .name { font-family: var(--font-display); font-weight: 700; }
.faculty-card .role { color: var(--accent); font-size: .85rem; font-weight: 600; }
.faculty-card .dept { color: var(--muted); font-size: .85rem; }

.gallery-item { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.gallery-item img { height: 190px; width: 100%; object-fit: cover; }
.gallery-item .cap { padding: 10px 14px; font-size: .85rem; color: var(--muted); }

/* ---------- Notice list ---------- */
.notice-row {
    display: flex; gap: 16px; align-items: flex-start; padding: 18px 0; border-bottom: 1px solid var(--line);
}
.notice-row .date-box {
    flex-shrink: 0; width: 62px; text-align: center; background: var(--primary-tint); color: var(--primary-dark);
    border-radius: 10px; padding: 8px 0; font-weight: 700; font-size: .8rem;
}
.notice-row h3 { font-size: 1.02rem; margin: 0 0 4px; }
.badge-important { background: var(--secondary); color: #fff; font-size: .72rem; padding: 2px 10px; border-radius: 999px; margin-inline-start: 8px; }
.notice-row p { color: var(--muted); font-size: .9rem; margin: 4px 0 0; }

/* ---------- Forms ---------- */
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: .88rem; color: var(--primary-dark); }
.field input, .field select, .field textarea {
    padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px; font-family: var(--font-body); font-size: .95rem; background: #fff;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); }
.alert { padding: 14px 18px; border-radius: 10px; margin-bottom: 20px; font-weight: 600; font-size: .92rem; }
.alert-success { background: #E4F3E9; color: #1F4D3A; border: 1px solid #BFE1CB; }
.alert-error { background: #FBEAEA; color: var(--secondary); border: 1px solid #F1C4C4; }

/* ---------- Result card ---------- */
.result-card { background: var(--primary-tint); border: 1px dashed var(--primary); border-radius: var(--radius); padding: 26px; margin-top: 24px; }
.result-card table { width: 100%; border-collapse: collapse; }
.result-card td { padding: 8px 6px; font-size: .95rem; }
.result-card td.label { color: var(--muted); width: 40%; }
.result-card td.value { font-weight: 700; color: var(--primary-dark); }

/* ---------- Data table (public pages e.g. student stats) ---------- */
table.data-table { width: 100%; border-collapse: collapse; }
table.data-table th, table.data-table td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line); font-size: .93rem; }
table.data-table th { background: var(--primary-tint); color: var(--primary-dark); font-weight: 700; font-size: .82rem; text-transform: uppercase; letter-spacing: .03em; }
table.data-table tbody tr:hover td { background: #FAFBF8; }
table.data-table tfoot td { border-top: 2px solid var(--primary); border-bottom: none; }

/* ---------- Footer ---------- */
footer.site-footer { background: var(--primary-dark); color: #D8E3DA; padding: 50px 0 18px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 500px) { .footer-grid { grid-template-columns: 1fr; } }
footer h4 { color: #fff; font-size: 1rem; }
footer a { color: #B9CBBE; font-size: .9rem; }
footer a:hover { color: #fff; }
footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 34px; padding-top: 18px; text-align: center; font-size: .82rem; color: #9FB4A6; }

/* ---------- Misc ---------- */
.breadcrumb-band { background: var(--primary-tint); padding: 26px 0; }
.breadcrumb-band h1 { margin: 0; font-size: 1.6rem; }
.breadcrumb-band .crumbs { font-size: .85rem; color: var(--muted); }
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 30px; }
.pagination a { padding: 8px 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-weight: 600; font-size: .9rem; }
.pagination a.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.empty-state { text-align: center; padding: 40px 0; color: var(--muted); }
