/* ========================================================
   Custom Layer Slider (WP Revolution Lite) - Frontend CSS
   ======================================================== */

.cls-slider-wrapper {
    position: relative;
    width: 100%;
    margin: 0 auto;
    overflow: hidden;
    user-select: none;
    background-color: #0b0f19;
    box-sizing: border-box;
}

.cls-slider-wrapper *,
.cls-slider-wrapper *::before,
.cls-slider-wrapper *::after {
    box-sizing: border-box;
}

/* Full Width Breakout (edge to edge 100vw) */
.cls-slider-wrapper.cls-layout-fullwidth {
    width: 100vw !important;
    max-width: 100vw !important;
    position: relative;
    left: 50% !important;
    right: 50% !important;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
}

/* Full Screen (100vw x 100vh) */
.cls-slider-wrapper.cls-layout-fullscreen {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100vh !important;
    position: relative;
    left: 50% !important;
    right: 50% !important;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
}

/* Under Theme Header Mode */
.cls-slider-wrapper.cls-under-header {
    z-index: 1;
}

.cls-slides-viewport {
    position: relative;
    width: 100%;
    height: 100%;
}

.cls-slide-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    z-index: 1;
    transition: opacity 0.8s ease-in-out, visibility 0.8s ease-in-out;
}

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

/* Backgrounds */
.cls-slide-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    transform: scale(1);
    will-change: transform;
}

/* Ken Burns Zoom In */
.cls-slide-item.cls-active .cls-bg-anim-kenburns-zoom-in {
    animation: cls-bg-zoom-in 9s ease-out forwards;
}
@keyframes cls-bg-zoom-in {
    0% { transform: scale(1); }
    100% { transform: scale(1.18); }
}

/* Ken Burns Zoom Out */
.cls-slide-item.cls-active .cls-bg-anim-kenburns-zoom-out {
    animation: cls-bg-zoom-out 9s ease-out forwards;
}
@keyframes cls-bg-zoom-out {
    0% { transform: scale(1.18); }
    100% { transform: scale(1); }
}

/* Pan Left */
.cls-slide-item.cls-active .cls-bg-anim-pan-left {
    animation: cls-bg-pan-left 9s ease-out forwards;
}
@keyframes cls-bg-pan-left {
    0% { transform: scale(1.15) translate3d(3%, 0, 0); }
    100% { transform: scale(1.15) translate3d(-3%, 0, 0); }
}

/* Pan Right */
.cls-slide-item.cls-active .cls-bg-anim-pan-right {
    animation: cls-bg-pan-right 9s ease-out forwards;
}
@keyframes cls-bg-pan-right {
    0% { transform: scale(1.15) translate3d(-3%, 0, 0); }
    100% { transform: scale(1.15) translate3d(3%, 0, 0); }
}

/* None (Static) */
.cls-slide-item.cls-active .cls-bg-anim-none {
    transform: none !important;
    animation: none !important;
}

/* YouTube Video Background */
.cls-bg-video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.cls-bg-video-iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 56.25vw; /* 16:9 Aspect Ratio */
    min-height: 100%;
    min-width: 177.77vh; /* 16:9 Aspect Ratio */
    transform: translate(-50%, -50%);
    pointer-events: none;
}

/* Dark/Tint Overlay */
.cls-slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

/* Layers Container */
.cls-slide-layers {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    pointer-events: none;
}

/* Layer Positioning Wrapper */
.cls-layer-pos {
    position: absolute;
    z-index: 3;
    pointer-events: none;
    max-width: 95%;
    display: inline-block;
}

.cls-layer-pos.cls-pos-center {
    left: 50% !important;
    transform: translateX(-50%) !important;
}

.cls-layer-item {
    position: relative;
    display: inline-block;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0 !important;
    white-space: pre-line;
    word-break: break-word;
    pointer-events: auto;
    transform-origin: center center;
    will-change: transform, opacity;
}

/* Fallback: Active slide layers are visible by default so they never disappear */
.cls-slide-item.cls-active .cls-layer-item {
    opacity: 1;
}

/* Layer waiting for its animation delay */
.cls-layer-item.cls-layer-waiting {
    opacity: 0;
}

.cls-layer-item,
.cls-layer-item p,
.cls-layer-item h1,
.cls-layer-item h2,
.cls-layer-item h3,
.cls-layer-item div,
.cls-layer-item span {
    margin: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    line-height: inherit;
}

.cls-layer-button {
    display: inline-block;
    cursor: pointer;
    text-decoration: none !important;
    transition: transform 0.2s ease, opacity 0.2s ease, filter 0.2s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
}

.cls-layer-button:hover {
    filter: brightness(1.15);
    transform: translateY(-2px);
}

/* When slide is active and layer triggered */
.cls-active .cls-layer-item.cls-animated {
    opacity: 1 !important;
    pointer-events: auto;
    animation-fill-mode: forwards;
}

/* Animation Keyframes */
@keyframes cls-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes cls-slide-in-left {
    from {
        opacity: 0;
        transform: translate3d(-70px, 0, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes cls-slide-in-right {
    from {
        opacity: 0;
        transform: translate3d(70px, 0, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes cls-slide-in-top {
    from {
        opacity: 0;
        transform: translate3d(0, -50px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes cls-slide-in-bottom {
    from {
        opacity: 0;
        transform: translate3d(0, 50px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes cls-zoom-in {
    from {
        opacity: 0;
        transform: scale3d(0.6, 0.6, 0.6);
    }
    to {
        opacity: 1;
        transform: scale3d(1, 1, 1);
    }
}

/* Specific Animation Classes */
.cls-active .cls-anim-fade-in {
    animation-name: cls-fade-in;
}

.cls-active .cls-anim-slide-in-left {
    animation-name: cls-slide-in-left;
}

.cls-active .cls-anim-slide-in-right {
    animation-name: cls-slide-in-right;
}

.cls-active .cls-anim-slide-in-top {
    animation-name: cls-slide-in-top;
}

.cls-active .cls-anim-slide-in-bottom {
    animation-name: cls-slide-in-bottom;
}

.cls-active .cls-anim-zoom-in {
    animation-name: cls-zoom-in;
}

/* Navigation Arrows */
.cls-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 48px;
    height: 48px;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-size: 20px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    padding: 0;
    outline: none;
}

.cls-slider-wrapper:hover .cls-nav-btn {
    opacity: 1;
}

.cls-nav-btn:hover {
    background: rgba(15, 23, 42, 0.95);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-50%) scale(1.1);
}

.cls-nav-prev {
    left: 20px;
}

.cls-nav-next {
    right: 20px;
}

/* Dots Indicator */
.cls-dots-container {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 10px;
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(4px);
    border-radius: 20px;
}

.cls-dot-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.cls-dot-btn.cls-active {
    background: #ffffff;
    transform: scale(1.25);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .cls-slider-wrapper {
        height: 380px !important;
    }
    
    .cls-layer-item {
        font-size: 80% !important;
        max-width: 90% !important;
    }

    .cls-layer-heading {
        font-size: 24px !important;
    }

    .cls-layer-text {
        font-size: 14px !important;
    }

    .cls-nav-btn {
        width: 36px;
        height: 36px;
        font-size: 16px;
        opacity: 0.8;
    }

    .cls-nav-prev {
        left: 8px;
    }

    .cls-nav-next {
        right: 8px;
    }
}
