/**
 * LzSlider - Professional Slider Component
 * Clean CSS with consistent lz-* naming convention
 */

.lz-background {
    position: absolute;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: scale(1) translateZ(0);
    z-index: 1;
    /* Ken Burns sempre ativo, mas só visível no slide ativo */
    animation: lzKenBurns 30s ease-in-out infinite alternate;
    animation-play-state: running;
    /* Otimizações de performance para parallax */
    will-change: transform;
    transform-style: preserve-3d;
    backface-visibility: hidden;
}

/**
 * LzSlider - Professional Slider Component
 * Clean CSS with consistent lz-* naming convention
 */

/* ============================================================================
   LZSLIDER CORE STRUCTURE
   ============================================================================ */
.lz-slider {
    position: relative;
    height: 100vh;
    overflow: hidden;
    /* Otimizações para parallax */
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Altura customizada via data-height */
.lz-slider[data-height] {
    height: var(--lz-height, 100vh);
}

#lzSliderContainer {
    position: relative;
    width: 100%;
    height: inherit;
    overflow: hidden;
}

#lzSliderContainer .slides-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.lz-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: inherit;
    opacity: 0;
    visibility: hidden;
    z-index: 1;
    transform: translateX(0) translateZ(0);
    will-change: transform, opacity;
    backface-visibility: hidden;
    perspective: 1000px;
    /* Preparação para parallax */
    transform-style: preserve-3d;
}

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

/* GPU acceleration e otimizações de performance */
.lz-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* ============================================================================
   LZSLIDER BACKGROUND & EFFECTS
   ============================================================================ */
.lz-background {
    position: absolute;
    top: -10%; /* Espaço extra para movimento parallax */
    left: -10%;
    width: 120%;
    height: 120%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: scale(1) translateZ(0);
    z-index: 1;
    animation: lzKenBurns 30s ease-in-out infinite alternate;
    /* Otimizações de performance para parallax */
    will-change: transform;
    transform-style: preserve-3d;
    backface-visibility: hidden;
}

.lz-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.6) 100%);
    z-index: 2;
    animation: lzOverlayPulse 15s ease-in-out infinite;
}

.lz-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
}

.lz-particles::before,
.lz-particles::after {
    content: '';
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: lzParticleFloat 8s ease-in-out infinite;
}

.lz-particles::before {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
    animation-duration: 12s;
}

.lz-particles::after {
    top: 70%;
    right: 15%;
    animation-delay: 6s;
    animation-duration: 10s;
}

/* ============================================================================
   LZSLIDER CONTENT
   ============================================================================ */
.lz-content {
    position: relative;
    z-index: 3;
    height: 100vh;
    animation: lzContentFloat 8s ease-in-out infinite;
    /* Otimizações para parallax */
    will-change: transform;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.lz-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    animation: lzTitleFloat 6s ease-in-out infinite;
}

.lz-subtitle {
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 1.4;
    margin-bottom: 1.5rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    animation: lzSubtitleFloat 7s ease-in-out infinite;
}

.lz-text {
    font-size: 1.1rem;
    line-height: 1.6;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    animation: lzTextFloat 9s ease-in-out infinite;
}

/* ============================================================================
   LZSLIDER CONTROLS
   ============================================================================ */
.lz-controls {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    z-index: 4;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lz-slider:hover .lz-controls {
    opacity: 1;
}

.lz-control {
    position: absolute;
    top: 0;
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
    backdrop-filter: blur(15px);
    cursor: pointer;
    user-select: none;
}

.lz-control:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.3);
}

.lz-control-prev {
    left: 30px;
    transform: translateX(-10px);
}

.lz-slider:hover .lz-control-prev {
    transform: translateX(0);
}

.lz-control-next {
    right: 30px;
    transform: translateX(10px);
}

.lz-slider:hover .lz-control-next {
    transform: translateX(0);
}

.lz-control:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.6);
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.lz-control:hover .lz-control-icon {
    transform: scale(1.15);
}

.lz-control:active {
    transform: scale(0.95);
}

.lz-control-icon {
    position: relative;
    z-index: 2;
    transition: transform 0.3s ease;
}

.lz-control-ripple {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
    pointer-events: none;
}

.lz-control:active .lz-control-ripple {
    width: 100px;
    height: 100px;
    opacity: 0.6;
}

/* ============================================================================
   LZSLIDER INDICATORS
   ============================================================================ */
.lz-indicators {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 4;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.lz-slider:hover .lz-indicators {
    opacity: 1;
}

.lz-indicator {
    position: relative;
    width: 50px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    border: none;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
}

.lz-indicator:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

.lz-indicator.active {
    background: rgba(255, 255, 255, 0.5);
}

.lz-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: white;
    border-radius: 2px;
    transition: width 0ms linear;
}

/* ============================================================================
   LZSLIDER SCROLL INDICATOR
   ============================================================================ */
.lz-scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: white;
    z-index: 4;
    animation: lzScrollPulse 2s ease-in-out infinite;
}

