@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Outfit:wght@400;600;700;800&display=swap');

/*
Theme Name: Rohtas Public School Theme
Theme URI: https://rpskochas.in/
Author: RPS
Author URI: https://rpskochas.in/
Description: A premium custom WordPress theme for Rohtas Public School (RPS Kochas).
Version: 12.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: education, school, premium, custom-theme
Text Domain: rps-theme
*/
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-blue: #1a237e;
    /* Deep Blue from School Logo */
    --primary-gold: #ffc107;
    /* Gold/Yellow from Logo */
    --text-dark: #1e293b;
    /* Refined Slate Dark */
    --text-light: #64748b;
    /* Refined Slate Light */
    --white: #ffffff;
    --light-bg: #f8fafc;
    /* Softer Blue-Gray Background */

    /* House Colors (Premium Shades) */
    --house-red: #e11d48;
    /* Vibrant Rose Red */
    --house-green: #10b981;
    /* Emerald Green */
    --house-blue: #3b82f6;
    /* Bright Sky Blue */
    --house-gold: #f59e0b;
    /* Amber Gold */

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* House Colors */
    --house-red: #d32f2f;
    --house-green: #388e3c;
    --house-blue: #1976d2;
}

html {
    scroll-behavior: smooth;
    overflow-x: clip;
    /* FIX: 'hidden' breaks position: sticky on many browsers */
}

html.no-scroll,
body.no-scroll {
    overflow: hidden !important;
    height: 100% !important;
    position: relative;
}

body {
    overflow-x: clip;
    /* FIX: 'hidden' breaks position: sticky on many browsers */
    max-width: 100vw;
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.site-wrapper {
    overflow-x: clip;
    /* FIX: 'hidden' breaks position: sticky on many browsers */
    width: 100%;
    position: relative;
}

/* Custom Scrollbar for a Premium Look */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
    border: 2px solid #f1f5f9;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-gold);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* =========================================
   2. TOP NOTIFICATION BAR
   ========================================= */
.top-bar {
    background-color: var(--primary-gold);
    color: var(--primary-blue);
    font-weight: bold;
    padding: 8px 0;
    font-size: 14px;
}

.marquee-container {
    display: flex;
    align-items: center;
    overflow: hidden;
    position: relative;
    width: 100%;
    padding-left: 80px;
    /* Offset for the NEW badge shield */
}

.marquee-wrapper {
    display: flex;
    width: 100%;
}

.marquee-content {
    display: flex;
    white-space: nowrap;
    animation: scroll-text 30s linear infinite;
    padding-left: 20px;
}

@keyframes scroll-text {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-100%);
    }
}

/* Pause on hover for easier reading */
.marquee-container:hover .marquee-content {
    animation-play-state: paused;
}

.badge-wrapper {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background-color: var(--primary-gold);
    /* Shield to hide scrolling text */
    padding: 0 15px;
    height: 100%;
    display: flex;
    align-items: center;
}

.badge {
    background-color: var(--house-red);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    animation: pulseBadge 2s infinite;
    display: inline-block;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
}

@keyframes pulseBadge {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(211, 47, 47, 0.7);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 6px rgba(211, 47, 47, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(211, 47, 47, 0);
    }
}

/* =========================================
   3. HEADER & NAVIGATION
   ========================================= */
.main-header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1200;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (min-width: 992px) {
    .main-header.scrolled .navbar {
        height: 0;
        overflow: hidden;
        opacity: 0;
        pointer-events: none;
        padding: 0;
    }
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    transition: padding 0.3s ease;
}

.main-header.scrolled .header-flex {
    padding: 10px 0;
    /* Slim down on scroll */
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    height: 80px;
    /* Adjust based on your logo quality */
    width: auto;
}

.school-identity h1 {
    font-size: 24px;
    color: var(--primary-blue);
    line-height: 1.2;
}

.tagline {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary-gold);
    background: var(--primary-blue);
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 2px;
}

.sub-address {
    font-size: 12px;
    color: var(--text-light);
}

.contact-quick {
    display: flex;
    gap: 20px;
}

.info-box {
    display: flex;
    flex-direction: column;
    text-align: right;
}

.info-box .label {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-light);
}

.info-box .value {
    font-weight: bold;
    color: var(--primary-blue);
}

/* Navbar — blue bg spans 100%, content centered via dynamic padding */
/* max() ensures minimum 20px padding on small screens;
   on larger screens padding grows to keep content within 1200px column */
.navbar {
    background-color: var(--primary-blue);
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    box-sizing: border-box;
    padding-left:  max(20px, calc((100% - 1200px) / 2 + 20px));
    padding-right: max(20px, calc((100% - 1200px) / 2 + 20px));
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    flex: 1;
}

.nav-links li a {
    display: block;
    color: var(--white);
    text-decoration: none;
    padding: 12px 16px;  /* Tighter padding so bar is compact */
    font-size: 14px;
    transition: background 0.3s;
    white-space: nowrap;
}

.nav-links li a:hover,
.nav-links li a.active {
    background-color: var(--primary-gold);
    color: var(--primary-blue);
}

.btn-apply {
    background: linear-gradient(45deg, #FFD700, #ffca28);
    color: var(--primary-blue);
    text-decoration: none;
    padding: 9px 20px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 13px;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
    flex-shrink: 0;       /* Never shrink — stays on the right */
    margin-left: 10px;    /* Gap from last nav link */
    position: relative;
    overflow: hidden;
}

.btn-apply:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.6);
    background: linear-gradient(45deg, #fff, #FFD700);
}

.btn-apply::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% {
        left: -100%;
    }

    20% {
        left: 100%;
    }

    100% {
        left: 100%;
    }
}

/* =========================================
   4. HERO SECTION
   ========================================= */
.hero-section {
    background-color: #0f172a;
    /* Sophisticated base color */
    background-image: url('assets/images/school_hero.jpg');
    background-size: cover;
    background-position: center;
    height: 80vh;
    /* Increased height for impact */
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-overlay {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0.4) 100%);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
}

.hero-subtitle {
    display: block;
    font-size: 18px;
    color: var(--primary-gold);
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    /* Responsive typography */
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.hero-desc {
    font-size: 18px;
    max-width: 700px;
    margin: 0 auto 30px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    margin: 5px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s;
}

.primary-btn {
    background-color: var(--primary-gold);
    color: var(--primary-blue);
    border: none;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
}

.primary-btn:hover {
    background-color: #ffbb00;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 193, 7, 0.5);
}

.secondary-btn {
    border: 2px solid rgba(255, 255, 255, 0.4);
    color: var(--white);
    backdrop-filter: blur(5px);
}

.secondary-btn:hover {
    background-color: var(--white);
    color: var(--primary-blue);
    transform: translateY(-3px);
}

/* Ripple Touch Effect */
.ripple-btn {
    position: relative;
    overflow: hidden;
}

.ripple-effect {
    position: absolute;
    border-radius: 50%;
    transform: scale(0);
    animation: rippleAnim 0.6s linear;
    background-color: rgba(255, 255, 255, 0.4);
    pointer-events: none;
}

@keyframes rippleAnim {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Scroll Down Text */
.scroll-down {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0.8;
}

.scroll-down span {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
    color: var(--white);
    animation: fade-in-out 2s infinite alternate;
}

/* =========================================
   NOTICE BOARD SECTION
   ========================================= */
.notice-section {
    background-color: #f8f9fa;
    /* Light slate background */
    padding: 60px 0 40px;
    overflow: hidden;
}

.notice-scroll-container {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 20px;
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

/* Hide scrollbar */
.notice-scroll-container::-webkit-scrollbar {
    display: none;
}

.notice-card {
    flex: 0 0 calc(33.333% - 14px);
    min-width: 320px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    padding: 25px;
    display: flex;
    flex-direction: column;
    scroll-snap-align: start;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    color: var(--text-dark);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.notice-badge-new {
    position: absolute;
    top: 12px;
    right: -30px;
    background: linear-gradient(135deg, #ffd700, #ffa500);
    color: #000;
    font-size: 10px;
    font-weight: 900;
    padding: 4px 35px;
    transform: rotate(45deg);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    z-index: 5;
    animation: gold-glow 2s infinite;
}

@keyframes gold-glow {
    0% {
        filter: brightness(1);
    }

    50% {
        filter: brightness(1.3);
        transform: rotate(45deg) scale(1.05);
    }

    100% {
        filter: brightness(1);
    }
}

.notice-card:hover {
    transform: translateY(-10px) scale(1.02);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 215, 0, 0.5);
    /* Gold border on hover */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.notice-date {
    display: flex;
    align-items: center;
    font-size: 28px;
    font-weight: 900;
    color: var(--primary-blue);
    margin-bottom: 12px;
    line-height: 1;
}

.notice-date span {
    font-size: 14px;
    font-weight: 700;
    background: var(--primary-gold);
    color: var(--primary-blue);
    padding: 4px 10px;
    border-radius: 12px;
    margin-left: 10px;
    letter-spacing: 1px;
}

.notice-content h4 {
    color: var(--text-dark);
    font-size: 18px;
    margin-top: 0;
    margin-bottom: 10px;
    font-family: var(--font-heading);
    line-height: 1.3;
}

.notice-content p {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    /* Limit to 2 lines */
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.read-more {
    font-size: 13px;
    font-weight: bold;
    color: var(--primary-gold);
    text-transform: uppercase;
    display: inline-block;
    transition: color 0.3s, transform 0.3s;
}

.notice-card:hover .read-more {
    color: var(--primary-blue);
    transform: translateX(5px);
}

/* NOTICE MODAL (Text) */
.notice-modal-overlay {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    background-color: rgba(26, 35, 126, 0.6) !important;
    /* Deep blue slightly transparent */
    padding: 0 !important;
    /* Override base modal 100px padding */
    align-items: center;
    justify-content: center;
}

.text-modal-content {
    background: var(--white) !important;
    max-width: 500px !important;
    width: calc(100% - 40px) !important;
    /* Strict viewport limits */
    max-height: 85vh !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    /* Prevent horizontal scrolling */
    border-radius: 20px !important;
    padding: 30px !important;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2) !important;
    box-sizing: border-box !important;
    word-break: break-word !important;
    /* Break long unseen strings */
    -ms-overflow-style: none;
    /* IE/Edge */
    scrollbar-width: none;
    /* Firefox */
}

.text-modal-content::-webkit-scrollbar {
    display: none;
}

.notice-modal-header {
    border-bottom: 2px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.nm-date-badge {
    display: inline-block;
    background: var(--primary-gold);
    color: var(--primary-blue);
    font-size: 12px;
    font-weight: bold;
    padding: 4px 10px;
    border-radius: 20px;
    margin-bottom: 15px;
}

#nm-title {
    font-size: 22px;
    color: var(--primary-blue);
    font-family: var(--font-heading);
    line-height: 1.3;
    margin: 0;
}

.notice-modal-body {
    font-size: 15px;
    line-height: 1.7;
    color: #444;
}

.notice-close {
    position: absolute;
    top: 20px;
    right: 25px;
    color: #999;
    font-size: 28px;
    cursor: pointer;
    transition: color 0.3s;
}

.notice-close:hover {
    color: var(--house-red);
}

/* Mobile Media Query for Notice Board */
@media (max-width: 768px) {
    .notice-card {
        flex: 0 0 85vw;
        /* Takes up most of the screen on mobile, encouraging swipe */
        min-width: unset;
    }

    .text-modal-content {
        padding: 25px 20px !important;
        /* Less padding on mobile to save space */
        width: calc(100% - 32px) !important;
        /* Always leave exactly 16px border on sides */
        max-width: 100% !important;
        /* Ensure it overrides the max-width: 500px if it conflicts */
    }
}

/* =========================================
   5. HIGHLIGHTS & SECTIONS
   ========================================= */
.section-padding {
    padding: 50px 0;
    /* Reduced from 100px for tighter layout */
}


.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: -50px;
    /* Overlap hero */
    position: relative;
    z-index: 10;
}

/* =========================================
   5. HIGHLIGHTS (Modern Stats)
   ========================================= */
.highlights-modern {
    padding: 50px 0;
    /* Reduced from 100px for tighter layout */
    position: relative;
    overflow: hidden;
    background: #fdfdfd;
}

.brand-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 25vw;
    font-weight: 900;
    color: rgba(26, 35, 126, 0.02);
    z-index: 1;
    pointer-events: none;
    user-select: none;
    letter-spacing: -2vw;
}

.highlights-modern .container {
    position: relative;
    z-index: 2;
}

.highlight-box {
    background: #ffffff;
    padding: 50px 35px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.03);
    border-radius: 28px;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.highlight-box:hover {
    transform: translateY(-15px);
    box-shadow: 0 30px 60px rgba(26, 35, 126, 0.08);
    border-color: rgba(255, 215, 0, 0.3);
}

.highlight-header {
    margin-bottom: 20px;
    display: flex;
    align-items: baseline;
    justify-content: center;
}

.count-up {
    font-size: 56px;
    font-weight: 900;
    color: var(--primary-blue);
    line-height: 1;
}

.suffix {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-gold);
    margin-left: 2px;
}

.highlight-box h3 {
    font-size: 18px;
    color: var(--primary-blue);
    margin-bottom: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 32px;
    color: var(--primary-blue);
    position: relative;
    display: inline-block;
}

.divider {
    height: 4px;
    width: 60px;
    background-color: var(--primary-gold);
    margin: 10px auto 0;
}

/* =========================================
   6. LEADERSHIP (Director & Principal)
   ========================================= */
.bg-light {
    background-color: var(--light-bg);
}

.message-card {
    display: flex;
    align-items: center;
    background: transparent;
    margin: 60px 0;
    transition: all 0.5s ease;
}

.message-card.reverse {
    flex-direction: row-reverse;
}

.image-box {
    flex: 1;
    height: 500px;
    z-index: 2;
    border-radius: 2rem;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.12);
    margin-right: -80px;
    /* Overlap */
}

.message-card.reverse .image-box {
    margin-right: 0;
    margin-left: -80px;
}

.image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s cubic-bezier(0.25, 1, 0.5, 1);
}

