/* ============================================ */
/* PROJECT BRIGHTSPROUT CSS          */
/* PART 1: GLOBALS, HEADER, HERO        */
/* ============================================ */

/* ============================================ */
/* 1. GLOBAL STYLES                */
/* ============================================ */

/* --- CSS Custom Properties (Variables) --- */
:root {
    --mango-tango: #FF8C42; /* Orange */
    --sky-blue: #42A5F5; /* Blue */
    --sunshine-yellow: #FFD700; /* Yellow */
    --seafoam-green: #32CD32; /* Green */
    /* === UPGRADE: Added new vibrant colors for a more colorful website === */
    --crimson-red: #E53935; /* Red */
    --purple-majesty: #8E44AD; /* Purple/Violet */
    --deep-indigo: #3949AB; /* Indigo */
    --off-white: #F7F7F7;
    --deep-charcoal: #333333;

    --font-primary: 'Nunito', sans-serif;
    --font-secondary: 'Baloo 2', cursive;
    
    --header-height: 70px;
}

/* --- Basic Reset --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    background-color: var(--off-white);
    color: var(--deep-charcoal);
    line-height: 1.6;
    overflow-x: hidden; /* Prevents horizontal scroll */
}

/* --- Reusable Components & Typography --- */
.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

h1, h2, h3, h4 {
    line-height: 1.2;
    font-weight: 700;
}

h1 { font-size: 3rem; font-family: var(--font-secondary); }
h2 { font-size: 2.25rem; font-family: var(--font-secondary); color: var(--mango-tango); }
h3 { font-size: 1.5rem; }
p { margin-bottom: 1rem; }

a {
    color: var(--mango-tango);
    text-decoration: none;
    transition: color 0.3s ease;
}
a:hover { color: var(--sky-blue); }

section {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
}
.section-title p {
    font-size: 1.1rem;
    color: #666;
}

/* ============================================ */
/* 2. HEADER & NAVIGATION            */
/* ============================================ */

#main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: transform 0.4s ease-out;
}

#main-header.is-scrolled {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

#main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

/* === UPGRADE: Styles for the logo container and new text element === */
.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo img {
 width: 60px;          /* adjust as needed */
    height: 60px;         /* keep same width/height */
    border-radius: 50%;   /* makes it round */
    object-fit: cover;    /* keeps it inside circle */
}

.logo-text {
    font-family: var(--font-secondary);
    font-size: 1.3rem;
    color: var(--deep-charcoal);
    font-weight: 700;
    display: none; /* Hide text on the smallest mobile screens */
}

/* --- Mobile Navigation --- */
#menu-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--deep-charcoal);
    cursor: pointer;
    z-index: 1001;
}

#main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--off-white);
    display: flex;
    justify-content: center;
    align-items: center;
    
    opacity: 0;
    visibility: hidden;
    transform: translateY(-100%);
    transition: all 0.4s ease;
}

body.nav-open #main-nav {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#main-nav ul {
    list-style: none;
    text-align: center;
}

#main-nav ul li {
    margin: 2rem 0;
}

#main-nav ul li a {
    font-family: var(--font-secondary);
    font-size: 2rem;
    color: var(--deep-charcoal);
}

.nav-button {
    background: var(--mango-tango);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
}
.nav-button:hover {
    background: var(--sky-blue);
    color: white;
}


/* --- Desktop Navigation --- */
@media (min-width: 500px) {
    /* === UPGRADE: Show the logo text on screens wider than 500px === */
    .logo-text {
        display: block;
    }
}

@media (min-width: 768px) {
    #menu-toggle {
        display: none;
    }

    #main-nav {
        position: static;
        height: auto;
        width: auto;
        background: none;
        opacity: 1;
        visibility: visible;
        transform: none;
    }

    #main-nav ul {
        display: flex;
        align-items: center;
        gap: 1.5rem;
    }
    
    #main-nav ul li {
        margin: 0;
    }

    #main-nav ul li a {
        font-size: 1rem;
        font-family: var(--font-primary);
    }
}

/* Default hide on desktop */
.logo-text {
    display: none;
}

/* Mobile view */
@media (max-width: 768px) {
    .logo-text {
        display: inline-block;
        font-family: 'Poppins', sans-serif;  /* cool & modern font */
        font-size: 22px;
        font-weight: 700;
        margin-left: 10px;

        /* 🔥 Gradient Text Effect */
        background: linear-gradient(135deg, #ff512f, #dd2476, #25d366);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;

        letter-spacing: 1px;
    }

    .logo {
        display: flex;
        align-items: center;
    }
}

/* ============================================ */
/* 3. HERO SECTION                */
/* ============================================ */

#hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    /* === UPGRADE: Changed text to white for contrast against the new background === */
    color: #fff;
    padding: 0;
    /* === UPGRADE: Added a background image for a more engaging look === */
    background-image: url('images/hero1.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Optional: creates a simple parallax effect */
    overflow: hidden;
}

/* === UPGRADE: Added a semi-transparent blue overlay for text readability === */
#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3); /* --sky-blue with 60% opacity */
    z-index: 1;
}

