/* Responsive Breakpoints Adjustments Stylesheet */

/* --- TABLETS / SMALL LAPTOPS (992px and down) --- */
@media (max-width: 992px) {
    .section-spacing {
        padding: 70px 0;
    }

    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .grid-3, .facilities-grid, .vision-mission-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .grid-2 {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    /* Hero Responsive Shift */
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

    .hero-content-left {
        order: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-btn-row {
        justify-content: center;
    }

    .hero-features-strip {
        max-width: 550px;
        width: 100%;
    }

    .hero-visual-right {
        order: 2;
        height: 420px;
    }

    .hero-badge-estd {
        left: 15%;
    }

    /* Statistics Strip */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    /* About Collage */
    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-img-collage {
        height: 380px;
        max-width: 550px;
        margin: 0 auto;
        width: 100%;
    }

    .chief-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

    .chief-img-frame {
        max-width: 320px;
        margin: 0 auto;
        height: 350px;
    }

    /* Details layout */
    .details-layout,
    .event-details-layout,
    .instructor-details-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .instructor-details-left {
        position: relative;
        top: 0;
    }

    .instructor-details-img {
        max-width: 320px;
        margin: 0 auto 24px;
        height: 400px;
    }

    /* Admission banner */
    .admission-banner-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 30px;
    }

    .admission-banner-left {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .admission-banner-btns {
        justify-content: center;
    }

    .admission-banner-right {
        height: 250px;
    }

    /* Footer widgets */
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }
}

/* --- LARGE MOBILE / PHONES (768px and down) --- */
@media (max-width: 768px) {
    .section-header {
        margin-bottom: 40px;
    }

    /* Table Schedule to Card transformation */
    .table-responsive-wrapper {
        display: none; /* Hide standard table */
    }

    .schedule-mobile-cards {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    .schedule-day-block {
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: var(--border-radius);
        padding: 20px;
        box-shadow: var(--shadow-soft);
    }

    .schedule-day-title {
        font-size: 16px;
        font-weight: 700;
        color: var(--primary-red);
        border-bottom: 2px solid var(--border);
        padding-bottom: 8px;
        margin-bottom: 15px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .schedule-card-item {
        display: flex;
        flex-direction: column;
        gap: 8px;
        background: var(--background);
        border: 1px solid var(--border);
        padding: 12px 16px;
        border-radius: var(--border-radius-sm);
        margin-bottom: 12px;
    }

    .schedule-card-item:last-child {
        margin-bottom: 0;
    }

    .schedule-card-time {
        font-weight: 700;
        font-size: 13px;
        color: var(--navy);
    }

    .schedule-card-details {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .schedule-card-name {
        font-weight: 700;
        font-size: 15px;
        color: var(--navy-light);
    }

    .schedule-card-instructor {
        font-size: 12px;
        color: var(--muted-text);
        font-weight: 500;
    }

    /* Timeline columns collapse */
    .timeline-container::before {
        left: 30px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 60px;
        padding-right: 0;
        text-align: left !important;
    }

    .timeline-item-right {
        left: 0;
    }

    .timeline-dot {
        left: 21px !important;
        right: auto !important;
    }

    .benefits-bullet-list {
        grid-template-columns: 1fr;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .form-grid-3 {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .event-card {
        flex-direction: column;
    }

    .event-card-img-wrapper {
        width: 100%;
        height: 200px;
    }

    /* Founder and coach cards responsive styling */
    .founder-grid {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
        text-align: center !important;
    }

    .coach-bio-card {
        grid-template-columns: 1fr !important;
        gap: 25px !important;
        padding: 20px !important;
    }
}

/* --- SMALL MOBILE / PHONES (576px and down) --- */
@media (max-width: 576px) {
    .section-spacing {
        padding: 50px 0;
    }

    .grid-4, .grid-3 {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .hero-features-strip {
        grid-template-columns: 1fr;
    }

    .hero-btn-row {
        flex-direction: column;
        width: 100%;
    }

    .hero-btn-row .btn {
        width: 100%;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .about-checklist {
        grid-template-columns: 1fr;
    }

    .values-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .details-highlights-grid {
        grid-template-columns: 1fr;
    }

    .event-meta-info-strip {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* --- SMALL PHONES (420px and down) --- */
@media (max-width: 420px) {
    .hero-badge-estd {
        left: 5%;
        right: 5%;
        width: 90%;
        justify-content: center;
    }

    .values-grid {
        grid-template-columns: 1fr;
    }
}

/* --- MOBILE HORIZONTAL SWIPE CARDS (576px and down) --- */
@media (max-width: 576px) {
    /* Convert grid containers to swipable row containers */
    .grid-4, 
    .grid-3, 
    .grid-2, 
    .instructor-grid, 
    .gallery-grid, 
    .masonry-grid, 
    .timetable-mobile-scroller,
    .schedule-mobile-cards,
    .facilities-grid,
    .vision-mission-row {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        scroll-snap-type: x mandatory !important;
        -webkit-overflow-scrolling: touch !important;
        gap: 20px !important;
        padding: 10px 10px 20px 10px !important; /* space for shadows and scrollbar */
        margin-left: -15px !important;
        margin-right: -15px !important;
        scroll-padding: 15px !important;
    }

    /* Style the horizontal scrollbars to be modern & thin */
    .grid-4::-webkit-scrollbar, 
    .grid-3::-webkit-scrollbar, 
    .grid-2::-webkit-scrollbar,
    .instructor-grid::-webkit-scrollbar,
    .gallery-grid::-webkit-scrollbar,
    .masonry-grid::-webkit-scrollbar,
    .timetable-mobile-scroller::-webkit-scrollbar,
    .schedule-mobile-cards::-webkit-scrollbar,
    .facilities-grid::-webkit-scrollbar,
    .vision-mission-row::-webkit-scrollbar {
        height: 5px !important;
    }
    .grid-4::-webkit-scrollbar-track, 
    .grid-3::-webkit-scrollbar-track, 
    .grid-2::-webkit-scrollbar-track,
    .instructor-grid::-webkit-scrollbar-track,
    .gallery-grid::-webkit-scrollbar-track,
    .masonry-grid::-webkit-scrollbar-track,
    .timetable-mobile-scroller::-webkit-scrollbar-track,
    .schedule-mobile-cards::-webkit-scrollbar-track,
    .facilities-grid::-webkit-scrollbar-track,
    .vision-mission-row::-webkit-scrollbar-track {
        background: rgba(15, 23, 42, 0.05) !important;
        border-radius: 10px !important;
    }
    .grid-4::-webkit-scrollbar-thumb, 
    .grid-3::-webkit-scrollbar-thumb, 
    .grid-2::-webkit-scrollbar-thumb,
    .instructor-grid::-webkit-scrollbar-thumb,
    .gallery-grid::-webkit-scrollbar-thumb,
    .masonry-grid::-webkit-scrollbar-thumb,
    .timetable-mobile-scroller::-webkit-scrollbar-thumb,
    .schedule-mobile-cards::-webkit-scrollbar-thumb,
    .facilities-grid::-webkit-scrollbar-thumb,
    .vision-mission-row::-webkit-scrollbar-thumb {
        background: var(--primary-red, #e63946) !important;
        border-radius: 10px !important;
    }

    /* Force children to occupy full viewport width minus offset and snap-align */
    .grid-4 > *, 
    .grid-3 > *, 
    .grid-2 > *,
    .instructor-grid > *,
    .gallery-grid > *,
    .masonry-grid > *,
    .timetable-mobile-scroller > *,
    .schedule-mobile-cards > *,
    .facilities-grid > *,
    .vision-mission-row > * {
        flex: 0 0 calc(100% - 30px) !important;
        width: calc(100% - 30px) !important;
        max-width: calc(100% - 30px) !important;
        scroll-snap-align: center !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }
}
