/**
 * WafiSlider Pro — Scoped Frontend Stylesheet
 * 100% Isolated, Zero Class Collisions
 */

.wf-slider-container {
    position: relative;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    touch-action: pan-y pinch-zoom;
}

.wf-slider-viewport {
    position: relative;
    width: 100%;
    overflow: hidden;
    background-color: #0b0f19;
}

.wf-slider-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition-property: transform;
    transition-timing-function: cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform;
}

.wf-slide-item {
    position: relative;
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Slide Transition Effects */
.wf-slider-container[data-transition-effect="fade"] .wf-slider-track {
    display: block;
    position: relative;
    transform: none !important;
}

.wf-slider-container[data-transition-effect="fade"] .wf-slide-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease, visibility 0.6s ease;
    z-index: 1;
}

.wf-slider-container[data-transition-effect="fade"] .wf-slide-item.wf-slide-active {
    opacity: 1;
    visibility: visible;
    position: relative;
    z-index: 2;
}

/* Media (Images & Picture) */
.wf-slide-media {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.wf-slide-media picture,
.wf-slide-media img {
    display: block;
    width: 100%;
    height: 100%;
    border: none;
}

/* Slide Content Layers */
.wf-slide-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.wf-slide-element {
    pointer-events: auto;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.wf-slide-element a {
    display: inline-block;
}

/* Default Caption Layout (Fallback when no visual builder layers) */
.wf-slide-default-caption {
    position: absolute;
    bottom: 12%;
    left: 8%;
    max-width: 650px;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
    pointer-events: auto;
}

.wf-caption-subtitle {
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
    color: #ffc107;
}

.wf-caption-title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.2rem;
    color: #ffffff;
}

.wf-caption-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.75rem;
    background-color: #0d6efd;
    color: #ffffff !important;
    font-weight: 600;
    border-radius: 4px;
    text-decoration: none !important;
    box-shadow: 0 4px 14px rgba(13, 110, 253, 0.4);
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.wf-caption-btn:hover {
    background-color: #0b5ed7;
    transform: translateY(-2px);
}

/* Navigation Arrows */
.wf-slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.85);
    color: #1a1a1a;
    border: none;
    outline: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.wf-slider-arrow:hover {
    background-color: #ffffff;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.wf-arrow-prev {
    left: 20px;
}

.wf-arrow-next {
    right: 20px;
}

/* Pagination Dots */
.wf-slider-pagination {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.wf-pagination-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    background-color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    padding: 0;
    outline: none;
    transition: all 0.3s ease;
}

.wf-pagination-dot.wf-dot-active {
    background-color: #ffffff;
    width: 32px;
    border-radius: 6px;
}

/* Device Visibility Helpers */
@media (min-width: 1200px) {
    .wf-hide-desktop { display: none !important; }
}
@media (min-width: 768px) and (max-width: 1199px) {
    .wf-hide-laptop { display: none !important; }
}
@media (max-width: 767px) {
    .wf-hide-mobile { display: none !important; }
    .wf-caption-title { font-size: 1.6rem; }
    .wf-slider-arrow { width: 36px; height: 36px; }
    .wf-arrow-prev { left: 10px; }
    .wf-arrow-next { right: 10px; }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .wf-slider-track,
    .wf-slide-item,
    .wf-slider-arrow,
    .wf-pagination-dot {
        transition-duration: 0.001ms !important;
        animation-duration: 0.001ms !important;
    }
}