.hero-content {
    /* === UPGRADE: Added position relative and z-index to place content above the overlay === */
    position: relative;
    z-index: 2;
}

.hero-content h1 {
    margin-bottom: 0.5rem;
}

.hero-content p {
    font-size: 1.25rem;
    font-family: var(--font-primary);
}

.scroll-down-arrow {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.5rem;
    /* === UPGRADE: Changed color to white to match other hero text === */
    color: #fff;
    animation: bounce 2s infinite;
    z-index: 2; /* Ensure it's above the overlay */
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translate(-50%, 0);
    }
    40% {
        transform: translate(-50%, -15px);
    }
    60% {
        transform: translate(-50%, -5px);
    }
}


/* ============================================ */
/* PROJECT BRIGHTSPROUT CSS                     */
/* PART 2: STORYBOOK & PLAYGROUND SECTIONS      */
/* ============================================ */

/* ============================================ */
/* 4. STORYBOOK SECTION (ABOUT US)              */
/* ============================================ */
.our-storybook {
    background-color: #fff;
}

.storybook-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    margin-bottom: 4rem;
}

.storybook-image-container,
.storybook-text-container {
    flex: 1;
}

.storybook-image-container img {
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    /* === UPGRADE: Changed border color to a new vibrant color === */
    border: 5px solid var(--purple-majesty);
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.storybook-text-container h3 {
    /* === UPGRADE: Changed heading color to a new vibrant color === */
    color: var(--deep-indigo);
    margin-bottom: 1rem;
}

.wonder-window-trigger {
    display: inline-block;
    margin-top: 1rem;
    background-color: var(--sunshine-yellow);
    color: var(--deep-charcoal);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.wonder-window-trigger:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.wonder-window-trigger .fas {
    margin-right: 0.5rem;
}

@media (min-width: 768px) {
    .storybook-page {
        flex-direction: row;
        gap: 3rem;
    }

    .storybook-page.reversed {
        flex-direction: row-reverse;
    }

    .storybook-text-container {
        text-align: left;
    }
}


/* ============================================ */
/* 5. LEARNING PLAYGROUND SECTION (ACADEMICS)   */
/* ============================================ */
.learning-playground {
    /* === UPGRADE: Changed background to a new vibrant color === */
    background-color: var(--purple-majesty);
    padding-top: 80px;
    padding-bottom: 80px;
}

.learning-playground .section-title h2,
.learning-playground .section-title p {
    color: white;
}

.playground-scroller {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding: 1rem 0 2rem 0;
    
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.playground-scroller::-webkit-scrollbar {
    display: none;
}

.playground-card {
    flex: 0 0 250px;
    height: 350px;
    perspective: 1000px;
    cursor: pointer;
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    transition: transform 0.6s ease;
    
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    text-align: center;
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.card-front {
    background-color: var(--off-white);
    color: var(--deep-charcoal);
    transform: rotateY(0deg);
}

.card-front h3 {
    font-family: var(--font-secondary);
    font-size: 1.75rem;
    color: var(--mango-tango);
}

.card-back {
    background-color: var(--sunshine-yellow);
    color: var(--deep-charcoal);
    transform: rotateY(180deg);
}

.playground-card:hover .card-front {
    transform: rotateY(-180deg);
}

.playground-card:hover .card-back {
    transform: rotateY(0deg);
}

@media (min-width: 992px) {
    .playground-scroller {
        flex-wrap: wrap;
        justify-content: center;
        overflow-x: hidden;
    }
}


/* ============================================ */
/* PROJECT BRIGHTSPROUT CSS                     */
/* PART 3: EXTRACURRICULARS & FACULTY SECTIONS  */
/* ============================================ */

/* ============================================ */
/* 6. WORLDS TO EXPLORE (EXTRACURRICULARS)      */
/* ============================================ */

.worlds-to-explore {
    background-color: var(--off-white);
}

.explore-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; 
    gap: 1rem;
}

.grid-item {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    color: white;
    min-height: 250px; /* === UPGRADE: Added min-height for consistency === */
}

.grid-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60%;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
}

.grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.grid-item:hover img {
    transform: scale(1.05);
}

.grid-item h4, .grid-item .wonder-window-trigger {
    position: absolute;
    left: 1rem;
    z-index: 2;
    margin: 0;
}

.grid-item h4 {
    bottom: 3.5rem;
    font-family: var(--font-secondary);
}

.grid-item .wonder-window-trigger {
    bottom: 1rem;
    padding: 0.3rem 0.8rem;
    font-size: 0.8rem;
}

.grid-item:nth-child(1) {
    grid-row: span 2;
}
.grid-item:nth-child(3) {
    grid-column: span 2;
}

@media (min-width: 768px) {
    .explore-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    .grid-item:nth-child(n) {
        grid-row: auto;
        grid-column: auto;
    }
    /* === UPGRADE: Adjusted grid spans for a more balanced layout on desktop === */
    .grid-item:nth-child(1), .grid-item:nth-child(4) {
        grid-row: span 2;
    }
}


/* ============================================ */
/* 7. OUR GUIDING STARS (FACULTY)               */
/* ============================================ */

.guiding-stars {
    background-color: #fff;
}

.faculty-carousel {
    padding-bottom: 50px;
}

.faculty-member {
    text-align: center;
}

.faculty-member img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1rem auto;
    border: 5px solid var(--sky-blue);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.faculty-member h4 {
    margin-bottom: 0.25rem;
    color: var(--deep-charcoal);
}

.faculty-member p {
    font-size: 0.9rem;
    color: #666;
}

.swiper-pagination-bullet {
    background-color: #ccc;
    width: 10px;
    height: 10px;
    opacity: 0.8;
}

.swiper-pagination-bullet-active {
    background-color: var(--mango-tango);
}



/* ============================================ */
/* PROJECT BRIGHTSPROUT CSS                     */
/* PART 4: TIMELINE, CANVAS, & FOOTER SECTIONS  */
/* ============================================ */

/* ============================================ */
/* 8. A DAY IN THE LIFE (TIMELINE)              */
/* ============================================ */
.day-in-the-life {
    background-color: #fff;
}

.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 3px;
    /* === UPGRADE: Changed color to a new vibrant color === */
    background-color: var(--crimson-red);
    top: 0;
    bottom: 0;
    left: 15px;
}

.timeline-item {
    padding: 10px 40px;
    padding-left: 50px;
    position: relative;
}

.timeline-icon {
    position: absolute;
    left: 0;
    top: 20px;
    width: 33px;
    height: 33px;
    /* === UPGRADE: Changed colors to a new vibrant combination === */
    background-color: var(--sunshine-yellow);
    color: var(--deep-charcoal);
    border: 3px solid var(--crimson-red);
    border-radius: 50%;
    z-index: 10;
    
    display: flex;
    justify-content: center;
    align-items: center;
}

.timeline-content h4 {
    color: var(--deep-charcoal);
    margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
    .timeline::after {
        left: 50%;
        margin-left: -1.5px;
    }
    
    .timeline-item {
        padding: 10px 40px;
        width: 50%;
    }
    
    .timeline-icon {
        left: 50%;
        margin-left: -16.5px;
    }

    .timeline-item:nth-child(odd) {
        left: 0;
        padding-right: 60px;
        text-align: right;
    }
    
    .timeline-item:nth-child(even) {
        left: 50%;
        padding-left: 60px;
    }
}

/* ============================================ */
/* 9. COMMUNITY CANVAS (EVENTS)                 */
/* ============================================ */
.community-canvas {
    background-color: var(--off-white);
}

.corkboard {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
}

.cork-item {
    padding: 1rem;
    box-shadow: 5px 5px 15px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cork-item:hover {
    transform: scale(1.05) rotate(0deg) !important;
    box-shadow: 10px 10px 20px rgba(0,0,0,0.3);
    z-index: 20;
}

.polaroid {
    background: #fff;
    padding-bottom: 3rem;
    border: 1px solid #eee;
}
.polaroid img {
    margin-bottom: 0.5rem;
}
.polaroid p {
    text-align: center;
    font-family: var(--font-secondary);
}

.sticky-note {
    /* === UPGRADE: Changed background to a new vibrant color and text to white === */
    background-color: var(--crimson-red);
    color: white;
}

.cork-item:nth-child(1) { transform: rotate(-3deg); }
.cork-item:nth-child(2) { transform: rotate(2deg); }
.cork-item:nth-child(3) { transform: rotate(4deg); }
.cork-item:nth-child(4) { transform: rotate(-1deg); }


/* ============================================ */
/* 10. FOOTER                                   */
/* ============================================ */
#main-footer {
    background-color: var(--deep-charcoal);
    color: var(--off-white);
    padding: 40px 0 0 0;
}

.footer-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: 1fr;
    margin-bottom: 30px;
}

