﻿/* =========================================================
   OPTIMIZED BASE.CSS WITH HEADER STYLES INTEGRATED
   ========================================================= */

/* ================= CSS CUSTOM PROPERTIES ================= */
:root {
    /* Colors */
    --text: #333;
    --text-light: #666;
    --white: #fff;
    --gray: #f5f5f5;
    --gray-light: #f8f9fa;
    --gray-dark: #6c757d;
    --border: #dee2e6;
    /* Theme Colors */
    --primary: #0d6efd;
    --primary-dark: #0b5ed7;
    --success: #198754;
    --warning: #ffc107;
    --danger: #dc3545;
    --info: #0dcaf0;
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1);
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition: 250ms ease;
    --transition-slow: 350ms ease;
    /* Z-index layers */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal: 1040;
    --z-popover: 1050;
    --z-tooltip: 1060;
}

/* ================= RESET & BASE STYLES ================= */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
html, body {
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Poppins', system-ui, -apple-system, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
    height: auto;
}

input, button, textarea, select {
    font: inherit;
}

/* ================= LAYOUT UTILITIES ================= */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}


/* ================= TYPOGRAPHY ================= */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--space-md);
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.75rem;
}

h4 {
    font-size: 1.5rem;
}

h5 {
    font-size: 1.25rem;
}

h6 {
    font-size: 1rem;
}

p {
    margin-bottom: var(--space-md);
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

    a:hover {
        text-decoration: underline;
    }

/* ================= TOP BAR ================= */
.top-bar {
    background: linear-gradient(135deg, #2c3e50 0%, #1a252f 100%);
    font-size: 0.875rem;
    z-index: var(--z-fixed);
}

.header-social-links {
    display: flex;
    gap: var(--space-sm);
}

.social-link {
    color: var(--white);
    opacity: 0.8;
    transition: opacity var(--transition-fast), transform var(--transition-fast);
}

    .social-link:hover {
        opacity: 1;
        transform: translateY(-2px);
        text-decoration: none;
    }

/* ================= HEADER STYLES ================= */


.school-header .container {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: var(--space-md) 0;
    box-shadow: var(--shadow-md);
    position: relative;
    z-index: var(--z-sticky);
    max-width: 100%;
    padding-left: 0.5rem; /* reduce left gap */
    padding-right: 1rem; /* keep some right spacing */
}

.header-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-lg);
}

/* Header Brand (Logo + School Name) */
.header-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 300px;
}

.school-logo {
    height: 100px;
    width: 100px;
    object-fit: contain;
    border-radius: var(--radius-md);
    border: 3px solid rgba(255, 255, 255, 0.2);
    background: var(--white);
    padding: 3px;
}

.header-brand-text {
    flex: 1;
}

