/* =============================================================
   BRAND CORE DESIGN TOKENS (LIGHT SKY-BLUE MATRIX)
============================================================= */
:root {
    --primary: #1e3a8a;          /* Deep Navy Base Theme */
    --primary-light: #e0f2fe;    /* Light Cloud Variant */
    --sky-accent: #0284c7;       /* Dynamic Sky Blue Accent */
    --accent: #f59e0b;           /* Safety Gold / Highlights */
    --canvas-bg: #f8fafc;        /* High-fidelity Neutral Studio Canvas */
    --card-surface: #ffffff;     
    --text-main: #0f172a;        /* High Contrast Charcoal text for WCAG compliance */
    --text-muted: #475569;
    
    /* Physics & Elevation Framework tokens */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --shadow-sm: 0 4px 6px -1px rgba(2, 132, 199, 0.05);
    --shadow-md: 0 10px 25px -5px rgba(30, 58, 138, 0.08), 0 8px 10px -6px rgba(30, 58, 138, 0.04);
    --shadow-glow: 0 0 25px rgba(2, 132, 199, 0.25);
    --transition-curve: cubic-bezier(0.4, 0, 0.2, 1);
}

/* -------------------------------------------------------------
   SYSTEM DOCUMENT ROOT SETUP
------------------------------------------------------------- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--canvas-bg);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* -------------------------------------------------------------
   PARALLAX HERO SURFACE STAGE
------------------------------------------------------------- */
.gallery-hero {
    position: relative;
    height: 60vh;
    min-height: 400px;
    width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #ffffff;
}

.hero-parallax-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120%; /* Extra height to accommodate parallax displacement travel */
    background: linear-gradient(rgba(15, 23, 42, 0.75), rgba(30, 58, 138, 0.65)), 
                url('../images/PARENT DAY.png') center/cover no-repeat;
    z-index: 1;
    will-change: transform;
}

.hero-overlay {
    position: relative;
    z-index: 2;
    padding: 0 1.5rem;
    max-width: 800px;
}

/* BREADCRUMB HOUSING UI */
.breadcrumb-nav {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.12);
    padding: 0.4rem 1.2rem;
    border-radius: 50px;
    backdrop-filter: blur(8px);
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.breadcrumb-nav a { color: #e2e8f0; text-decoration: none; transition: color 0.3s; }
.breadcrumb-nav a:hover { color: var(--accent); }
.breadcrumb-nav i { font-size: 0.7rem; color: #94a3b8; }

.gallery-hero h1 {
    font-size: clamp(2.2rem, 6vw, 3.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.hero-subtitle {
    font-size: clamp(0.95rem, 2.5vw, 1.15rem);
    color: #e2e8f0;
    margin-top: 0.75rem;
    font-weight: 300;
}

.hero-motto {
    font-size: 1.1rem;
    color: var(--accent);
    font-style: italic;
    margin-top: 0.5rem;
    font-weight: 400;
}

/* -------------------------------------------------------------
   DYNAMIC STATISTICAL COUNTER STRIP
------------------------------------------------------------- */
.metrics-strip {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    max-width: 1200px;
    margin: -3rem auto 3rem;
    padding: 0 1.25rem;
    position: relative;
    z-index: 5;
}

.metric-item {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 1.5rem 1rem;
    border-radius: var(--radius-md);
    text-align: center;
    box-shadow: var(--shadow-md);
}

.metric-icon { font-size: 1.5rem; color: var(--sky-accent); margin-bottom: 0.25rem; }
.metric-data { font-size: 1.75rem; font-weight: 700; color: var(--primary); }
.metric-lbl { font-size: 0.8rem; font-weight: 500; color: var(--text-muted); text-transform: uppercase; }

/* -------------------------------------------------------------
   MODERN SEPARATORS STRUCTURAL SYSTEM
------------------------------------------------------------- */
.card-header-block {
    margin-bottom: 2rem;
}

.card-header-block h2 {
    font-size: 1.4rem;
    color: var(--primary);
    font-weight: 600;
}

.section-divider {
    width: 45px;
    height: 4px;
    background-color: var(--sky-accent);
    border-radius: 2px;
    margin-top: 0.4rem;
}

/* -------------------------------------------------------------
   MAIN CONTAINER & STAGGERED MODERN MASONRY ECOSYSTEM
------------------------------------------------------------- */
#gallery-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem 4rem;
}

.gallery-card {
    background: var(--card-surface);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 3rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(148, 163, 184, 0.12);
    transition: transform 0.4s var(--transition-curve), box-shadow 0.4s var(--transition-curve);
}

/* PREVENT GLOW ON IMAGES BY TARGETING EXCLUSIVE SURFACES */
.gallery-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-glow);
}

/* CORE RESPONSIVE FLEXIBLE GALLERY ENGINE Grid SYSTEM */
.gallery-images {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.gallery-item {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    height: 240px;
    cursor: pointer;
    background-color: var(--primary);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--transition-curve);
}

/* IMAGE GRADIENT SHADOW HOUSING & TEXT HOVER SLIDE IN */
.img-hover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.9) 0%, rgba(30, 58, 138, 0.3) 60%, rgba(0,0,0,0) 100%);
    opacity: 0;
    display: flex;
    align-items: flex-end;
    padding: 1.25rem;
    transition: opacity 0.4s var(--transition-curve);
}