.footer-column h4 {
    font-family: var(--font-secondary);
    color: var(--mango-tango);
    margin-bottom: 1rem;
}

.footer-column ul {
    list-style: none;
}
.footer-column ul li {
    margin-bottom: 0.5rem;
}
.footer-column ul a {
    color: #ccc;
}
.footer-column ul a:hover {
    color: white;
}

/* === UPGRADE: Styles for the new contact info list === */
.footer-column .contact-info a {
    color: #ccc;
}
.footer-column .contact-info i {
    margin-right: 0.5rem;
    color: var(--mango-tango);
}


.social-icons a {
    color: var(--off-white);
    font-size: 1.5rem;
    margin-right: 1rem;
}

.footer-bottom {
    border-top: 1px solid #444;
    padding: 20px 0;
    text-align: center;
    font-size: 0.9rem;
    color: #aaa;
}

@media(min-width: 992px) { /* === UPGRADE: Adjusted breakpoint for 4 columns === */
    .footer-grid {
        /* === UPGRADE: Changed to a 4-column layout for desktop === */
        grid-template-columns: repeat(4, 1fr);
    }
}
/* === Footer Map Styling === */
.footer-column iframe {
    width: 100%;
    height: 220px;
    border: none;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}


/* ============================================ */
/* WONDER WINDOW (MODAL GALLERY) – ADVANCED     */
/* ============================================ */

