/**
 * Estilos para a Seção Banner
 * 
 * Este arquivo contém todos os estilos CSS para o widget
 * de banner 100% personalizado do Elementor
 */

/* Container principal do banner */
.leds-banner-section {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
}

/* Sobreposição (overlay) */
.leds-banner-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* Imagem do banner */
.leds-banner-section img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
    transition: transform 0.3s ease;
}

/* Hover effect na imagem */
.leds-banner-section:hover img {
    transform: scale(1.02);
}

/* Banner Fluid (100% da tela) */
.leds-banner-fluid {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
}

/* Banner Container (limitado) */
.leds-banner-container {
    width: 100%;
    max-width: 1312px;
    margin: 0 auto;
}

/* Altura viewport (100% da tela) */
.leds-banner-viewport {
    height: 100vh;
    min-height: 100vh;
}

/* Altura automática */
.leds-banner-section:not(.leds-banner-viewport):not(.leds-banner-custom) {
    height: auto;
    min-height: 300px;
}

/* Placeholder quando não há imagem */
.leds-banner-section .banner-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    background: #f5f5f5;
    color: #666;
    font-size: 16px;
    text-align: center;
    border: 2px dashed #ccc;
    border-radius: 8px;
    margin: 20px;
}

/* Imagem mobile */
.leds-banner-section .mobile-image {
    display: none;
}

/* Responsividade - Tablet */
@media (max-width: 1024px) {
    .leds-banner-section {
        min-height: 60vh;
    }
    
    .leds-banner-viewport {
        height: 80vh;
        min-height: 80vh;
    }
}

/* Responsividade - Mobile */
@media (max-width: 768px) {
    .leds-banner-section {
        min-height: 50vh;
    }
    
    .leds-banner-viewport {
        height: 70vh;
        min-height: 70vh;
    }
    
    /* Mostrar imagem mobile se disponível */
    .leds-banner-section .desktop-image {
        display: none;
    }
    
    .leds-banner-section .mobile-image {
        display: block;
    }
    
    /* Se não há imagem mobile, mostrar a desktop */
    .leds-banner-section:not(:has(.mobile-image)) .desktop-image {
        display: block;
    }
}

/* Responsividade - Mobile pequeno */
@media (max-width: 480px) {
    .leds-banner-section {
        min-height: 40vh;
    }
    
    .leds-banner-viewport {
        height: 60vh;
        min-height: 60vh;
    }
    
    .leds-banner-section .banner-placeholder {
        min-height: 200px;
        font-size: 14px;
        margin: 10px;
    }
}

/* Animações de entrada */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.leds-banner-section {
    animation: fadeIn 0.8s ease-out;
}

.leds-banner-section img {
    animation: slideInUp 1s ease-out 0.2s both;
}

/* Dark mode removido */

/* Acessibilidade */
@media (prefers-reduced-motion: reduce) {
    .leds-banner-section * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .leds-banner-section:hover img {
        transform: none;
    }
}

/* Print styles */
@media print {
    .leds-banner-section {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    .leds-banner-section img {
        max-height: 50vh;
        object-fit: contain;
    }
    
    .leds-banner-section::before {
        display: none;
    }
}

/* Suporte para diferentes object-fit */
.leds-banner-section img[style*="object-fit: contain"] {
    background: #f8f9fa;
}

.leds-banner-section img[style*="object-fit: fill"] {
    object-fit: fill !important;
}

.leds-banner-section img[style*="object-fit: scale-down"] {
    object-fit: scale-down !important;
}

/* Melhorias de performance */
.leds-banner-section img {
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Suporte para lazy loading */
.leds-banner-section img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.leds-banner-section img[loading="lazy"].loaded {
    opacity: 1;
}

/* Fallback para navegadores antigos */
@supports not (object-fit: cover) {
    .leds-banner-section img {
        width: 100%;
        height: auto;
        min-height: 300px;
    }
}

/* Suporte para aspect-ratio (navegadores modernos) */
@supports (aspect-ratio: 16/9) {
    .leds-banner-section.leds-banner-auto {
        aspect-ratio: 16/9;
    }
}

/* Estados especiais */
.leds-banner-section.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;
    }
}