.message-card:hover .image-box img {
    transform: scale(1.08);
}

.text-box {
    flex: 1.6;
    background: white;
    padding: 60px 60px 60px 120px;
    /* Padding for overlap */
    border-radius: 2.5rem;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.04);
    z-index: 1;
    border: 1px solid rgba(0, 0, 0, 0.02);
}

.message-card.reverse .text-box {
    padding: 60px 120px 60px 60px;
}

.role-badge {
    background-color: var(--primary-gold);
    color: var(--primary-blue);
    padding: 4px 10px;
    font-size: 12px;
    font-weight: bold;
    border-radius: 20px;
}

.text-box h3 {
    font-size: 28px;
    margin-top: 10px;
    color: var(--primary-blue);
}

.text-box h4 {
    color: var(--text-light);
    margin-bottom: 25px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.signature {
    font-family: 'Dancing Script', cursive;
    font-size: 36px;
    color: var(--primary-blue);
    margin-top: 30px;
    opacity: 0.8;
}

.signature::before {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    background: var(--primary-gold);
    margin-bottom: 10px;
}

@media (max-width: 1024px) {

    .message-card,
    .message-card.reverse {
        flex-direction: column;
        background: white;
        border-radius: 2rem;
        overflow: hidden;
        margin: 30px 0;
    }

    .image-box {
        margin: 0 !important;
        height: 350px;
        width: 100%;
        border-radius: 0;
    }

    .text-box {
        padding: 30px !important;
        border-radius: 0;
        box-shadow: none;
    }
}

.quote {
    font-style: italic;
    font-size: 1.25rem;
    color: var(--text-dark);
    border-left: 5px solid var(--primary-gold);
    padding-left: 20px;
    margin-bottom: 25px;
    line-height: 1.4;
    font-weight: 500;
}

/* =========================================
   7. HOUSE SYSTEM
   ========================================= */
.house-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.house-card {
    background: var(--white);
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    border: 1px solid #eee;
    transition: transform 0.3s;
}

.house-card:hover {
    transform: translateY(-10px);
}

.house-icon img {
    height: 100px;
    margin-bottom: 20px;
}

.house-card .slogan {
    font-weight: bold;
    font-style: italic;
    margin: 10px 0;
}

/* Specific House Styling */
.red-theme {
    border-top: 5px solid var(--house-red);
}

.red-theme .slogan {
    color: var(--house-red);
}

.green-theme {
    border-top: 5px solid var(--house-green);
}

.green-theme .slogan {
    color: var(--house-green);
}

.blue-theme {
    border-top: 5px solid var(--house-blue);
}

.blue-theme .slogan {
    color: var(--house-blue);
}

/* =========================================
   8. FACILITIES & GALLERY
   ========================================= */
.bg-dark {
    background-color: #1a1a1a;
    color: var(--white);
}

.white-text h2 {
    color: var(--white);
}

/* =========================================
   7. FACILITIES (Bento Grid)
   ========================================= */
.facilities-bento {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 220px;
    grid-auto-flow: dense;
    gap: 25px;
}

.facility-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 32px;
    padding: 35px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    overflow: hidden;
    height: 100%;
}

.facility-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-8px);
    border-color: var(--primary-gold);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.bento-wide {
    grid-column: span 2;
}

.bento-tall {
    grid-row: span 2;
}

.facility-icon {
    position: absolute;
    top: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-gold) 0%, #ffca28 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--primary-blue);
    box-shadow: 0 8px 20px rgba(255, 193, 7, 0.3);
    transition: transform 0.4s ease;
}

.facility-card:hover .facility-icon {
    transform: rotate(15deg) scale(1.1);
}

.facility-info h3 {
    color: var(--primary-gold);
    margin-bottom: 15px;
    font-size: 24px;
    font-weight: 800;
    line-height: 1.2;
}

.facility-info p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    line-height: 1.6;
    max-width: 90%;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.gallery-item {
    text-align: center;
}

.gallery-placeholder {
    background-color: #ddd;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #777;
    border-radius: 5px;
    margin-bottom: 5px;
    border: 2px dashed #bbb;
}

/* =========================================
   9. FOOTER
   ========================================= */
.cta-section {
    background: linear-gradient(to right, var(--primary-blue), #2c3e50);
    color: var(--white);
    text-align: center;
    padding: 60px 20px;
}

.cta-section ul {
    list-style: none;
    margin: 20px 0;
}

.white-btn {
    background: var(--white);
    color: var(--primary-blue);
    padding: 12px 30px;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
}

.main-footer {
    background-color: #111;
    color: #aaa;
    padding: 50px 0 20px;
}

.footer-top {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h3 {
    color: var(--white);
    margin-bottom: 20px;
    border-bottom: 2px solid var(--primary-gold);
    display: inline-block;
    padding-bottom: 5px;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: #aaa;
    text-decoration: none;
}

.footer-col ul li a:hover {
    color: var(--primary-gold);
}

.social-icons {
    display: flex;
    gap: 10px;
    flex-direction: column;
}

.social-link {
    display: block;
    color: var(--white);
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 3px;
    text-align: center;
}

.fb {
    background: #3b5998;
}

.yt {
    background: #c4302b;
}

.insta {
    background: #C13584;
}

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 20px;
    text-align: center;
    font-size: 13px;
}

/* =========================================
   10. RESPONSIVE (MOBILE)
   ========================================= */
@media (max-width: 768px) {
    .header-flex {
        flex-direction: row;
        /* Keeps Logo and Text side-by-side */
        align-items: center;
        text-align: left;
        padding: 5px 10px;
        /* Reduces vertical space */
        justify-content: flex-start;
        gap: 10px;
    }

    .contact-quick {
        display: none;
        /* Hide quick contact on small mobile to save space */
    }

    .nav-links {
        flex-direction: column;
        text-align: center;
    }

    .hero-title {
        font-size: 32px;
    }

    .message-card,
    .message-card.reverse {
        flex-direction: column;
    }

    /* Force 2 columns for features on mobile */
    .grid-4 {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        /* 2 items per row */
        gap: 10px;
        margin-top: -30px;
    }

    .logo-area {
        display: flex;
        flex-direction: row;
        align-items: center;
        /* Vertically center logo with text */
        width: 100%;
        gap: 12px;
        /* Space between Logo and School Name */
    }

    /* Hide the Quick Contact (Phone/Email) on mobile to save space */
    .contact-quick {
        display: none;
    }

    .highlight-box {
        padding: 15px;
        /* Smaller padding inside boxes */
        font-size: 13px;
        /* Smaller text */
    }

    .highlight-box h3 {
        font-size: 16px;
        margin-bottom: 5px;
    }

    .image-box {
        height: 250px;
        width: 100%;
    }
}

/* =========================================
   NEW SCROLLING GALLERY STYLES
   ========================================= */

.gallery-scroller {
    display: flex;
    overflow-x: auto;
    /* Allows scrolling sideways */
    scroll-snap-type: x mandatory;
    /* Makes it "snap" to each picture */
    gap: 20px;
    padding-bottom: 20px;
    /* Space for scrollbar */
    -webkit-overflow-scrolling: touch;
    /* Smooth scrolling on iPhones */
}

/* Hide the ugly scrollbar but keep functionality */
.gallery-scroller::-webkit-scrollbar {
    height: 8px;
}

.gallery-scroller::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.gallery-scroller::-webkit-scrollbar-thumb {
    background: var(--primary-gold);
    border-radius: 4px;
}

.gallery-card {
    flex: 0 0 300px;
    /* Fixed width for laptop view */
    scroll-snap-align: center;
    /* Snaps to center when scrolling */
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #eee;
}

.gallery-card img {
    width: 100%;
    height: 200px;
    /* Fixed height for all images */
    object-fit: cover;
    /* Crops image nicely without stretching */
}

.gallery-card .caption {
    padding: 15px;
    text-align: center;
}

.gallery-card h4 {
    color: var(--primary-blue);
    margin-bottom: 5px;
    font-size: 18px;
}

.gallery-card p {
    font-size: 14px;
    color: #666;
}

/* MOBILE ADJUSTMENTS */
@media (max-width: 768px) {
    .gallery-card {
        flex: 0 0 85%;
        /* On phones, make card take up 85% of screen width */
    }
}

/* =========================================
   1. LOADER STYLES
   ========================================= */
#loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--white);
    z-index: 9999;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}

