/* ==========================================
   STRICT OVERFLOW CONTROL
   ========================================== */
html, body {
    overflow-x: hidden !important;
    max-width: 100vw;
    width: 100%;
    position: relative;
    margin: 0;
    padding: 0;
}

@media (max-width: 768px) {
    /* Strip away stray margins on full-width mobile buttons */
    .hero-buttons .btn {
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100%;
    }
}



/* Responsive Design */
@media (max-width: 1200px) {
    .hero-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 992px) {
    .hero-section {
        padding: 120px 0 60px;
    }
    
    .hero-title {
        font-size: 2.25rem;
    }
    
    .section-padding {
        padding: 60px 0;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .cta-content h2 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .hero-buttons .btn {
        width: 100%;
        text-align: center;
    }
    
    .footer {
        padding: 40px 0 20px;
    }
    
    .footer > .row > div {
        margin-bottom: 2rem;
    }
    
    .footer > .row > div:last-child {
        margin-bottom: 0;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section-header h2 {
        font-size: 1.75rem;
    }
    
    .detail-item {
        flex-direction: column;
        text-align: center;
    }
    
    .detail-item i {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
    
    .indicator {
        flex-direction: column;
        text-align: center;
    }
    
    .indicator-icon {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .btn-nav {
        margin-left: 0;
        margin-top: 0.5rem;
        width: 100%;
        text-align: center;
    }
}

/* Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Print Styles */
@media print {
    .navbar,
    .hero-buttons,
    .cta-section,
    .footer {
        display: none;
    }
    
    body {
        color: black;
    }
}

/* ==========================================
   MOBILE FIXES FOR INFINITY EDUTECH
   ========================================== */

/* Fix Mobile Navigation Menu Background & Spacing */
@media (max-width: 991px) {
    .navbar-collapse {
        background: #0f172a; 
        padding: 1rem;
        border-radius: 10px;
        margin-top: 15px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    }
    
    .navbar-nav .nav-item {
        margin-bottom: 10px;
        text-align: center;
    }
    
    .navbar-nav .btn-nav {
        width: 100%;
        margin-left: 0 !important;
        margin-top: 10px;
        display: block;
    }
}

/* Stop Horizontal Overflow & Auto-Scaling on Mobile */
@media (max-width: 768px) {
    /* Scale down massive text */
    .hero-title, .web-header h2 { 
        font-size: 28px !important; 
    }
    
    .main-title, .section-header h2 { 
        font-size: 24px !important; 
    }
    
    .price-tag { 
        font-size: 28px !important; 
    }
    
    /* Fix the Enroll bars breaking the screen width */
    .enroll-bar, .enroll-bar1 {
        padding: 15px !important;
        border-radius: 20px !important;
        text-align: center;
        justify-content: center !important;
        flex-direction: column;
    }
    
    .enroll-bar span, .enroll-bar1 span {
        font-size: 16px !important;
        display: block;
        width: 100%;
        text-align: center;
    }
    
    .btn-web, .enroll-bar1 .btn-nav {
        width: 100%;
        padding: 12px 20px !important;
        margin: 10px 0 0 0 !important;
    }
    
    /* Ensure the sub-nav scrolls smoothly without breaking layout */
    .course-sub-nav .sub-nav-list {
        flex-wrap: nowrap;
        padding-bottom: 10px;
    }
}