/* =========================================
   1. ANIMAÇÕES GLOBAIS
   ========================================= */
@keyframes titleMotionBlur {
    0% { filter: blur(0); opacity: 1; transform: translateY(0); }
    30% { filter: blur(4px); opacity: 0.7; transform: translateY(-2px); }
    100% { filter: blur(0); opacity: 1; transform: translateY(-5px); }
}

/* =========================================
   2. CONTAINER PAI
   ========================================= */
.acordeon-container {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    width: 100vw; 
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding-top: 60px; 
    padding-bottom: 60px;
    padding-left: 0; 
    scrollbar-width: none;
    -ms-overflow-style: none;
    cursor: grab;
    user-select: none;
    -webkit-user-drag: none;
    position: relative;
    max-width: 100vw;
    box-sizing: border-box;
}
.acordeon-container::-webkit-scrollbar { height: 0px; background: transparent; }
.acordeon-container.active { cursor: grabbing; }

/* =========================================
   3. ITEM DO CARD
   ========================================= */
.acordeon-item {
    flex: 1;
    min-width: 180px;
    height: 400px;
    padding: 20px;
    margin: 0 5px;
    
    /* Transições */
    transition: all 0.7s cubic-bezier(0.25, 1, 0.5, 1), background-image 0.7s;
    
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
    z-index: 1;
    
    /* Importante: Background é controlado pelo Elementor agora */
    background-size: cover;
    background-position: center;
}

/* --- CAMADA DE OVERLAY (Escurecer fundo) --- */
.acordeon-item::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    
    /* A cor vem do PHP (default rgba(0,0,0,0.7)) */
    background-color: transparent; 
    
    opacity: 0; /* Invisível por padrão */
    z-index: -1; /* Fica atrás do texto */
    transition: opacity 0.5s ease;
}

/* --- WRAPPER DE CONTEÚDO --- */
/* Garante que o texto fique acima do Overlay */
.acordeon-content-wrapper {
    position: relative;
    z-index: 2;
}

/* ESTADO HOVER */
.acordeon-item:hover {
    flex: 3; 
    min-width: 350px;
    box-shadow: 0 0 60px rgba(255, 204, 0, 0.4); 
    z-index: 10;
    cursor: pointer;
    
    /* Nota: A imagem de fundo é injetada aqui pelo Elementor */
}

/* Ativa o Overlay no Hover */
.acordeon-item:hover::before {
    opacity: 1;
}

/* =========================================
   4. CONTEÚDO E TEXTOS
   ========================================= */
.acordeon-item h3 {
    white-space: normal;
    margin: 0 0 10px 0;
    opacity: 1; 
    filter: blur(0); 
    transform: translateY(0);
    transition: all 0.7s ease-out;
}
.acordeon-item:hover h3 {
    animation: titleMotionBlur 0.9s ease-out forwards;
    animation-delay: 0.1s;
}

.acordeon-desc {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px); 
    filter: blur(10px); 
    transition: all 0.5s ease-out;
}
.acordeon-item:hover .acordeon-desc {
    max-height: 300px;
    opacity: 1;
    transform: translateY(0);
    filter: blur(0); 
    transition-delay: 0.3s; 
    transition-duration: 0.8s;
}
.acordeon-desc p { margin: 0; }

/* =========================================
   5. ÍCONES
   ========================================= */
.acordeon-icon-wrapper {
    position: relative;
    width: 40px;
    height: 50px; 
    margin-bottom: 30px;
}
.acordeon-icon-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    transition: opacity 0.6s ease, filter 0.6s ease, transform 0.6s ease;
}
.icon-normal { opacity: 1; filter: blur(0); transform: scale(1); position: absolute; top: 0; left: 0; }
.icon-hover { opacity: 0; filter: blur(8px); transform: scale(0.8); position: absolute; top: 0; left: 0; }

.acordeon-item:hover .icon-normal { opacity: 0; filter: blur(5px); transform: scale(1.1); }
.acordeon-item:hover .icon-hover { opacity: 1; filter: blur(0); transform: scale(1); transition-delay: 0.1s; }

/* =========================================
   6. MOBILE
   ========================================= */
.nav-arrow-mobile { display: none; }

@media (max-width: 767px) {
    .acordeon-container { padding: 40px 0 !important; scroll-snap-type: x mandatory; gap: 0; }
    .acordeon-item {
        min-width: calc(100vw - 60px) !important;
        width: calc(100vw - 60px) !important;
        margin-left: 30px !important;
        margin-right: 30px !important;
        scroll-snap-align: center;
        flex: 0 0 auto !important;
        box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    }
    .acordeon-item:last-child { margin-right: 30px !important; }
    
    .acordeon-desc {
        display: block !important;
        max-height: none !important;
        overflow: visible !important;
        opacity: 1 !important;
        transform: none !important;
        filter: blur(0) !important;
        margin-top: 10px;
    }
    
    .nav-arrow-mobile {
        display: flex; justify-content: center; align-items: center; position: absolute;
        bottom: 55px; z-index: 99; width: 34px; height: 34px; font-size: 18px;
        background-color: rgba(0,0,0,0.8); color: #FFCC00;
        border: 1px solid #FFCC00; border-radius: 50%; cursor: pointer;
        box-shadow: 0 2px 10px rgba(0,0,0,0.5);
    }
    .nav-next { left: 120px; }
    .nav-prev { right: -90px; }
}

/* CORREÇÃO EDITOR ELEMENTOR */
body.elementor-editor-active .entrada-scroll {
    opacity: 1 !important; filter: none !important; transform: none !important;
    animation: none !important; transition: none !important;
}