/* ==========================================================================
   VMTTI Ultra-Modern Responsive Stylesheet
   Project: Vivekananda Montessori Teachers Training Institute
   Fully optimized for Mobile (<= 576px), Tablet (577px - 991px), and Desktop
   ========================================================================== */

/* Prevent horizontal overflow across entire website on all viewports */
html, body {
    max-width: 100vw;
    overflow-x: hidden !important;
}

/* --------------------------------------------------------------------------
   1. Large Devices & Desktops (max-width: 1200px)
   -------------------------------------------------------------------------- */
@media (max-width: 1200px) {
    .main-navbar .navbar-nav .nav-link {
        padding: 6px 7px !important;
        font-size: 0.82rem;
    }
}

/* --------------------------------------------------------------------------
   2. Tablets & Mobile Landscape (max-width: 991.98px)
   -------------------------------------------------------------------------- */
@media (max-width: 991.98px) {
    /* Main Navbar Drawer */
    .main-navbar {
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }

    .main-navbar .navbar-brand img {
        height: 40px;
        max-height: 40px;
    }

    .navbar-collapse {
        background: #FFFFFF;
        box-shadow: 0 16px 40px rgba(0, 0, 0, 0.15);
        padding: 20px;
        border-radius: 16px;
        margin-top: 14px;
        border: 1px solid rgba(74, 14, 23, 0.1);
        max-height: 80vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .main-navbar .navbar-nav {
        gap: 4px;
    }

    .main-navbar .navbar-nav .nav-link {
        padding: 10px 14px !important;
        font-size: 0.95rem;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .main-navbar .navbar-nav .nav-link:hover,
    .main-navbar .navbar-nav .nav-link.active {
        background-color: rgba(74, 14, 23, 0.06);
        color: var(--primary-navy) !important;
    }

    /* Mobile Dropdown Menus */
    .main-navbar .dropdown-menu {
        border: 1px solid rgba(0, 0, 0, 0.08) !important;
        background-color: #FAF7F2;
        border-radius: 10px !important;
        box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.04) !important;
        padding: 8px !important;
        margin: 6px 0 10px 0 !important;
        position: static !important;
        float: none !important;
        width: 100% !important;
    }

    .main-navbar .dropdown-item {
        padding: 10px 14px !important;
        font-size: 0.88rem !important;
        border-radius: 6px;
    }

    .main-navbar .dropdown-item:hover {
        background-color: #FFFFFF !important;
        padding-left: 18px !important;
    }

    .navbar-btn {
        width: 100% !important;
        height: 44px !important;
        font-size: 0.95rem !important;
        margin-top: 8px;
        display: flex !important;
        align-items: center;
        justify-content: center;
    }

    /* Modern Hero Carousel for Tablets */
    .modern-hero-carousel .carousel-inner {
        min-height: auto;
    }

    .modern-hero-slide {
        min-height: 520px;
    }

    .hero-slide-content {
        padding: 10px 0 !important;
        margin: 10px 0;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
    }

    .hero-main-heading {
        font-size: 2.2rem !important;
        line-height: 1.22;
    }

    .hero-subtext {
        font-size: 0.95rem !important;
        margin-bottom: 20px;
    }

    /* Floating Cards in About Section */
    .about-floating-card {
        padding: 8px 14px;
        bottom: 10px;
        right: 10px;
    }

    /* Play School Card */
    .play-school-lux-card {
        padding: 28px 20px !important;
    }
}

/* --------------------------------------------------------------------------
   3. Small Devices & Smartphones (max-width: 767.98px)
   -------------------------------------------------------------------------- */
@media (max-width: 767.98px) {
    /* Sections Global Spacing */
    section {
        padding: 40px 0 !important;
    }

    .section-title {
        font-size: 1.65rem !important;
        line-height: 1.28;
    }

    .section-badge {
        font-size: 0.72rem;
        letter-spacing: 1px;
    }

    /* Top Announcement Ticker Bar */
    .announcement-ticker-bar {
        padding: 6px 0;
        font-size: 0.78rem;
    }

    .ticker-badge {
        font-size: 0.68rem;
        padding: 3px 8px;
        letter-spacing: 0.5px;
    }

    .ticker-all-link {
        font-size: 0.72rem;
        padding: 3px 8px;
    }

    /* Hero Carousel on Mobile Phones */
    .modern-hero-carousel .carousel-inner {
        min-height: auto !important;
    }

    .modern-hero-slide {
        min-height: 480px;
        display: flex;
        align-items: center;
    }

    .modern-hero-slide > img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover !important;
    }

    .hero-gradient-overlay {
        background: linear-gradient(180deg, transparent 0%, rgba(10, 2, 4, 0.25) 50%, rgba(10, 2, 4, 0.7) 100%) !important;
    }

    /* Natural flow on small screens */
    .modern-hero-slide .position-absolute.top-50.translate-middle-y {
        position: relative !important;
        top: auto !important;
        transform: none !important;
        padding: 35px 0 45px !important;
    }

    .hero-slide-content {
        padding: 10px 0 !important;
        margin: 0 auto;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        text-align: left;
    }

    .hero-gold-badge {
        font-size: 0.68rem !important;
        padding: 5px 12px !important;
        letter-spacing: 0.8px !important;
        margin-bottom: 12px !important;
    }

    .hero-main-heading {
        font-size: 1.65rem !important;
        line-height: 1.25 !important;
        margin-bottom: 12px !important;
    }

    .hero-subtext {
        font-size: 0.86rem !important;
        line-height: 1.55 !important;
        margin-bottom: 16px !important;
    }

    .hero-tags-row {
        gap: 6px !important;
        margin-bottom: 20px !important;
    }

    .hero-tag-item {
        font-size: 0.74rem !important;
        padding: 4px 10px !important;
    }

    .btn-hero-gold, .btn-hero-glass {
        width: 100% !important;
        justify-content: center !important;
        padding: 10px 18px !important;
        font-size: 0.88rem !important;
    }

    /* Metrics Section */
    .metrics-section {
        padding: 25px 0 !important;
    }

    .metric-box-luxury {
        padding: 14px !important;
        border-radius: 12px;
    }

    .metric-icon-wrap {
        width: 44px;
        height: 44px;
        min-width: 44px;
        font-size: 1.15rem;
    }

    .metric-box-luxury h4 {
        font-size: 0.95rem;
    }

    /* About Section */
    .about-image-stack {
        border-radius: 14px;
        box-shadow: 0 10px 25px rgba(74, 14, 23, 0.08);
    }

    .about-check-grid {
        grid-template-columns: 1fr !important;
        gap: 8px;
    }

    .about-check-item {
        font-size: 0.82rem;
        padding: 8px 12px;
    }

    /* Courses Category Filter Tabs - Horizontal Smooth Scroll on Mobile */
    .filter-tabs {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 12px;
        justify-content: flex-start !important;
        gap: 8px;
        scrollbar-width: none;
    }

    .filter-tabs::-webkit-scrollbar {
        display: none;
    }

    .filter-tab {
        flex-shrink: 0;
        white-space: nowrap;
        padding: 6px 14px !important;
        font-size: 0.82rem !important;
        border-radius: 20px;
    }

    /* Play School Image Grid on Mobile */
    .play-school-lux-card .col-lg-6:last-child {
        margin-top: 25px;
    }

    .play-school-lux-card img {
        height: 160px !important;
    }

    /* Responsive Tables */
    .table-responsive {
        border-radius: 8px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Footer Mobile Adjustments */
    .footer-section {
        padding: 40px 0 20px !important;
    }

    .footer-section h4 {
        margin-top: 15px;
        font-size: 1rem;
    }

    .footer-bottom {
        text-align: center;
        padding-top: 20px;
    }
}

/* --------------------------------------------------------------------------
   4. Extra Small Smartphones (max-width: 480px)
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
    /* Brand Logo and Title in Header */
    .main-navbar .navbar-brand img {
        height: 36px;
        max-height: 36px;
    }

    .navbar-brand-text span:first-child {
        font-size: 1.05rem !important;
        line-height: 1.1;
    }

    .navbar-brand-subtitle {
        font-size: 0.52rem !important;
        letter-spacing: 0.2px;
    }

    /* Hero Heading */
    .hero-main-heading {
        font-size: 1.45rem !important;
    }

    /* Service Hub Grid */
    .service-hub-card {
        padding: 18px 14px;
    }

    .service-hub-icon {
        width: 50px;
        height: 50px;
        font-size: 1.35rem;
        margin-bottom: 10px;
    }

    /* Button full width helper */
    .btn-premium, .btn-outline-premium {
        width: 100%;
        text-align: center;
    }
}