.loader-text {
    margin-top: 20px;
    font-weight: bold;
    color: var(--primary-blue);
    letter-spacing: 1px;
    animation: blink 1.5s infinite;
}

/* A Simple Book Animation */
.book-loader {
    border: 4px solid var(--primary-blue);
    width: 60px;
    height: 45px;
    position: relative;
    perspective: 150px;
}

.book-loader ul {
    margin: 0;
    padding: 0;
    list-style: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.book-loader li {
    position: absolute;
    top: 0;
    left: 0;
    border: 2px solid var(--primary-gold);
    width: 100%;
    height: 100%;
    transform-origin: 0% 50%;
    background: #fff;
    animation: flip 2s infinite linear;
}

@keyframes flip {
    0% {
        transform: rotateY(0deg);
    }

    50% {
        transform: rotateY(-180deg);
        opacity: 0;
    }

    100% {
        transform: rotateY(-180deg);
        opacity: 0;
    }
}

/* =========================================
   2. GALLERY — Desktop: 3-Column Masonry Grid
              Mobile:  Full-Width Swipe Slider
   ========================================= */

/* ── DESKTOP GRID (≥ 769px) ─────────────────────────── */
@media (min-width: 769px) {
    .gallery-focus-slider {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: auto;
        gap: 16px;
        padding: 10px 0 20px;
        overflow: visible;       /* Disable horizontal scroll on desktop */
        scroll-snap-type: none;
    }

    /* First card spans 2 columns — hero/featured image */
    .gallery-focus-slider .modern-card:first-child {
        grid-column: span 2;
        grid-row: span 1;
    }

    /* Last card spans 2 columns — featured end image */
    .gallery-focus-slider .modern-card:last-child {
        grid-column: span 2;
    }

    .modern-card {
        flex: unset;             /* Remove flex-basis from mobile */
        border-radius: 16px;
        overflow: hidden;
        position: relative;
        cursor: pointer;
        transition: transform 0.35s ease, box-shadow 0.35s ease;
    }

    .modern-card:hover {
        transform: translateY(-6px) scale(1.02);
        box-shadow: 0 20px 45px rgba(26, 35, 126, 0.18);
    }

    .modern-card img {
        width: 100%;
        height: 280px !important;
        object-fit: cover;
        display: block;
        transition: transform 0.6s ease;
    }

    /* Featured (first + last) cards get taller images */
    .gallery-focus-slider .modern-card:first-child img,
    .gallery-focus-slider .modern-card:last-child img {
        height: 340px !important;
    }

    .modern-card:hover img {
        transform: scale(1.08);
    }

    /* Caption overlay — hidden by default, slides up on hover */
    .modern-card .overlay {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        background: linear-gradient(transparent, rgba(13, 71, 161, 0.88));
        padding: 30px 20px 18px;
        transform: translateY(100%) !important;
        opacity: 0 !important;
        transition: transform 0.35s ease, opacity 0.35s ease !important;
    }

    .modern-card:hover .overlay {
        transform: translateY(0) !important;
        opacity: 1 !important;
    }

    .overlay span {
        font-size: 1rem;
        font-weight: 700;
        letter-spacing: 0.5px;
        text-transform: uppercase;
        color: #fff;
        text-shadow: 0 2px 8px rgba(0,0,0,0.4);
    }
}

/* ── DEFAULT (mobile-first): full-width swipe slider ── */
.gallery-focus-slider {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    gap: 0;
    padding: 10px 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.gallery-focus-slider::-webkit-scrollbar { display: none; }

/* Default card = full-width slide for mobile */
.modern-card {
    flex: 0 0 100%;
    scroll-snap-align: center;
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    border: 1px solid rgba(0, 0, 0, 0.03);
    background: #fff;
    margin-bottom: 0 !important;
}

/* ── DESKTOP (≥ 769px): 3-column masonry grid ── */
@media (min-width: 769px) {
    .gallery-focus-slider {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr);
        gap: 18px;
        padding: 10px 0 30px;
        overflow: visible !important;   /* no horizontal scroll on desktop */
        scroll-snap-type: none;
    }

    /* Card resets — no longer a flex slide */
    .modern-card {
        flex: none !important;           /* Override mobile flex: 0 0 100% */
        scroll-snap-align: none;
        border-radius: 14px;
    }

    /* First card: hero — spans 2 columns, taller */
    .gallery-focus-slider .modern-card:first-child {
        grid-column: 1 / span 2;
    }

    /* Last card: feature — spans 2 columns */
    .gallery-focus-slider .modern-card:nth-child(6) {
        grid-column: 2 / span 2;
    }

    /* All desktop images: uniform height */
    .modern-card img {
        height: 270px !important;
        width: 100%;
        object-fit: cover;
        display: block;
        transition: transform 0.55s ease;
    }

    /* Hero + feature cards get extra height */
    .gallery-focus-slider .modern-card:first-child img,
    .gallery-focus-slider .modern-card:nth-child(6) img {
        height: 330px !important;
    }

    .modern-card:hover {
        transform: translateY(-5px) scale(1.01);
        box-shadow: 0 22px 48px rgba(26, 35, 126, 0.16);
    }

    .modern-card:hover img {
        transform: scale(1.07);
    }

    /* Desktop caption: hidden, slides up on hover */
    .modern-card .overlay {
        transform: translateY(100%) !important;
        opacity: 0 !important;
        transition: transform 0.35s ease, opacity 0.35s ease !important;
        background: linear-gradient(transparent, rgba(13, 71, 161, 0.9));
        padding: 32px 20px 18px;
    }

    .modern-card:hover .overlay {
        transform: translateY(0) !important;
        opacity: 1 !important;
    }
}

.modern-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 25px 50px rgba(26, 35, 126, 0.15);
}

.modern-card img {
    width: 100%;
    height: 480px !important;
    /* Uniform Height to ELIMINATE GAPS */
    object-fit: cover;
    /* Crops correctly to fill space */
    display: block;
    transition: transform 0.8s ease;
}

@media (max-width: 768px) {
    .modern-card img {
        height: 320px !important;
        /* Smaller on mobile but STILL UNIFORM */
    }
}

.modern-card:hover img {
    transform: scale(1.1);
}

/* Text Overlay Effect */
.overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    padding: 25px 30px;
    color: white;
    transform: translateY(0);
    opacity: 1;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

/* Mobile: always show the caption */
@media (max-width: 768px) {
    .overlay {
        transform: translateY(0) !important;
        opacity: 1 !important;
    }
}

.overlay span {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

@media (max-width: 768px) {
    .overlay span {
        font-size: 1rem;
    }
}

.modern-card:hover .overlay {
    background: linear-gradient(transparent, rgba(13, 71, 161, 0.9));
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(-100% * 6));
    }

    /* Scroll half width */
}

/* =========================================
   3. MODERN CTA (Join Family)
   ========================================= */
.cta-modern {
    position: relative;
    background-image: url('assets/images/school_hero.jpg');
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    padding: 100px 20px;
    text-align: center;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cta-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(26, 35, 126, 0.9), rgba(20, 20, 50, 0.9));
    /* Deeper, richer blue */
}

.relative-z {
    position: relative;
    z-index: 2;
    width: 100%;
}

.glass-card {
    background: rgba(255, 255, 255, 0.08);
    /* More transparent */
    backdrop-filter: blur(25px);
    /* Much stronger blur */
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 70px 50px;
    /* More breathable padding */
    border-radius: 40px;
    max-width: 950px;
    margin: 0 auto;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5);
    /* Massive shadow for depth */
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--house-red), var(--house-green), var(--house-blue), var(--house-gold));
    /* House colors hint */
}

.glass-card h2 {
    color: var(--primary-gold);
    font-size: 36px;
    text-transform: uppercase;
    font-weight: 900;
    letter-spacing: 2px;
    margin-bottom: 20px;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    display: inline-block;
    border-bottom: 3px solid var(--primary-gold);
    padding-bottom: 10px;
}

.cta-sub {
    font-size: 18px;
    line-height: 1.6;
    max-width: 80%;
    margin: 0 auto 30px auto;
    color: #f0f0f0;
}

.features-row {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.feat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 20px;
    border-radius: 50px;
}

/* PROFESSIONAL WHATSAPP BUTTON */
.btn-whatsapp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    /* Official Gradient */
    color: white;
    padding: 18px 40px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 800;
    font-size: 20px;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4);
    /* Glowing Green Shadow */
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    gap: 12px;
}

.btn-whatsapp:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(37, 211, 102, 0.5);
    background: linear-gradient(135deg, #2cf575 0%, #16a090 100%);
}

.wa-icon {
    font-size: 24px;
}

/* =========================================
   4. MINIMALIST FOOTER
   ========================================= */
