/**
 * FIX FINAL E DEFINITIVO PARA BANNERS RESPONSIVOS
 * Solução direta que funciona imediatamente
 */

/* ========================================
   1. CONTAINER DO BANNER - RESPONSIVO
   ======================================== */

.hero-banner-slider {
    position: relative;
    width: 100vw !important;
    height: 60vh !important;
    min-height: 400px !important;
    max-height: 700px !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    left: 50%;
    right: 50%;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
}

.banner-container {
    position: relative;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
}

/* ========================================
   2. SLIDES - IMAGEM DE FUNDO RESPONSIVA
   ======================================== */

.banner-slide {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    opacity: 0;
    transition: opacity 1s ease-in-out;

    /* FORÇAR COMPORTAMENTO RESPONSIVO DA IMAGEM - Mostra imagem completa */
    background-size: contain !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    background-attachment: scroll !important;
    background-color: #2E3F31;

    /* Otimizações */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translate3d(0, 0, 0);
}

.banner-slide.active {
    opacity: 1;
    z-index: 1;
}

/* ========================================
   3. CONTEÚDO DO BANNER - RESPONSIVO
   ======================================== */

.banner-slide .container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
}

.banner-slide .hero-content {
    max-width: 700px;
    color: #fff;
    position: relative;
    z-index: 10;
}

/* ========================================
   4. RESPONSIVIDADE POR DISPOSITIVO
   ======================================== */

/* MOBILE PEQUENO - até 480px */
@media (max-width: 480px) {
    .hero-banner-slider {
        height: 300px !important;
        min-height: 300px !important;
        max-height: 350px !important;
        display: block !important;
    }

    .banner-slide {
        background-size: contain !important;
        background-position: center center !important;
    }

    .banner-slide .container {
        padding: 0 15px;
    }

    .banner-slide .hero-content {
        max-width: 100%;
    }

    .banner-slide h1 {
        font-size: 1.5rem !important;
    }

    .banner-slide p {
        font-size: 0.9rem !important;
    }
}

/* MOBILE - 481px até 768px */
@media (min-width: 481px) and (max-width: 768px) {
    .hero-banner-slider {
        height: 350px !important;
        min-height: 350px !important;
        max-height: 400px !important;
        display: block !important;
    }

    .banner-slide {
        background-size: contain !important;
        background-position: center center !important;
    }

    .banner-slide h1 {
        font-size: 1.8rem !important;
    }

    .banner-slide p {
        font-size: 1rem !important;
    }
}

/* TABLET - 769px até 1024px */
@media (min-width: 769px) and (max-width: 1024px) {
    .hero-banner-slider {
        height: 450px !important;
        min-height: 400px !important;
        max-height: 500px !important;
        display: block !important;
    }

    .banner-slide {
        background-size: contain !important;
        background-position: center center !important;
    }

    .banner-slide h1 {
        font-size: 2.2rem !important;
    }

    .banner-slide p {
        font-size: 1.1rem !important;
    }
}

/* DESKTOP - 1025px até 1440px */
@media (min-width: 1025px) and (max-width: 1440px) {
    .hero-banner-slider {
        height: 65vh !important;
        min-height: 450px !important;
        max-height: 700px !important;
    }

    .banner-slide {
        background-size: contain !important;
        background-position: center center !important;
    }
}

/* DESKTOP GRANDE - acima de 1440px */
@media (min-width: 1441px) {
    .hero-banner-slider {
        height: 70vh !important;
        min-height: 500px !important;
        max-height: 800px !important;
    }

    .banner-slide {
        background-size: contain !important;
        background-position: center center !important;
    }
}

/* ========================================
   5. ORIENTAÇÃO LANDSCAPE EM MOBILE
   ======================================== */

@media (max-height: 500px) and (orientation: landscape) {
    .hero-banner-slider {
        height: 85vh !important;
        min-height: 300px !important;
    }

    .banner-slide .hero-content {
        max-width: 90%;
    }

    .banner-slide h1 {
        font-size: 1.5rem !important;
        margin-bottom: 10px !important;
    }

    .banner-slide p {
        font-size: 0.9rem !important;
    }
}

/* ========================================
   6. NAVEGAÇÃO E CONTROLES
   ======================================== */

.banner-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.3);
    color: #fff;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 100;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner-nav:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: translateY(-50%) scale(1.1);
}

.banner-prev {
    left: 20px;
}

.banner-next {
    right: 20px;
}

.banner-indicators {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 100;
}

.banner-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.banner-indicator.active {
    background: #CBA135;
    border-color: #fff;
    width: 30px;
    border-radius: 6px;
}

/* ========================================
   7. AJUSTES MOBILE PARA CONTROLES
   ======================================== */

@media (max-width: 768px) {
    .banner-nav {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .banner-prev {
        left: 10px;
    }

    .banner-next {
        right: 10px;
    }

    .banner-indicators {
        bottom: 15px;
        gap: 8px;
    }

    .banner-indicator {
        width: 8px;
        height: 8px;
    }

    .banner-indicator.active {
        width: 20px;
    }
}

/* ========================================
   8. BOTÕES NO BANNER
   ======================================== */

.banner-slide .hero-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 20px;
    justify-content: flex-start; /* Alinha botões à esquerda */
}

@media (max-width: 768px) {
    .banner-slide .hero-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .banner-slide .hero-buttons a {
        width: 100%;
        text-align: center;
        padding: 12px 20px;
        font-size: 0.95rem;
    }
}

/* ========================================
   9. PERFORMANCE E ACESSIBILIDADE
   ======================================== */

/* Reduzir movimento se usuário preferir */
@media (prefers-reduced-motion: reduce) {
    .banner-slide {
        transition: opacity 0.3s ease !important;
    }

    .banner-nav:hover {
        transform: translateY(-50%) !important;
    }
}

/* Otimizar renderização */
.banner-slide,
.banner-container {
    contain: layout style paint;
}

/* Telas de alta densidade */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .banner-slide {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* ========================================
   10. GARANTIR QUE IMAGEM NUNCA ULTRAPASSE
   ======================================== */

.hero-banner-slider,
.banner-container,
.banner-slide {
    overflow: hidden !important;
    max-width: 100vw !important;
}

/* Prevenir scroll horizontal */
body {
    overflow-x: hidden;
}