.img-hover-overlay span {
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 500;
    transform: translateY(15px);
    transition: transform 0.4s var(--transition-curve);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.gallery-item:hover img {
    transform: scale(1.08);
}

.gallery-item:hover .img-hover-overlay {
    opacity: 1;
}

.gallery-item:hover .img-hover-overlay span {
    transform: translateY(0);
}

.card-footer-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px dashed rgba(148, 163, 184, 0.2);
}

/* -------------------------------------------------------------
   HOLISTIC EXCELLENCE SECTION (TWO-COLUMN ENGINE)
------------------------------------------------------------- */
#life-excellence {
    background-color: var(--primary-light);
    padding: 4rem 1.25rem;
    margin-bottom: 4rem;
}

.life-grid-wrapper {
    max-width: 1160px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    align-items: center;
}

.floating-image-wrapper {
    width: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    animation: imageFloat 6s ease-in-out infinite;
}

.floating-image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
}

@keyframes imageFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.gallery-content-column h2 {
    font-size: 1.75rem;
    color: var(--primary);
    font-weight: 700;
    line-height: 1.25;
}

.accent-align { margin-bottom: 1.5rem; }
.lead-p { font-size: 1rem; color: var(--text-main); font-weight: 500; margin-bottom: 1rem; }

/* SMOOTH ACCORDION TRANSITION DRAWERS */
.expandable-drawer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0, 1, 0, 1);
}

.expandable-drawer.expanded {
    max-height: 1000px; /* High safety threshold for expanded text depth */
    transition: max-height 0.5s cubic-bezier(1, 0, 1, 0);
}

.expandable-drawer p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.btn-readmore {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.65rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 10px rgba(30, 58, 138, 0.2);
    transition: background 0.3s, transform 0.3s;
}

.btn-readmore:hover { background: var(--sky-accent); transform: translateY(-2px); }

/* -------------------------------------------------------------
   SCHOOL AT A GLANCE (RESPONSIVE CARDS-TO-TABLE DRIVER)
------------------------------------------------------------- */
#school-glance {
    max-width: 1200px;
    margin: 0 auto 5rem;
    padding: 0 1.25rem;
}

.glance-header { text-align: center; margin-bottom: 3rem; }
.glance-header .section-divider { margin: 0.5rem auto 1rem; }
.glance-header p { color: var(--text-muted); max-width: 700px; margin: 0 auto; font-size: 0.95rem; }

/* MOBILE FLOW BY DEFAULT (TABLE HIDDEN) */
.glance-table { display: none; }

