:root {
    --ink: #14213d;
    --muted: #5c667a;
    --line: #dfe5ee;
    --paper: #ffffff;
    --soft: #f3f6fa;
    --navy: #0f2d52;
    --maroon: #8f1d2c;
    --gold: #f4b942;
    --green: #1d7c63;
    --shadow: 0 18px 45px rgba(20, 33, 61, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
    background: var(--paper);
    line-height: 1.6;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(12px);
}

.top-strip {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 16px;
    padding: 8px max(20px, 6vw);
    color: #ffffff;
    background: var(--navy);
    font-size: 14px;
}

.top-strip a {
    font-weight: 700;
    color: var(--gold);
}

.top-contact,
.social-links {
    display: flex;
    align-items: center;
}

.top-contact {
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px 16px;
}

.social-links {
    gap: 8px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 50%;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    font-size: 11px;
    line-height: 1;
    text-transform: uppercase;
}

.social-links a:hover {
    color: #152238;
    background: var(--gold);
}

.navbar,
.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 14px max(20px, 6vw);
}

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

.brand img {
    width: 58px;
    height: 58px;
    object-fit: contain;
}

.brand strong {
    display: block;
    color: var(--maroon);
    font-size: 24px;
    line-height: 1.1;
}

.brand small {
    display: block;
    color: var(--muted);
    font-weight: 700;
}

.nav-links,
.admin-header nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-links a,
.admin-header nav a {
    padding: 10px 12px;
    color: var(--ink);
    font-weight: 700;
    border-radius: 6px;
}

.nav-links a:hover,
.admin-header nav a:hover {
    background: var(--soft);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #ffffff;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: var(--ink);
}

.hero {
    position: relative;
    min-height: 640px;
    display: grid;
    align-items: end;
    padding: 120px max(20px, 6vw) 36px;
    overflow: hidden;
    color: #ffffff;
    background:
        linear-gradient(115deg, rgba(15, 45, 82, 0.95), rgba(143, 29, 44, 0.72)),
        url("../../Images/school-campus.png") center / cover no-repeat,
        #0f2d52;
}

.hero.has-campus-image {
    min-height: max(820px, calc(100vw * 1180 / 1672));
    background:
        linear-gradient(115deg, rgba(8, 22, 40, 0.78), rgba(10, 64, 54, 0.58)),
        url("../../Images/school-campus.png") center / cover no-repeat,
        #0f2d52;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 80% 45%, rgba(255, 255, 255, 0.22), transparent 24%);
    pointer-events: none;
}

.hero-campus-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    opacity: 0.78;
}

.hero-content,
.hero-info {
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 760px;
    transform: translate(125px, -40px);
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--maroon);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0;
}

.hero .eyebrow {
    margin-top: 90px;
    color: var(--gold);
}

h1,
h2,
h3,
p {
    overflow-wrap: anywhere;
}

h1,
h2,
h3 {
    margin: 0;
    line-height: 1.15;
}

.hero h1 {
    max-width: 760px;
    font-size: clamp(42px, 6vw, 78px);
}

.hero p:not(.eyebrow):not(.mobile-hero-title) {
    max-width: 650px;
    margin: 220px 0 0;
    font-size: 20px;
}

.mobile-hero-title {
    display: none;
}

.mobile-hero-images {
    display: none;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 34px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 11px 18px;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
}

.btn.primary {
    color: #152238;
    background: var(--gold);
}

.btn.secondary {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.08);
}

.btn.danger {
    color: #ffffff;
    background: #b3263a;
}

.btn.full {
    width: 100%;
}

.hero-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    margin-top: 160px;
    background: rgba(255, 255, 255, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.24);
}

.hero-info div {
    padding: 22px;
    background: rgba(7, 22, 43, 0.46);
}

.hero-info strong,
.hero-info span {
    display: block;
}

.hero-info span {
    margin-top: 4px;
    color: rgba(255, 255, 255, 0.78);
}

