:root {
    --bg: #f2f5fb;
    --bg-elevated: #ffffff;
    --panel: #ffffff;
    --panel-soft: #f8faff;
    --text: #1f2b43;
    --heading: #12243f;
    --muted: #5a6880;
    --primary: #a07b2a;
    --secondary: #1b355d;
    --accent: #8a1f3b;
    --success: #176b46;
    --border: #d4ddec;
    --border-strong: #becbe1;
    --shadow: 0 10px 28px rgba(16, 31, 58, 0.08);
    --radius: 14px;
    --max: 1320px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: "Source Sans 3", Arial, sans-serif;
    line-height: 1.55;
    color: var(--text);
    background: radial-gradient(circle at top right, rgba(160, 123, 42, 0.08), transparent 42%), var(--bg);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--heading);
}

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

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

button,
input,
textarea,
select {
    font: inherit;
}

.container {
    width: min(var(--max), calc(100% - 32px));
    margin: 0 auto;
}

.utility-strip {
    background: var(--secondary);
    color: #ffffff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
    font-size: 0.91rem;
}

.utility-inner {
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    padding: 8px 0;
}

.utility-left,
.utility-right {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.utility-right a {
    color: #ffffff;
    font-weight: 600;
}

.institution-header {
    background: var(--bg-elevated);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 80;
}

.masthead {
    min-height: 88px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
}

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

.brand-logo {
    width: 62px;
    height: 62px;
    border-radius: 12px;
    border: 1px solid var(--border-strong);
    overflow: hidden;
    flex-shrink: 0;
    background: #ffffff;
    display: grid;
    place-items: center;
    color: var(--heading);
    font-weight: 700;
}

.brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.brand-name {
    font-family: "Merriweather", Georgia, serif;
    font-size: clamp(1.03rem, 2vw, 1.56rem);
    font-weight: 700;
    line-height: 1.18;
    color: var(--heading);
}

.brand-tag {
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.9rem;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 8px;
    border: 1px solid transparent;
    padding: 10px 16px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--accent);
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(138, 31, 59, 0.32);
}

.btn-outline {
    background: transparent;
    border-color: var(--border-strong);
    color: var(--heading);
}

.btn-outline:hover {
    background: rgba(138, 31, 59, 0.06);
}

.main-nav {
    background: var(--accent);
    color: #ffffff;
}

.nav-inner {
    display: flex;
    align-items: center;
    gap: 2px;
    overflow-x: auto;
    scrollbar-width: none;
}

.nav-inner::-webkit-scrollbar {
    display: none;
}

.nav-inner a {
    padding: 11px 16px;
    font-weight: 700;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    color: #ffffff;
}

.nav-inner a:hover,
.nav-inner a.active {
    background: rgba(255, 255, 255, 0.18);
    border-bottom-color: var(--primary);
}

.menu-btn {
    display: none;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    background: transparent;
    color: var(--heading);
}

.menu-btn span {
    display: block;
    width: 18px;
    height: 2px;
    background: currentColor;
    margin: 4px auto;
}

.mobile-menu {
    display: none;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    background: var(--bg-elevated);
}

.mobile-menu.open {
    display: grid;
}

.mobile-menu a {
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    padding: 10px 12px;
    font-weight: 600;
}

.ticker-wrap {
    background: #f3ecdd;
    border-bottom: 1px solid #e2d5ba;
}

.ticker-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 42px;
}

.ticker-label {
    color: var(--accent);
    font-weight: 700;
    white-space: nowrap;
}

.ticker-view {
    width: 100%;
    color: var(--heading);
    font-weight: 600;
}

.ticker-marquee {
    width: 100%;
    color: inherit;
}

.public-main {
    padding-bottom: 26px;
}

.hero-fullwidth {
    position: relative;
    margin-top: 0;
    margin-bottom: 14px;
}

.hero-full-slider {
    width: 100%;
    min-height: clamp(340px, 68vh, 700px);
    position: relative;
    overflow: hidden;
    background: #1f2f4a;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.5s ease;
    background-size: cover;
    background-position: center;
}

.hero-slide.active {
    opacity: 1;
}

.hero-nav {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    pointer-events: none;
    padding: 0 14px;
}

.hero-nav button {
    pointer-events: auto;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.7);
    background: rgba(8, 20, 39, 0.42);
    color: #ffffff;
    cursor: pointer;
}

.hero-dots {
    position: absolute;
    z-index: 2;
    left: 50%;
    bottom: 12px;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.65);
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    padding: 0;
}

