/* --- 1. GLOBAL & TYPOGRAPHY --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

:root {
    --primary: #4f46e5;       /* Indigo */
    --accent: #f472b6;        /* Pink */
    --dark: #0f172a;          /* Slate 900 */
    --text-gray: #475569;     /* Slate 600 */
    --bg-light: #ffffff;
    --bg-offwhite: #f1f5f9;   /* Slate 100 */
    /* Elastic Bezier Curve for Pro Feel */
    --elastic: cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

body {
    background-color: var(--bg-offwhite);
    color: var(--dark);
    overflow-x: hidden;
}

/* --- 2. STICKY BLUR HEADER --- */
/* =========================================
   HEADER & ANNOUNCEMENT BAR STYLES
   ========================================= */

/* Announcement Bar */
.announcement-bar {
    background: #e67e22; /* Orange */
    color: white;
    height: 40px;
    display: flex;
    align-items: center;
    overflow: hidden;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 3000;
    transition: transform 0.3s ease;
}

.marquee-container { width: 100%; overflow: hidden; white-space: nowrap; }
.marquee-content { display: inline-block; animation: marquee 25s linear infinite; }
.marquee-content span { display: inline-block; padding-left: 50px; font-weight: 600; font-size: 0.9rem; }
.marquee-content span i { margin-right: 8px; }

@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* Header */
header {
    background: transparent;
    height: 70px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    position: fixed;
    top: 40px; /* Below announcement bar */
    width: 100%;
    z-index: 2999;
    transition: all 0.4s ease;
}

/* Header Scrolled State */
/* body.scrolled header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px); */
    /* top: 0; Moves up */
    /* box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
} */
/* body.scrolled .announcement-bar { transform: translateY(-100%); ; } */


/* =========================================
   UPDATED STICKY LOGIC (Both Bar & Header)
   ========================================= */

/* 1. Keep Announcement Bar Sticky */
body.scrolled .announcement-bar {
    transform: none; /* Stops it from hiding */
    box-shadow: 0 1px 5px rgba(0,0,0,0.1); /* Adds depth */
    z-index: 3001; /* High z-index to stay on top */
}

/* 2. Header Position Fix */
body.scrolled header {
    background: rgba(255, 255, 255, 0.95); /* White background */
    backdrop-filter: blur(10px);
    
    /* IMPORTANT: Keep it 40px from top so it sits BELOW the bar */
    top: 40px; 
    
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}
.logo {
    font-size: 1.6rem;
    font-weight: 800;
    background: linear-gradient(to right, #4f46e5, #f472b6);
    -webkit-background-clip: text;
    color: transparent;
}

/* Nav Links */
header nav ul { display: none; gap: 30px; align-items: center; list-style: none; }
@media(min-width: 900px) { header nav ul { display: flex; } }

header nav a {
    color: #2d3436;
    text-decoration: none;
    font-weight: 600;
    position: relative;
    font-size: 0.95rem;
}

/* Active Link Color */
/* --- Active Menu Highlight --- */
header nav a.active {
    color: var(--orange-bar) !important; /* Forces Orange Color */
    position: relative;
}

/* Optional: Add a small dot under the active link */
header nav a.active::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--orange-bar);
    border-radius: 50%;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
}

