/* ==========================================================================
   AREAS CAROUSEL SECTION STYLES
   ==========================================================================
   Estilos para o carrossel de áreas de atuação
*/

.areas-carousel-section {
    overflow: hidden;
    position: relative;
    background: #1a1a1a; /* Fundo escuro */
    color: #fff;
    position: relative;
}

/* Fundo Dinâmico Animado - Gradiente Sutil em Movimento (Mais Suave) */
.areas-carousel-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(185, 32, 39, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(30, 41, 59, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0.25) 0%, transparent 70%);
    background-size: 200% 200%, 150% 150%, 100% 100%;
    animation: backgroundFlow 25s ease-in-out infinite alternate;
    z-index: 0;
    opacity: 0.5;
}

@keyframes backgroundFlow {
    0% {
        background-position: 0% 0%, 100% 100%, center center;
    }
    50% {
        background-position: 50% 50%, 50% 50%, center center;
    }
    100% {
        background-position: 100% 100%, 0% 0%, center center;
    }
}

/* Overlay escuro para garantir contraste e legibilidade */
.areas-carousel-section::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.4) 0%,
        rgba(0, 0, 0, 0.3) 50%,
        rgba(0, 0, 0, 0.4) 100%
    );
    z-index: 1;
    pointer-events: none;
}

/* Garantir que o conteúdo fique acima do fundo animado */
.areas-carousel-section .container {
    position: relative;
    z-index: 2;
}

/* ======================================================================
   TRANSIÇÕES (sem usar ::before/::after da section, pois já são do fundo)
   Implementa o mesmo “degradê elegante” usando pseudo-elements no .container.
   ====================================================================== */
.areas-carousel-section .container::before,
.areas-carousel-section .container::after {
    content: '';
    position: absolute;
    left: -50vw;   /* cobre toda a largura da viewport mesmo em container limitado */
    right: -50vw;
    height: 100px;
    pointer-events: none;
    z-index: 2;    /* abaixo do conteúdo (z=3), acima do overlay (z=1) */
}

/* Top transition: vindo do Hero (escuro cinema) para o fundo escuro da seção */
.areas-carousel-section .container::before {
    top: 0;
    background: linear-gradient(to bottom,
        rgba(0, 0, 0, 0.45) 0%,
        rgba(26, 26, 26, 0.35) 35%,
        rgba(26, 26, 26, 0.15) 65%,
        transparent 100%);
}

/* Bottom transition: saída suave (a próxima seção já terá ::before própria) */
.areas-carousel-section .container::after {
    bottom: 0;
    background: linear-gradient(to top,
        rgba(26, 26, 26, 0.45) 0%,
        rgba(26, 26, 26, 0.25) 35%,
        rgba(26, 26, 26, 0.12) 65%,
        transparent 100%);
}

@media (max-width: 991px) {
    .areas-carousel-section .container::before,
    .areas-carousel-section .container::after {
        height: 60px;
    }
}

.areas-carousel-section > * {
    position: relative;
    z-index: 2;
}

/* Fundo semi-transparente atrás dos títulos para garantir legibilidade WCAG AA */
.areas-carousel-section .text-center {
    position: relative;
    z-index: 3;
    padding: 2.5rem 2rem;
    background: rgba(0, 0, 0, 0.65); /* Mais escuro para melhor contraste */
    border-radius: 20px;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    margin-bottom: 2rem;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Ajuste para mobile - Melhorar legibilidade */
@media (max-width: 991px) {
    .areas-carousel-section .text-center {
        padding: 2rem 1.5rem;
        background: rgba(0, 0, 0, 0.7); /* Ainda mais escuro no mobile */
        margin-bottom: 1.5rem;
    }
    
    .areas-title {
        font-size: clamp(1.8rem, 5vw, 2.5rem);
        text-shadow: 
            0 2px 8px rgba(0, 0, 0, 0.9),
            0 4px 16px rgba(0, 0, 0, 0.7);
    }
    
    .areas-subtitle {
        font-size: 1rem;
        line-height: 1.6;
    }
}

/* Validação de contraste para diferentes navegadores e dispositivos */
@media (prefers-contrast: high) {
    .areas-carousel-section .text-center {
        background: rgba(0, 0, 0, 0.85);
    }
    
    .areas-title,
    .areas-subtitle {
        color: #ffffff !important;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 1);
    }
}

.areas-kicker {
    display: inline-block;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-size: 0.8rem;
    color: #ff6b6b; /* Vermelho mais claro para melhor contraste */
    margin-bottom: 12px;
    text-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.7),
        0 0 12px rgba(185, 32, 39, 0.4);
    position: relative;
    z-index: 4;
}