.hero-dot.active {
    background: #ffffff;
}

.announce-marquee-wrap {
    margin-bottom: 4px;
}

.announce-marquee-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px 10px;
}

.announce-label {
    font-weight: 700;
    color: var(--accent);
    white-space: nowrap;
}

.announce-marquee {
    width: 100%;
    color: var(--heading);
    font-weight: 600;
}

.page-shell {
    padding-top: 12px;
}

.panel {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.page-banner {
    padding: 20px;
    margin-bottom: 18px;
}

.page-banner h1 {
    margin: 0;
    font-family: "Merriweather", Georgia, serif;
    font-size: clamp(1.45rem, 3vw, 2rem);
}

.page-banner p {
    margin: 8px 0 0;
    color: var(--muted);
}

.stats-strip {
    margin-top: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.stat-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px;
    text-align: center;
}

.stat-card h3 {
    margin: 0;
    font-family: "Merriweather", Georgia, serif;
    font-size: 1.56rem;
    color: var(--accent);
}

.stat-card p {
    margin: 5px 0 0;
    color: var(--muted);
    font-weight: 700;
}

.teachers-marquee-section {
    padding: 16px;
    margin-top: 14px;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
    margin-bottom: 12px;
}

.section-head h2 {
    margin: 0;
    font-family: "Merriweather", Georgia, serif;
    font-size: 1.22rem;
}

.section-head a {
    color: var(--accent);
    font-weight: 700;
}

.teachers-marquee {
    width: 100%;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start;
    align-items: stretch;
    gap: 14px;
    overflow-x: hidden;
    overflow-y: hidden;
    padding: 2px 2px 8px;
    scroll-behavior: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
    white-space: nowrap;
}

/* High-specificity fallback to prevent column layout on old/cached school themes */
.public-main .teachers-marquee,
main .teachers-marquee,
section .teachers-marquee {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 14px !important;
}

.teachers-marquee::-webkit-scrollbar {
    height: 0;
}

.teachers-marquee::-webkit-scrollbar-track {
    background: transparent;
}

.teachers-marquee::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 999px;
}

.teacher-marquee-card {
    flex: 0 0 210px;
    min-width: 210px;
    display: block;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px;
    background: var(--panel-soft);
}

.public-main .teacher-marquee-card,
main .teacher-marquee-card,
section .teacher-marquee-card {
    flex: 0 0 210px !important;
    min-width: 210px !important;
    display: block !important;
}

.teacher-marquee-photo {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(27, 53, 93, 0.08);
    display: grid;
    place-items: center;
    color: var(--heading);
    font-weight: 700;
    margin-bottom: 8px;
}

.teacher-marquee-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.teacher-marquee-card h3 {
    margin: 0;
    font-size: 1rem;
    line-height: 1.3;
}

.teacher-marquee-card p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.news-section {
    margin-top: 14px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.news-card {
    padding: 16px;
}

.news-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.news-list li {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    background: var(--panel-soft);
}

.news-list h3 {
    margin: 0;
    font-size: 1rem;
    line-height: 1.34;
    color: var(--heading);
}

.news-list p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.news-list time {
    font-size: 0.82rem;
    color: var(--muted);
    white-space: nowrap;
}

.about-section {
    margin-top: 14px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 14px;
}

.about-main,
.about-cards {
    padding: 16px;
}

.about-main h2,
.about-cards h2 {
    margin: 0 0 10px;
    font-family: "Merriweather", Georgia, serif;
}

.about-main p {
    margin: 0 0 12px;
    color: var(--muted);
}

.facility-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.facility-card {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px;
    background: var(--panel-soft);
}

.facility-card h3 {
    margin: 0 0 5px;
    font-size: 1rem;
}

.facility-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 14px;
}

.content-card {
    padding: 16px;
}

.content-card h2 {
    margin: 0 0 8px;
    font-family: "Merriweather", Georgia, serif;
    font-size: 1.2rem;
}

.content-card p {
    margin: 0 0 10px;
    color: var(--muted);
}

.bullet-list {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 8px;
}

.principal-box {
    margin-top: 12px;
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: 8px;
    padding: 10px;
    background: rgba(138, 31, 59, 0.08);
}

.faculty-panel {
    padding: 16px;
    margin-bottom: 14px;
}

