/* Critical Mobile CSS Overrides for Banner, Header, Footer */
/* This file contains !important overrides to fix mobile issues */

/* Prevent horizontal scrolling on all mobile devices */
html, body {
    overflow-x: hidden !important;
    width: 100% !important;
    position: relative !important;
}

/* Mobile Banner Critical Fixes */
@media (max-width: 991.98px) {
    /* Hero Section Container */
    .hero-section {
        position: relative !important;
        width: 100% !important;
        min-height: 70vh !important;
        height: auto !important;
        padding: 60px 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    /* Video Banner Specific */
    .hero-section.video-banner {
        height: 70vh !important;
        min-height: 400px !important;
        padding: 0 !important;
        overflow: hidden !important;
    }
    
    /* Hero Content */
    .hero-content {
        position: relative !important;
        z-index: 10 !important;
        text-align: center !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 20px !important;
        margin: 0 auto !important;
    }
    
    /* YouTube Embed Sizing */
    .youtube-fullsize-embed {
        position: absolute !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        width: 100vw !important;
        height: 56.25vw !important;
        min-height: 70vh !important;
        min-width: 177.78vh !important;
        border: none !important;
        z-index: 1 !important;
    }
    
    /* Container in Video Banners */
    .youtube-banner .container,
    .video-banner .container {
        position: absolute !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        z-index: 10 !important;
        width: 100% !important;
        padding: 0 20px !important;
        margin: 0 !important;
    }
    
    /* Typography Fixes */
    .hero-content h1 {
        font-size: 2rem !important;
        line-height: 1.2 !important;
        margin-bottom: 1rem !important;
        font-weight: 700 !important;
        text-shadow: 2px 2px 4px rgba(0,0,0,0.8) !important;
    }
    
    .hero-content h2 {
        font-size: 1.8rem !important;
        line-height: 1.3 !important;
        margin-bottom: 1rem !important;
        font-weight: 700 !important;
        text-shadow: 2px 2px 4px rgba(0,0,0,0.8) !important;
    }
    
    .hero-content h3 {
        font-size: 1.4rem !important;
        line-height: 1.3 !important;
        margin-bottom: 1rem !important;
        text-shadow: 2px 2px 4px rgba(0,0,0,0.8) !important;
    }
    
    .hero-content p {
        font-size: 1rem !important;
        line-height: 1.5 !important;
        margin-bottom: 1.5rem !important;
        text-shadow: 1px 1px 2px rgba(0,0,0,0.8) !important;
    }
}

/* Tablet Portrait */
@media (max-width: 767.98px) {
    .hero-section {
        min-height: 60vh !important;
        padding: 50px 0 !important;
    }
    
    .hero-section.video-banner {
        height: 60vh !important;
        min-height: 350px !important;
    }
    
    .hero-content h1 {
        font-size: 1.7rem !important;
    }
    
    .hero-content h2 {
        font-size: 1.5rem !important;
    }
    
    .hero-content h3 {
        font-size: 1.2rem !important;
    }
    
    .hero-content p {
        font-size: 0.95rem !important;
    }
}

/* Mobile Phone */
@media (max-width: 575.98px) {
    .hero-section {
        min-height: 50vh !important;
        padding: 40px 0 !important;
    }
    
    .hero-section.video-banner {
        height: 50vh !important;
        min-height: 300px !important;
    }
    
    .hero-content {
        padding: 0 15px !important;
    }
    
    .hero-content h1 {
        font-size: 1.5rem !important;
        margin-bottom: 0.8rem !important;
    }
    
    .hero-content h2 {
        font-size: 1.3rem !important;
        margin-bottom: 0.8rem !important;
    }
    
    .hero-content h3 {
        font-size: 1.1rem !important;
        margin-bottom: 0.8rem !important;
    }
    
    .hero-content p {
        font-size: 0.9rem !important;
        margin-bottom: 1.2rem !important;
    }
    
    .hero-content .btn {
        font-size: 0.9rem !important;
        padding: 8px 16px !important;
        margin: 0.5rem auto !important;
        display: block !important;
        width: 80% !important;
        max-width: 200px !important;
    }
    
    .hero-content .btn-warning {
        width: auto !important;
        display: inline-block !important;
        margin: 0 auto 1rem auto !important;
        padding: 6px 12px !important;
        font-size: 0.8rem !important;
    }
}

/* Mobile Header Critical Fixes */
@media (max-width: 991.98px) {
    /* Navbar Structure */
    .navbar {
        padding: 0.5rem 0 !important;
        min-height: 70px !important;
        position: relative !important;
    }
    
    /* Brand Container */
    .navbar-brand {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: calc(100% - 60px) !important;
        margin: 0 !important;
        padding: 0.5rem 0 !important;
        flex-wrap: nowrap !important;
        position: relative !important;
    }
    
    /* Mobile Toggle Button */
    .navbar-toggler {
        position: absolute !important;
        right: 15px !important;
        top: 15px !important;
        z-index: 1051 !important;
        border: 2px solid rgba(255, 255, 255, 0.5) !important;
        background-color: rgba(255, 255, 255, 0.1) !important;
        padding: 0.375rem 0.5rem !important;
        border-radius: 0.375rem !important;
        backdrop-filter: blur(10px) !important;
    }
    
    .navbar-toggler:focus {
        box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.25) !important;
        outline: none !important;
    }
    
    /* Navigation Collapse */
    .navbar-collapse {
        margin-top: 15px !important;
        padding: 1rem 0 !important;
        text-align: center !important;
        background-color: rgba(25, 135, 84, 0.95) !important;
        border-radius: 0.5rem !important;
        backdrop-filter: blur(10px) !important;
    }
    
    .navbar-nav {
        width: 100% !important;
        text-align: center !important;
    }
    
    .nav-item {
        margin: 0.25rem 0 !important;
        width: 100% !important;
    }
    
    .nav-link {
        padding: 0.75rem 1rem !important;
        font-size: 1rem !important;
        font-weight: 500 !important;
        color: #fff !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
        min-height: 44px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .nav-link:hover,
    .nav-link:focus {
        background-color: rgba(255, 255, 255, 0.1) !important;
        color: #fff !important;
    }
}

/* Mobile Footer Critical Fixes */
@media (max-width: 991.98px) {
    footer {
        padding: 3rem 0 2rem 0 !important;
        text-align: center !important;
    }
    
    footer .container {
        padding: 0 15px !important;
    }
    
    footer .row {
        text-align: center !important;
    }
    
    footer .col-md-4 {
        margin-bottom: 2rem !important;
        text-align: center !important;
    }
    
    footer h4,
    footer h5 {
        margin-bottom: 1.5rem !important;
        text-align: center !important;
    }
    
    footer p {
        font-size: 0.95rem !important;
        line-height: 1.6 !important;
        margin-bottom: 1rem !important;
        text-align: center !important;
    }
    
    .footer-links {
        text-align: center !important;
    }
    
    .footer-links li {
        margin-bottom: 0.75rem !important;
        text-align: center !important;
    }
    
    .footer-links a {
        font-size: 1rem !important;
        padding: 0.5rem 0 !important;
        display: block !important;
        text-align: center !important;
    }
    
    .social-icons {
        margin-bottom: 2rem !important;
        text-align: center !important;
        display: flex !important;
        justify-content: center !important;
        flex-wrap: wrap !important;
    }
    
    .social-icons a {
        margin: 0 1rem 1rem 0 !important;
        font-size: 1.5rem !important;
        text-decoration: none !important;
    }
    
    .newsletter-block {
        max-width: 300px !important;
        margin: 0 auto !important;
        text-align: center !important;
    }
    
    .newsletter-block .input-group {
        margin-bottom: 1rem !important;
        justify-content: center !important;
    }
    
    .nabh-logo {
        height: 40px !important;
        width: auto !important;
        display: inline-block !important;
    }
}

/* Small Mobile Phones */
@media (max-width: 575.98px) {
    footer {
        padding: 2rem 0 1rem 0 !important;
    }
    
    footer .container {
        padding: 0 10px !important;
    }
    
    footer .col-md-4 {
        margin-bottom: 2rem !important;
    }
    
    footer h4 {
        font-size: 1.1rem !important;
        margin-bottom: 1rem !important;
    }
    
    footer p {
        font-size: 0.9rem !important;
    }
    
    .social-icons a {
        margin: 0 0.5rem 0.8rem 0 !important;
        font-size: 1.3rem !important;
    }
    
    .newsletter-block {
        max-width: 280px !important;
    }
    
    .navbar-brand img {
        height: 45px !important;
    }
    
    .govind-ayurveda-brand {
        font-size: 1.1rem !important;
        margin: 0 4px !important;
    }
}

/* Ultra Small Devices */
@media (max-width: 320px) {
    .hero-content {
        padding: 0 10px !important;
    }
    
    .hero-content h1 {
        font-size: 1.3rem !important;
    }
    
    .hero-content h2 {
        font-size: 1.2rem !important;
    }
    
    .hero-content p {
        font-size: 0.85rem !important;
    }
    
    .hero-content .btn {
        font-size: 0.85rem !important;
        padding: 6px 12px !important;
    }
    
    .navbar-brand img {
        height: 35px !important;
    }
    
    .govind-ayurveda-brand {
        font-size: 0.8rem !important;
        margin: 0 2px !important;
    }
    
    footer {
        padding: 1.5rem 0 1rem 0 !important;
    }
    
    footer .container {
        padding: 0 8px !important;
    }
}

/* Performance and Animation Optimizations for Mobile */
@media (max-width: 991.98px) {
    /* Reduce animations for better performance */
    .carousel-item {
        transition: transform 0.6s ease-in-out !important;
    }
    
    /* Optimize touch targets */
    .btn,
    .nav-link,
    .dropdown-item,
    .social-icons a {
        touch-action: manipulation !important;
        min-height: 44px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    /* Prevent zoom on input focus (iOS) */
    input[type="email"],
    input[type="text"],
    input[type="password"],
    textarea,
    select {
        font-size: 16px !important;
    }
}

/* Back to Top Button Mobile */
@media (max-width: 991.98px) {
    .back-to-top {
        bottom: 20px !important;
        right: 20px !important;
        width: 50px !important;
        height: 50px !important;
        font-size: 1.2rem !important;
        z-index: 1050 !important;
    }
}

@media (max-width: 575.98px) {
    .back-to-top {
        bottom: 15px !important;
        right: 15px !important;
        width: 45px !important;
        height: 45px !important;
        font-size: 1.1rem !important;
    }
}
