:root {
    --primary-blue: #0d2137;
    --navy-blue: #1a3c5e;
    --medium-blue: #1e4d7b;
    --light-blue: #c5ddf0;
    --lighter-blue: #e8f2fa;
    --accent-red: #b71c1c;
    --red-hover: #d32f2f;
    --white: #ffffff;
    --off-white: #f8f9fa;
    --gray-light: #e9ecef;
    --gray-medium: #6c757d;
    --gray-dark: #343a40;
    --gold: #c8960c;
    --gold-light: #f0d078;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 12px 36px rgba(0, 0, 0, 0.18);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --btn-radius: 25px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-heading: Georgia, "Times New Roman", serif;
    --font-body: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    background: var(--off-white);
    color: var(--gray-dark);
    line-height: 1.6;
    overflow-x: hidden;
}
img { max-width: 100%; height: auto; }
a { color: var(--medium-blue); }
.container { max-width: 1300px; margin: 0 auto; padding: 0 24px; }

.announce-bar {
    background: var(--accent-red);
    color: #fff;
    text-align: center;
    padding: 10px 16px;
    font-size: .95rem;
    font-weight: 600;
}
.announce-bar a { color: #fff; text-decoration: underline; }

.header {
    background: linear-gradient(180deg, var(--primary-blue) 0%, var(--navy-blue) 100%);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
    border-bottom: 3px solid var(--accent-red);
}
.header-inner {
    position: relative;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
    gap: 16px;
}
.logo-section { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; min-width: 0; flex: 0 1 auto; }
.logo-icon {
    width: 48px; height: 48px; background: #fff; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; border: 3px solid var(--accent-red); flex-shrink: 0;
}
.logo-icon img { width: 100%; height: 100%; object-fit: cover; }
.logo-icon span { font-family: var(--font-heading); font-weight: 700; color: var(--navy-blue); font-size: 1.2rem; }
.logo-text { min-width: 0; max-width: 210px; }
.school-name { font-family: var(--font-heading); font-size: 1.05rem; font-weight: 700; color: #fff; line-height: 1.15; }
.portal-label {
    font-size: .58rem;
    letter-spacing: .3px;
    text-transform: none;
    color: var(--light-blue);
    line-height: 1.25;
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.header-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 1;
    min-width: 0;
    gap: 4px;
    flex-wrap: nowrap;
}
.header-nav > .nav-item { flex-shrink: 0; }
.header-nav > .nav-item.has-mega { position: static; }
.header-nav > .nav-item > .nav-link,
.header-nav > a.nav-link {
    color: #fff;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 999px;
    font-weight: 600;
    font-size: .9rem;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: 0;
    font-family: inherit;
    cursor: pointer;
}
.header-nav > .nav-item > .nav-link:hover,
.header-nav > .nav-item > .nav-link.is-active,
.header-nav > a.nav-link:hover,
.header-nav > a.nav-link.is-active {
    background: rgba(255,255,255,.14);
    color: var(--gold-light);
}
.header-nav > .nav-item > .nav-link i { font-size: .62rem; opacity: .85; }
.nav-cta {
    background: var(--accent-red) !important;
    color: #fff !important;
    font-weight: 700 !important;
    padding: 9px 16px !important;
    font-size: .85rem !important;
    white-space: nowrap;
    border-radius: 8px !important;
    text-decoration: none;
}
.nav-cta:hover { background: var(--red-hover) !important; color: #fff !important; }

.mega-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 16px;
    right: 16px;
    z-index: 80;
    background: #fff;
    color: var(--gray-dark);
    border-radius: 22px;
    box-shadow: 0 18px 50px rgba(13, 33, 55, .22);
    padding: 22px;
}
.mega-menu::before {
    content: "";
    position: absolute;
    left: 0; right: 0;
    top: -14px;
    height: 14px;
}
.has-mega:hover > .mega-menu,
.has-mega:focus-within > .mega-menu,
.has-mega.open > .mega-menu { display: block; }
.mega-menu-inner {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px 16px;
    max-width: 980px;
    margin: 0 auto;
}
.mega-card {
    display: flex !important;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 12px !important;
    border-radius: 14px;
    text-decoration: none !important;
    color: var(--gray-dark) !important;
    background: transparent;
    white-space: normal !important;
}
.mega-card:hover { background: #f4f7fb !important; color: var(--primary-blue) !important; }
.mega-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: #eaf2fb;
    color: var(--medium-blue);
    font-size: 1.05rem;
}
.mega-card:nth-child(3n+2) .mega-icon { background: #f3eefc; color: #6d4cae; }
.mega-card:nth-child(3n+3) .mega-icon { background: #eaf7f0; color: #2e7d57; }
.mega-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mega-copy strong {
    display: block;
    font-size: .98rem;
    color: var(--primary-blue);
    line-height: 1.25;
}
.mega-copy small {
    color: var(--gray-medium);
    font-size: .8rem;
    line-height: 1.35;
}

.nav-more { margin-left: 2px; }

.header-tools { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.search-toggle {
    width: 40px; height: 40px; border: 0; border-radius: 50%;
    background: rgba(255,255,255,.12); color: #fff; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
}
.search-toggle:hover { background: rgba(255,255,255,.22); }
.search-modal {
    position: fixed; inset: 0; z-index: 2000;
    display: flex; align-items: flex-start; justify-content: center;
    padding: 12vh 20px 20px;
}
.search-modal[hidden] { display: none !important; }
.search-modal-backdrop { position: absolute; inset: 0; background: rgba(13,33,55,.55); }
.search-modal-panel {
    position: relative; z-index: 1; width: 100%; max-width: 640px;
    background: #fff; border-radius: 16px; padding: 24px 24px 20px;
    box-shadow: var(--shadow-lg);
}
.search-modal-panel label { font-family: var(--font-heading); color: var(--primary-blue); font-size: 1.1rem; margin-bottom: 12px; }
.search-modal-row { display: flex; gap: 10px; }
.search-modal-row input { margin-bottom: 0; }
.search-modal-close {
    position: absolute; top: 10px; right: 14px; border: 0; background: none;
    font-size: 1.6rem; line-height: 1; cursor: pointer; color: var(--gray-medium);
}
body.search-open { overflow: hidden; }

.hamburger { display: none; background: none; border: none; cursor: pointer; flex-direction: column; gap: 5px; padding: 8px; }
.hamburger span { display: block; width: 28px; height: 3px; background: #fff; border-radius: 3px; }

.slider-section { position: relative; width: 100%; min-height: 480px; overflow: hidden; background: var(--navy-blue); display: flex; align-items: center; }
.slide-bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.slide-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(13,33,55,.82), rgba(30,77,123,.55)); }
.slide-content { position: relative; z-index: 1; text-align: center; color: #fff; padding: 60px 24px; max-width: 820px; margin: 0 auto; }
.slide-badge { display: inline-block; background: var(--accent-red); padding: 6px 18px; border-radius: 20px; font-size: .82rem; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 18px; }
.slide-content h1 { font-family: var(--font-heading); font-size: 3rem; margin-bottom: 12px; text-shadow: 0 3px 12px rgba(0,0,0,.3); }
.slide-content p { font-size: 1.15rem; opacity: .92; margin-bottom: 28px; }
.btn, .slide-btn {
    display: inline-block; background: var(--accent-red); color: #fff; padding: 13px 28px;
    border-radius: var(--btn-radius); text-decoration: none; font-weight: 600; border: 0; cursor: pointer;
    box-shadow: 0 6px 20px rgba(183,28,28,.3); transition: var(--transition);
}
.btn:hover, .slide-btn:hover { background: var(--red-hover); color: #fff; transform: translateY(-2px); }
.btn-outline { background: transparent; border: 2px solid #fff; color: #fff; box-shadow: none; }
.btn-outline:hover { background: #fff; color: var(--primary-blue); }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.section { padding: 70px 24px; }
.section-header { text-align: center; margin-bottom: 44px; }
.section-tag {
    display: inline-block; background: var(--lighter-blue); color: var(--navy-blue);
    padding: 6px 16px; border-radius: 20px; font-size: .8rem; font-weight: 600;
    letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 12px; border: 1px solid var(--light-blue);
}
.section-header h2 { font-family: var(--font-heading); font-size: 2.3rem; color: var(--primary-blue); }
.section-divider { width: 70px; height: 4px; background: var(--accent-red); margin: 12px auto; border-radius: 2px; }
.section-header p { color: var(--gray-medium); max-width: 620px; margin: 0 auto; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
    background: #fff; border-radius: var(--radius-lg); overflow: hidden;
    box-shadow: var(--shadow-sm); border: 1px solid #e8ecf1; transition: var(--transition);
}
.card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.card-accent { height: 6px; background: var(--accent-red); }
.card-body { padding: 26px 22px; }
.card-icon {
    width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 16px;
    display: flex; align-items: center; justify-content: center;
    background: var(--lighter-blue); color: var(--medium-blue); font-size: 1.4rem;
}
.card h3 { font-family: var(--font-heading); color: var(--primary-blue); margin-bottom: 8px; text-align: center; }
.card p { color: #5a636c; text-align: center; }

.split { display: grid; grid-template-columns: .9fr 1.1fr; gap: 40px; align-items: center; }
.split img, .split .photo { width: 100%; border-radius: 16px; object-fit: cover; max-height: 420px; background: var(--lighter-blue); }
.stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.stat { background: #fff; border-radius: 14px; padding: 22px 10px; text-align: center; box-shadow: var(--shadow-sm); }
.stat strong { display: block; font-size: 1.8rem; color: var(--primary-blue); font-family: var(--font-heading); }
.stat span { color: var(--gray-medium); font-size: .85rem; }

.news-grid, .event-grid, .gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.news-card img, .event-card img, .gallery-card img { width: 100%; height: 180px; object-fit: cover; background: var(--navy-blue); }
.meta { color: var(--gray-medium); font-size: .85rem; margin-bottom: 8px; }
.quote { font-style: italic; color: #4a5568; }
.stars { color: var(--gold); letter-spacing: 2px; }

.cta-band {
    background: linear-gradient(135deg, var(--primary-blue), var(--medium-blue));
    color: #fff; text-align: center; padding: 70px 24px; border-top: 4px solid var(--accent-red);
}
.cta-band h2 { font-family: var(--font-heading); font-size: 2.2rem; margin-bottom: 10px; color: #fff; }
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 28px; }
.contact-form, .info-box { background: #fff; border-radius: 16px; padding: 24px; box-shadow: var(--shadow-sm); }
.form-control, textarea, select, input[type=text], input[type=email], input[type=tel], input[type=search] {
    width: 100%; padding: 12px 14px; border: 1px solid #dbe3ea; border-radius: 10px; font: inherit; margin-bottom: 12px;
}
label { display: block; font-weight: 600; margin-bottom: 6px; }
.map-embed iframe { width: 100%; min-height: 240px; border: 0; border-radius: 12px; }

.page-hero { background: linear-gradient(135deg, var(--primary-blue), var(--medium-blue)); color: #fff; padding: 48px 24px 40px; border-bottom: 4px solid var(--accent-red); }
.page-hero h1 { font-family: var(--font-heading); font-size: 2.4rem; color: #fff; }
.prose { max-width: 860px; margin: 0 auto; background: #fff; padding: 32px; border-radius: 16px; box-shadow: var(--shadow-sm); }
.prose h2, .prose h3 { font-family: var(--font-heading); color: var(--primary-blue); margin: 1.2em 0 .4em; }
.prose p { margin-bottom: 1em; }
.alert-success { background: #e8f5e9; color: #1b5e20; padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; }
.alert-danger { background: #fdecea; color: #8b1515; padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; }

.footer { background: var(--primary-blue); color: #fff; padding: 48px 24px 20px; border-top: 4px solid var(--accent-red); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; max-width: 1300px; margin: 0 auto; }
.footer h4 { font-family: var(--font-heading); margin-bottom: 12px; }
.footer a { color: var(--gold-light); text-decoration: none; display: block; margin-bottom: 8px; }
.footer a:hover { color: #fff; }
.socials { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.socials a { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.12); display: flex; align-items: center; justify-content: center; margin: 0; }
.footer-bottom { max-width: 1300px; margin: 28px auto 0; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.12); font-size: .85rem; opacity: .85; }

.portal-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.portal-option-card {
    background: #fff; border-radius: 14px; padding: 22px 16px; text-align: center;
    text-decoration: none; color: inherit; border: 2px solid transparent; transition: var(--transition);
}
.portal-option-card:hover { border-color: var(--light-blue); transform: translateY(-4px); box-shadow: var(--shadow-md); }
.portal-icon { width: 54px; height: 54px; border-radius: 50%; margin: 0 auto 10px; display: flex; align-items: center; justify-content: center; background: var(--lighter-blue); color: var(--medium-blue); font-size: 1.3rem; }
.staff-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.staff-card { text-align: center; }
.staff-card img { width: 120px; height: 120px; object-fit: cover; border-radius: 50%; border: 3px solid var(--accent-red); margin-bottom: 10px; }
.faq-item { background: #fff; border-radius: 12px; padding: 16px 18px; margin-bottom: 10px; box-shadow: var(--shadow-sm); }
.faq-item summary { cursor: pointer; font-weight: 700; color: var(--primary-blue); }

@media (max-width: 1024px) {
    .cards, .news-grid, .event-grid, .gallery-grid, .stats { grid-template-columns: repeat(2, 1fr); }
    .split, .contact-grid, .footer-grid { grid-template-columns: 1fr; }
    .staff-grid { grid-template-columns: repeat(2, 1fr); }
    .slide-content h1 { font-size: 2rem; }
    .mega-menu-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
    .header-nav {
        display: none; position: absolute; top: 100%; left: 0; right: 0;
        background: var(--navy-blue); flex-direction: column; align-items: stretch;
        padding: 12px; border-top: 1px solid rgba(255,255,255,.1); flex-wrap: wrap;
        overflow: visible; justify-content: flex-start;
    }
    .header-nav.mobile-open { display: flex; }
    .header-nav .nav-more { display: none !important; }
    .hamburger { display: flex; }
    .header-nav > .nav-item.has-mega { position: relative; }
    .mega-menu {
        position: static;
        display: none;
        left: auto; right: auto; top: auto;
        margin: 8px 0 4px;
        padding: 10px;
        box-shadow: none;
        border-radius: 14px;
    }
    .has-mega.open > .mega-menu { display: block; }
    .mega-menu-inner { grid-template-columns: 1fr; }
    .logo-text { max-width: 160px; }
    .cards, .news-grid, .event-grid, .gallery-grid, .stats, .portal-options, .staff-grid { grid-template-columns: 1fr; }
    .slider-section { min-height: 360px; }
    .nav-cta { padding: 8px 12px !important; font-size: .78rem !important; }
    .search-modal-row { flex-direction: column; }
}