/* Dropdown Menu */
.dropdown { position: relative; }
.dropdown-menu {
    position: absolute; top: 100%; left: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: white; min-width: 220px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    opacity: 0; visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    padding: 10px;
    z-index: 9999;
}
.dropdown:hover .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-menu li { width: 100%; display: block; }
.dropdown-menu a {
    text-transform: capitalize; font-weight: 500; color: #555;
    padding: 8px 10px; display: block; border-radius: 5px;
}
.dropdown-menu a:hover { background: #f8f9fa; color: #4f46e5; padding-left: 15px; }

/* Mobile Menu Toggle */
.menu-toggle {
    display: none; font-size: 1.5rem; cursor: pointer;
    color: #2d3436; margin-left: 15px;
}

/* Right Side Buttons */
.header-right { display: flex; align-items: center; }
.nav-btn {
    background: #0f172a;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.3s ease;
}
.nav-btn:hover { transform: translateY(-3px); }

/* Responsive Media Query for Header */
/* =========================================
   MOBILE RESPONSIVENESS FIX (Max-Width 900px)
   ========================================= */
   @media (max-width: 900px) {

    /* --- 1. MENU TOGGLE BUTTON --- */
    .menu-toggle {
        display: block;
        position: relative;
        /* Increased z-index to ensure it sits above EVERYTHING */
        z-index: 4000; 
        cursor: pointer;
    }

    /* Hide the desktop 'Admissions' button to prevent overlap */
    .nav-btn {
        display: none;
    }

    /* --- 2. SIDEBAR NAVIGATION --- */
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%; /* Hidden off-screen */
        width: 70%;
        height: 100vh;
        background: white;
        display: flex;
        flex-direction: column;
        justify-content: flex-start; /* Align items to top */
        align-items: center;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        transition: right 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        /* Z-index lower than toggle but higher than page content */
        z-index: 2999; 
        padding-top: 80px; /* Space for the close button */
        overflow-y: auto; /* Allow scrolling if menu is tall */
    }

    /* Active state (Slide in) */
    .nav-links.active {
        right: 0;
    }

    .nav-links ul {
        flex-direction: column;
        gap: 0;
        width: 100%;
    }
    
    .nav-links li {
        width: 100%;
        border-bottom: 1px solid #f0f0f0;
    }

    .nav-links a {
        font-size: 1.1rem;
        display: block;
        padding: 15px 25px;
        width: 100%;
        color: var(--text-dark);
    }
    
    /* --- 3. DROPDOWN FIX --- */
    /* Ensure dropdown links are flex containers to align text and arrow */
    .dropdown > a {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: #f9f9f9;
        padding: 0;
        display: none; /* Hidden by default */
    }
    
    /* Show when active class added by JS */
    .dropdown.active .dropdown-menu {
        display: block;
    }
}

/* --- 3. PRO HERO SECTION --- */
.gallery-hero {
    position: relative;
    padding: 180px 20px 100px;
    text-align: center;
    background: var(--bg-light);
    overflow: hidden;
    /* Subtle pattern overlay */
    background-image: radial-gradient(var(--text-gray) 1px, transparent 1px);
    background-size: 40px 40px;
    background-color: #ffffff;
}

/* The giant moving blob */
.hero-bg-shape {
    position: absolute;
    top: -60%;
    left: -20%;
    width: 100%;
    height: 120%;
    background: linear-gradient(120deg, rgba(79, 70, 229, 0.08), rgba(244, 114, 182, 0.08));
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    animation: morphBlob 20s infinite alternate ease-in-out;
    z-index: 0;
    filter: blur(60px);
}

@keyframes morphBlob {
    0% { border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; transform: rotate(0deg); }
    100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; transform: rotate(360deg); }
}

/* Floating Emojis Animation */
.hero-emojis {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none; /* Ensure they don't block clicks */
    z-index: 1;
}

.float-item {
    position: absolute;
    font-size: 3rem;
    opacity: 0.6;
    animation: floatUp 15s linear infinite;
    bottom: -10vh;
}

/* Positioning and varying speeds for emojis */
.f1 { left: 10%; animation-duration: 18s; font-size: 4rem; }
.f2 { left: 30%; animation-duration: 12s; animation-delay: 2s; }
.f3 { left: 60%; animation-duration: 20s; font-size: 2.5rem; }
.f4 { left: 80%; animation-duration: 15s; animation-delay: 5s; }
.f5 { left: 50%; animation-duration: 22s; animation-delay: 1s; font-size: 3.5rem;}

