/**
 * Banner Slider para Elementor — Frontend Styles
 *
 * Estilos do slider e dos banners exibidos no frontend.
 * Depende: swiper-bundle.min.css
 *
 * @package Banner_Slider_Elementor
 * @version 1.0.0
 */

/* ──────────────────────────────────────────────
   1. WRAPPER DO SLIDER
────────────────────────────────────────────── */

.bse-slider-wrapper {
    position: relative;
    width: 100%;
    height: 500px; /* Fallback; sobrescrito pelo Elementor */
    overflow: hidden;
    box-sizing: border-box;
}

.bse-slider-wrapper .swiper {
    width: 100%;
    height: 100%;
}

/* ──────────────────────────────────────────────
   2. SLIDE BASE
────────────────────────────────────────────── */

.bse-slide {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #1a1a1a; /* Fallback enquanto carrega */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ──────────────────────────────────────────────
   3. IMAGEM DO BANNER
────────────────────────────────────────────── */

.bse-slide-picture {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    display: block;
}

.bse-slide-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
    transition: transform 0.6s ease;
}

/* Zoom sutil no hover */
.bse-slide:hover .bse-slide-img {
    transform: scale(1.03);
}

/* ──────────────────────────────────────────────
   4. OVERLAY DE COR
────────────────────────────────────────────── */

.bse-slide-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

/* ──────────────────────────────────────────────
   5. CONTEÚDO DO BANNER (textos + botão)
────────────────────────────────────────────── */

.bse-banner-content {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px 40px;
    max-width: 800px;
    width: 100%;
    pointer-events: none; /* Clique passa para o link de cobertura */
}

/* Permite clique nos botões mesmo com o link de cobertura */
.bse-banner-content .bse-banner-button {
    pointer-events: all;
    position: relative;
    z-index: 5;
}

.bse-banner-main-text {
    margin: 0 0 10px;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    word-break: break-word;
}

.bse-banner-secondary-text {
    margin: 0 0 5px;
    font-size: 1.2rem;
    font-weight: 400;
    line-height: 1.4;
    color: #f0f0f0;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

/* ──────────────────────────────────────────────
   6. BOTÃO CTA
────────────────────────────────────────────── */

.bse-banner-button {
    display: inline-block;
    padding: 12px 28px;
    margin-top: 20px;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: 4px;
    background-color: #1a5c1c;
    color: #ffffff;
    transition:
        background-color 0.25s ease,
        transform 0.2s ease,
        box-shadow 0.25s ease;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
}

.bse-banner-button:hover,
.bse-banner-button:focus {
    background-color: color-mix(in srgb, currentcolor 0%, #1a5c1c 80%);
    filter: brightness(1.15);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
    text-decoration: none;
}

.bse-banner-button:active {
    transform: translateY(0);
}

/* ──────────────────────────────────────────────
   7. LINK DE COBERTURA (banner inteiro clicável)
────────────────────────────────────────────── */

.bse-slide-link {
    position: absolute;
    inset: 0;
    z-index: 2;
    cursor: pointer;
    display: block;
}

/* Indicador visual de link ativo */
.bse-slide-link:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.8);
    outline-offset: -4px;
}

/* ──────────────────────────────────────────────
   8. BANNER TIPO TEXTO / COMUNICADO
────────────────────────────────────────────── */

.bse-type-text {
    background-color: #2d7a2f;
}

.bse-type-text .bse-banner-content {
    max-width: 700px;
}

/* ──────────────────────────────────────────────
   9. SETAS DE NAVEGAÇÃO (Swiper override)
────────────────────────────────────────────── */

.bse-slider-wrapper .swiper-button-prev,
.bse-slider-wrapper .swiper-button-next {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.35);
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.bse-slider-wrapper .swiper-button-prev::after,
.bse-slider-wrapper .swiper-button-next::after {
    font-size: 18px;
    color: #ffffff;
    font-weight: 700;
}

.bse-slider-wrapper .swiper-button-prev:hover,
.bse-slider-wrapper .swiper-button-next:hover {
    background-color: rgba(0, 0, 0, 0.6);
    transform: scale(1.08);
}

.bse-slider-wrapper .swiper-button-prev {
    left: 16px;
}