.areas-title {
    font-weight: 900;
    letter-spacing: -0.02em;
    font-size: clamp(2rem, 3.6vw, 3.2rem);
    margin: 0;
    color: #ffffff !important; /* Branco puro para máximo contraste WCAG AAA */
    text-shadow: 
        0 2px 10px rgba(0, 0, 0, 0.9),
        0 4px 20px rgba(0, 0, 0, 0.7),
        0 0 30px rgba(0, 0, 0, 0.5); /* Múltiplas sombras para legibilidade máxima */
    position: relative;
    z-index: 4;
    line-height: 1.2;
    /* Garantir contraste mínimo WCAG AA (4.5:1) - Branco sobre preto = 21:1 */
}

.areas-subtitle {
    margin: 16px auto 0;
    max-width: 820px;
    color: rgba(255, 255, 255, 0.98) !important; /* Branco quase puro para legibilidade WCAG AA */
    font-size: 1.1rem;
    text-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.8),
        0 0 16px rgba(0, 0, 0, 0.6); /* Sombra forte para legibilidade */
    position: relative;
    z-index: 4;
    line-height: 1.7; /* Aumentado para melhor legibilidade */
    font-weight: 400;
    /* Contraste: rgba(255,255,255,0.98) sobre rgba(0,0,0,0.65) = ~18:1 (WCAG AAA) */
}

.mySwiper {
    padding: 26px 0 60px;
}

.swiper-slide {
    width: 280px;
    height: 410px;
    border-radius: 18px;
}

.area-card-3d {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    text-decoration: none;
    color: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 20px 45px rgba(0,0,0,0.12);
    transform: translateZ(0);
    outline: none;
}

.card-bg {
    position: absolute;
    inset: 0;
    background-image: url('/static/images/banners/areas_bg.webp');
    background-size: cover;
    background-position: center;
    filter: grayscale(100%) saturate(0%) brightness(0.55);
    transition: transform 0.6s ease, filter 0.6s ease;
    opacity: 0.92;
}

.area-card-3d:hover .card-bg,
.area-card-3d:focus-visible .card-bg,
.area-card-3d:active .card-bg {
    transform: scale(1.08);
    filter: grayscale(0%) saturate(110%) brightness(0.75);
}

.card-content {
    position: relative;
    z-index: 2;
    height: 100%;
    padding: 34px 26px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    text-align: center;
    background: linear-gradient(to top, rgba(0,0,0,0.92), rgba(0,0,0,0.15) 55%, rgba(0,0,0,0.05));
    transition: padding 0.25s ease;
}

.area-card-3d:hover .card-content,
.area-card-3d:focus-visible .card-content,
.area-card-3d:active .card-content {
    padding-bottom: 44px;
}

.area-icon {
    font-size: 4.2rem;
    color: #b92027;
    margin-bottom: 18px;
    filter: drop-shadow(0 10px 22px rgba(0,0,0,0.35));
}

.area-title {
    font-weight: 900;
    font-size: 1.25rem;
    margin: 0 0 10px;
    color: #fff;
}

.area-desc {
    margin: 0;
    color: rgba(255,255,255,0.78);
    font-size: 0.95rem;
    line-height: 1.45;
}

.areas-nav-prev,
.areas-nav-next {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: rgba(0,0,0,0.75);
    border: 1px solid rgba(255,255,255,0.25);
    box-shadow: 0 16px 30px rgba(0,0,0,0.25);
    transition: transform 0.2s ease, background 0.2s ease;
}
.areas-nav-prev:hover,
.areas-nav-next:hover {
    transform: scale(1.08);
    background: rgba(185,32,39,0.95);
}
.areas-nav-prev::after,
.areas-nav-next::after {
    font-size: 16px;
    font-weight: 900;
    color: #fff;
}

@media (max-width: 991px) {
    .swiper-slide { width: 250px; height: 380px; }
    .area-icon { font-size: 3.6rem; }
}