.footer-minimal {
    background-color: #111;
    color: #888;
    padding: 60px 0 20px;
    font-size: 14px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.f-logo {
    color: white;
    font-size: 24px;
    margin-bottom: 15px;
    border-left: 3px solid var(--primary-gold);
    padding-left: 10px;
}

.f-col h4 {
    color: white;
    margin-bottom: 20px;
    font-weight: 600;
}

.f-col ul {
    list-style: none;
}

.f-col ul li {
    margin-bottom: 10px;
}

.f-col ul li a {
    color: #888;
    text-decoration: none;
    transition: 0.3s;
}

.f-col ul li a:hover {
    color: var(--primary-gold);
    padding-left: 5px;
}

.f-socials {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.social-btn {
    color: white;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 4px;
    font-weight: 500;
    text-align: center;
    transition: 0.3s;
}

.social-btn.fb {
    background: #3b5998;
}

.social-btn.yt {
    background: #c4302b;
}

.social-btn.in {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.social-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.footer-bar {
    border-top: 1px solid #222;
    padding-top: 20px;
    text-align: center;
}

/* =========================================
   5. NEW JS FEATURES STYLING
   ========================================= */

/* Mobile Menu Button (Hamburger) */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 12px;
    background-color: var(--primary-blue);
    /* Navy background from image */
    border-radius: 12px;
    /* Rounded corners from image */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.menu-toggle .bar {
    height: 3px;
    width: 22px;
    background-color: white;
    /* White bars from image */
    margin: 2px 0;
    transition: 0.4s;
    border-radius: 2px;
}

/* Toggle Animation */
.menu-toggle.active .bar:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active .bar:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Scroll Reveal Animation (Hidden State) */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 1s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform, opacity;
}

/* Visible State (JS adds this class) */
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered Reveals for Grid Items */
.grid-4>.highlight-box.reveal:nth-child(1) {
    transition-delay: 0.1s;
}

.grid-4>.highlight-box.reveal:nth-child(2) {
    transition-delay: 0.2s;
}

.grid-4>.highlight-box.reveal:nth-child(3) {
    transition-delay: 0.3s;
}

.grid-4>.highlight-box.reveal:nth-child(4) {
    transition-delay: 0.4s;
}

.house-grid-modern>.house-card-pro.reveal:nth-child(1) {
    transition-delay: 0.1s;
}

.house-grid-modern>.house-card-pro.reveal:nth-child(2) {
    transition-delay: 0.2s;
}

.house-grid-modern>.house-card-pro.reveal:nth-child(3) {
    transition-delay: 0.3s;
}

.facilities-bento>.facility-card.reveal:nth-child(1) {
    transition-delay: 0.1s;
}

.facilities-bento>.facility-card.reveal:nth-child(2) {
    transition-delay: 0.2s;
}

.facilities-bento>.facility-card.reveal:nth-child(3) {
    transition-delay: 0.3s;
}

.facilities-bento>.facility-card.reveal:nth-child(4) {
    transition-delay: 0.4s;
}

.facilities-bento>.facility-card.reveal:nth-child(5) {
    transition-delay: 0.5s;
}

.facilities-bento>.facility-card.reveal:nth-child(6) {
    transition-delay: 0.6s;
}

/* ============================================================
   NOTIFICATION BANNER STYLES
   ============================================================ */
.notification-banner {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 800px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 999;
    animation: slideDown 0.5s ease-out;
    border: 2px solid #2c3e50;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.banner-content {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    position: relative;
}

.banner-image-wrapper {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.banner-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-text {
    flex: 1;
}

.banner-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 8px 0;
}

.banner-description {
    font-family: 'Open Sans', sans-serif;
    font-size: 1rem;
    color: #555;
    margin: 0;
    line-height: 1.5;
}

.banner-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #2c3e50;
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.banner-close:hover {
    background: #e74c3c;
    transform: rotate(90deg);
}

@media (max-width: 768px) {
    .notification-banner {
        top: 70px;
        width: 95%;
    }

    .banner-content {
        flex-direction: column;
        text-align: center;
        padding: 15px;
    }

    .banner-image-wrapper {
        width: 100px;
        height: 100px;
    }

    .banner-title {
        font-size: 1.2rem;
    }

    .banner-description {
        font-size: 0.9rem;
    }

    .banner-close {
        top: 10px;
        right: 10px;
        width: 30px;
        height: 30px;
        font-size: 1rem;
    }
}

/* ============================================================
   GOOGLE MAPS LOCATION SECTION
   ============================================================ */
.location-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.map-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    margin-top: 40px;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.map-info {
    padding: 40px;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
}

.map-info h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.map-info p {
    font-family: 'Open Sans', sans-serif;
    font-size: 1.1rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.map-info i {
    color: #ffd700;
    font-size: 1.3rem;
}

.map-directions {
    margin-top: 30px;
}

.btn-directions {
    display: inline-block;
    padding: 12px 30px;
    background: white;
    color: #2c3e50;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif;
}

.btn-directions:hover {
    background: #ffd700;
    color: #2c3e50;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.map-embed {
    position: relative;
    height: 500px;
}

.map-embed iframe {
    width: 100%;
    height: 100%;
    border: none;
}

@media (max-width: 968px) {
    .map-container {
        grid-template-columns: 1fr;
    }

    .map-info {
        padding: 30px;
    }

    .map-embed {
        height: 400px;
    }
}

@media (max-width: 600px) {
    .highlights-modern .grid-4 {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }
}

/* ============================================================
   ULTRA-ADVANCED MEDIA CONTROLS (V5.0)
   ============================================================ */
.premium-modal {
    max-width: 900px !important;
    width: 95% !important;
    border-radius: 30px !important;
    padding: 0 !important;
    overflow: hidden;
}

.notice-modal-header {
    padding: 30px 40px 10px;
}

.notice-modal-body {
    padding: 0 40px 100px;
    max-height: 70vh;
    overflow-y: auto;
}

.notice-media-controls {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    padding: 15px 25px;
    display: none;
    /* Shown via JS */
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    z-index: 100;
    animation: slideUpFade 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes slideUpFade {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.media-control-btn {
    border: none;
    outline: none;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.view-btn {
    background: var(--primary-blue);
    color: white;
    padding: 10px 22px;
    border-radius: 12px;
    font-size: 14px;
}

.view-btn:hover {
    background: var(--primary-gold);
    color: var(--primary-blue);
    transform: scale(1.02);
}

.media-actions-right {
    display: flex;
    gap: 10px;
}

.download-btn,
.reset-btn {
    width: 40px;
    height: 40px;
    background: white;
    color: var(--primary-blue);
    border-radius: 12px;
    justify-content: center;
    text-decoration: none;
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
}

.download-btn:hover,
.reset-btn:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
}

/* PDF Viewer Iframe */
.pdf-viewer-container {
    width: 100%;
    border-radius: 15px;
    overflow: hidden;
    margin-top: 20px;
    background: #1a1a2e;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
}

.pdf-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.pdf-label {
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 7px;
}

.pdf-label i {
    color: #ff4d4d;
}

.pdf-external-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.2s ease;
}

.pdf-external-btn:hover {
    background: var(--primary-gold, #ff9800);
    color: #000;
    border-color: transparent;
}

.pdf-viewer-container iframe {
    width: 100%;
    height: 60vh;
    border: none;
    flex: 1;
    background: #fff;
}

.pdf-fallback {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 40px 20px;
    color: #ccc;
    text-align: center;
}

.pdf-fallback i {
    font-size: 2.5rem;
    color: #ff9800;
}

.pdf-fallback p {
    font-size: 14px;
    margin: 0;
}

.pdf-gdocs-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 10px;
    background: #1a73e8;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
}

.pdf-gdocs-btn:hover {
    background: #1557b0;
}

/* Image inline preview in modal */
.media-preview-wrapper {
    width: 100%;
    margin-top: 16px;
    border-radius: 14px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.08);
    text-align: center;
}

.notice-inline-img {
    max-width: 100%;
    max-height: 70vh;
    width: auto;
    height: auto;
    display: block;
    margin: 0 auto;
    object-fit: contain;
    border-radius: 12px;
}

.preview-error {
    padding: 30px 20px;
    font-size: 14px;
    color: #666;
}

.preview-error a {
    color: var(--primary-blue, #1a237e);
    font-weight: 700;
}

@media (max-width: 600px) {
    .pdf-viewer-container iframe {
        height: 75vh;
    }

    .pdf-toolbar {
        flex-wrap: wrap;
        gap: 8px;
    }
}

/* Document Link styling inside notices (sent by bot) */
.notice-doc-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #f8f9fa;
    border: 2px dashed #ddd;
    padding: 15px 20px;
    border-radius: 15px;
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 700;
    margin-top: 20px;
    transition: all 0.3s ease;
    width: 100%;
}

.notice-doc-btn:hover {
    background: #edf2f7;
    border-color: var(--primary-blue);
}

.notice-attachment {
    margin-bottom: 20px;
}

@media (max-width: 600px) {
    .notice-modal-body {
        padding: 0 20px 100px;
    }

    .notice-media-controls {
        padding: 10px 15px;
        bottom: 10px;
        left: 10px;
        right: 10px;
    }

    .view-btn {
        padding: 8px 15px;
        font-size: 11px;
    }

    .pdf-viewer-container {
        height: 75vh;
        /* Taller on mobile for better reading */
    }
}

@media (max-width: 600px) {
    .location-section {
        padding: 60px 0;
    }

    .map-info h3 {
        font-size: 1.5rem;
    }

    .map-info p {
        font-size: 1rem;
    }

    .map-embed {
        height: 300px;
    }
}

/* Back to Top Button */
#back-to-top {
    display: none;
    /* Hidden by default */
    position: fixed;
    bottom: 20px;
    right: 30px;
    z-index: 99;
    font-size: 20px;
    border: none;
    outline: none;
    background-color: var(--primary-gold);
    color: var(--primary-blue);
    cursor: pointer;
    padding: 10px 15px;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s;
}

#back-to-top:hover {
    background-color: var(--primary-blue);
    color: white;
    transform: scale(1.1);
}

/* Mobile Responsiveness for Menu */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .nav-links {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 100vw;
        height: 100vh;
        position: fixed;
        top: 0;
        left: 0;
        background: var(--primary-blue);
        z-index: 9999;
        padding: 60px 40px 40px;
        text-align: center;
        transform: translateX(-100%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        opacity: 1;
        visibility: hidden;
    }

    .nav-links.active {
        transform: translateX(0);
        visibility: visible;
    }
}

/* =========================================
   MODERN ABOUT SECTION STYLES
   ========================================= */
.about-wrapper {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    /* Text takes more space */
    gap: 60px;
    align-items: center;
}

.sub-heading {
    text-transform: uppercase;
    color: var(--primary-gold);
    font-weight: bold;
    letter-spacing: 2px;
    font-size: 13px;
}

.about-text h2 {
    font-size: 36px;
    color: var(--primary-blue);
    margin-top: 5px;
    line-height: 1.2;
}

.divider-left {
    height: 4px;
    width: 60px;
    background-color: var(--primary-gold);
    margin: 15px 0 25px 0;
}

.about-text p {
    color: #555;
    margin-bottom: 20px;
    font-size: 16px;
    line-height: 1.8;
}

.link-arrow {
    text-decoration: none;
    color: var(--primary-blue);
    font-weight: bold;
    border-bottom: 2px solid var(--primary-gold);
    transition: 0.3s;
}

.link-arrow:hover {
    color: var(--primary-gold);
    border-color: var(--primary-blue);
}

/* The Right Side Card */
.about-card {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border-left: 5px solid var(--primary-blue);
    position: relative;
    overflow: hidden;
}

/* Background decoration for card */
.about-card::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 100px;
    height: 100px;
    background: var(--primary-gold);
    border-radius: 50%;
    opacity: 0.2;
}

.card-stat {
    margin-bottom: 30px;
}

.card-stat h3 {
    color: #888;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-highlight {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary-blue);
    font-style: italic;
    font-family: serif;
    /* Gives a "Motto" feel */
}

.card-grid {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.stat-box {
    flex: 1;
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.stat-box .label {
    display: block;
    font-size: 12px;
    color: #777;
}

.stat-box .value {
    display: block;
    font-size: 22px;
    font-weight: bold;
    color: var(--text-dark);
}

.reg-box {
    background: #eef2ff;
    /* Light blue bg */
    padding: 10px;
    border-radius: 5px;
    text-align: center;
    border: 1px dashed var(--primary-blue);
}

.reg-box small {
    display: block;
    color: var(--primary-blue);
    font-weight: bold;
    margin-bottom: 2px;
}

.reg-box code {
    font-family: monospace;
    color: #444;
    font-size: 13px;
}

/* Mobile Response */
@media (max-width: 768px) {
    .about-wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

/* =========================================
   MODERN HOUSE SYSTEM STYLES
   ========================================= */
.house-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 20px 0;
}

.house-card-pro {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 32px;
    padding: 50px 35px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.04);
}

.house-card-pro:hover {
    transform: translateY(-12px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.08);
    border-color: var(--theme-color);
}

/* Internal Glow */
.house-card-pro::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, var(--theme-color) 0%, transparent 70%);
    opacity: 0.03;
    transition: opacity 0.5s;
    pointer-events: none;
}

.house-card-pro:hover::before {
    opacity: 0.08;
}

/* Color Variables for each house */
.red-style {
    --theme-color: var(--house-red);
}