.lz-scroll-text {
    font-size: 0.9rem;
    margin-bottom: 8px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.lz-scroll-arrow {
    font-size: 1.2rem;
    animation: lzScrollBounce 1.5s ease-in-out infinite;
}

/* ============================================================================
   LZSLIDER ANIMATIONS
   ============================================================================ */

/* Ken Burns Effect */
@keyframes lzKenBurns {
    0% {
        transform: scale(1) translate(0, 0);
    }
    25% {
        transform: scale(1.08) translate(-2%, -1%);
    }
    50% {
        transform: scale(1.12) translate(1%, -2%);
    }
    75% {
        transform: scale(1.06) translate(-1%, 1%);
    }
    100% {
        transform: scale(1.1) translate(2%, -1%);
    }
}

/* Ken Burns Variations */
.lz-slide:nth-child(2n) .lz-background {
    animation: lzKenBurns2 35s ease-in-out infinite alternate-reverse;
}

.lz-slide:nth-child(3n) .lz-background {
    animation: lzKenBurns3 25s ease-in-out infinite alternate;
}

@keyframes lzKenBurns2 {
    0% {
        transform: scale(1.05) translate(1%, 0);
    }
    33% {
        transform: scale(1.1) translate(-1%, 2%);
    }
    66% {
        transform: scale(1.08) translate(2%, -1%);
    }
    100% {
        transform: scale(1.12) translate(-2%, 1%);
    }
}

@keyframes lzKenBurns3 {
    0% {
        transform: scale(1.02) translate(-1%, 1%);
    }
    50% {
        transform: scale(1.15) translate(1%, -2%);
    }
    100% {
        transform: scale(1.08) translate(-1%, 2%);
    }
}

/* Overlay Pulse */
@keyframes lzOverlayPulse {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.85;
    }
}

/* Particle Float */
@keyframes lzParticleFloat {
    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.3;
    }
    25% {
        transform: translateY(-20px) rotate(90deg);
        opacity: 0.6;
    }
    50% {
        transform: translateY(-30px) rotate(180deg);
        opacity: 1;
    }
    75% {
        transform: translateY(-15px) rotate(270deg);
        opacity: 0.4;
    }
}

/* Variações de animações para partículas dinâmicas */
@keyframes lzParticleFloat1 {
    0%,
    100% {
        transform: translate3d(0, 0, 0) scale(1);
        opacity: 0.2;
    }
    50% {
        transform: translate3d(-8px, -15px, 0) scale(1.1);
        opacity: 0.6;
    }
}

@keyframes lzParticleFloat2 {
    0%,
    100% {
        transform: translate3d(0, 0, 0) scale(0.9);
        opacity: 0.15;
    }
    50% {
        transform: translate3d(10px, -20px, 0) scale(1.2);
        opacity: 0.5;
    }
}

@keyframes lzParticleFloat3 {
    0%,
    100% {
        transform: translate3d(0, 0, 0) scale(1);
        opacity: 0.1;
    }
    50% {
        transform: translate3d(-5px, -25px, 0) scale(1.15);
        opacity: 0.4;
    }
    60% {
        transform: translate(10px, -40px) scale(1.4) rotate(216deg);
        opacity: 0.9;
    }
    90% {
        transform: translate(5px, -5px) scale(1) rotate(324deg);
        opacity: 0.3;
    }
}

/* Ocultar partículas CSS originais quando usar sistema dinâmico */
.lz-particles[style*='--particle-display: none']::before,
.lz-particles[style*='--particle-display: none']::after {
    display: none;
}

/* Content Animations */
@keyframes lzContentFloat {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

@keyframes lzTitleFloat {
    0%,
    100% {
        transform: translateY(0) translateX(0);
    }
    33% {
        transform: translateY(-3px) translateX(1px);
    }
    66% {
        transform: translateY(2px) translateX(-1px);
    }
}

@keyframes lzSubtitleFloat {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-2px);
    }
}

@keyframes lzTextFloat {
    0%,
    100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-1px);
    }
    80% {
        transform: translateY(1px);
    }
}

/* Scroll Animations */
@keyframes lzScrollPulse {
    0%,
    100% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
}

@keyframes lzScrollBounce {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* ============================================================================
   LZSLIDER ANIMATION STATES
   ============================================================================ */

/* Ken Burns sempre ativo em todos os slides */
.lz-background {
    animation-play-state: running !important;
    filter: blur(3px);
}

/* Outras animações apenas no slide ativo */
.lz-slide.active .lz-content {
    animation-play-state: running;
}

.lz-slide:not(.active) .lz-content {
    animation-play-state: paused;
}

.lz-slide.active .lz-title {
    animation-play-state: running;
}

.lz-slide:not(.active) .lz-title {
    animation-play-state: paused;
}

.lz-slide.active .lz-subtitle {
    animation-play-state: running;
}

.lz-slide:not(.active) .lz-subtitle {
    animation-play-state: paused;
}

.lz-slide.active .lz-text {
    animation-play-state: running;
}

.lz-slide:not(.active) .lz-text {
    animation-play-state: paused;
}

.lz-slide.active .lz-particles {
    animation-play-state: running;
}

.lz-slide:not(.active) .lz-particles {
    animation-play-state: paused;
}

/* ============================================================================
   LZSLIDER RESPONSIVE DESIGN
   ============================================================================ */
@media (max-width: 768px) {
    .lz-controls {
        display: none;
    }

    .lz-control {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .lz-control-prev {
        left: 20px;
    }

    .lz-control-next {
        right: 20px;
    }

    .lz-indicators {
        bottom: 20px;
        gap: 8px;
    }

    .lz-indicator {
        width: 30px;
        height: 3px;
    }

    .lz-title {
        font-size: 2.5rem;
    }

    .lz-subtitle {
        font-size: 1.2rem;
    }

    .lz-text {
        font-size: 1rem;
    }
}

@media (max-width: 992px) {
    .lz-control {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .lz-control-prev {
        left: 20px;
    }

    .lz-control-next {
        right: 20px;
    }
}

/* ============================================================================
   LZSLIDER PERFORMANCE OPTIMIZATIONS
   ============================================================================ */

/* Visibility controls via data attributes - handled by JavaScript */
.lz-slider[data-lz-slider-show-indicators='false'] .lz-indicators {
    display: none;
}

.lz-slider[data-lz-slider-show-controls='false'] .lz-controls {
    display: none;
}

.lz-slider * {
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.lz-slide,
.lz-control,
.lz-indicator {
    transform: translateZ(0);
}
