/**
 * Estilos do Widget de Banners da Home para Elementor
 */

.portal-banners-conteiner {
    position: relative;
    width: 100%;
    overflow: hidden;
}

/* Estrutura do Slide */
.portal-banner-slide {
    position: relative;
    width: 100%;
    height: 500px; /* Altura padrão ajustável pelo controle do Elementor */
    display: flex;
    align-items: center;
    justify-content: flex-start;
    overflow: hidden;
    box-sizing: border-box;
}

/* Ajuste Tablet */
@media (max-width: 1024px) {
    .portal-banner-slide {
        height: 450px;
    }
}

/* Ajuste Mobile */
@media (max-width: 767px) {
    .portal-banner-slide {
        height: 400px;
        align-items: flex-end;
    }
}

/* Imagens Responsivas dentro do Slide */
.portal-banner-picture {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.portal-banner-img {
    width: 100%;
    height: 100%!important;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Camada de Gradiente / Overlay */
.portal-banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.3) 50%, rgba(0, 0, 0, 0) 100%);
    z-index: 2;
    pointer-events: none;
}

/* Container de Segurança e Conteúdo Central */
.portal-banner-conteiner-seguranca {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 2000px;
    margin: 0 auto;
    padding: 40px 80px 40px 100px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.portal-banner-conteudo {
    position: relative;
    max-width: 680px;
    width: 100%;
    color: #ffffff;
    box-sizing: border-box;
    text-align: left;
}

@media (max-width: 1024px) {
    .portal-banner-conteiner-seguranca {
        padding: 30px 60px 30px 85px;
    }
}

@media (max-width: 767px) {
    .portal-banner-overlay {
        background: linear-gradient(180deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.9) 100%);
    }

    .portal-banner-conteiner-seguranca {
        padding: 24px 20px 45px 20px;
        align-items: flex-end;
        justify-content: center;
    }

    .portal-banner-conteudo {
        max-width: 100%;
        text-align: center;
    }
}

/* Suporte e compatibilidade para alinhamento Flex */
.portal-banner-conteiner-seguranca[style*="justify-content: left"],
.portal-banner-botoes-wrapper[style*="justify-content: left"] {
    justify-content: flex-start;
}
.portal-banner-conteiner-seguranca[style*="justify-content: right"],
.portal-banner-botoes-wrapper[style*="justify-content: right"] {
    justify-content: flex-end;
}

/* ==========================================================================
   ANIMAÇÃO DOS CONTEÚDOS: Efeito Slide Left na Entrada do Slide
   ========================================================================== */
.portal-banner-titulo,
.portal-banner-subtitulo,
.portal-banner-botoes-wrapper {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity;
}

/* Entrada escalonada após a chegada do slide ativo */
.swiper-slide-active .portal-banner-titulo,
.swiper-slide-duplicate-active .portal-banner-titulo {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.2s;
}

.swiper-slide-active .portal-banner-subtitulo,
.swiper-slide-duplicate-active .portal-banner-subtitulo {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.35s;
}

.swiper-slide-active .portal-banner-botoes-wrapper,
.swiper-slide-duplicate-active .portal-banner-botoes-wrapper {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.5s;
}

/* Fallback: caso o Swiper ainda esteja carregando */
.portal-banners-swiper:not(.swiper-initialized) .portal-banner-titulo,
.portal-banners-swiper:not(.swiper-initialized) .portal-banner-subtitulo,
.portal-banners-swiper:not(.swiper-initialized) .portal-banner-botoes-wrapper {
    opacity: 1;
    transform: none;
}

/* Acessibilidade: respeita quem desativou animações no SO */
@media (prefers-reduced-motion: reduce) {
    .portal-banner-titulo,
    .portal-banner-subtitulo,
    .portal-banner-botoes-wrapper {
        opacity: 1 !important;
       /* transform: none !important;*/
        transition: none !important;
    }
}

/* Tipografia Padrão */
.portal-banner-titulo {
    font-size: 38px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 14px 0;
    color: #ffffff;
}

.portal-banner-subtitulo {
    font-size: 18px;
    font-weight: 400;
    line-height: 1.5;
    margin: 0 0 22px 0;
    color: #f0f0f0;
}

/* Suporte a imagens e tags HTML no subtítulo */
.portal-banner-subtitulo img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
    display: inline-block;
    margin: 4px 0;
}

.portal-banner-subtitulo p {
    margin: 0 0 10px 0;
    color: inherit;
    font: inherit;
}

.portal-banner-subtitulo p:last-child {
    margin-bottom: 0;
}

@media (max-width: 767px) {
    .portal-banner-titulo {
        font-size: 26px;
    }

    .portal-banner-subtitulo {
        font-size: 15px;
    }
}

/* Botões de Ação (Exibição Lado a Lado) */
.portal-banner-botoes-wrapper {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 15px;
    margin-top: 18px;
}

@media (max-width: 767px) {
    .portal-banner-botoes-wrapper {
        justify-content: center;
    }
}

.portal-banner-botao {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    padding: 12px 28px;
    border-radius: 4px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
    box-sizing: border-box;
    line-height: 1.2;
}

/* Botão 1: Primário */
.portal-banner-botao-1 {
    background-color: #2271b1;
    border-color: #2271b1;
    color: #ffffff;
}

.portal-banner-botao-1:hover {
    background-color: #135e96;
    border-color: #135e96;
    color: #ffffff;
    transform: translateY(-2px);
}

/* Botão 2: Secundário (Opcional) */
.portal-banner-botao-2 {
    background-color: transparent;
    border-color: #ffffff;
    color: #ffffff;
}

.portal-banner-botao-2:hover {
    background-color: #ffffff;
    border-color: #ffffff;
    color: #111111;
    transform: translateY(-2px);
}

/* Setas de Navegação Personalizadas */
.portal-swiper-button-prev,
.portal-swiper-button-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background-color: rgba(0, 0, 0, 0.35);
    color: #ffffff;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.portal-swiper-button-prev:hover,
.portal-swiper-button-next:hover {
    background-color: rgba(0, 0, 0, 0.7);
    color: #ffffff;
}

.portal-swiper-button-prev {
    left: 20px;
}

.portal-swiper-button-next {
    right: 20px;
}

.portal-swiper-button-prev svg,
.portal-swiper-button-next svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* Pontos de Navegação (Bullets) */
.portal-swiper-pagination {
    position: absolute;
    bottom: 20px !important;
    left: 0;
    width: 100%;
    text-align: center;
    z-index: 10;
}

.portal-swiper-pagination .swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    display: inline-block;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    margin: 0 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.portal-swiper-pagination .swiper-pagination-bullet-active {
    background: #ffffff;
    transform: scale(1.25);
}