.green-style {
    --theme-color: var(--house-green);
}

.blue-style {
    --theme-color: var(--house-blue);
}

.house-icon-wrapper img {
    height: 120px;
    margin-bottom: 25px;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.1));
    transition: transform 0.4s;
}

.house-content h3 {
    font-size: 1.75rem;
    margin-bottom: 12px;
    color: var(--text-dark);
    font-weight: 800;
}

.house-slogan {
    display: block;
    font-family: var(--font-body);
    font-style: italic;
    color: var(--theme-color);
    font-weight: 600;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 15px;
    font-size: 0.95rem;
}

/* Small line under slogan */
.house-slogan::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background-color: var(--theme-color);
    opacity: 0.3;
}

.house-content p {
    color: #666;
    font-size: 15px;
    line-height: 1.6;
}

/* HOVER EFFECTS (The Magic) */
.house-card-pro:hover {
    transform: translateY(-15px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: var(--theme-color);
}

.house-card-pro:hover .house-icon-wrapper img {
    transform: scale(1.1) rotate(5deg);
    /* Slight pop and tilt */
}

/* The "Glow" Background Circle */
.glow-bg {
    position: absolute;
    top: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    background: var(--theme-color);
    border-radius: 50%;
    opacity: 0.05;
    transition: 0.5s;
    z-index: 0;
}

.house-card-pro:hover .glow-bg {
    transform: scale(5);
    /* Expands to cover whole card faintly */
    opacity: 0.03;
}

/* =========================================
   FIXED FLOATING ELEMENTS
   ========================================= */

/* 1. Floating WhatsApp Button (Round) - LEFT SIDE */
.float-wa-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    /* Moved to LEFT */
    width: 60px;
    height: 60px;
    background-color: #25D366;
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 32px;
    box-shadow: 0 5px 20px rgba(37, 211, 102, 0.5);
    z-index: 1000;
    text-decoration: none;
    transition: all 0.3s ease;
    animation: floatPulse 3s infinite;
}

.float-wa-btn:hover {
    transform: scale(1.1) rotate(10deg);
    /* Fun hover effect */
    background-color: #20b858;
}

@keyframes floatPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
        transform: translateY(0);
    }

    50% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
        transform: translateY(-5px);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
        transform: translateY(0);
    }
}

/* Adjust Back to Top Button position so it doesn't overlap WhatsApp */
#back-to-top {
    bottom: 100px !important;
    /* Move it up above WhatsApp */
    right: 35px !important;
    width: 50px;
    height: 50px;
}

/* 2. Mobile Sticky Admission Bar (Initially Hidden on Desktop) */
.mobile-sticky-bar {
    display: none;
    /* Hidden by default */
}

/* SHOW ONLY ON MOBILE */
@media (max-width: 768px) {

    /* Hide the round floating button on mobile if it blocks the bar, 
       OR move it up. Let's move it up. */
    .float-wa-btn {
        bottom: 90px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 24px;
    }

    #back-to-top {
        bottom: 150px !important;
        right: 25px !important;
    }

    .mobile-sticky-bar {
        display: flex;
        justify-content: space-between;
        align-items: center;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: rgba(26, 35, 126, 0.92);
        /* Deep Blue Glassy */
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        padding: 8px 15px;
        box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.15);
        z-index: 2000;
        border-top: 2px solid rgba(255, 193, 7, 0.8);
        /* Golden subtle top border */
        animation: slideUpBar 0.8s cubic-bezier(0.25, 1, 0.5, 1) 0.5s forwards;
        /* Delayed slightly so it slide up after load */
        transform: translateY(100%);
    }

    @keyframes slideUpBar {
        to {
            transform: translateY(0);
        }
    }

    .ms-text {
        display: flex;
        flex-direction: column;
        color: white;
    }

    .ms-text span {
        font-weight: 800;
        font-size: 14px;
        text-transform: uppercase;
        color: var(--primary-gold);
    }

    .ms-text small {
        font-size: 11px;
        opacity: 0.8;
    }

    .ms-btn {
        background: var(--primary-gold);
        color: var(--primary-blue);
        text-decoration: none;
        padding: 12px 25px;
        /* Boosted for 44px touch target */
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        border-radius: 25px;
        font-weight: bold;
        font-size: 13px;
        animation: fade-in-out 2s infinite alternate;
    }
}

/* =========================================
   MOBILE FIXES (Screens smaller than 768px)
   ========================================= */
@media (max-width: 768px) {

    /* 1. Fix the Header Alignment & Size */
    .header-flex {
        flex-direction: row;
        /* Forces side-by-side */
        align-items: center;
        /* Vertically centers them */
        justify-content: flex-start;
        /* Pushes everything to the LEFT */
        text-align: left;
        padding: 5px 15px;
        /* Minimal padding for narrow height */
        gap: 0;
        /* Remove gap, we handle spacing in logo-area */
    }

    .logo {
        height: 45px;
        /* Compact logo height */
        width: auto;
        margin: 0;
        /* Remove extra margins */
    }

    /* --- FIX: COMPACT LEADERSHIP CARDS (Director/Principal) --- */
    .message-card,
    .message-card.reverse {
        flex-direction: column !important;
        /* Stack vertically */
        height: auto !important;
        margin-bottom: 30px !important;
        border-radius: 15px !important;
        overflow: hidden !important;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05) !important;
        border: 1px solid #eee !important;
    }

    /* 1. Smaller, Focused Image Area */
    .image-box {
        height: 180px !important;
        /* Reduced from 400px/250px */
        width: 100% !important;
    }

    .image-box img {
        object-position: top center !important;
        /* Focus on the face */
        height: 100% !important;
        width: 100% !important;
    }

    /* 2. Compact Text Area */
    .text-box {
        padding: 20px 15px !important;
        /* Much tighter padding */
        text-align: center !important;
        /* Center align looks better on mobile */
    }

    /* 3. Badge & Name Styling */
    .role-badge {
        font-size: 10px !important;
        padding: 3px 8px !important;
        display: inline-block !important;
        margin-bottom: 8px !important;
    }

    .text-box h3 {
        font-size: 22px !important;
        /* Compact Name */
        margin-top: 5px !important;
        margin-bottom: 2px !important;
    }

    .text-box h4 {
        font-size: 13px !important;
        margin-bottom: 15px !important;
    }

    /* 4. Quote & Text */
    .quote {
        font-size: 14px !important;
        padding-left: 0 !important;
        border-left: none !important;
        /* Remove side border for center layout */
        border-top: 2px solid var(--primary-gold) !important;
        /* Top border instead */
        padding-top: 10px !important;
        margin-bottom: 10px !important;
        font-weight: 600 !important;
    }

    .text-box p {
        font-size: 13px !important;
        line-height: 1.6 !important;
        text-align: justify !important;
        /* Clean text block */
    }

    .school-identity {
        display: flex;
        flex-direction: column;
        /* Stacks Name on top of Tagline */
        justify-content: center;
        align-items: flex-start;
        /* Left aligns text */
    }

    .school-identity h1 {
        font-size: 18px;
        /* BIGGER and clear */
        font-weight: 800;
        /* Extra Bold */
        color: var(--primary-blue);
        margin: 0;
        line-height: 1.1;
        /* Tighter spacing */
    }

    .tagline {
        font-size: 10px;
        font-weight: 600;
        color: white;
        background: var(--primary-blue);
        /* Blue pill background */
        padding: 1px 6px;
        border-radius: 4px;
        margin-top: 3px;
        /* Small space between Name and Tagline */
        display: inline-block;
        white-space: nowrap;
        /* Keeps tagline on one line if possible */
    }

    /* Hide the address on mobile to keep header thin */
    .sub-address {
        display: none;
    }

    /* --- MOBILE MENU (Sleek Blur Drawer) --- */
    .nav-links {
        display: flex;
        flex-direction: column;
        justify-content: center;
        /* Center vertically */
        align-items: center;
        /* Center horizontally */
        width: 100vw;
        /* Full width of phone */
        height: 100vh;
        position: fixed;
        /* Fix to viewport */
        top: 0;
        right: -100vw;
        /* Start hidden completely to the right */
        background-color: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        padding: 0;
        z-index: 1000;
        /* Just below the toggle button */
        opacity: 0;
        visibility: hidden;
        transition: right 0.4s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.4s ease;
        border: none;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    }

    /* The 'Active' class is added by JS when you click the button */
    .nav-links.active {
        right: 0;
        /* Slide in via CSS positioning */
        transform: none;
        /* Disable transform stretching completely */
        opacity: 1;
        visibility: visible;
    }

    /* List Items */
    .nav-links li {
        width: 100%;
        text-align: center;
        margin: 10px 0;
        border-bottom: none;
        opacity: 0;
        transform: translateY(20px);
        transition: all 0.4s ease;
    }

    .nav-links.active li {
        opacity: 1;
        transform: translateY(0);
    }

    /* Staggered entry for links */
    .nav-links.active li:nth-child(1) {
        transition-delay: 0.1s;
    }

    .nav-links.active li:nth-child(2) {
        transition-delay: 0.15s;
    }

    .nav-links.active li:nth-child(3) {
        transition-delay: 0.2s;
    }

    .nav-links.active li:nth-child(4) {
        transition-delay: 0.25s;
    }

    .nav-links.active li:nth-child(5) {
        transition-delay: 0.3s;
    }

    .nav-links.active li:nth-child(6) {
        transition-delay: 0.35s;
    }

    .nav-links.active li:nth-child(7) {
        transition-delay: 0.4s;
    }

    .nav-links.active li:nth-child(8) {
        transition-delay: 0.45s;
    }

    /* Links Text (Mobile V5.1 - More Compact) */
    .nav-links li a {
        display: inline-block;
        padding: 12px 25px;
        /* Reduced for a more compact look */
        color: var(--primary-blue);
        font-weight: 800;
        font-size: 1.2rem;
        /* Reduced from 1.5rem for better mobile fit */
        background: transparent;
        transition: all 0.2s;
        border-radius: 30px;
    }

    /* Hover/Touch Effect */
    .nav-links li a:hover,
    .nav-links li a.active {
        background-color: var(--primary-gold);
        color: var(--primary-blue);
        transform: scale(1.05);
        /* Slight bounce */
    }

    /* Remove tiny arrow */
    .nav-links li a::after {
        display: none;
    }

    /* 3. HIDE the Top 'Enquire Now' Button on Mobile 
       (Because we already have the bottom sticky bar now) */
    .navbar .btn-apply {
        display: none;
    }

    .menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 30px;
        height: 21px;
        position: absolute;
        right: 15px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 2000;
        /* ABOVE OVERLAY */
        cursor: pointer;
    }

    .menu-toggle .bar {
        height: 3px;
        width: 100%;
        background: var(--primary-blue);
        border-radius: 10px;
        transition: all 0.3s ease;
    }

    /* CLOSE BUTTON ANIMATION (X) */
    .menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active .bar:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
        background: #fff;
    }

    .menu-toggle.active .bar:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
        background: #fff;
    }

    /* 5. Premium Cinematic Hero */
    .hero-title {
        font-size: clamp(36px, 10vw, 48px);
        /* Fluid scaling */
        line-height: 1.15;
        font-weight: 800;
        margin-bottom: 20px;
        letter-spacing: -1px;
    }

    .hero-desc {
        font-size: 16px;
        margin-bottom: 30px;
        line-height: 1.5;
        padding: 0 10px;
    }

    .hero-section {
        height: 100dvh;
        /* Fill entire phone screen perfectly */
        min-height: 600px;
        background-position: center 20%;
        /* Keep focus on school building */
        display: flex;
        align-items: center;
        /* Center content vertically inside */
        justify-content: center;
    }

    .hero-overlay {
        background: linear-gradient(to bottom, rgba(26, 35, 126, 0.6) 0%, rgba(26, 35, 126, 0.95) 100%);
    }

    .hero-content {
        padding-top: 60px;
        /* Offset for pill header */
    }

    .hero-buttons {
        display: flex;
        flex-direction: column;
        /* Stack buttons vertically for mobile */
        width: 100%;
        gap: 15px;
        padding: 0 15px;
    }

    .hero-buttons .btn {
        width: 100%;
        /* Force full width touch targets */
        padding: 18px 0;
        /* Massive tap area */
        font-size: 16px;
        border-radius: 30px;
        /* Soft app-like pills */
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    }

    /* 6. Adjust Top Marquee */
    .marquee-container {
        font-size: 11px;
    }

    .badge {
        font-size: 9px;
        padding: 1px 4px;
    }

    /* 7. Ensure Bottom Bar & WhatsApp don't overlap */
    .mobile-sticky-bar {
        padding-bottom: env(safe-area-inset-bottom);
        z-index: 9999;
        background: rgba(255, 255, 255, 0.9) !important;
        backdrop-filter: blur(15px) !important;
        -webkit-backdrop-filter: blur(15px) !important;
        box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.06);
        border-top: 1px solid rgba(255, 255, 255, 0.5);
    }

    .ms-text {
        color: var(--primary-blue) !important;
        /* Elegant slate blue text over white */
        font-weight: 800 !important;
        font-size: 15px !important;
    }

    .ms-btn {
        background: linear-gradient(135deg, #FFD700 0%, #FFB300 100%) !important;
        color: #1a237e !important;
        border-radius: 30px !important;
        box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4) !important;
        padding: 10px 24px !important;
    }

    /* Move the floating WhatsApp button up so it sits above the Admission bar */
    .float-wa-btn {
        bottom: 90px !important;
        right: 15px !important;
        width: 55px;
        /* Slightly larger hit area */
        height: 55px;
        font-size: 26px;
        box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4) !important;
    }

    /* Touch Feedback (Tap State) */
    .btn:active,
    .float-wa-btn:active,
    .notice-card:active,
    .highlight-box:active {
        transform: scale(0.96) !important;
        transition: transform 0.1s ease !important;
    }
}

