/* RESPONSIVE BREAKPOINT */
@media (max-width: 992px) {
    .hide-mobile {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: rgba(10, 15, 30, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: flex-start;
        padding: 40px;
        gap: 25px;
        transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        border-left: 1px solid var(--glass-border);
    }

    .nav-links.active {
        right: 0;
    }

    .mobile-only-header {
        display: flex;
        width: 100%;
        justify-content: space-between;
        color: var(--accent-color);
        font-weight: 700;
        margin-bottom: 20px;
    }

    .mobile-only-btn {
        display: block;
        width: 100%;
        margin-top: 20px;
    }

    .mobile-only-btn .btn-portal {
        width: 100%;
    }

    .nav-links a {
        font-size: 1.1rem;
        width: 100%;
    }
}

/* ++++++++++ Main-Section +++++++++ */
@media (max-width: 768px) {
    .hero-slider {
        height: 90vh;
        /* Shorter for mobile to show more of next section */
    }

    .swiper-slide {
        background-size: contain;
        background-repeat: repeat;
    }

    .slide-overlay {
        padding: 0 20px;
        align-items: flex-end;
        /* Card sits at bottom on mobile */
        padding-bottom: 60px;
    }

    .glass-card {
        padding: 25px;
        border-radius: 15px;
    }

    .glass-card h1 {
        font-size: 2rem;
    }

    .glass-card p {
        font-size: 0.9rem;
    }
}

/* ++++++++++ About-Section +++++++++ */
@media (max-width: 992px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 60px;
        text-align: center;
    }

    .main-img-container {
        transform: rotate(0);
    }

    .floating-glass-stat {
        right: 60%;
        width: 50%;
        transform: translateX(50%);
        bottom: -20px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        /* 2x2 layout for mobile */
    }

    .stat-item:last-child {
        grid-column: span 2;
    }
}

/* ++++++++++ Vission-Section +++++++++ */
@media (max-width: 992px) {
    .vmv-grid {
        grid-template-columns: 1fr;
        /* Stacked cards */
        padding: 0 10px;
    }

    .vmv-card {
        padding: 40px 25px;
    }

    .section-title {
        font-size: 2rem;
    }
}

/* ++++++++++ Academic-Section +++++++++ */
@media (max-width: 992px) {
    .bento-grid {
        grid-template-columns: 1fr;
        /* Single column */
        grid-template-rows: auto;
        /* Let height adjust to content */
    }

    .teaching-quality,
    .legacy-trust {
        grid-column: span 1;
    }

    .bento-item {
        padding: 30px;
    }

    .section-title {
        font-size: 1.8rem;
    }
}

/* ++++++++++ Gallery-Section +++++++++ */
@media (max-width: 992px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 150px;
    }

    .gallery-item.large {
        grid-column: span 2;
    }
}

@media (max-width: 500px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 250px;
    }

    .gallery-item.large,
    .gallery-item.tall {
        grid-column: span 1;
        grid-row: span 1;
    }
}

/* ++++++++++ Admission-Section +++++++++ */
@media (max-width: 992px) {
    .admission-wrapper {
        padding: 40px 20px;
        margin: 0 15px;
    }

    .admission-steps {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .step-num {
        font-size: 2.5rem;
    }

    .admission-actions {
        flex-direction: column;
    }

    .admission-actions button {
        width: 100%;
    }
}

/* ++++++++++ AdmissionForm-Section +++++++++ */
/* --- ADMISSION MODAL RESPONSIVE --- */
@media (max-width: 768px) {
    .glass-modal {
        padding: 25px 20px;
        width: 95%;
        max-height: 85vh;
        border-radius: 20px;
    }

    .modal-header h3 {
        font-size: 1.1rem;
    }

    /* Change Grid to Single Column */
    .form-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    /* Make all groups span full width */
    .input-group.full,
    .input-group {
        grid-column: span 1;
    }

    /* Adjust typography for mobile readability */
    .input-group label {
        font-size: 0.8rem;
    }

    .input-group input,
    .input-group select,
    .input-group textarea {
        padding: 10px;
        font-size: 0.9rem;
    }

    /* Sticky-like navigation for mobile */
    .form-nav {
        margin-top: 30px;
        gap: 10px;
    }

    .form-nav button {
        flex: 1;
        /* Buttons take equal width */
        padding: 12px 10px;
        font-size: 0.85rem;
    }

    /* Ensure the step indicator is visible */
    .step-indicator {
        text-align: center;
        width: 100%;
    }

    /* Declaration box needs more space on mobile */
    .declaration-box {
        font-size: 0.85rem;
        line-height: 1.4;
    }
}

/* Small heights (landscape phones) */
@media (max-height: 500px) {
    .glass-modal {
        max-height: 95vh;
    }

    .form-grid {
        gap: 10px;
    }
}

@media (max-width: 768px) {
    .glass-modal {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
        padding: 20px;
        overflow-y: auto;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-nav {
        padding-bottom: 40px;
    }
}
/* ++++++++++ Founder-Section +++++++++ */
@media (max-width: 992px) {
    .founder-wrapper {
        flex-direction: column;
        text-align: center;
        padding: 30px;
    }
    .founder-image img {
        width: 100%;
        height: auto;
        max-width: 300px;
    }
    .teacher-card {
        flex: 1 1 100%; /* On mobile, every teacher gets a full row */
        height: 870px;
    }
    .desk{
        display: none;
    }
    .mobl{
        display: inline-block;
        width: 70%;
    }
}
/* ++++++++++ Excellence-Section +++++++++ */
@media (max-width: 992px) {
    .excellence-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
        gap: 25px;
        margin-top: 50px;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ++++++++++ Stats-Section +++++++++ */
@media (max-width: 580px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-card h2 {
        font-size: 2.5rem;
    }
}

/* ++++++++++ Contact-Section +++++++++ */
/* --- FIX FOR OUT OF BOUNDARY --- */
@media (max-width: 768px) {
    .contact-section .container {
        padding: 0 15px;
        /* Ensure space on sides */
        overflow-x: hidden;
    }

    .contact-wrapper {
        display: flex;
        flex-direction: column;
        gap: 20px;
        width: 100%;
    }

    /* Force the map to stay inside */
    .map-container {
        width: 100%;
        height: 300px;
        /* Smaller height for mobile */
        margin: 0 auto;
        border-radius: 20px;
    }

    /* Force Info Cards to stay inside */
    .info-glass-card {
        width: 100%;
        margin-right: 0;
        margin-left: 0;
        padding: 20px;
        word-wrap: break-word;
        /* Prevents long emails from breaking boundary */
    }

    .info-glass-card p {
        font-size: 0.85rem;
        max-width: 200px;
        /* Limits text width so it doesn't push the card wide */
    }

    .youtube-glass-card {
        width: 100%;
    }
}