/* 
 * BANNERS RESPONSIVOS - MOBILE E DESKTOP
 * Arquivo: public/css/banners-responsive.css
 * Suporte otimizado para aplicativos móveis
 */

/* ==================== BASE BANNERS ==================== */
.banner-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    margin-bottom: 20px;
}

.banner-item {
    position: relative;
    display: block;
    width: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.banner-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* ==================== BANNER HERO (PRINCIPAL) ==================== */
.banner-hero {
    height: 500px;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.2));
}

.banner-hero .banner-content {
    max-width: 600px;
    padding: 40px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

.banner-hero .banner-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    line-height: 1.2;
}

.banner-hero .banner-subtitle {
    font-size: 1.2rem;
    font-weight: 400;
    margin-bottom: 25px;
    opacity: 0.9;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.banner-hero .banner-button {
    display: inline-block;
    padding: 12px 30px;
    background: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.banner-hero .banner-button:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
    color: white;
    text-decoration: none;
}

/* ==================== BANNER SECUNDÁRIO ==================== */
.banner-secondary {
    height: 300px;
    margin-bottom: 15px;
}

.banner-secondary .banner-content {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    padding: 20px;
    border-radius: 12px;
    color: white;
}

.banner-secondary .banner-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.banner-secondary .banner-subtitle {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 15px;
}

/* ==================== RESPONSIVIDADE TABLET ==================== */
@media (max-width: 1024px) {
    .banner-hero {
        height: 400px;
        min-height: 350px;
    }
    
    .banner-hero .banner-content {
        max-width: 500px;
        padding: 30px;
    }
    
    .banner-hero .banner-title {
        font-size: 2.2rem;
    }
    
    .banner-hero .banner-subtitle {
        font-size: 1.1rem;
    }
    
    .banner-secondary {
        height: 250px;
    }
}

/* ==================== RESPONSIVIDADE MOBILE ==================== */
@media (max-width: 768px) {
    /* Banner Hero Mobile - CORREÇÃO PARA EXIBIÇÃO COMPLETA */
    .banner-hero {
        height: 400px; /* Altura fixa para manter proporção 768x400 */
        min-height: 400px;
        border-radius: 8px;
    }
    
    /* CORREÇÃO PRINCIPAL: Mostrar imagem inteira no mobile */
    .banner-item, 
    .hero-slide {
        background-size: contain !important; /* Mostrar imagem completa */
        background-position: center center !important;
        background-repeat: no-repeat !important;
        background-color: #000; /* Fundo preto para áreas não cobertas */
    }
    
    .banner-hero .banner-content {
        max-width: 90%;
        padding: 25px 20px;
        margin: 0 15px;
    }
    
    .banner-hero .banner-title {
        font-size: 1.8rem;
        margin-bottom: 12px;
        line-height: 1.3;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8); /* Mais contraste */
    }
    
    .banner-hero .banner-subtitle {
        font-size: 1rem;
        margin-bottom: 20px;
        line-height: 1.4;
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8); /* Mais contraste */
    }
    
    .banner-hero .banner-button {
        padding: 10px 25px;
        font-size: 1rem;
        border-radius: 20px;
    }
    
    /* Banner Secundário Mobile */
    .banner-secondary {
        height: 200px;
        border-radius: 8px;
        margin-bottom: 12px;
    }
    
    .banner-secondary .banner-content {
        bottom: 15px;
        left: 15px;
        right: 15px;
        padding: 15px;
        border-radius: 8px;
    }
    
    .banner-secondary .banner-title {
        font-size: 1.2rem;
        margin-bottom: 6px;
    }
    
    .banner-secondary .banner-subtitle {
        font-size: 0.9rem;
        margin-bottom: 10px;
    }
}