.bse-slider-wrapper .swiper-button-next {
    right: 16px;
}

/* ──────────────────────────────────────────────
   10. INDICADORES / DOTS (Swiper override)
────────────────────────────────────────────── */

.bse-slider-wrapper .swiper-pagination {
    bottom: 14px;
}

.bse-slider-wrapper .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 1;
    margin: 0 5px;
    border-radius: 50%;
    transition: background 0.3s ease, transform 0.3s ease;
    cursor: pointer;
}

.bse-slider-wrapper .swiper-pagination-bullet-active {
    background: #ffffff;
    transform: scale(1.3);
}

/* ──────────────────────────────────────────────
   11. ESTADO DE CARREGAMENTO
────────────────────────────────────────────── */

.bse-slider-wrapper:not(.bse-initialized) .swiper-slide:not(:first-child) {
    visibility: hidden;
}

.bse-slider-wrapper.bse-initialized .swiper-slide {
    visibility: visible;
}

/* ──────────────────────────────────────────────
   12. MENSAGEM SEM BANNERS (modo editor)
────────────────────────────────────────────── */

.bse-no-banners-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    background: #f0f0f0;
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}

.bse-no-banners-notice p {
    margin: 0;
    font-size: 1rem;
    color: #666;
}

/* ──────────────────────────────────────────────
   13. RESPONSIVIDADE
────────────────────────────────────────────── */

/* Tablet (max 1024px) */
@media screen and (max-width: 1024px) {
    .bse-slider-wrapper {
        height: 380px;
    }

    .bse-banner-main-text {
        font-size: 1.6rem;
    }

    .bse-banner-secondary-text {
        font-size: 1rem;
    }

    .bse-banner-content {
        padding: 16px 30px;
    }
}

/* Mobile (max 767px) */
@media screen and (max-width: 767px) {
    .bse-slider-wrapper {
        height: 260px;
    }

    .bse-banner-main-text {
        font-size: 1.15rem;
    }

    .bse-banner-secondary-text {
        font-size: 0.9rem;
    }

    .bse-banner-content {
        padding: 12px 16px;
    }

    .bse-banner-button {
        padding: 10px 20px;
        font-size: 0.9rem;
        margin-top: 12px;
    }

    .bse-slider-wrapper .swiper-button-prev,
    .bse-slider-wrapper .swiper-button-next {
        width: 32px;
        height: 32px;
    }

    .bse-slider-wrapper .swiper-button-prev::after,
    .bse-slider-wrapper .swiper-button-next::after {
        font-size: 13px;
    }

    .bse-slider-wrapper .swiper-button-prev {
        left: 8px;
    }

    .bse-slider-wrapper .swiper-button-next {
        right: 8px;
    }

    .bse-slider-wrapper .swiper-pagination-bullet {
        width: 8px;
        height: 8px;
        margin: 0 3px;
    }
}

/* Mobile pequeno (max 480px) */
@media screen and (max-width: 480px) {
    .bse-banner-main-text {
        font-size: 1rem;
    }

    .bse-banner-secondary-text {
        display: none; /* Oculta subtítulo em telas muito pequenas */
    }
}

/* ──────────────────────────────────────────────
   14. ACESSIBILIDADE
────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
    .bse-slide-img {
        transition: none;
    }

    .bse-banner-button {
        transition: none;
    }
}

/* ──────────────────────────────────────────────
   15. ANIMAÇÃO DE ENTRADA DO CONTEÚDO
────────────────────────────────────────────── */

@keyframes bse-fade-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.swiper-slide-active .bse-banner-main-text {
    animation: bse-fade-up 0.5s ease forwards;
    animation-delay: 0.1s;
    opacity: 0;
}

.swiper-slide-active .bse-banner-secondary-text {
    animation: bse-fade-up 0.5s ease forwards;
    animation-delay: 0.25s;
    opacity: 0;
}

.swiper-slide-active .bse-banner-button {
    animation: bse-fade-up 0.5s ease forwards;
    animation-delay: 0.4s;
    opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
    .swiper-slide-active .bse-banner-main-text,
    .swiper-slide-active .bse-banner-secondary-text,
    .swiper-slide-active .bse-banner-button {
        animation: none;
        opacity: 1;
    }
}
