/**
 * ENWP Slider - Estilos
 * Escola Ninja WP - Flavio Henrique
 */

/* ==========================================================================
   CONTAINER DO SLIDER
   ========================================================================== */

.enwp-slider {
    position: relative;
    width: 100%;
    height: 600px;
    overflow: hidden;
    background-color: #f0f0f0;
}

.enwp-slides-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

/* ==========================================================================
   SLIDE INDIVIDUAL
   ========================================================================== */

.enwp-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.enwp-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

/* Transição Fade */
.enwp-slider[data-transition="fade"] .enwp-slide {
    transition: opacity 0.6s ease-in-out, visibility 0.6s ease-in-out;
}

/* Transição Slide */
.enwp-slider[data-transition="slide"] .enwp-slide {
    transform: translateX(100%);
    transition: transform 0.6s ease-in-out, opacity 0.6s ease-in-out, visibility 0.6s ease-in-out;
}

.enwp-slider[data-transition="slide"] .enwp-slide.active {
    transform: translateX(0);
}

.enwp-slider[data-transition="slide"] .enwp-slide.prev {
    transform: translateX(-100%);
}

/* ==========================================================================
   BACKGROUND E OVERLAY
   ========================================================================== */

.enwp-slide-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    z-index: 1;
}

.enwp-slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

/* ==========================================================================
   CONTEÚDO DO SLIDE
   ========================================================================== */

.enwp-slide-content {
    position: relative;
    z-index: 3;
    max-width: 800px;
    padding: 40px 20px;
    width: 100%;
    box-sizing: border-box;
}

/* Alinhamentos */
.enwp-slide-content.align-left {
    text-align: left;
    margin-left: 0;
    margin-right: auto;
    padding-left: 60px;
}

.enwp-slide-content.align-center {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

.enwp-slide-content.align-right {
    text-align: right;
    margin-left: auto;
    margin-right: 0;
    padding-right: 60px;
}

/* ==========================================================================
   TEXTOS
   ========================================================================== */

.enwp-slide-subtitle {
    font-size: 16px;
    font-weight: 400;
    color: #ffffff;
    margin-bottom: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.enwp-slide-title {
    font-size: 48px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 15px 0;
    line-height: 1.2;
}

.enwp-slide-description {
    font-size: 18px;
    font-weight: 400;
    color: #ffffff;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* ==========================================================================
   BOTÃO
   ========================================================================== */

.enwp-slide-button {
    display: inline-block;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    background-color: #3b82f6;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.enwp-slide-button:hover {
    background-color: #2563eb;
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.enwp-slide-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5);
}

/* ==========================================================================
   NAVEGAÇÃO - SETAS
   ========================================================================== */

.enwp-slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background-color: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 0;
}

.enwp-slider-arrow:hover {
    background-color: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.enwp-slider-arrow:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.5);
}

.enwp-slider-arrow svg {
    width: 24px;
    height: 24px;
    fill: #ffffff;
}

.enwp-slider-prev {
    left: 20px;
}

.enwp-slider-next {
    right: 20px;
}

/* ==========================================================================
   NAVEGAÇÃO - INDICADORES (DOTS)
   ========================================================================== */

.enwp-slider-dots {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 8px;
}

.enwp-slider-dot {
    width: 12px;
    height: 12px;
    background-color: rgba(255, 255, 255, 0.5);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.enwp-slider-dot:hover {
    background-color: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

.enwp-slider-dot.active {
    background-color: #ffffff;
    transform: scale(1.2);
}

.enwp-slider-dot:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5);
}

/* ==========================================================================
   ANIMAÇÕES DO CONTEÚDO
   ========================================================================== */

/* Estado inicial - escondido */
.enwp-slide .enwp-animate-item {
    opacity: 0;
    transform: translateY(30px);
}

/* Estado final - visível - IMPORTANTE: precisa de maior especificidade para sobrescrever os estados iniciais das animações */
.enwp-slider .enwp-slide.active .enwp-animate-item.animated {
    opacity: 1 !important;
    transform: translateY(0) translateX(0) scale(1) !important;
}

/* FALLBACK: Se a classe animated não for adicionada pelo JS, mostrar conteúdo após 1s */
.enwp-slide.active .enwp-animate-item {
    animation: enwpFallbackShow 0.6s ease forwards;
    animation-delay: 0.3s;
}

@keyframes enwpFallbackShow {
    to {
        opacity: 1;
        transform: translateY(0) translateX(0) scale(1);
    }
}

/* Animação Fade In */
.enwp-slider[data-animation="fadeIn"] .enwp-slide .enwp-animate-item {
    opacity: 0;
    transform: none;
}

/* Animação Fade In Up */
.enwp-slider[data-animation="fadeInUp"] .enwp-slide .enwp-animate-item {
    opacity: 0;
    transform: translateY(30px);
}