/* ==================== MOBILE PEQUENO ==================== */
@media (max-width: 480px) {
    .banner-container {
        margin-bottom: 15px;
    }
    
    /* Banner Hero Mobile Pequeno */
    .banner-hero {
        height: 320px; /* Ajustado para melhor proporção */
        min-height: 320px;
        border-radius: 6px;
    }
    
    /* Garantir que imagem seja exibida completa em telas pequenas */
    .banner-item, 
    .hero-slide {
        background-size: contain !important;
        background-position: center center !important;
        background-repeat: no-repeat !important;
        background-color: #000;
    }
    
    .banner-hero .banner-content {
        padding: 20px 15px;
        margin: 0 10px;
        border-radius: 12px;
        background: rgba(0, 0, 0, 0.4); /* Fundo mais escuro para contraste */
    }
    
    .banner-hero .banner-title {
        font-size: 1.5rem;
        margin-bottom: 10px;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9);
    }
    
    .banner-hero .banner-subtitle {
        font-size: 0.9rem;
        margin-bottom: 18px;
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.9);
    }
    
    .banner-hero .banner-button {
        padding: 9px 20px;
        font-size: 0.9rem;
        border-radius: 18px;
    }
    
    /* Banner Secundário Mobile Pequeno */
    .banner-secondary {
        height: 160px;
        border-radius: 6px;
        margin-bottom: 10px;
    }
    
    .banner-secondary .banner-content {
        bottom: 10px;
        left: 10px;
        right: 10px;
        padding: 12px;
        border-radius: 6px;
    }
    
    .banner-secondary .banner-title {
        font-size: 1.1rem;
        margin-bottom: 5px;
    }
    
    .banner-secondary .banner-subtitle {
        font-size: 0.8rem;
        margin-bottom: 8px;
    }
}

/* ==================== APLICATIVOS MÓVEIS (PWA/WebView) ==================== */
@media (display-mode: standalone), 
       (display-mode: fullscreen),
       (display-mode: minimal-ui) {
    
    /* Otimizações específicas para apps */
    .banner-item {
        border-radius: 8px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    }
    
    .banner-hero {
        height: 300px;
        min-height: 280px;
    }
    
    .banner-hero .banner-content {
        padding: 20px 15px;
        background: rgba(0, 0, 0, 0.4);
        backdrop-filter: blur(8px);
    }
    
    .banner-hero .banner-title {
        font-size: 1.6rem;
        font-weight: 600;
    }
    
    .banner-hero .banner-subtitle {
        font-size: 0.95rem;
    }
    
    .banner-hero .banner-button {
        padding: 10px 22px;
        font-size: 0.95rem;
        box-shadow: 0 3px 12px rgba(0, 123, 255, 0.25);
    }
    
    .banner-secondary {
        height: 180px;
    }
}

/* ==================== DETECÇÃO DE TOUCH ==================== */
@media (hover: none) and (pointer: coarse) {
    /* Dispositivos touch */
    .banner-item:hover {
        transform: none;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    }
    
    .banner-hero .banner-button:hover {
        transform: none;
        box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
    }
    
    .banner-hero .banner-button:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
}

/* ==================== OTIMIZAÇÃO DE PERFORMANCE ==================== */
.banner-item {
    will-change: transform;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.banner-content {
    will-change: opacity;
}

/* ==================== ACESSIBILIDADE ==================== */
@media (prefers-reduced-motion: reduce) {
    .banner-item,
    .banner-hero .banner-button {
        transition: none;
    }
    
    .banner-item:hover {
        transform: none;
    }
    
    .banner-hero .banner-button:hover {
        transform: none;
    }
}

/* ==================== MODO ESCURO ==================== */
@media (prefers-color-scheme: dark) {
    .banner-item {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    }
    
    .banner-hero .banner-content,
    .banner-secondary .banner-content {
        background: rgba(0, 0, 0, 0.6);
    }
}

/* ==================== CARROSSEL DE BANNERS ==================== */
.banners-carousel {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}

.banners-carousel .banner-item {
    border-radius: 0;
}

@media (max-width: 768px) {
    .banners-carousel {
        border-radius: 8px;
    }
}

@media (max-width: 480px) {
    .banners-carousel {
        border-radius: 6px;
    }
}

/* ==================== ESTADOS DE CARREGAMENTO ==================== */
.banner-loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ==================== UTILITÁRIOS ==================== */
.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.banner-content {
    position: relative;
    z-index: 2;
}

.text-shadow {
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}