.section {
    padding: 82px max(20px, 6vw);
}

.band {
    background: var(--soft);
}

.section-heading {
    max-width: 760px;
    margin-bottom: 34px;
}

.section-heading h2,
.split-section h2,
.admission-copy h2,
.contact-section h2 {
    font-size: clamp(30px, 4vw, 48px);
}

.intro-grid,
.split-section,
.admissions,
.contact-section {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    gap: 42px;
    align-items: center;
}

.intro-copy p,
.split-section p,
.admission-copy p,
.contact-section p {
    color: var(--muted);
    font-size: 18px;
}

.stats-panel {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    border: 1px solid var(--line);
    background: #ffffff;
    box-shadow: var(--shadow);
}

.stats-panel div {
    min-height: 130px;
    padding: 24px;
    border: 1px solid var(--line);
}

.stats-panel strong {
    display: block;
    color: var(--maroon);
    font-size: 28px;
}

.stats-panel span {
    color: var(--muted);
}

.program-grid,
.gallery-grid,
.video-grid,
.notice-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.program-card,
.notice-grid article,
.video-card {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.program-card span {
    color: var(--maroon);
    font-weight: 900;
}

.program-card h3,
.notice-grid h3,
.video-card h3 {
    margin-top: 12px;
    font-size: 22px;
}

.program-card p,
.notice-grid p {
    color: var(--muted);
}

.facility-list {
    display: grid;
    gap: 12px;
}

.facility-list span {
    padding: 15px 18px;
    border-left: 4px solid var(--gold);
    background: var(--soft);
    font-weight: 800;
}

.admissions {
    color: #ffffff;
    background: linear-gradient(105deg, var(--navy), var(--maroon));
}

.admissions .eyebrow,
.admissions p {
    color: rgba(255, 255, 255, 0.82);
}

.admission-box {
    padding: 28px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.1);
}

.admission-box p {
    color: rgba(255, 255, 255, 0.82);
}

.gallery-item {
    position: relative;
    min-height: 230px;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    background: #d8dee8;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    min-height: 230px;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item span {
    position: absolute;
    inset: auto 0 0;
    padding: 12px;
    color: #ffffff;
    font-weight: 800;
    text-align: left;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.78));
}

.video-card video {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: #000000;
}

.empty-state {
    padding: 28px;
    color: var(--muted);
    border: 1px dashed #aab5c6;
    border-radius: 8px;
    background: #ffffff;
}

.notice-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.notice-grid time {
    color: var(--green);
    font-weight: 900;
}

.contact-card {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--soft);
}

.footer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 26px max(20px, 6vw);
    color: #ffffff;
    background: #0b1930;
}

.footer p {
    margin: 0;
}

.footer a {
    color: var(--gold);
    font-weight: 800;
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 28px;
    color: #ffffff;
    background: rgba(4, 10, 20, 0.9);
}

.lightbox[hidden] {
    display: none;
}