.school-name {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    margin-bottom: var(--space-xs);
    color: var(--white);
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.school-affiliation,
.school-established {
    font-size: 0.875rem;
    opacity: 0.9;
    display: flex;
    gap: var(--space-xs);
    align-items: center;
}

.affiliation-label,
.established-label {
    font-weight: 600;
}

/* Header Contact Information */
    .header-contact {
        display: flex;
        flex-direction: column;
        gap: var(--space-sm);
        min-width: 250px;
    }

    .contact-item {
        display: flex;
        align-items: center;
        gap: var(--space-sm);
        font-size: 0.875rem;
    }

        .contact-item i {
            width: 20px;
            text-align: center;
            color: rgba(255, 255, 255, 0.8);
        }

    .contact-text {
        color: rgba(255, 255, 255, 0.95);
        line-height: 1.3;
    }
    /* ================= HEADER STYLE VARIANTS ================= */
    /* Classic Header (Default) */
    .header-classic .header-content {
        flex-direction: row;
        align-items: center;
    }

    .header-classic .header-contact {
        text-align: right;
    }
    /* Modern Header */
    .header-modern .header-content {
        flex-direction: column;
        text-align: center;
        gap: var(--space-md);
    }

    .header-modern .header-brand {
        flex-direction: column;
        text-align: center;
        min-width: auto;
    }

    .header-modern .school-logo {
        height: 100px;
        width: 100px;
    }

    .header-modern .header-contact {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: var(--space-md);
        width: 100%;
        max-width: 800px;
        margin: 0 auto;
    }
    /* Compact Header */
    .header-compact {
        padding: var(--space-sm) 0;
    }

        .header-compact .school-logo {
            height: 50px;
            width: 50px;
        }

        .header-compact .school-name {
            font-size: clamp(1.2rem, 2vw, 1.5rem);
        }

        .header-compact .contact-item {
            font-size: 0.8rem;
        }
    /* Split Header */
    .header-split .header-content {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: var(--space-lg);
    }

    .header-split .header-brand {
        min-width: auto;
    }

    .header-split .header-contact {
        text-align: right;
        align-items: flex-end;
    }
    /* Stacked Header */
    .header-stacked .header-content {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-md);
    }

    .header-stacked .header-brand {
        flex-direction: column;
        text-align: center;
        padding-bottom: var(--space-md);
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    }

    .header-stacked .header-contact {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: var(--space-md);
        text-align: center;
    }
    /* ================= SCROLL MESSAGE ================= */
    .scroll-message-bar {
        background: var(--scroll-bg, linear-gradient(90deg, var(--primary), var(--success)));
        color: var(--scroll-color, var(--white));
        padding: var(--space-sm) 0;
        overflow: hidden;
        position: relative;
        z-index: var(--z-fixed);
        font-weight: 500;
    }

    .scroll-inner {
        overflow: hidden;
        white-space: nowrap;
    }

    .scroll-wrapper {
        display: inline-flex;
        width: max-content;
        animation: scrollHorizontal 20s linear infinite;
    }
        /* Fix: The animation speed should be controlled by inline style, not CSS variable */
        .scroll-wrapper:hover {
            animation-play-state: paused;
        }

    @keyframes scrollHorizontal {
        0% {
            transform: translateX(0);
        }

        100% {
            transform: translateX(-50%);
        }
    }

    .scroll-text {
        display: inline-block;
        padding: 0 2rem;
        white-space: nowrap;
    }
    /* For continuous scrolling effect, duplicate content */
    .scroll-wrapper::after {
        content: attr(data-content);
        padding: 0 2rem;
    }
    /* Scroll Style Variants */
    .scroll-style-highlight {
        --scroll-bg: linear-gradient(90deg, #ff6b6b, #4ecdc4);
        --scroll-color: #fff;
    }

    .scroll-style-subtle {
        --scroll-bg: #f8f9fa;
        --scroll-color: #495057;
        border-bottom: 1px solid #dee2e6;
    }

    .scroll-style-dark {
        --scroll-bg: #343a40;
        --scroll-color: #fff;
    }

    .scroll-style-gradient {
        --scroll-bg: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
        --scroll-color: #fff;
    }
    /* ================= NAVIGATION ================= */
    .navbar-custom {
        background: var(--white);
        box-shadow: var(--shadow-sm);
        position: sticky;
        top: 0;
        z-index: var(--z-sticky);
        transition: all var(--transition);
    }

        .navbar-custom.scrolled {
            box-shadow: var(--shadow-lg);
        }

        .navbar-custom .nav-link {
            font-weight: 600;
            padding: var(--space-sm) var(--space-md);
            transition: all var(--transition-fast);
            position: relative;
        }

            .navbar-custom .nav-link.active {
                color: var(--primary);
            }

                .navbar-custom .nav-link.active::after {
                    content: '';
                    position: absolute;
                    bottom: 0;
                    left: var(--space-md);
                    right: var(--space-md);
                    height: 3px;
                    background: var(--primary);
                    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
                }
 
     /* ================= HERO SLIDER ================= */
    .hero-slider {
        position: relative;
        overflow: hidden;
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-lg);
    }

    .hero-img {
        width: 100%;
        height: clamp(400px, 70vh, 600px);
        object-fit: cover;
        object-position: center center;
        background: #000;
    }

    .carousel-caption {
        position: absolute;
        left: 50%;
        bottom: 0%;
        transform: translateX(-50%);
        background: rgba(0, 0, 0, 0.55);
        backdrop-filter: blur(6px);
        padding: 0.5rem 1rem;
        border-radius: 8px;
        color: #fff;
        max-width: 60%;
        text-align: center;
        box-shadow: 0 6px 15px rgba(0,0,0,0.25);
    }


        .carousel-caption h1 {
            font-size: clamp(1rem, 2.2vw, 1.6rem);
            margin-bottom: 0.25rem;
            font-weight: 600;
            line-height: 1.2;
        }

        .carousel-caption p {
            font-size: clamp(0.75rem, 1.6vw, 0.95rem);
            margin-bottom: 0;
            opacity: 0.9;
            line-height: 1.35;
        }
    /* Slider layout variants */
    .slider-full .hero-slider {
        border-radius: 0;
    }

    .slider-center .hero-slider {
        margin: var(--space-xl) auto;
        max-width: 80%;
    }

    /* Split layout */
    .hero-split {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: var(--space-lg);
        align-items: center;
    }

        .hero-split .hero-slider {
            height: 100%;
        }

        .hero-split .hero-img {
            height: 400px;
            min-height: auto;
        }
    /* Responsive adjustments */
    @media (max-width: 768px) {
        .hero-slider .carousel-caption {
            left: 3%; /* Further reduce on mobile */
            right: 3%; /* Further reduce on mobile */
            bottom: 1%; /* Move it up on mobile */
            padding: var(--space-sm); /* Even smaller padding on mobile */
            max-width: 300px; /* Even narrower on mobile */
        }

            .hero-slider .carousel-caption h1 {
                font-size: 1.125rem; /* Smaller on mobile */
                margin-bottom: 0.25rem;
            }

            .hero-slider .carousel-caption p {
                font-size: 0.8125rem; /* Smaller on mobile */
                line-height: 1.3;
            }

        .hero-slider .carousel-item img {
            height: clamp(300px, 50vh, 400px);
        }
    }
    /* Slider layout variants */
    .slider-full .hero-slider {
        border-radius: 0;
    }

    .slider-center .hero-slider {
        margin: var(--space-xl) auto;
        max-width: 90%;
    }
    /* Split layout */
    .hero-split {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: var(--space-lg);
        align-items: center;
    }

        .hero-split .hero-slider {
            height: 100%;
        }

        .hero-split .hero-img {
            height: 400px;
            min-height: auto;
        }
    /* ================= CONTENT CARDS ================= */
    .content-card {
        background: var(--white);
        border-radius: var(--radius-lg);
        padding: var(--space-lg);
        box-shadow: var(--shadow-md);
        transition: all var(--transition);
        position: relative;
        overflow: hidden;
    }

        .content-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 4px;
            background: var(--card-accent, linear-gradient(90deg, var(--primary), var(--accent)));
        }

        .content-card:hover {
            transform: translateY(-4px);
            box-shadow: var(--shadow-lg);
        }

    .card-title {
        font-size: 1.5rem;
        font-weight: 700;
        color: var(--primary);
        margin-bottom: var(--space-md);
        position: relative;
        padding-bottom: var(--space-sm);
    }

        .card-title::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            width: 60px;
            height: 3px;
            background: var(--primary);
        }
    /* ================= NOTICES & EVENTS ================= */
    .notice-item,
    .event-item {
        display: grid;
        grid-template-columns: auto 1fr;
        gap: var(--space-md);
        padding: var(--space-md);
        border-bottom: 1px solid var(--border);
        transition: all var(--transition-fast);
    }

        .notice-item:hover,
        .event-item:hover {
            background: var(--gray-light);
            padding-left: var(--space-lg);
        }

    .notice-date,
    .event-date {
        background: var(--primary);
        color: var(--white);
        padding: var(--space-xs) var(--space-sm);
        border-radius: var(--radius-sm);
        font-size: 0.875rem;
        font-weight: 600;
        text-align: center;
        min-width: 70px;
    }
    /* ================= VERTICAL MARQUEE ================= */
    .marquee-container {
        position: relative;
        height: 300px; /* keep in sync with card body */
        overflow: hidden;
        /* Smooth fade top & bottom */
        -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 10%, black 90%, transparent 100%);
        mask-image: linear-gradient(to bottom, transparent 0%, black 10%, black 90%, transparent 100%);
    }
    /* Moving content */
    .marquee-content {
        will-change: transform;
        animation: marquee-vertical 30s linear infinite;
    }
    /* Pause on hover */
    .marquee-container:hover .marquee-content {
        animation-play-state: paused;
    }
    /* Vertical loop animation */
    @keyframes marquee-vertical {
        from {
            transform: translateY(0);
        }

        to {
            transform: translateY(-50%);
        }
    }
    /* ================= AUTHORITIES ================= */
    /* ================== AUTHORITIES CORNER RECTANGLE STYLES ================== */
    .authority-card-corner-rectangle {
        background: var(--white);
        border-radius: var(--radius-lg);
        padding: 1.5rem;
        box-shadow: var(--shadow-md);
        transition: all var(--transition);
        position: relative;
        overflow: hidden;
        height: 100%;
        display: flex;
        flex-direction: column;
    }

        .authority-card-corner-rectangle::before {
            content: '';
            position: absolute;
            top: 0;
            right: 0;
            width: 60px;
            height: 60px;
            background: linear-gradient(135deg, transparent 50%, var(--primary) 50%);
            border-bottom-left-radius: var(--radius-lg);
            transition: all var(--transition);
        }

        .authority-card-corner-rectangle:hover {
            transform: translateY(-5px);
            box-shadow: var(--shadow-lg);
        }

            .authority-card-corner-rectangle:hover::before {
                width: 80px;
                height: 80px;
            }

    .authority-image-wrapper {
        position: relative;
        overflow: hidden;
        border-radius: var(--radius-md);
        margin: 0 auto;
    }

    .authority-img-rectangle {
        width: 140px;
        height: 160px;
        object-fit: cover;
        object-position: center;
        border-radius: var(--radius-md);
        transition: transform var(--transition-slow);
        border: 3px solid var(--white);
        box-shadow: var(--shadow-sm);
    }

    .authority-card-corner-rectangle:hover .authority-img-rectangle {
        transform: scale(1.05);
    }

    .authority-message-preview {
        line-height: 1.5;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    /* For CENTER layout compact view */
    @media (max-width: 768px) {
        .authority-card-corner-rectangle .authority-img-rectangle {
            width: 100px;
            height: 120px;
        }
    }
    /* ================== AUTHORITY DETAIL PAGE FULL WIDTH MESSAGE ================== */
    .authority-message-fullwidth {
        background: var(--white);
        border-radius: var(--radius-lg);
        padding: 2.5rem;
        box-shadow: var(--shadow-md);
        width: 100%;
        margin: 0;
    }

    .authority-message-content-full {
        white-space: pre-line;
        line-height: 1.8;
        font-size: 1.1rem;
        text-align: justify;
        width: 100%;
    }

    .authority-detail-grid {
        display: grid;
        grid-template-columns: 1fr 2fr;
        gap: 2rem;
        align-items: start;
    }

    @media (max-width: 992px) {
        .authority-detail-grid {
            grid-template-columns: 1fr;
            gap: 1.5rem;
        }
    }
    /* Authority Detail Page Additional Styles */
    .authority-profile-img-rectangle {
        width: 100%;
        height: 300px;
        object-fit: cover;
        object-position: center;
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-md);
    }

    .authority-detail-page {
        flex: 1;
        width: 100%;
    }

    .authority-detail-card {
        background: var(--white);
        border-radius: var(--radius-lg);
        padding: 1.5rem;
        box-shadow: var(--shadow-md);
        overflow: hidden;
    }
    /* Add this to existing .authority-contact-info if you want to keep it */
    .authority-contact-info {
        background: var(--bg-light);
        border-radius: var(--radius-lg);
        padding: 1.5rem;
        margin-top: 1.5rem;
    }

    .authority-compact .authority-card {
        padding: 1rem;
        margin-bottom: 1rem;
    }

        .authority-compact .authority-card img {
            width: 80px !important;
            height: 80px !important;
        }

        .authority-compact .authority-card h5 {
            font-size: 1rem;
            margin-bottom: 0.25rem;
        }

        .authority-compact .authority-card p.text-primary {
            font-size: 0.85rem;
            margin-bottom: 0.5rem;
        }

        .authority-compact .authority-card .text-muted {
            font-size: 0.8rem;
            line-height: 1.4;
        }
    /* Hero Split Layout Styles */
    .hero-split {
        margin: 1rem 0;
    }

        .hero-split .content-card {
            min-height: 250px;
            display: flex;
            flex-direction: column;
            justify-content: center;
            border-radius: 10px;
        }
    /* Responsive Styles for Hero Split */
    @media (max-width: 768px) {
        .hero-split {
            flex-direction: column;
        }

            .hero-split > div {
                margin-bottom: 1rem;
            }

            .hero-split .content-card {
                min-height: auto;
            }
    }

    @media (max-width: 768px) {
        .authority-compact .row > [class*="col-"] {
            margin-bottom: 1rem;
        }

        .authority-compact .authority-card {
            margin-bottom: 0;
        }
    }

    .authority-card {
        position: relative;
        border-radius: 50%;
        width: 150px;
        height: 150px;
        margin: 0 auto;
        overflow: hidden;
        box-shadow: var(--shadow-md);
        transition: all var(--transition);
    }

        .authority-card:hover {
            transform: scale(1.05);
            box-shadow: var(--shadow-lg);
        }

        .authority-card img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform var(--transition-slow);
        }

        .authority-card:hover img {
            transform: scale(1.1);
        }

    .authority-overlay {
        position: absolute;
        inset: 0;
        background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%);
        color: var(--white);
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        padding: var(--space-md);
        opacity: 0;
        transition: opacity var(--transition);
    }

    .authority-card:hover .authority-overlay {
        opacity: 1;
    }
    /* ================= GALLERY ================= */
    .gallery-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: var(--space-md);
    }

    .gallery-item {
        position: relative;
        border-radius: var(--radius-md);
        overflow: hidden;
        aspect-ratio: 16/9;
    }

        .gallery-item img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform var(--transition-slow);
        }

        .gallery-item:hover img {
            transform: scale(1.1);
        }

    .gallery-overlay {
        position: absolute;
        inset: 0;
        background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%);
        color: var(--white);
        display: flex;
        align-items: flex-end;
        padding: var(--space-md);
        opacity: 0;
        transition: opacity var(--transition);
    }

    .gallery-item:hover .gallery-overlay {
        opacity: 1;
    }
    /* ================= QUICK STATS ================= */
    .quick-stats-section {
        background: var(--gray-light);
        position: relative;
        overflow: hidden;
    }

        .quick-stats-section::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 4px;
            background: linear-gradient(90deg, var(--primary), var(--accent));
        }

        .quick-stats-section .content-card {
            border: none;
            box-shadow: var(--shadow-sm);
            text-align: center;
            padding: var(--space-lg);
        }

            .quick-stats-section .content-card i {
                font-size: 2.5rem;
                color: var(--primary);
                margin-bottom: var(--space-sm);
            }

        .quick-stats-section h3 {
            font-size: 2rem;
            font-weight: 700;
            color: var(--text);
            margin-bottom: var(--space-xs);
        }
    /* ================= FOOTER ================= */
    .footer {
        background: var(--footer-bg, linear-gradient(135deg, var(--dark) 0%, #000 100%));
        color: var(--white);
        padding: var(--space-xl) 0 var(--space-md);
        position: relative;
    }

        .footer::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 4px;
            background: linear-gradient(90deg, var(--primary), var(--accent));
        }

    .footer-heading {
        font-size: 1.25rem;
        font-weight: 600;
        margin-bottom: var(--space-md);
        position: relative;
        padding-bottom: var(--space-sm);
    }

        .footer-heading::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            width: 40px;
            height: 2px;
            background: var(--accent);
        }

    .footer-link {
        color: rgba(255, 255, 255, 0.8);
        display: block;
        padding: var(--space-xs) 0;
        transition: all var(--transition-fast);
    }

        .footer-link:hover {
            color: var(--white);
            padding-left: var(--space-sm);
            text-decoration: none;
        }

    .footer-social-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.1);
        color: var(--white);
        transition: all var(--transition);
        margin-right: var(--space-sm);
    }

        .footer-social-icon:hover {
            background: var(--accent);
            transform: translateY(-2px);
            color: var(--white);
        }

    site-wrapper {
        display: flex;
        flex-direction: column;
        min-height: 100vh;
    }

    main {
        flex: 1 0 auto;
        width: 100%;
    }

    .site-footer {
        flex-shrink: 0;
        width: 100%;
        margin-top: auto;
    }
    /* ================= GLOBAL LAYOUT ================= */

    .site-wrapper {
        min-height: 100vh;
        display: flex;
        flex-direction: column;
    }

    .site-main {
        flex: 1;
        width: 100%;
    }

    .site-footer {
        width: 100%;
        flex-shrink: 0;
    }
    /* ================= ADMISSION BANNER ================= */
    .admission-banner {
        background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
        color: var(--white);
        border-radius: var(--radius-lg);
        overflow: hidden;
        position: relative;
        box-shadow: var(--shadow-lg);
    }

        .admission-banner::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 4px;
            background: linear-gradient(90deg, var(--success), var(--warning));
        }
    /* ================= SCROLLABLE CONTENT ================= */
    .scrollable-content {
        scrollbar-width: thin;
        scrollbar-color: var(--border) transparent;
        max-height: 400px;
        overflow-y: auto;
        padding-right: var(--space-sm);
    }

        .scrollable-content::-webkit-scrollbar {
            width: 6px;
        }

        .scrollable-content::-webkit-scrollbar-track {
            background: transparent;
            border-radius: var(--radius-sm);
        }

        .scrollable-content::-webkit-scrollbar-thumb {
            background: var(--border);
            border-radius: var(--radius-sm);
        }

            .scrollable-content::-webkit-scrollbar-thumb:hover {
                background: var(--gray-dark);
            }
    /* ================= BUTTONS ================= */
    .btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: var(--space-xs);
        padding: var(--space-sm) var(--space-lg);
        font-weight: 600;
        border-radius: var(--radius-md);
        border: 2px solid transparent;
        transition: all var(--transition);
        cursor: pointer;
        text-decoration: none;
        white-space: nowrap;
    }

    .btn-primary {
        background: var(--primary);
        color: var(--white);
        border-color: var(--primary);
    }

        .btn-primary:hover {
            background: var(--primary-dark);
            border-color: var(--primary-dark);
            transform: translateY(-2px);
            box-shadow: var(--shadow-md);
            text-decoration: none;
        }

    .btn-outline-primary {
        background: transparent;
        color: var(--primary);
        border-color: var(--primary);
    }

        .btn-outline-primary:hover {
            background: var(--primary);
            color: var(--white);
            transform: translateY(-2px);
        }

    .btn-success {
        background: var(--success);
        color: var(--white);
        border-color: var(--success);
    }

        .btn-success:hover {
            background: #157347;
            border-color: #146c43;
            transform: translateY(-2px);
            box-shadow: var(--shadow-md);
        }
    /* ================= UTILITIES ================= */
    .scroll-to-top {
        position: fixed;
        bottom: var(--space-xl);
        right: var(--space-xl);
        width: 50px;
        height: 50px;
        background: var(--primary);
        color: var(--white);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition);
        z-index: var(--z-tooltip);
        box-shadow: var(--shadow-lg);
        border: none;
    }

        .scroll-to-top.visible {
            opacity: 1;
            visibility: visible;
        }

        .scroll-to-top:hover {
            background: var(--primary-dark);
            transform: translateY(-2px);
        }
    /* ================= ANIMATIONS ================= */
    @keyframes fadeInDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    @keyframes fadeInUp {
        from {
            opacity: 0;
            transform: translateY(20px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    @keyframes pulse {
        0%, 100% {
            opacity: 1;
        }

        50% {
            opacity: 0.5;
        }
    }
    /* ================= RESPONSIVE DESIGN ================= */
    @media (max-width: 1199px) {
        .container {
            max-width: 960px;
        }
    }
    /* Responsive adjustments */
    @media (max-width: 768px) {
        .carousel-caption {
            bottom: 5%;
            max-width: 90%;
            padding: 0.4rem 0.75rem;
        }

            .carousel-caption h1 {
                font-size: 1rem;
            }

            .carousel-caption p {
                font-size: 0.75rem;
            }

        .hero-img {
            height: clamp(280px, 50vh, 380px);
        }
    }

    @media (max-width: 991px) {
        .container {
            max-width: 720px;
        }

        .hero-split {
            grid-template-columns: 1fr;
        }

        .carousel-caption {
            left: 5%;
            right: 5%;
            bottom: 10%;
        }

        .hero-img {
            height: clamp(350px, 60vh, 500px);
        }
        /* Header responsive styles */
        .header-content {
            flex-direction: column;
            text-align: center;
        }

        .header-brand {
            flex-direction: column;
            text-align: center;
            min-width: auto;
        }

        .header-contact {
            align-items: center;
        }

        .header-split .header-content {
            grid-template-columns: 1fr;
        }

        .header-split .header-contact {
            text-align: center;
            align-items: center;
        }
    }

    @media (max-width: 767px) {
        .container {
            max-width: 540px;
            padding: 0 var(--space-sm);
        }

        .school-header {
            padding: var(--space-sm) 0;
        }

        .school-logo {
            height: 60px;
            width: 60px;
        }

        .navbar-custom .nav-link {
            padding: var(--space-sm);
        }

        .carousel-caption {
            position: static;
            background: rgba(0, 0, 0, 0.8);
            margin: 0;
            border-radius: 0;
            padding: var(--space-md);
        }

        .gallery-grid {
            grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        }

        .marquee-container {
            height: 350px;
        }

        .footer {
            text-align: center;
        }

        .footer-heading::after {
            left: 50%;
            transform: translateX(-50%);
        }

        .scroll-to-top {
            bottom: var(--space-md);
            right: var(--space-md);
        }
        /* Header mobile styles */
        .header-contact {
            font-size: 0.8rem;
        }

        .contact-item {
            flex-wrap: wrap;
            justify-content: center;
        }
    }

    @media (max-width: 575px) {
        :root {
            --space-lg: 1rem;
            --space-xl: 1.5rem;
        }

        h1 {
            font-size: 1.75rem;
        }

        h2 {
            font-size: 1.5rem;
        }

        h3 {
            font-size: 1.25rem;
        }

        h4 {
            font-size: 1.125rem;
        }

        .content-card {
            padding: var(--space-md);
        }

        .btn {
            padding: var(--space-sm) var(--space-md);
            width: 100%;
        }

        .gallery-grid {
            grid-template-columns: 1fr;
        }
    }
    /* ================= PRINT STYLES ================= */
    @media print {
        .navbar-custom,
        .footer,
        .scroll-message-bar,
        .scroll-to-top,
        .btn {
            display: none !important;
        }

        body {
            font-size: 12pt;
            line-height: 1.4;
        }

        .container {
            max-width: 100%;
            padding: 0;
        }

        a {
            text-decoration: underline;
            color: #000;
        }
    }