#wonder-window {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

#wonder-window.active {
    opacity: 1;
    visibility: visible;
}

.wonder-window-content {
    position: relative;
    width: 95%;
    max-width: 1100px;
    height: 85vh;
    transform: scale(0.8) translateY(30px);
    transition: transform 0.4s ease, opacity 0.4s ease;
    opacity: 0;
}

#wonder-window.active .wonder-window-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* === Close Button (glass style) === */
.wonder-window-content .close-btn {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 45px;
    height: 45px;
    background: rgba(255,255,255,0.15);
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    font-size: 2rem;
    color: #fff;
    cursor: pointer;
    z-index: 2001;
    line-height: 42px;
    backdrop-filter: blur(6px);
    transition: all 0.3s ease;
}
.wonder-window-content .close-btn:hover {
    background: rgba(255,255,255,0.35);
    transform: scale(1.15) rotate(90deg);
}

/* === Swiper Slider === */
.wonder-window-slider {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}
.wonder-window-slider .swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(145deg, #111, #222);
}
.wonder-window-slider .swiper-slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    animation: fadeIn 0.8s ease;
}

/* === Navigation Buttons (neon style) === */
.wonder-window-slider .swiper-button-next,
.wonder-window-slider .swiper-button-prev {
    width: 55px;
    height: 55px;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255,255,255,0.25);
    border-radius: 50%;
    color: #fff;
    backdrop-filter: blur(6px);
    transition: all 0.3s ease;
}
.wonder-window-slider .swiper-button-next:hover,
.wonder-window-slider .swiper-button-prev:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.15);
}
.wonder-window-slider .swiper-button-next::after,
.wonder-window-slider .swiper-button-prev::after {
    font-size: 1.5rem;
    font-weight: 700;
}

/* === Fade-in Animation === */
@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* === Loader (centered spinner) === */
.loader {
    position: absolute;
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255,255,255,0.2);
    border-top: 4px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2002;
}
@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* === Mobile Optimizations === */
@media (max-width: 768px) {
    .wonder-window-content {
        width: 100%;
        height: 75vh;
    }
    .wonder-window-slider .swiper-button-next,
    .wonder-window-slider .swiper-button-prev {
        width: 40px;
        height: 40px;
    }
}



.call-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #25d366, #25d366);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 6px 15px rgba(0,0,0,0.3);
    animation: ziggle 1.5s infinite ease-in-out;
    z-index: 3000;
    transition: transform 0.3s ease;
}
.call-btn:hover {
    transform: scale(1.15) rotate(8deg);
}

.call-btn img {
    width: 40px;
    height: 40px;
    border-radius: 50%;  /* make the icon image circular */
    object-fit: cover;
    filter: none;        /* keep original colors */
}

/* 🔥 Ziggle animation */
@keyframes ziggle {
    0%, 100% { transform: translateY(0) rotate(0); }
    20% { transform: translateY(-4px) rotate(-5deg); }
    40% { transform: translateY(4px) rotate(5deg); }
    60% { transform: translateY(-3px) rotate(-3deg); }
    80% { transform: translateY(2px) rotate(3deg); }
}