.lightbox img {
    max-height: 78vh;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.lightbox p {
    margin: 14px 0 0;
    font-weight: 800;
}

.lightbox-close {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    background: transparent;
    font-size: 30px;
    cursor: pointer;
}

.admin-body {
    min-height: 100vh;
    background: #eef2f7;
}

.admin-header {
    background: #ffffff;
    border-bottom: 1px solid var(--line);
}

.admin-brand img {
    width: 52px;
    height: 52px;
}

.admin-layout {
    display: grid;
    gap: 24px;
    padding: 34px max(20px, 6vw);
}

.admin-panel,
.login-card {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.panel-heading h1,
.panel-heading h2 {
    font-size: 28px;
}

.panel-heading strong {
    display: grid;
    place-items: center;
    min-width: 44px;
    height: 44px;
    border-radius: 50%;
    color: #ffffff;
    background: var(--navy);
}

.upload-form {
    display: grid;
    grid-template-columns: 180px minmax(220px, 1fr) minmax(220px, 1fr) auto;
    gap: 14px;
    align-items: end;
}

label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-weight: 800;
}

input,
select {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    color: var(--ink);
    border: 1px solid #c8d1df;
    border-radius: 6px;
    background: #ffffff;
    font: inherit;
}

.alert {
    margin-bottom: 18px;
    padding: 12px 14px;
    border-radius: 6px;
    font-weight: 800;
}

.alert.success {
    color: #0d513f;
    background: #d9f5eb;
}

.alert.error {
    color: #84212f;
    background: #ffe0e5;
}

.admin-media-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.admin-media-card {
    display: grid;
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.admin-media-card img,
.admin-media-card video {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 6px;
    background: #0b1930;
}

.admin-media-card h3 {
    font-size: 18px;
}

.admin-media-card p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.login-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-card {
    width: min(440px, 100%);
}

.login-card img {
    width: 96px;
    height: 96px;
    object-fit: contain;
    margin: 0 auto 14px;
}

.login-card h1,
.login-card p {
    text-align: center;
}

.login-card p {
    margin: 8px 0 22px;
    color: var(--muted);
}

.login-card label {
    margin-bottom: 14px;
}

.back-link {
    display: block;
    margin-top: 16px;
    color: var(--maroon);
    font-weight: 800;
    text-align: center;
}

@media (max-width: 1050px) {
    .program-grid,
    .gallery-grid,
    .video-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .upload-form,
    .admin-media-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 780px) {
    .top-strip,
    .footer,
    .admin-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .menu-toggle {
        display: block;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 12px 20px 18px;
        background: #ffffff;
        border-bottom: 1px solid var(--line);
    }

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

    .nav-links a {
        padding: 12px;
    }

    .brand strong {
        font-size: 20px;
    }

    .brand small {
        font-size: 12px;
    }

    .hero {
        min-height: auto;
        padding-top: 34px;
        padding-bottom: 28px;
        background:
            linear-gradient(115deg, rgba(15, 45, 82, 0.96), rgba(143, 29, 44, 0.78)),
            #0f2d52;
    }

    .hero.has-campus-image {
        align-items: start;
        background:
            linear-gradient(115deg, rgba(15, 45, 82, 0.96), rgba(143, 29, 44, 0.78)),
            #0f2d52;
    }

    .hero-overlay {
        display: none;
    }

    .hero h1 {
        display: none;
    }

    .hero .eyebrow {
        display: block;
        margin: 0 0 4px;
    }

    .hero-content {
        transform: none;
    }

    .hero .mobile-hero-title {
        display: block;
        max-width: 100%;
        margin: 0;
        color: transparent;
        background: linear-gradient(90deg, #ffffff 0%, #f4b942 38%, #73e2c3 72%, #ffffff 100%);
        -webkit-background-clip: text;
        background-clip: text;
        font-size: clamp(34px, 10vw, 46px);
        font-weight: 900;
        line-height: 1.12;
    }

    .mobile-hero-images {
        display: grid;
        grid-template-columns: 1.15fr 0.85fr;
        grid-template-rows: repeat(2, 112px);
        gap: 10px;
        margin-top: 24px;
    }

    .mobile-hero-images img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border: 2px solid rgba(255, 255, 255, 0.72);
        border-radius: 8px;
        box-shadow: 0 12px 28px rgba(4, 10, 20, 0.28);
    }

    .mobile-hero-images img:first-child {
        grid-row: span 2;
    }

    .hero-content > p:not(.eyebrow):not(.mobile-hero-title),
    .hero-actions {
        display: none;
    }

    .hero-info {
        display: none;
    }

    .intro-grid,
    .split-section,
    .admissions,
    .contact-section,
    .notice-grid {
        grid-template-columns: 1fr;
    }

    .section {
        padding-top: 60px;
        padding-bottom: 60px;
    }

    .program-grid,
    .gallery-grid,
    .video-grid,
    .stats-panel,
    .upload-form,
    .admin-media-grid {
        grid-template-columns: 1fr;
    }
}