@keyframes floatUp {
    0% { transform: translateY(0) rotate(0deg); opacity: 0; }
    20% { opacity: 0.7; }
    80% { opacity: 0.7; }
    100% { transform: translateY(-120vh) rotate(360deg); opacity: 0; }
}

.hero-content { position: relative; z-index: 2; }

.tagline {
    display: inline-block;
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary);
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.hero-content h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.1;
    color: var(--dark);
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    color: transparent;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 40px;
    color: var(--text-gray);
    font-weight: 600;
}

.stat-item i {
    font-size: 1.5rem;
    color: var(--primary);
    margin-right: 10px;
}

/* --- 4. ELASTIC FILTER BUTTONS --- */
.filter-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    padding: 60px 20px;
}

.filter-btn {
    background: var(--bg-light);
    border: 2px solid rgba(79, 70, 229, 0.1);
    color: var(--text-gray);
    padding: 12px 30px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.95rem;
    /* Elastic transition */
    transition: all 0.4s var(--elastic);
}

.filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-3px);
}

.filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 15px 30px -10px rgba(79, 70, 229, 0.5);
    transform: translateY(-3px) scale(1.05);
}

/* --- 5. GALLERY GRID & SCROLL REVEAL --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 35px;
    padding: 0 5% 150px;
    max-width: 1400px;
    margin: 0 auto;
}

.gallery-item {
    background: var(--bg-light);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.05);
    transition: all 0.5s var(--elastic);
    
    /* --- SCROLL REVEAL INITIAL STATE --- */
    opacity: 0;
    transform: translateY(50px) scale(0.95);
}

/* The class JS adds when scrolled into view */
.gallery-item.reveal-active {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Hover Lift */
.gallery-item:hover {
    transform: translateY(-15px) scale(1.02) !important; /* Override reveal state on hover */
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.15);
}

.image-wrapper {
    position: relative;
    height: 320px;
    overflow: hidden;
}

/* === NEW: Category Badge Style === */
.category-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    backdrop-filter: blur(4px);
    pointer-events: none; /* Allows click through to image */
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gallery-item:hover img { transform: scale(1.15) rotate(1deg); }

/* Modern Gradient Overlay */
.overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.8) 0%, transparent 60%);
    opacity: 0;
    transition: all 0.4s ease;
    display: flex;
    align-items: flex-end;
    padding: 30px;
}

.gallery-item:hover .overlay { opacity: 1; }

.caption {
    transform: translateY(20px);
    transition: transform 0.4s var(--elastic) 0.1s;
}

.gallery-item:hover .caption { transform: translateY(0); }

.caption h3 { color: white; font-size: 1.4rem; margin-bottom: 5px; }
.caption p { color: rgba(255,255,255,0.8); font-size: 1rem; }

/* --- LIGHTBOX --- */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.95); /* Darker background */
    backdrop-filter: blur(20px);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    opacity: 0; /* Fade in effect */
    transition: opacity 0.3s ease;
}

.lightbox.active { opacity: 1; }

.lightbox-content {
    max-width: 90%;
    max-height: 85vh;
    border-radius: 16px;
    box-shadow: 0 50px 100px -20px rgba(0,0,0,0.5);
    transform: scale(0.9);
    transition: transform 0.4s var(--elastic);
}

.lightbox.active .lightbox-content { transform: scale(1); }

#lightbox-caption {
    margin-top: 20px;
    color: white;
    text-align: center;
    font-size: 1.1rem;
}

.close-lightbox {
    position: absolute;
    top: 30px;
    right: 40px;
    font-size: 3rem;
    color: white;
    cursor: pointer;
    transition: transform 0.3s ease;
}
.close-lightbox:hover { transform: rotate(90deg); color: var(--accent); }

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .hero-content h1 { font-size: 2.8rem; }
    .gallery-grid { grid-template-columns: 1fr; padding-bottom: 80px;}
    .image-wrapper { height: 250px; }
}