/* ==========================================================================
   MOBILE & TABLET RESPONSIVE STYLES (GENIAL LAUREL SCHOOL)
   ========================================================================== */

/* Base Reset & Prevent Horizontal Scroll */
html, body {
    overflow-x: hidden;
    width: 100%;
}

img, video {
    max-width: 100%;
    height: auto;
}

/* --------------------------------------------------------------------------
   Header & Mobile Navigation Toggle
   -------------------------------------------------------------------------- */
.mobile-toggle {
    display: none;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-color, #0f2b5c);
    cursor: pointer;
    z-index: 1001;
}

/* --------------------------------------------------------------------------
   Tablet & Mobile Breakpoint (Max Width: 992px)
   -------------------------------------------------------------------------- */
@media screen and (max-width: 992px) {
    /* Hide Top Bar on Smaller Screens for Clean Layout */
    .top-bar {
        display: none;
    }

    header .container {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 12px 20px;
    }

    .mobile-toggle {
        display: block;
    }

    /* Off-Canvas Navigation Drawer */
    header nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background-color: #ffffff;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.15);
        padding: 80px 25px 30px;
        transition: right 0.4s ease-in-out;
        z-index: 1000;
    }

    header nav.nav-active {
        right: 0;
    }

    header nav ul {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
    }

    header nav ul li a {
        font-size: 1.1rem;
        font-weight: 600;
        color: #333;
    }

    /* Header Action Button Hide/Restructure */
    header .btn-admission {
        display: none;
    }

    /* Hero Section Responsive */
    .hero {
        min-height: 80vh;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        padding: 60px 20px;
    }

    .hero-content h1 {
        font-size: 2.5rem;
        line-height: 1.2;
    }

    .hero-content p {
        font-size: 1rem;
        margin: 15px 0 25px;
    }

    /* Grid Layout Conversions to Single/Double Column */
    .welcome-container,
    .ecosystem-container,
    .founder-container,
    .contact-wrapper,
    .location-container {
        grid-template-columns: 1fr !important;
        flex-direction: column;
        gap: 30px;
    }

    /* Multi-card Grids Optimization */
    .cards,
    .dashboard-grid,
    .life-grid,
    .environment-grid,
    .governance-grid,
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)) !important;
        gap: 20px;
    }

    .testimonial-container {
        grid-template-columns: 1fr !important;
    }
}

/* --------------------------------------------------------------------------
   Mobile Phones Breakpoint (Max Width: 576px)
   -------------------------------------------------------------------------- */
@media screen and (max-width: 576px) {
    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-content .btn-primary,
    .hero-content .btn-secondary {
        width: 100%;
        margin-bottom: 10px;
        text-align: center;
    }

    .cta-buttons {
        flex-direction: column;
        gap: 12px;
    }

    .cta-buttons a {
        width: 100%;
        text-align: center;
    }

    .gallery-filter {
        display: flex;
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 10px;
        gap: 8px;
    }

    .gallery-filter button {
        flex: 0 0 auto;
        padding: 8px 16px;
    }

    /* Footer Layout Stack */
    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 30px;
    }
}