/* Animação Fade In Down */
.enwp-slider[data-animation="fadeInDown"] .enwp-slide .enwp-animate-item {
    opacity: 0;
    transform: translateY(-30px);
}

/* Animação Fade In Left */
.enwp-slider[data-animation="fadeInLeft"] .enwp-slide .enwp-animate-item {
    opacity: 0;
    transform: translateX(-30px);
}

/* Animação Fade In Right */
.enwp-slider[data-animation="fadeInRight"] .enwp-slide .enwp-animate-item {
    opacity: 0;
    transform: translateX(30px);
}

/* Animação Zoom In */
.enwp-slider[data-animation="zoomIn"] .enwp-slide .enwp-animate-item {
    opacity: 0;
    transform: scale(0.8);
}

/* Sem animação */
.enwp-slider[data-animation="none"] .enwp-slide .enwp-animate-item {
    opacity: 1;
    transform: none;
}

/* ==========================================================================
   RESPONSIVO
   ========================================================================== */

/* Tablet */
@media (max-width: 1024px) {
    .enwp-slider {
        height: 500px;
    }

    .enwp-slide-title {
        font-size: 36px;
    }

    .enwp-slide-subtitle {
        font-size: 14px;
    }

    .enwp-slide-description {
        font-size: 16px;
    }

    .enwp-slide-content {
        max-width: 90%;
        padding: 30px 20px;
    }

    .enwp-slide-content.align-left,
    .enwp-slide-content.align-right {
        padding-left: 40px;
        padding-right: 40px;
    }

    .enwp-slider-arrow {
        width: 45px;
        height: 45px;
    }

    .enwp-slider-arrow svg {
        width: 20px;
        height: 20px;
    }

    .enwp-slider-prev {
        left: 15px;
    }

    .enwp-slider-next {
        right: 15px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .enwp-slider {
        height: 450px;
    }

    .enwp-slide-title {
        font-size: 28px;
    }

    .enwp-slide-subtitle {
        font-size: 12px;
    }

    .enwp-slide-description {
        font-size: 14px;
    }

    .enwp-slide-content {
        max-width: 95%;
        padding: 20px 15px;
    }

    .enwp-slide-content.align-left,
    .enwp-slide-content.align-right {
        padding-left: 20px;
        padding-right: 20px;
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }

    .enwp-slide-button {
        padding: 10px 24px;
        font-size: 14px;
    }

    .enwp-slider-arrow {
        width: 40px;
        height: 40px;
    }

    .enwp-slider-arrow svg {
        width: 18px;
        height: 18px;
    }

    .enwp-slider-prev {
        left: 10px;
    }

    .enwp-slider-next {
        right: 10px;
    }

    .enwp-slider-dots {
        bottom: 15px;
    }

    .enwp-slider-dot {
        width: 10px;
        height: 10px;
    }
}

/* Mobile pequeno */
@media (max-width: 480px) {
    .enwp-slider {
        height: 400px;
    }

    .enwp-slide-title {
        font-size: 24px;
    }

    .enwp-slide-description {
        font-size: 13px;
        margin-bottom: 15px;
    }

    .enwp-slider-arrow {
        width: 35px;
        height: 35px;
    }

    .enwp-slider-arrow svg {
        width: 16px;
        height: 16px;
    }

    .enwp-slider-prev {
        left: 5px;
    }

    .enwp-slider-next {
        right: 5px;
    }
}

/* ==========================================================================
   ESTADOS DE ACESSIBILIDADE
   ========================================================================== */

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .enwp-slide,
    .enwp-slider-arrow,
    .enwp-slider-dot,
    .enwp-slide-button,
    .enwp-animate-item {
        transition: none !important;
        animation: none !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .enwp-slider-arrow {
        background-color: #000000;
        border: 2px solid #ffffff;
    }

    .enwp-slider-dot {
        border: 2px solid #ffffff;
    }

    .enwp-slide-button {
        border: 2px solid #ffffff;
    }
}

/* ==========================================================================
   FIX PARA PROBLEMA DE TEXTO SUMINDO
   Garante que o conteúdo esteja sempre visível durante transições
   ========================================================================== */

.enwp-slide.active .enwp-slide-content {
    opacity: 1;
    visibility: visible;
}

.enwp-slide.transitioning .enwp-slide-content {
    opacity: 1;
    visibility: visible;
}

/* Garante que os elementos de texto não tenham problemas de renderização */
.enwp-slide-subtitle,
.enwp-slide-title,
.enwp-slide-description,
.enwp-slide-button {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   EDITOR DO ELEMENTOR
   ========================================================================== */

.elementor-editor-active .enwp-slider {
    min-height: 400px;
}

.elementor-editor-active .enwp-slide {
    position: relative;
    opacity: 1;
    visibility: visible;
    display: none;
}

.elementor-editor-active .enwp-slide.active {
    display: flex;
}

.elementor-editor-active .enwp-animate-item {
    opacity: 1 !important;
    transform: none !important;
}
