/* ==========================================================
   Public site — base + header
   ========================================================== */
:root {
    --navy: #0d2d5e;
    --navy-dark: #0a2349;
    --green: #127a3b;
    --green-btn: #13843f;
    --text: #1d2433;
    --muted: #5b6475;
    --bg: #ffffff;
    --line: #e6e9ef;
    --font: 'Hind Siliguri', system-ui, sans-serif;
    --font-title: 'Noto Serif Bengali', 'Hind Siliguri', serif;
}

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

body {
    margin: 0;
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

.container {
    width: 100%;
    max-width: 1640px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- Top bar ---------- */
.topbar {
    background: var(--navy);
    color: #fff;
    font-size: 16px;
}

.topbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 50px;
}

.topbar__contact,
.topbar__actions {
    display: flex;
    align-items: center;
    gap: 22px;
}

.topbar__item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.topbar__item svg { width: 20px; height: 20px; }
.topbar__item:hover { opacity: .85; }
.topbar__sep { opacity: .5; }

.topbar__actions { gap: 18px; }

.topbar__icon {
    display: inline-grid;
    place-items: center;
    width: 22px;
    height: 22px;
    transition: opacity .2s;
}

.topbar__icon svg { width: 20px; height: 20px; }
.topbar__icon:hover { opacity: .75; }

/* ---------- Main bar ---------- */
.mainbar {
    background: var(--bg);
    border-bottom: 1px solid var(--line);
}

.mainbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 110px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

.brand__logo {
    width: auto;
    height: 76px;
    max-width: 560px;
    object-fit: contain;
}


/* ---------- Navigation ---------- */
.nav {
    display: flex;
    align-items: center;
    gap: 22px;
}

.nav__list {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav__item { position: relative; }

.nav__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 19px;
    font-weight: 500;
    white-space: nowrap;
    transition: background .2s, color .2s;
}

.nav__link:hover { color: var(--navy); background: #eef2f9; }

.nav__link.is-active,
.nav__link.is-active:hover {
    background: var(--navy);
    color: #fff;
    padding: 12px 15px;
}

.caret {
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid currentColor;
}

.drop {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 50;
    min-width: 210px;
    margin: 0;
    padding: 8px;
    list-style: none;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(13, 45, 94, .12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity .2s, transform .2s, visibility .2s;
}

.drop a {
    display: block;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 17px;
}

.drop a:hover { background: #eef2f9; color: var(--navy); }

.has-drop:hover .drop,
.has-drop.is-open .drop {
    opacity: 1;
    visibility: visible;
    transform: none;
}

.login-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 24px;
    border-radius: 999px;
    background: var(--green-btn);
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    white-space: nowrap;
    transition: background .2s;
}

.login-btn svg { width: 16px; height: 16px; }
.login-btn:hover { background: #0f6c33; }

/* ---------- Mobile menu button ---------- */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
}

.menu-toggle span {
    width: 26px;
    height: 3px;
    border-radius: 2px;
    background: var(--navy);
    transition: transform .25s, opacity .25s;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Responsive ---------- */
@media (max-width: 1400px) {
    .nav__link { font-size: 17px; padding: 9px 10px; }
    .nav { gap: 14px; }
}

@media (max-width: 1180px) {
    .mainbar__inner { min-height: 88px; position: relative; }
    .brand__logo { height: 62px; max-width: 70vw; }

    .menu-toggle { display: flex; }

    .nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 40;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 14px 24px 20px;
        background: var(--bg);
        border-bottom: 1px solid var(--line);
        box-shadow: 0 14px 30px rgba(13, 45, 94, .1);
        display: none;
    }

    .nav.is-open { display: flex; }

    .nav__list { flex-direction: column; align-items: stretch; gap: 2px; }
    .nav__link { width: 100%; justify-content: space-between; font-size: 18px; }
    .nav__link.is-active { padding: 10px 14px; }

    .drop {
        position: static;
        display: none;
        margin: 2px 0 6px 12px;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
    }

    .has-drop:hover .drop { display: none; }
    .has-drop.is-open .drop { display: block; }

    .login-btn { justify-content: center; }
}

@media (max-width: 760px) {
    .topbar__inner { flex-direction: column; justify-content: center; gap: 6px; padding: 8px 0; }
    .topbar__contact { flex-wrap: wrap; justify-content: center; gap: 4px 14px; font-size: 14px; }
    .topbar__sep { display: none; }
    .topbar__actions { gap: 16px; }
}

@media (max-width: 520px) {
    .container { padding: 0 14px; }
    .brand { gap: 10px; }
    .brand__logo { height: 50px; }
    .nav { padding: 12px 14px 18px; }
}

/* Let the school name wrap on very small phones so the menu button stays visible. */
@media (max-width: 520px) {
    .brand { min-width: 0; flex: 1; }
    .menu-toggle { flex-shrink: 0; }
}

/* Mobile top bar: only phone and email. */
@media (max-width: 760px) {
    .topbar__actions { display: none; }
}

/* ==========================================================
   Footer
   ========================================================== */
.site-footer {
    position: relative;
    background: var(--navy);
    color: #e9eef7;
}

.footer__grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1.2fr;
    gap: 40px;
    padding-top: 56px;
    padding-bottom: 60px;
}

.footer__brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer__brand img {
    width: auto;
    height: 80px;
    max-width: 100%;
    object-fit: contain;
}

.footer__motto { margin: 18px 0 0; font-size: 18px; }

.footer__title {
    margin: 0 0 14px;
    font-family: var(--font-title);
    font-size: 21px;
    font-weight: 800;
    color: #fff;
}

.footer__links,
.footer__contact { margin: 0; padding: 0; list-style: none; }

.footer__links li + li { margin-top: 6px; }

.footer__links a {
    font-size: 18px;
    transition: color .2s, padding .2s;
}

.footer__links a:hover { color: #fff; padding-left: 4px; }

.footer__contact li {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    font-size: 18px;
}

.footer__contact li + li { margin-top: 10px; }
.footer__contact svg { width: 20px; height: 20px; flex-shrink: 0; margin-top: 4px; }
.footer__contact a:hover { color: #fff; }

.footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, .14);
    padding: 20px 0;
    text-align: center;
    font-size: 17px;
}

.to-top {
    position: fixed;
    right: 26px;
    bottom: 26px;
    z-index: 60;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--navy);
    color: #fff;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity .25s, transform .25s, visibility .25s, background .2s;
}

.to-top svg { width: 22px; height: 22px; }
.to-top:hover { background: var(--green-btn); }
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }

@media (max-width: 1000px) {
    .footer__grid { grid-template-columns: 1fr 1fr; }
    .footer__about { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
    .footer__grid { grid-template-columns: 1fr; gap: 30px; padding-top: 40px; padding-bottom: 40px; }
    .footer__motto { font-size: 16px; }
    .footer__bottom { font-size: 15px; }
    .to-top { right: 16px; bottom: 16px; }
}

/* ==========================================================
   Content pages (/page/{slug})
   ========================================================== */
.page-hero {
    background: #f2f5fa;
    border-bottom: 1px solid var(--line);
    padding: 34px 0 30px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 15px;
    color: var(--muted);
}

.breadcrumb a:hover { color: var(--navy); }

.page-hero__title {
    margin: 6px 0 0;
    font-family: var(--font-title);
    font-size: 34px;
    font-weight: 800;
    line-height: 1.3;
    color: var(--navy);
}

.page-body { padding-top: 40px; padding-bottom: 64px; }

.page-draft {
    margin: 0 0 24px;
    padding: 10px 14px;
    border-radius: 8px;
    background: #fff7e6;
    color: #8a5a00;
    font-size: 15px;
}

.page-content {
    max-width: 960px;
    font-size: 18px;
    line-height: 1.85;
}

.page-content h2,
.page-content h3,
.page-content h4 {
    font-family: var(--font-title);
    color: var(--navy);
    line-height: 1.35;
    margin: 1.4em 0 .5em;
}

.page-content h2 { font-size: 28px; }
.page-content h3 { font-size: 23px; }
.page-content h4 { font-size: 20px; }
.page-content > :first-child { margin-top: 0; }
.page-content p { margin: 0 0 1em; }
.page-content ul,
.page-content ol { margin: 0 0 1em; padding-left: 1.6em; }
.page-content li { margin-bottom: .3em; }
.page-content a { color: #1c5fd1; text-decoration: underline; }
.page-content img { height: auto; border-radius: 10px; margin: 1em 0; }

.page-content blockquote {
    margin: 0 0 1em;
    padding: 12px 18px;
    border-left: 4px solid var(--green);
    background: #f4f8f5;
    border-radius: 0 8px 8px 0;
}

.page-content hr { border: 0; border-top: 2px solid var(--line); margin: 1.8em 0; }

@media (max-width: 640px) {
    .page-hero { padding: 24px 0 22px; }
    .page-hero__title { font-size: 26px; }
    .page-body { padding-top: 28px; padding-bottom: 44px; }
    .page-content { font-size: 17px; }
}

/* Content pages: centred title, content in the middle 8 of 12 columns, justified text. */
.page-hero { text-align: center; }
.breadcrumb { justify-content: center; }

.page-content {
    width: 66.6667%;           /* 8 of 12 columns */
    max-width: none;
    margin: 0 auto;
    text-align: justify;
    text-justify: inter-character; /* even spacing for Bangla */
}

.page-content h2,
.page-content h3,
.page-content h4 { text-align: left; }
.page-draft { width: 66.6667%; margin-left: auto; margin-right: auto; }

@media (max-width: 992px) {
    .page-content,
    .page-draft { width: 100%; }
}

/* Images added from the text editor always fill the content width. */
.page-content img { display: block; width: 100%; max-width: 100%; height: auto; }