/* =========================================
   FIX FOR "JOIN FAMILY" SECTION ON MOBILE (Final Wide V6)
   ========================================= */
@media (max-width: 768px) {

    /* 1. MAXIMIZE CONTAINER WIDTH */
    .cta-modern {
        padding: 30px 5px !important;
        /* Very small outer padding */
    }

    .glass-card {
        width: 100% !important;
        /* Force full width of container */
        max-width: 96% !important;
        /* Keep tiny margin on edges */
        margin: 0 auto !important;
        padding: 25px 15px !important;
        box-sizing: border-box !important;
        border-radius: 12px !important;
    }

    /* 2. TEXT ADJUSTMENTS */
    .glass-card h2 {
        font-size: 20px !important;
        margin-bottom: 15px !important;
        line-height: 1.3 !important;
    }

    .cta-sub {
        font-size: 14px !important;
        line-height: 1.5 !important;
        text-align: center !important;
        margin-bottom: 20px !important;
        padding: 0 5px !important;
        /* Ensure text doesn't hit edges */
    }

    /* 3. COMPACT FEATURES (Side-by-Side Chips) */
    .features-row {
        display: flex !important;
        flex-direction: row !important;
        /* Force horizontal row */
        flex-wrap: wrap !important;
        /* Wrap to next line if needed */
        justify-content: center !important;
        gap: 8px !important;
        /* Small gap between items */
        margin-bottom: 20px !important;
    }

    .feat-item {
        width: auto !important;
        /* Only as wide as the text */
        flex: 0 0 auto !important;
        /* Prevent stretching */
        padding: 6px 12px !important;
        /* Small padding */
        font-size: 12px !important;
        /* Small text */
        background: rgba(255, 255, 255, 0.15) !important;
        border-radius: 20px !important;
        margin: 0 !important;
    }

    .feat-item .icon {
        font-size: 14px !important;
        margin-right: 5px !important;
    }

    /* 4. COMPACT & FULL WIDTH WHATSAPP BUTTON */
    .btn-whatsapp {
        width: 100% !important;
        /* Fill the box width */
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        font-size: 14px !important;
        /* Smaller text */
        padding: 10px 0 !important;
        /* Slimmer height */
        border-radius: 8px !important;
        /* Professional rounded corners */
        margin-top: 5px !important;
        box-shadow: none !important;
        /* Remove heavy shadow */
        background: #25D366 !important;
        /* Flat clean green */
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
    }

    .wa-icon {
        font-size: 16px !important;
        margin-right: 8px !important;
    }
}

/* =========================================
   MASTER MOBILE FIXES (Professional V3)
   - 2-Column Footer Grid
   - Clean Copyright Bar
   - Split Floating Buttons
   ========================================= */
