/* =====================================================
 * Slider frontend — overrides on top of Swiper defaults.
 * Scoped to .sw-slider so global page CSS can't bleed in.
 * Dimensions driven by per-instance CSS vars: --sw-d-h /
 * --sw-d-w (desktop) and --sw-m-h / --sw-m-w (mobile).
 * ===================================================== */

.sw-slider {
    width: var(--sw-d-w, 100%);
    height: var(--sw-d-h, 500px);
    margin: 0 auto;
    overflow: hidden !important;     /* clip any rogue overflow from clones */
    position: relative;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .sw-slider {
        width: var(--sw-m-w, 100%);
        height: var(--sw-m-h, 300px);
    }
}

/* The wrapper holds all slides in a flex row that Swiper translates.
   box-sizing must match the slide so width math doesn't drift by 1-2px.
   `width: 100%` forces wrapper to match container — Swiper calculates the
   transform from this, so a stable wrapper width is essential. */
.sw-slider .swiper-wrapper {
    box-sizing: content-box !important;
    width: 100% !important;
    height: 100% !important;
}

/* Each slide MUST equal the container width when slidesPerView=1.
   `width: 100% !important` + `min-width: 100% !important` defeat any
   rogue Swiper inline width that was causing the "multiple slides
   visible side-by-side" bug (Swiper occasionally computes a smaller
   width when the container's parent size is still settling during init
   or when loop-mode clones get added). flex-shrink:0 stops slides from
   collapsing inside the wrapper's flex container. */
.sw-slider .swiper-slide {
    flex-shrink: 0 !important;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    box-sizing: border-box !important;
}

/* The slide overlay/content stack — same element as .swiper-slide. */
.sw-slider .sw-slide {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    overflow: hidden;
}

/* Overlay layer sits over the bg image, under the link + content */
.sw-slider .sw-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

/* Whole-slide click target — transparent anchor covering the entire slide.
   Sits ABOVE the overlay so it's clickable, BELOW the content so the button
   can still receive its own click. */
.sw-slider .sw-link {
    position: absolute;
    inset: 0;
    z-index: 2;
    text-decoration: none;
    /* Intentionally no background — just a click capture surface */
}

/* Content layer — text + button on top of everything else.
   pointer-events:none on the wrapper lets clicks on empty text fall THROUGH
   to .sw-link below; the button re-enables pointer-events for itself so its
   own click wins. Without this trick, the .sw-link is unreachable wherever
   text covers it. */
.sw-slider .sw-content {
    position: relative;
    z-index: 3;
    width: 100%;
    padding: 24px 28px;
    max-width: 1100px;
    pointer-events: none;
}
.sw-slider .sw-content a,
.sw-slider .sw-content button {
    pointer-events: auto;
}
.sw-slider .sw-content-inner {
    display: inline-block;
    max-width: 720px;
}

/* Typography */
.sw-slider .sw-kicker {
    text-transform: uppercase;
    letter-spacing: .14em;
    font-size: .8rem;
    font-weight: 600;
    opacity: .9;
    margin-bottom: 8px;
}
.sw-slider .sw-title {
    font-size: clamp(1.6rem, 4.4vw, 3.2rem);
    line-height: 1.15;
    font-weight: 800;
    margin: 0 0 12px;
}
.sw-slider .sw-desc {
    font-size: clamp(.95rem, 1.4vw, 1.125rem);
    line-height: 1.55;
    margin: 0 0 18px;
    opacity: .95;
}
.sw-slider .sw-btn {
    display: inline-block;
    background: #fff;
    color: #111;
    padding: 11px 26px;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease;
    box-shadow: 0 4px 14px rgba(0,0,0,.18);
}
.sw-slider .sw-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(0,0,0,.25);
    color: #111;
}

/* Swiper arrows — neutral white-on-dark pill */
.sw-slider .swiper-button-next,
.sw-slider .swiper-button-prev {
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0,0,0,.35);
    backdrop-filter: blur(4px);
    transition: background .15s ease;
}
.sw-slider .swiper-button-next:hover,
.sw-slider .swiper-button-prev:hover {
    background: rgba(0,0,0,.55);
}
.sw-slider .swiper-button-next::after,
.sw-slider .swiper-button-prev::after {
    font-size: 18px;
    font-weight: 700;
}

/* Pagination dots */
.sw-slider .swiper-pagination-bullet {
    background: #fff;
    opacity: .55;
    width: 10px;
    height: 10px;
    transition: opacity .15s ease, transform .15s ease;
}
.sw-slider .swiper-pagination-bullet-active {
    opacity: 1;
    transform: scale(1.2);
}

/* Mobile tightening */
@media (max-width: 480px) {
    .sw-slider .sw-content { padding: 16px 18px; }
    .sw-slider .sw-btn { padding: 9px 20px; font-size: .9rem; }
    .sw-slider .swiper-button-next,
    .sw-slider .swiper-button-prev { width: 36px; height: 36px; }
    .sw-slider .swiper-button-next::after,
    .sw-slider .swiper-button-prev::after { font-size: 14px; }
}