.faculty-grid {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.faculty-card {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px;
    text-align: center;
    background: var(--panel-soft);
}

.faculty-photo {
    width: 78px;
    height: 78px;
    border-radius: 50%;
    margin: 0 auto 8px;
    overflow: hidden;
    background: rgba(27, 53, 93, 0.08);
    display: grid;
    place-items: center;
    font-weight: 700;
    color: var(--heading);
}

.faculty-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.faculty-card h3 {
    margin: 0;
    font-size: 1rem;
    color: var(--heading);
}

.faculty-card p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.designation {
    color: var(--accent);
    font-weight: 700;
}

.form-grid {
    display: grid;
    gap: 12px;
}

.grid-2.form-grid {
    grid-template-columns: 1fr 1fr;
}

.form-grid label {
    display: grid;
    gap: 6px;
    font-weight: 600;
    color: var(--heading);
}

.field,
textarea,
select {
    width: 100%;
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    padding: 10px 12px;
    background: #ffffff;
    color: #152440;
}

.field::placeholder,
textarea::placeholder {
    color: #6d7a90;
}

textarea {
    min-height: 110px;
    resize: vertical;
}

.field:focus,
textarea:focus,
select:focus {
    outline: 2px solid rgba(138, 31, 59, 0.2);
    border-color: var(--accent);
}

.form-status {
    display: none;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 9px 10px;
    font-size: 0.93rem;
}

.form-status.success {
    display: block;
    background: rgba(21, 128, 61, 0.13);
    color: #166534;
    border-color: rgba(21, 128, 61, 0.42);
}

.form-status.error {
    display: block;
    background: rgba(220, 38, 38, 0.13);
    color: #b91c1c;
    border-color: rgba(220, 38, 38, 0.42);
}

.login-panel {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 12px;
    padding: 14px;
    margin-bottom: 14px;
}

.login-info,
.login-form-box {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px;
    background: var(--panel-soft);
}

.login-info h2 {
    margin: 0 0 8px;
    font-family: "Merriweather", Georgia, serif;
}

.text-link {
    color: var(--accent);
    font-weight: 700;
    font-size: 0.95rem;
}

.site-footer {
    background: var(--secondary);
    color: #ffffff;
    margin-top: 18px;
    padding: 24px 0 10px;
}

.site-footer .brand-name,
.site-footer .brand-tag {
    color: #ffffff;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 0.8fr 1fr;
    gap: 16px;
}

.footer-block h3 {
    margin: 0 0 8px;
    font-size: 1rem;
    color: #f9dc9f;
}

.footer-block a,
.footer-block p {
    display: block;
    margin: 0 0 6px;
    color: rgba(255, 255, 255, 0.92);
}

.footer-meta {
    border-top: 1px solid rgba(255, 255, 255, 0.25);
    margin-top: 16px;
    padding-top: 10px;
    display: flex;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.88rem;
}

.floating-actions {
    position: fixed;
    right: 14px;
    bottom: 14px;
    display: grid;
    gap: 8px;
    z-index: 120;
}

.floating-link {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.26);
}

.floating-link.wa {
    background: #1fa855;
}

.floating-link.call {
    background: #2d66de;
}

.fade-up {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-up.show {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 1180px) {
    /* reserved */
}

@media (max-width: 1040px) {
    .news-section,
    .about-section,
    .content-grid,
    .login-panel,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .stats-strip {
        grid-template-columns: repeat(2, 1fr);
    }

    .faculty-grid,
    .facility-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* reserved */
}

@media (max-width: 860px) {
    .nav-inner,
    .masthead-actions .btn {
        display: none;
    }

    .menu-btn {
        display: inline-block;
    }

    .hero-full-slider {
        min-height: 420px;
    }

    .utility-inner {
        justify-content: center;
    }

    .brand-tag {
        max-width: 55vw;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .teachers-marquee {
        gap: 12px;
    }
}

@media (max-width: 620px) {
    .container {
        width: min(var(--max), calc(100% - 20px));
    }

    .grid-2.form-grid,
    .stats-strip,
    .faculty-grid,
    .facility-grid {
        grid-template-columns: 1fr;
    }

    .hero-full-slider {
        min-height: 360px;
    }

    .hero-nav {
        padding: 0 8px;
    }

    .hero-nav button {
        width: 38px;
        height: 38px;
    }

    .hero-dots {
        bottom: 10px;
    }

    .announce-marquee-inner {
        padding: 7px 8px;
    }

    .announce-label,
    .ticker-label {
        display: none;
    }

    .teacher-marquee-card {
        flex-basis: 176px;
    }

    .floating-actions {
        right: 10px;
        bottom: 10px;
    }
}