@media (max-width: 768px) {


    /* --- 1. TOP HEADER & LOGO (Premium Pill V5) --- */
    .main-header {
        position: sticky !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: auto !important;
        /* Let content decide height or set a standard height */
        border-radius: 0 !important;
        background: var(--white) !important;
        backdrop-filter: blur(15px) !important;
        -webkit-backdrop-filter: blur(15px) !important;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05) !important;
        z-index: 1000 !important;
        display: block !important;
        /* Standard block flow */
        padding: 0 !important;
        border: none !important;
        border-bottom: 2px solid var(--primary-gold) !important;
        /* Brand line */
        margin: 0 !important;
    }

    .header-flex {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 5px 15px !important;
        height: auto !important;
        min-height: 60px !important;
        background: transparent !important;
        width: 100% !important;
        box-shadow: none !important;
    }

    .menu-toggle {
        display: flex !important;
        /* Forces visibility in white header */
        margin-left: auto !important;
        /* Pushes to FAR RIGHT */
        transform: translateY(5px);
        /* "Little below" as requested */
    }

    .navbar {
        height: auto !important;
        background: var(--primary-blue) !important;
        padding: 0 !important;
    }

    .contact-quick {
        display: none !important;
        /* Hide Call/Email boxes on phone to make room for button */
    }

    /* LEFT SIDE: Logo + Text */
    .logo-area {
        display: flex;
        align-items: center;
        gap: 8px;
        /* Space between logo and name */
        flex: 1;
        /* Takes available space */
        min-width: 0;
        /* Allows text to shrink */
        width: auto !important;
        /* Override any fixed widths */
    }

    /* LOGO: Small & Crisp */
    .logo {
        height: 45px !important;
        width: auto !important;
        margin-right: 12px !important;
    }

    /* TEXT CONTAINER: Force One Line */
    .school-identity {
        display: flex !important;
        flex-direction: row !important;
        /* Name and Date side-by-side */
        align-items: baseline !important;
        /* Aligns text cleanly */
        gap: 5px !important;
        width: auto !important;
    }

    /* NAME: Rohtas Public School */
    .school-identity h1 {
        font-size: 14px !important;
        /* Smaller size to fit phone */
        line-height: 1;
        margin: 0;
        color: var(--primary-blue);
        font-weight: 800;
        white-space: nowrap;
        /* Never wrap to next line */
    }

    /* TAGLINE: The "Est. '06" part */
    /* REMOVING THE BLUE BOX STYLE HERE */
    .tagline {
        display: block !important;
        /* Ensure it is visible */
        font-size: 0 !important;
        /* Hide original long text */
        background: transparent !important;
        /* REMOVE BLUE BG */
        color: #888 !important;
        /* Grey text */
        padding: 0 !important;
        /* Remove padding */
        margin: 0 !important;
        border-radius: 0 !important;
        width: auto !important;
    }

    /* Insert the short date */
    .tagline::after {
        content: "| Est. 2006";
        font-size: 11px;
        /* Visible size */
        color: #666;
        white-space: nowrap;
    }

    /* HIDE DESKTOP EXTRAS */
    .sub-address,
    .contact-quick,
    .navbar .btn-apply {
        display: none !important;
    }

    /* MENU BUTTON: Right Side */
    .navbar {
        display: block !important;
        background: transparent !important;
        padding: 0 !important;
        position: relative;
    }

    .nav-links {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: var(--primary-blue);
        z-index: 9999;
        padding: 60px 40px 40px;
        text-align: center;
        overflow: hidden;
        /* prevent internal scroll on menu */
        transform: translateX(-100%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        -webkit-overflow-scrolling: touch;
    }

    .nav-links.active {
        transform: translateX(0);
    }


    .nav-links li {
        width: 100%;
        margin-bottom: 5px;
    }

    .nav-links li a {
        color: #ffffff !important;
        font-size: 1.3rem;
        font-weight: 600;
        display: block;
        padding: 12px 0;
        transition: color 0.3s ease;
        letter-spacing: 0.5px;
    }

    .nav-links li a:hover {
        color: var(--primary-gold) !important;
    }

    /* HAMBURGER BUTTON (default state) */
    .menu-toggle {
        display: flex !important;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        margin: 0 !important;
        padding: 8px;
        background: transparent;
        width: 45px;
        height: 45px;
        z-index: 10001; /* Always above the overlay */
        position: relative;
    }


    .menu-toggle .bar {
        background-color: var(--primary-blue);
        height: 3px;
        margin: 3px 0;
        width: 30px;
        border-radius: 3px;
        transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
        transform-origin: center;
    }

    /* X Formation when active */
    .menu-toggle.active {
        position: fixed !important;
        top: 20px;
        right: 15px;
        z-index: 10002; /* Above the overlay (9999) */
    }

    .menu-toggle.active .bar {
        background-color: #ffffff !important;
    }

    .menu-toggle.active .bar:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    .menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active .bar:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    /* --- 2. PREMIUM SOFT FORM CARDS --- */
    .highlight-box,
    .facility-item,
    .gallery-card,
    .notice-card,
    .leader-card,
    .message-card.student-card {
        border-radius: 24px !important;
        padding: 24px !important;
        box-shadow: 0 4px 15px rgba(26, 35, 126, 0.04), 0 10px 40px rgba(0, 0, 0, 0.06) !important;
        margin-bottom: 20px;
        background: #ffffff;
        border: 1px solid rgba(0, 0, 0, 0.02);
    }

    /* Make gallery images fill their softer card shapes perfectly */
    .gallery-card img,
    .facility-icon {
        border-radius: 16px !important;
    }

    /* Notice card specifically */
    .notice-card {
        margin-bottom: 0px;
        /* Let flex gap handle spacing */
    }

    /* Force features to 1 column */


    /* --- 3. CTA (FAMILY) SECTION - WIDER & CLEANER --- */
    .cta-modern {
        padding: 40px 10px;
        /* Reduced outer padding so box can be wider */
    }

    .glass-card {
        width: 95% !important;
        /* Almost full width but leaves a small margin */
        margin: 0 auto !important;
        /* Centers the box */
        padding: 30px 20px !important;
        box-sizing: border-box !important;
    }

    /* Title Styling */
    /* Special Style for the Join Family Headline */
    .glass-card h2 {
        color: var(--primary-gold);
        /* Make it Gold */
        font-size: 22px;
        /* medium size */
        text-transform: uppercase;
        /* ALL CAPS */
        font-weight: 900;
        /* Extra Bold */
        letter-spacing: 2px;
        /* Wide letter spacing */
        text-shadow: 2px 2px 0px #000;
        /* 3D Shadow effect */
        border-bottom: 3px solid var(--primary-gold);
        /* Thick underline */
        padding-bottom: 10px;
        /* Space between text and underline */
        margin-bottom: 25px;
        /* Space below the title */
        display: inline-block;
        /* Keeps underline only as wide as text */
    }

    /* Paragraph Text - Justified */
    .cta-sub {
        text-align: justify !important;
        /* Neatly aligns left and right edges */
        text-justify: inter-word;
        /* Improves spacing between words */
        font-size: 15px !important;
        line-height: 1.6 !important;
        margin-bottom: 20px;
        display: block;
    }

    /* Features List (Small Class Size etc.) - Left Aligned */
    .features-row {
        flex-direction: column !important;
        gap: 15px !important;
        margin: 20px 0 30px 0 !important;
        /* Extra bottom margin to separate from button */
        align-items: flex-start !important;
        /* Aligns items to the LEFT */
        padding-left: 10px;
        /* Indent slightly so it looks neat */
    }

    .feat-item {
        justify-content: flex-start !important;
        /* content inside stays left */
        font-size: 16px;
        width: 100%;
    }

    /* Green Button - Separate from Floating Icon */
    .btn-whatsapp {
        width: 100% !important;
        font-size: 15px !important;
        padding: 15px !important;
        white-space: normal !important;
        text-align: center;
        border-radius: 12px !important;
        margin-bottom: 10px;
        /* Push it up slightly from the edge */
        position: relative;
        z-index: 5;
        /* Ensure it sits above background elements */
    }


    /* --- 4. PROFESSIONAL FOOTER GRID --- */
    .footer-minimal {
        padding: 40px 15px 0 15px !important;
        /* REMOVED extra bottom padding */
        text-align: left;
    }

    /* Create the 2-Column Grid for Links & Contact */
    .footer-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        /* Two equal columns */
        gap: 20px;
        align-items: start;
    }

    /* Make the Brand (RPS Kochas) span across the top */
    .f-col.brand-col {
        grid-column: 1 / -1;
        /* Spans full width */
        text-align: center;
        margin-bottom: 20px;
        border-bottom: 1px solid #333;
        padding-bottom: 20px;
    }

    .f-logo {
        border: none;
        margin-bottom: 10px;
        display: block;
    }

    /* Footer Headings */
    .f-col h4 {
        font-size: 16px;
        margin-bottom: 15px;
        color: var(--white);
        border-bottom: 2px solid var(--primary-gold);
        display: inline-block;
        padding-bottom: 3px;
    }

    /* Font Sizes for Links & Text */
    .f-col ul li a,
    .f-col p {
        font-size: 13px;
        line-height: 1.6;
    }

    /* Social Icons (Span full width at bottom) */
    .f-col:last-child {
        grid-column: 1 / -1;
        /* Spans full width */
        text-align: center;
        margin-top: 20px;
    }

    .f-socials {
        flex-direction: row;
        justify-content: center;
        gap: 15px;
    }

    /* Copyright Bar - Single Line */
    .footer-bar {
        padding: 15px 0 60px 0;
        /* Add space at bottom so bar isn't covered */
        margin-top: 0;
        font-size: 11px;
    }

    /* --- 5. FLOATING BUTTON POSITIONS (Fixed Low) --- */
    /* WhatsApp on Left - Lowered */
    .float-wa-btn {
        bottom: 60px !important;
        /* Just above the Admission bar */
        left: 15px !important;
        right: auto !important;
        width: 45px;
        /* Slightly smaller for mobile */
        height: 45px;
        font-size: 24px;
    }

    /* Back to Top on Right - Lowered */
    #back-to-top {
        bottom: 60px !important;
        /* Matches WhatsApp height */
        right: 15px !important;
        width: 45px;
        height: 45px;
        font-size: 20px;
        padding: 0;
        /* Centering fix */
        display: flex;
        /* Ensures arrow is centered */
        justify-content: center;
        align-items: center;
    }

    /* --- FIX: HIGHLIGHTS 2x2 GRID --- */
    /* 1. Create a 2-Column Grid */
    .grid-4 {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        /* Two boxes per row */
        gap: 10px !important;
        /* Small gap between boxes */
        margin-top: 30px !important;
        padding: 0 10px !important;
        /* Add side breathing room */
        position: relative;
        z-index: 10;
    }

    /* 2. Style the Boxes to be Compact */
    .highlight-box {
        padding: 15px 10px !important;
        /* Reduce padding inside */
        border-radius: 10px !important;
        text-align: center !important;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08) !important;
        display: flex;
        flex-direction: column;
        justify-content: center;
        /* Center text vertically */
        min-height: 110px;
        /* Force equal height */
        background: white;
    }

    /* 3. Smaller Heading */
    .highlight-box h3 {
        font-size: 14px !important;
        color: var(--primary-blue);
        margin-bottom: 5px !important;
        line-height: 1.2;
    }

    /* 4. Smaller Description Text */
    .highlight-box p {
        font-size: 11px !important;
        color: #555;
        line-height: 1.4 !important;
        margin: 0 !important;
        display: block;
        /* Ensure it shows */
    }

    .facilities-bento {
        display: grid;
        grid-template-columns: 1fr !important;
        /* Single column stack on mobile */
        grid-auto-rows: auto !important;
        gap: 15px !important;
    }

    .bento-wide,
    .bento-tall {
        grid-column: span 1 !important;
        grid-row: span 1 !important;
    }

    .facility-card {
        padding: 25px !important;
        min-height: 180px !important;
    }

    .facility-icon {
        width: 50px !important;
        height: 50px !important;
        top: 20px !important;
        right: 20px !important;
        font-size: 20px !important;
    }
}

/* =========================================
   LIGHTBOX MODAL STYLES (Web & Mobile)
   ========================================= */

/* 1. The Image on the page (before clicking) */
.clickable-image {
    cursor: zoom-in;
    /* Shows a magnifying glass cursor */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.clickable-image:hover {
    transform: scale(1.02);
    /* Slight zoom effect on hover */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* 2. The Modal Background (Dark Overlay) */
.modal {
    display: none;
    /* Hidden by default */
    position: fixed;
    /* Stay in place */
    z-index: 99999;
    /* Sit on top of everything */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    /* No scrolling */
    background-color: rgba(0, 0, 0, 0.92);
    /* Deep black transparent bg */
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* 3. The Expanded Image */
.modal-content {
    margin: auto;
    display: block;
    width: auto;
    height: auto;
    max-width: 90%;
    /* Keep some space on sides */
    max-height: 80vh;
    /* Keep space above and below for UI */
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s;
    /* Subtle zoom effect on open */
}

@keyframes zoomIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* 4. The Close Button (Top Right) */
.close-modal {
    position: absolute;
    top: 25px;
    right: 35px;
    color: #f1f1f1;
    font-size: 45px;
    font-weight: 300;
    transition: 0.3s;
    z-index: 100000;
    line-height: 1;
    padding: 5px;
}

.close-modal:hover,
.close-modal:focus {
    color: var(--primary-gold);
    text-decoration: none;
    cursor: pointer;
}

/* 5. Caption Text (Bottom Left) */
#captionText {
    position: absolute;
    bottom: 30px;
    left: 30px;
    background: rgba(0, 0, 0, 0.75);
    /* Dark semi-transparent background for readability */
    color: #fff;
    padding: 15px 20px;
    border-radius: 8px;
    max-width: 600px;
    /* Don't let text stretch too wide on big screens */
    text-align: left;
    font-size: 16px;
    line-height: 1.5;
    border-left: 4px solid var(--primary-gold);
    /* Gold accent bar */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* =========================================
   QUIZ SECTION — RPS HIT 2026 PRACTICE
   ========================================= */

/* ── Section Wrapper ── */
#quiz-section {
    background: linear-gradient(135deg, #0d1b4b 0%, #1a237e 60%, #002147 100%);
    padding: 70px 0;
    position: relative;
    overflow: hidden;
}

#quiz-section::before {
    content: '';
    position: absolute;
    top: -80px;
    left: -80px;
    width: 300px;
    height: 300px;
    background: rgba(255, 193, 7, 0.06);
    border-radius: 50%;
}

#quiz-section::after {
    content: '';
    position: absolute;
    bottom: -100px;
    right: -80px;
    width: 400px;
    height: 400px;
    background: rgba(255, 193, 7, 0.05);
    border-radius: 50%;
}

.quiz-section-header {
    text-align: center;
    margin-bottom: 40px;
}

.quiz-section-header .quiz-badge {
    background: var(--primary-gold);
    color: var(--primary-blue);
    font-weight: 800;
    padding: 5px 18px;
    border-radius: 30px;
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 12px;
}

.quiz-section-header h2 {
    color: #fff;
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.quiz-section-header p {
    color: rgba(255, 255, 255, 0.72);
    font-size: 1rem;
    max-width: 560px;
    margin: 0 auto;
}

/* ── Stats Row ── */
.quiz-stats-row {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 36px;
    flex-wrap: wrap;
}

.quiz-stat-pill {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #fff;
    padding: 10px 22px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(6px);
}

.quiz-stat-pill span.pill-icon {
    font-size: 18px;
}

/* ── Main Quiz Container ── */
.quiz-container {
    background: #fff;
    border-radius: 20px;
    max-width: 820px;
    margin: 0 auto;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    position: relative;
    z-index: 1;
}

/* ── SCREEN: Registration ── */
.quiz-screen {
    padding: 40px;
}

.quiz-screen.hidden {
    display: none !important;
}

.quiz-reg-title {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-blue);
    margin-bottom: 6px;
}

.quiz-reg-sub {
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 28px;
}

.quiz-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 24px;
}

.quiz-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.quiz-form-group.full-width {
    grid-column: 1 / -1;
}

.quiz-form-group label {
    font-weight: 700;
    font-size: 13px;
    color: var(--primary-blue);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.quiz-form-group input,
.quiz-form-group select {
    padding: 12px 16px;
    border: 2px solid #e0e6f5;
    border-radius: 10px;
    font-size: 15px;
    transition: border-color 0.2s;
    outline: none;
    color: #333;
}

.quiz-form-group input:focus,
.quiz-form-group select:focus {
    border-color: var(--primary-blue);
}

.quiz-rules-box {
    background: #f4f7fb;
    border-left: 4px solid var(--primary-gold);
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 24px;
}

.quiz-rules-box h4 {
    color: var(--primary-blue);
    font-size: 14px;
    margin-bottom: 10px;
}

.quiz-rules-box ul {
    list-style: none;
    padding: 0;
}

.quiz-rules-box ul li {
    font-size: 13px;
    color: #444;
    padding: 3px 0;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.5;
}

.quiz-rules-box ul li::before {
    content: '✔';
    color: var(--primary-blue);
    font-weight: bold;
    flex-shrink: 0;
}

.btn-start-quiz {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary-blue), #1565c0);
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 6px 20px rgba(26, 35, 126, 0.3);
}

