/* WP Light Slider — Frontend CSS
   Zero JS dependencies. Pure CSS transitions.
   Designed for maximum PageSpeed scores.
*/

/* ── Elementor container resets ─────────────────────────────── */
.elementor-widget-wpls_slider { width: 100%; }
.elementor-widget-wpls_slider .elementor-widget-container {
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden;
    line-height: 0;
}
/* Override Elementor column/container padding that collapses slider */
.e-con:has(.elementor-widget-wpls_slider),
.elementor-column:has(.elementor-widget-wpls_slider) {
    padding: 0 !important;
}

.wpls-slider {
    position: relative;
    width: 100%;
    height: var(--wpls-h-desktop, 550px);
    overflow: hidden;
    background: #111;
    -webkit-font-smoothing: antialiased;
}

/* ── Track ──────────────────────────────────────────────────── */
.wpls-track {
    position: relative;
    width: 100%;
    height: 100%;
}

/* ── Slides ─────────────────────────────────────────────────── */
.wpls-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--wpls-speed, 800ms) ease,
                visibility var(--wpls-speed, 800ms) ease,
                transform var(--wpls-speed, 800ms) ease;
    will-change: opacity, transform;
    cursor: default;
}

.wpls-slide[data-link] { cursor: pointer; }

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

.wpls-slide.wpls-leaving {
    opacity: 0;
    visibility: hidden;
    z-index: 1;
}

/* ── Fade Transition ────────────────────────────────────────── */
.wpls-trans-fade .wpls-slide {
    transform: none;
}

/* ── Slide Transition ───────────────────────────────────────── */
.wpls-trans-slide .wpls-slide {
    transform: translateX(100%);
}
.wpls-trans-slide .wpls-slide.wpls-active {
    transform: translateX(0);
}
.wpls-trans-slide .wpls-slide.wpls-prev-slide {
    transform: translateX(-100%);
    opacity: 0;
    visibility: hidden;
}

/* ── Zoom Transition ────────────────────────────────────────── */
.wpls-trans-zoom .wpls-slide {
    transform: scale(1.08);
}
.wpls-trans-zoom .wpls-slide.wpls-active {
    transform: scale(1);
}

/* ── Background Image ───────────────────────────────────────── */
.wpls-bg-picture {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
}

.wpls-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* default — overridden per-slide via inline style */
    object-position: center;
    display: block;
    /* Subtle Ken Burns pan on active slide */
    transition: transform 8s ease;
}

.wpls-slide.wpls-active .wpls-bg-img {
    transform: scale(1.05);
}

/* ── Overlay ────────────────────────────────────────────────── */
.wpls-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

/* ── Content ────────────────────────────────────────────────── */
.wpls-content {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 60px;
    box-sizing: border-box;
    /* Animate content in */
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease 0.2s, transform 0.6s ease 0.2s;
}

.wpls-slide.wpls-active .wpls-content {
    opacity: 1;
    transform: translateY(0);
}

.wpls-align-center { align-items: center; text-align: center; }
.wpls-align-left   { align-items: flex-start; text-align: left; }
.wpls-align-right  { align-items: flex-end; text-align: right; }

/* ── Typography ─────────────────────────────────────────────── */
.wpls-icon {
    max-height: 60px;
    max-width: 180px;
    object-fit: contain;
    margin-bottom: 16px;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.4));
}

.wpls-heading {
    font-size: clamp(1.6rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.15;
    margin: 0 0 14px;
    text-shadow: 0 2px 12px rgba(0,0,0,0.5);
    max-width: 800px;
}

.wpls-subheading {
    font-size: clamp(0.9rem, 2vw, 1.2rem);
    line-height: 1.6;
    margin: 0 0 24px;
    text-shadow: 0 1px 6px rgba(0,0,0,0.4);
    max-width: 680px;
    opacity: 0.92;
}

/* ── Buttons ────────────────────────────────────────────────── */
.wpls-btns {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.wpls-align-center .wpls-btns { justify-content: center; }
.wpls-align-right  .wpls-btns { justify-content: flex-end; }

.wpls-btn {
    display: inline-block;
    padding: 13px 30px;
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
    letter-spacing: 0.3px;
    white-space: nowrap;
    border: 2px solid transparent;
}

.wpls-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

/* Primary — solid white button */
.wpls-btn-primary {
    background: #fff;
    color: #111 !important;
    border-color: #fff;
}
.wpls-btn-primary:hover { opacity: 0.9; }

/* Outline — transparent with white border */
.wpls-btn-outline {
    background: transparent;
    color: inherit !important;
    border-color: currentColor;
}
.wpls-btn-outline:hover { background: rgba(255,255,255,0.15); }

/* Ghost — text only with subtle hover */
.wpls-btn-ghost {
    background: transparent;
    color: inherit !important;
    border-color: transparent;
    padding-left: 0;
    padding-right: 0;
}
.wpls-btn-ghost:hover { text-decoration: underline; }

/* ── Arrows ─────────────────────────────────────────────────── */
.wpls-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(0,0,0,0.35);
    color: #fff;
    border: none;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.wpls-arrow:hover {
    background: rgba(0,0,0,0.65);
    transform: translateY(-50%) scale(1.08);
}

.wpls-prev { left: 16px; }
.wpls-next { right: 16px; }

/* ── Dots ───────────────────────────────────────────────────── */
.wpls-dots {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 8px;
}

.wpls-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.45);
    border: 2px solid rgba(255,255,255,0.7);
    cursor: pointer;
    padding: 0;
    transition: background 0.2s ease, transform 0.2s ease;
}

.wpls-dot-active,
.wpls-dot:hover {
    background: #fff;
    transform: scale(1.3);
}

/* ── Mobile ─────────────────────────────────────────────────── */
@media (max-width: 767px) {
    .wpls-slider {
        height: var(--wpls-h-mobile, 300px);
    }

    .wpls-content {
        padding: 24px 20px;
    }

    .wpls-arrow {
        width: 36px;
        height: 36px;
        font-size: 20px;
    }

    .wpls-btn {
        padding: 10px 20px;
        font-size: 0.85rem;
    }

    .wpls-btns {
        gap: 8px;
    }
}

/* ── Reduced motion ─────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .wpls-slide,
    .wpls-content,
    .wpls-bg-img {
        transition: none !important;
        animation: none !important;
    }
}
