/* Critical Mobile Banner Layout Fixes */
@media (max-width: 991px) {
    /* Force mobile layout for all banner elements */
    .hero-banner {
        padding: 100px 0 80px 0 !important;
        min-height: auto !important;
    }
    
    .hero-banner .slider-container {
        width: 100%;
        height: auto;
    }
    
    .hero-banner .slide {
        position: relative !important;
        padding: 40px 0 !important;
        display: flex !important;
        align-items: center !important;
        min-height: auto !important;
    }
    
    .hero-banner .slide-content {
        width: 100%;
        padding: 0 15px;
    }
    
    .hero-banner .row {
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        margin: 0 !important;
    }
    
    .hero-banner .col-lg-6 {
        text-align: center !important;
        width: 100% !important;
        max-width: 100% !important;
        flex: none !important;
        margin-bottom: 15px;
        padding: 0 10px;
    }
    
    .text-lg-start {
        text-align: center !important;
    }
    
    .justify-content-center {
        justify-content: center !important;
    }
    
    .align-items-center {
        align-items: center !important;
    }
    
    .banner-title {
        font-size: 2rem !important;
        line-height: 1.2 !important;
        margin-bottom: 15px !important;
        text-align: center !important;
        font-weight: 700 !important;
    }
    
    .banner-description {
        font-size: 1rem !important;
        line-height: 1.4 !important;
        text-align: center !important;
        margin-bottom: 25px !important;
        opacity: 0.95 !important;
    }
    
    .banner-buttons {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 10px !important;
        margin-top: 20px !important;
        flex-wrap: wrap !important;
    }
    
    .banner-buttons .btn {
        margin: 5px !important;
        padding: 12px 20px !important;
        font-size: 0.9rem !important;
        min-width: 130px !important;
        display: inline-block !important;
    }
}

@media (max-width: 767px) {
    /* Enhanced mobile banner fixes */
    .hero-banner {
        text-align: center !important;
        padding: 90px 0 60px 0 !important;
        min-height: 60vh !important;
    }
    
    .hero-banner .slide {
        padding: 30px 0 !important;
        min-height: auto !important;
    }
    
    .slide .container {
        max-width: 100%;
        padding: 0 20px;
    }
    
    .banner-title {
        text-align: center !important;
        word-wrap: break-word;
        hyphens: auto;
        font-size: 1.8rem !important;
        line-height: 1.2 !important;
        margin-bottom: 18px !important;
    }
    
    .banner-description {
        text-align: center !important;
        max-width: 100%;
        margin: 0 auto 25px auto;
        font-size: 0.95rem !important;
        line-height: 1.4 !important;
    }
    
    .banner-buttons {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 12px !important;
        margin-top: 25px !important;
    }
    
    .banner-buttons .btn {
        width: 200px !important;
        max-width: 90% !important;
        padding: 12px 20px !important;
        font-size: 0.9rem !important;
        margin: 0 !important;
        display: block !important;
    }
    
    .banner-image {
        margin-top: 25px;
        max-width: 85%;
        height: auto;
    }
}

@media (max-width: 575px) {
    /* Ultra-mobile banner optimization */
    .hero-banner {
        padding: 80px 0 50px 0 !important;
        min-height: 50vh !important;
    }
    
    .hero-banner .slide {
        padding: 25px 0 !important;
        min-height: auto !important;
    }
    
    .slide .container {
        padding: 0 15px;
    }
    
    .banner-title {
        font-size: 1.6rem !important;
        line-height: 1.1 !important;
        margin-bottom: 15px !important;
    }
    
    .banner-description {
        font-size: 0.88rem !important;
        line-height: 1.3 !important;
        margin-bottom: 20px !important;
    }
    
    .banner-buttons {
        flex-direction: column !important;
        gap: 10px !important;
        margin-top: 20px !important;
    }
    
    .banner-buttons .btn {
        width: 180px !important;
        max-width: 85% !important;
        font-size: 0.85rem !important;
        padding: 11px 18px !important;
    }
    
    .banner-image {
        margin-top: 20px;
        max-width: 90%;
    }
}

/* Additional Mobile Fixes for All Screen Sizes */
@media (max-width: 991px) {
    /* Hide or adjust slider navigation for mobile */
    .slider-navigation {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 10;
    }
    
    .slider-navigation button {
        background: rgba(255, 255, 255, 0.8);
        border: none;
        border-radius: 50%;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .prev-btn {
        left: 10px;
    }
    
    .next-btn {
        right: 10px;
    }
    
    .slider-dots {
        position: absolute;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        display: flex;
        gap: 8px;
        z-index: 10;
    }
    
    .dot {
        width: 10px;
        height: 10px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.6);
        cursor: pointer;
    }
    
    .dot.active {
        background: white;
    }
    
    /* Ensure proper container behavior */
    .hero-banner .container {
        max-width: 100%;
        padding: 0 15px;
    }
    
    /* Fix any margin/padding conflicts */
    .hero-banner * {
        box-sizing: border-box;
    }
    
    /* Fix blank spaces - hide inactive slides */
    .slide.active {
        opacity: 1;
        display: flex !important;
        align-items: center;
    }
    
    .slide:not(.active) {
        display: none !important;
    }
}

/* Fix Blank Spaces Only */
@media (max-width: 991px) {
    /* Remove any extra spacing between slides */
    .hero-banner .slide {
        margin: 0 !important;
        border: none !important;
    }
    
    .hero-banner .slide-content {
        margin: 0 !important;
        padding: 0 15px !important;
    }
    
    /* Ensure no gap between banner and next section */
    .hero-banner {
        margin-bottom: 0 !important;
    }
    
    .hero-banner + section,
    .hero-banner + .section {
        margin-top: 0 !important;
        padding-top: 60px !important;
    }
}

/* Emergency Mobile Banner Override */
@media (max-width: 767px) {
    /* Force override any conflicting styles */
    .hero-banner {
        position: relative !important;
        overflow: visible !important;
        height: auto !important;
    }
    
    .hero-banner .slide-content {
        position: relative !important;
        z-index: 5 !important;
    }
    
    /* Ensure buttons are always visible */
    .banner-buttons {
        position: relative !important;
        z-index: 6 !important;
        width: 100% !important;
        overflow: visible !important;
    }
    
    .banner-buttons .btn {
        position: relative !important;
        z-index: 7 !important;
        overflow: visible !important;
        white-space: nowrap !important;
    }
}