.glance-cards-mobile {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.g-mobile-card {
    background: var(--card-surface);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--sky-accent);
}

.g-mobile-card h3 {
    font-size: 1.05rem;
    color: var(--primary);
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.g-mobile-card h3 i { color: var(--sky-accent); }
.g-mobile-card p { font-size: 0.9rem; color: var(--text-muted); }

/* -------------------------------------------------------------
   CORE LIGHTBOX RENDERING WINDOW
------------------------------------------------------------- */
.lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.95);
    z-index: 3000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    padding: 1rem;
}

.lightbox-modal.active { opacity: 1; pointer-events: auto; }
.lightbox-close { position: absolute; top: 1.5rem; right: 1.5rem; background: none; border: none; color: white; font-size: 3rem; cursor: pointer; line-height: 1; }
.lightbox-wrapper { max-width: 90%; max-height: 80%; display: flex; flex-direction: column; align-items: center; }
.lightbox-wrapper img { max-width: 100%; max-height: 70vh; object-fit: contain; border-radius: var(--radius-sm); box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5); }
#lightbox-caption { color: #e2e8f0; margin-top: 1rem; font-size: 1rem; text-align: center; font-weight: 400; }

/* -------------------------------------------------------------
   BACK TO TOP FLOATING INTERFACE ACTION TRIGGER
------------------------------------------------------------- */
.scroll-top-trigger {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    display: grid;
    place-items: center;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    z-index: 100;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.3s, transform 0.3s var(--transition-curve), background 0.3s;
}

.scroll-top-trigger.active { opacity: 1; transform: translateY(0); }
.scroll-top-trigger:hover { background-color: var(--sky-accent); transform: translateY(-3px); }

/* -------------------------------------------------------------
   RESPONSIVE LAYOUT UPSTREAM BREAKPOINTS (DESKTOP INTERFACES)
============================================================= */
@media (min-width: 576px) {
    .metrics-strip { grid-template-columns: repeat(4, 1fr); margin-bottom: 4rem; }
    .gallery-images { grid-template-columns: repeat(2, 1fr); }
    .glance-cards-mobile { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 768px) {
    .gallery-card { padding: 2.5rem; }
    .card-header-block h2 { font-size: 1.65rem; }
    
    /* DYNAMIC MASONRY LAYOUT FEELS VIA EXCLUSIVE FLEXIBLE GRID */
    .gallery-images { grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
    
    /* FEATURED ITEM CONFIGURATION (HIGHLIGTED FEATURE TARGETS) */
    .gallery-item.featured { grid-column: span 2; grid-row: span 1; height: 240px; }
    
    .life-grid-wrapper { grid-template-columns: 1fr 1.2fr; gap: 4rem; }
    .gallery-content-column h2 { font-size: 2.2rem; }
    
    /* TABLE TO CARD INTERFACE REVERSION RUNS HERE */
    .glance-cards-mobile { display: none; }
    .glance-table { display: table; width: 100%; border-collapse: separate; border-spacing: 0; background: var(--card-surface); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid rgba(148, 163, 184, 0.12); }
    .glance-table th, .glance-table td { padding: 1.25rem 1.75rem; text-align: left; }
    .glance-table th { background-color: var(--primary); color: white; font-weight: 600; font-size: 1rem; }
    .glance-table td { font-size: 0.95rem; border-bottom: 1px solid rgba(148, 163, 184, 0.12); color: var(--text-muted); }
    .glance-table tr:last-child td { border-bottom: none; }
    .glance-table td:first-child { font-weight: 600; color: var(--primary); width: 30%; }
    .glance-table td i { color: var(--sky-accent); margin-right: 0.5rem; }
}

/* -------------------------------------------------------------
   ON-SCROLL ANIMATION ENGINE CONFIGURATIONS
------------------------------------------------------------- */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s var(--transition-curve), transform 0.8s var(--transition-curve);
}

.scroll-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}