.btn-start-quiz:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(26, 35, 126, 0.4);
}

/* ── SCREEN: Active Quiz ── */
.quiz-top-bar {
    background: linear-gradient(135deg, var(--primary-blue), #1565c0);
    padding: 16px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #fff;
    flex-wrap: wrap;
    gap: 10px;
}

.quiz-top-bar .student-info {
    font-size: 14px;
    font-weight: 600;
    opacity: 0.9;
}

.quiz-top-bar .student-info strong {
    color: var(--primary-gold);
}

.quiz-timer {
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.35);
    padding: 6px 18px;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 1px;
    transition: background 0.3s, color 0.3s;
}

.quiz-timer.danger {
    background: #d32f2f;
    border-color: #ff6b6b;
    animation: pulse-timer 0.8s infinite;
}

@keyframes pulse-timer {

    0%,
    100% {
        transform: scale(1)
    }

    50% {
        transform: scale(1.08)
    }
}

.quiz-progress-wrap {
    padding: 10px 28px 0;
}

.quiz-progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #666;
    margin-bottom: 6px;
    font-weight: 600;
}

.quiz-progress-bar {
    height: 6px;
    background: #e8eaf6;
    border-radius: 50px;
    overflow: hidden;
}

.quiz-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-blue), var(--primary-gold));
    border-radius: 50px;
    transition: width 0.3s;
}

.quiz-question-area {
    padding: 24px 28px;
}

.quiz-subject-tag {
    display: inline-block;
    background: #e8eaf6;
    color: var(--primary-blue);
    font-size: 11px;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: 20px;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.quiz-q-number {
    font-size: 12px;
    color: #999;
    margin-bottom: 6px;
    font-weight: 600;
}

.quiz-question-text {
    font-size: 17px;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1.55;
    margin-bottom: 22px;
}

/* Options */
.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quiz-option {
    border: 2px solid #e0e6f5;
    border-radius: 12px;
    padding: 13px 18px;
    font-size: 15px;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all 0.18s;
    background: #fff;
    position: relative;
    overflow: hidden;
}

.quiz-option:hover:not(.selected):not(.disabled) {
    border-color: var(--primary-blue);
    background: #f0f3ff;
    transform: translateX(4px);
}

.quiz-option .opt-label {
    width: 30px;
    height: 30px;
    background: #e8eaf6;
    color: var(--primary-blue);
    font-weight: 800;
    font-size: 13px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.18s, color 0.18s;
}

.quiz-option.selected {
    border-color: var(--primary-blue);
    background: #e8eaf6;
}

.quiz-option.selected .opt-label {
    background: var(--primary-blue);
    color: #fff;
}

.quiz-option.correct {
    border-color: #2e7d32 !important;
    background: #e8f5e9 !important;
}

.quiz-option.correct .opt-label {
    background: #2e7d32 !important;
    color: #fff !important;
}

.quiz-option.wrong {
    border-color: #c62828 !important;
    background: #ffebee !important;
}

.quiz-option.wrong .opt-label {
    background: #c62828 !important;
    color: #fff !important;
}

.quiz-option.disabled {
    cursor: default;
}

/* Nav Buttons */
.quiz-nav {
    padding: 0 28px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.quiz-nav-left,
.quiz-nav-right {
    display: flex;
    gap: 10px;
}

.btn-quiz-nav {
    padding: 11px 24px;
    border: 2px solid var(--primary-blue);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s;
    background: #fff;
    color: var(--primary-blue);
}

.btn-quiz-nav:hover {
    background: var(--primary-blue);
    color: #fff;
}

.btn-quiz-nav.primary {
    background: var(--primary-blue);
    color: #fff;
}

.btn-quiz-nav.primary:hover {
    background: #0d1470;
    border-color: #0d1470;
}

.btn-quiz-nav.danger {
    border-color: #c62828;
    color: #c62828;
}

.btn-quiz-nav.danger:hover {
    background: #c62828;
    color: #fff;
}

.btn-quiz-nav:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* Question Navigator Dots */
.q-navigator {
    padding: 0 28px 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.q-dot {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 2px solid #c5cae9;
    background: #fff;
    font-size: 10px;
    font-weight: 700;
    color: #999;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.q-dot:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}

.q-dot.answered {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
    color: #fff;
}

.q-dot.current {
    border-color: var(--primary-gold);
    box-shadow: 0 0 0 2px var(--primary-gold);
}

/* ── SCREEN: Results ── */
.result-header {
    background: linear-gradient(135deg, var(--primary-blue), #1565c0);
    padding: 36px 28px;
    text-align: center;
    color: #fff;
}

.result-emoji {
    font-size: 56px;
    margin-bottom: 8px;
}

.result-header h2 {
    font-size: 1.8rem;
    font-weight: 800;
}

.result-student-name {
    opacity: 0.8;
    font-size: 14px;
    margin-top: 4px;
}

.result-score-ring {
    width: 130px;
    height: 130px;
    background: rgba(255, 255, 255, 0.12);
    border: 6px solid var(--primary-gold);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 18px auto;
}

.result-score-ring .score-num {
    font-size: 2.2rem;
    font-weight: 900;
}

.result-score-ring .score-den {
    font-size: 14px;
    opacity: 0.75;
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    padding: 24px 28px;
    border-bottom: 1px solid #eee;
}

.result-stat {
    background: #f4f7fb;
    border-radius: 14px;
    padding: 16px 12px;
    text-align: center;
}

.result-stat .rs-value {
    font-size: 1.7rem;
    font-weight: 900;
    color: var(--primary-blue);
}

.result-stat .rs-value.green {
    color: #2e7d32;
}

.result-stat .rs-value.red {
    color: #c62828;
}

.result-stat .rs-value.gold {
    color: #f57f17;
}

.result-stat .rs-label {
    font-size: 11px;
    color: #777;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

.result-message {
    margin: 0 28px 20px;
    padding: 16px 20px;
    border-radius: 14px;
    border-left: 5px solid var(--primary-gold);
    background: #fffde7;
    font-size: 14px;
    color: #444;
    line-height: 1.6;
    font-style: italic;
}

/* Result breakdown table */
.result-breakdown {
    padding: 0 28px 10px;
}

.result-breakdown h3 {
    color: var(--primary-blue);
    font-size: 15px;
    margin-bottom: 12px;
    font-weight: 800;
}

.breakdown-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.breakdown-table th {
    background: var(--primary-blue);
    color: #fff;
    padding: 9px 12px;
    text-align: left;
    font-weight: 700;
}

.breakdown-table td {
    padding: 9px 12px;
    border-bottom: 1px solid #eee;
    vertical-align: top;
}

.breakdown-table tr:nth-child(even) td {
    background: #f9f9f9;
}

.tag-correct {
    color: #2e7d32;
    font-weight: 800;
}

.tag-wrong {
    color: #c62828;
    font-weight: 800;
}

.tag-skip {
    color: #999;
    font-weight: 600;
}

.result-actions {
    padding: 20px 28px 32px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-result {
    flex: 1;
    padding: 14px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    border: none;
    transition: all 0.18s;
    min-width: 140px;
}

.btn-result.primary {
    background: linear-gradient(135deg, var(--primary-blue), #1565c0);
    color: #fff;
    box-shadow: 0 4px 14px rgba(26, 35, 126, 0.3);
}

.btn-result.primary:hover {
    transform: translateY(-2px);
}

.btn-result.secondary {
    background: #fff;
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
}

.btn-result.secondary:hover {
    background: #f0f3ff;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .quiz-screen {
        padding: 24px 18px;
    }

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

    .quiz-top-bar {
        padding: 14px 18px;
    }

    .quiz-question-area {
        padding: 18px;
    }

    .quiz-nav {
        padding: 0 18px 18px;
    }

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

    .quiz-section-header h2 {
        font-size: 1.6rem;
    }

    .result-actions {
        flex-direction: column;
    }

    .q-navigator {
        padding: 0 18px 16px;
    }
}

/* =========================================
   MOBILE ADJUSTMENTS FOR LIGHTBOX
   ========================================= */
@media only screen and (max-width: 768px) {

    /* Make image wider on phone */
    .modal-content {
        max-width: 95%;
        max-height: 70vh;
        /* Leave more room below for caption on phone */
    }

    /* Adjust close button position */
    .close-modal {
        top: 15px;
        right: 20px;
        font-size: 35px;
    }

    /* Adjust caption for mobile */
    #captionText {
        bottom: 20px;
        left: 15px;
        right: 15px;
        /* Stretch across bottom with padding */
        width: auto;
        max-width: none;
        font-size: 14px;
        padding: 12px 15px;
    }
}

/* ======================================================
   EXCELLENCE CENTER (V5.3 - MERGED & VIBRANT)
   ====================================================== */
.excellence-section {
    padding: 100px 0;
    background: #fff;
    position: relative;
    overflow: hidden;
    z-index: 10;
}

.excellence-section .brand-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 15vw;
    font-weight: 900;
    color: rgba(26, 35, 126, 0.03);
    z-index: -1;
    white-space: nowrap;
    pointer-events: none;
}

.stats-grid-vibrant {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.feature-grid-legacy {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.feature-card-legacy {
    background: #fff;
    padding: 40px 30px;
    border-radius: 24px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Vibrant Orange-Yellow Border Accent (V5.3) */
.feature-card-legacy::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 5%;
    width: 90%;
    height: 8px;
    /* Thicker for more impact */
    background: linear-gradient(90deg, #ff6f00, #ffca28);
    /* More vibrant orange-yellow */
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card-legacy:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
}

.feature-card-legacy:hover::after {
    width: 100%;
    left: 0;
}

.feature-card-legacy h3 {
    color: var(--primary-blue);
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.feature-card-legacy p {
    color: #444;
    line-height: 1.6;
    font-size: 1.05rem;
}

@media (max-width: 768px) {
    .excellence-section {
        padding: 60px 0;
    }
}

body.admin-bar .main-header {
    top: 32px !important;
}

@media screen and (max-width: 782px) {
    body.admin-bar .main-header {
        top: 46px !important;
    }
}

/* Theme Toggle Button Style */
.theme-toggle-btn {
    position: fixed;
    bottom: 20px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-gold);
    color: var(--primary-blue);
    border: none;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    /* CENTERED ICON */
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 999;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-toggle-btn:hover {
    transform: scale(1.1) rotate(15deg);
    background: var(--primary-blue);
    color: #fff;
}

/* Mobile Tweaks */
@media (max-width: 768px) {
    .theme-toggle-btn {
        bottom: 60px !important;
        right: 15px !important;
        width: 45px;
        height: 45px;
    }
}