/* ============================================================
   JV SLIDER — Frontend Styles v1.1.0
   New in this version:
     - Image content source with responsive desktop/tablet/mobile
       variants (.jv-slide-img-wrap, .jv-img-desktop/tablet/mobile)
     - 3-4 tab bars stack into a single column on tablet/mobile
       (.jv-tabs[data-count="3"/"4"]) to prevent label clipping
   Carried from v1.0.2:
     1. Arrow icons always visible — removed overflow:hidden,
        icon sized relative to button via font-size on i/svg
     2. Dots are perfect circles — use span not button,
        explicit box-sizing and all UA resets
     3. Tab label colors default to dark (works on light bg)
     4. Top label never hidden at any breakpoint
   ============================================================ */

/* ── Wrapper ── */
.jv-slider-wrapper {
    position: relative;
    width: 100%;
}

/* ══════════════════════════════════════
   TAB BAR
══════════════════════════════════════ */
.jv-tabs {
    display: flex;
    border-bottom: 2px solid rgba(0, 0, 0, 0.12);
    list-style: none;
    padding: 0;
    margin: 0;
}

.jv-tab-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 14px 20px;
    position: relative;
    gap: 3px;
    transition: background-color 0.25s ease;
}

/* Active underline */
.jv-tab-btn::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #E85D26;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.jv-tab-btn.jv-active::after {
    transform: scaleX(1);
}

/* Autoplay progress bar */
.jv-tab-progress {
    position: absolute;
    bottom: -2px;
    left: 0;
    height: 3px;
    width: 0%;
    background-color: #E8507A;
    z-index: 2;
    pointer-events: none;
}

/* Top label */
.jv-tab-top {
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(0, 0, 0, 0.45);
    line-height: 1.3;
    transition: color 0.25s ease;
}

/* Bottom label */
.jv-tab-bottom {
    display: block;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(0, 0, 0, 0.45);
    line-height: 1.2;
    transition: color 0.25s ease;
}

/* Active state */
.jv-tab-btn.jv-active .jv-tab-top,
.jv-tab-btn.jv-active .jv-tab-bottom {
    color: #000000;
}

/* ── Tab Stacking for 3-4 tabs ──────────
   With only 2 tabs, side-by-side (flex:1)
   works fine down to small mobile.
   With 3-4 tabs, labels get squeezed and
   clipped well before mobile width — so
   those stack into a single column once
   the viewport drops to tablet size.
────────────────────────────────────── */
@media (max-width: 1024px) {
    .jv-tabs[data-count="3"],
    .jv-tabs[data-count="4"] {
        flex-direction: column;
    }

    .jv-tabs[data-count="3"] .jv-tab-btn,
    .jv-tabs[data-count="4"] .jv-tab-btn {
        flex: 1 1 100%;
        width: 100%;
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    }

    .jv-tabs[data-count="3"] .jv-tab-btn:last-child,
    .jv-tabs[data-count="4"] .jv-tab-btn:last-child {
        border-bottom: none;
    }

    /* The active underline (bottom border) still works per-button,
       but stacked items also get a left accent for clearer "selected" state */
    .jv-tabs[data-count="3"] .jv-tab-btn.jv-active,
    .jv-tabs[data-count="4"] .jv-tab-btn.jv-active {
        background-color: rgba(0, 0, 0, 0.03);
    }
}

/* ══════════════════════════════════════
   SLIDER OUTER + TRACK
══════════════════════════════════════ */
.jv-slider-outer {
    position: relative;
    overflow: hidden;
    width: 100%;
    cursor: grab;
}

.jv-slider-outer.jv-dragging {
    cursor: grabbing;
}

.jv-track {
    display: flex;
    will-change: transform;
    /* FIX: without explicit width, flex children's 100% resolves
       to the track's natural (expanded) width — causing each slide
       to be wider than the viewport and the translateX calc to
       drift further off with every slide navigation. */
    width: 100%;
}

.jv-track.jv-dragging {
    transition: none !important;
}

.jv-slide {
    /* FIX: both width AND min-width needed. width:100% resolves
       correctly against the outer container because the track is
       now also 100% wide. min-width prevents flex from shrinking
       the slide. Together they guarantee every slide = viewport width. */
    width: 100%;
    min-width: 100%;
    flex-shrink: 0;
    box-sizing: border-box;
    min-height: 500px;
    background-color: #1A1208;
    position: relative;
}

.jv-slide > .elementor {
    height: 100%;
    width: 100%;
}

/* ── Elementor "Stretch Section" fix ──
   Elementor stretched sections use 100vw + negative margins to
   break out of containers. Inside overflow:hidden this cuts off
   the left edge. Force them to stay within the slide bounds.
────────────────────────────────────── */
.jv-slide .elementor-section.elementor-section-stretched,
.jv-slide .e-con.e-con--full-width {
    width: 100% !important;
    max-width: 100% !important;
    left: auto !important;
    right: auto !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* ── Image Slides ──────────────────────
   Each slide can show a different image
   per breakpoint. Default image fit is
   "cover"; overridden via Elementor's
   "Image Fit" control on .jv-slide-img.
────────────────────────────────────── */
.jv-slide-img-wrap {
    display: block;
    position: relative;
    width: 100%;
    height: 100%;
}

.jv-slide-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Show desktop image by default, hide tablet/mobile variants */
.jv-img-tablet,
.jv-img-mobile {
    display: none;
}

/* Tablet: swap to tablet image (falls back to desktop URL if not set) */
@media (max-width: 1024px) {
    .jv-img-desktop { display: none; }
    .jv-img-tablet  { display: block; }
    .jv-img-mobile  { display: none; }
}

/* Mobile: swap to mobile image (falls back to tablet/desktop URL if not set) */
@media (max-width: 767px) {
    .jv-img-desktop { display: none; }
    .jv-img-tablet  { display: none; }
    .jv-img-mobile  { display: block; }
}

/* ══════════════════════════════════════
   BOTTOM NAVIGATION — overlaid on slide
   Position: absolute inside .jv-slider-outer
   so no extra space below the image.
══════════════════════════════════════ */
.jv-nav-row {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 16px 0 20px;
    /* Subtle gradient so arrows/dots are legible on any image */
    background: linear-gradient(to top, rgba(0,0,0,0.45) 0%, transparent 100%);
    pointer-events: none;   /* let clicks through to slide content */
}

/* Re-enable clicks on interactive children only */
.jv-nav-row .jv-arrow,
.jv-nav-row .jv-dots,
.jv-nav-row .jv-dot {
    pointer-events: auto;
}

/* ── Arrows ──────────────────────────
   FIX: NO overflow:hidden — that clips
   the icon. Icon is sized via font-size
   set to ~40% of button size by default.
   Button size & icon size are independent
   Elementor slider controls.
────────────────────────────────────── */
.jv-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.6);
    background-color: rgba(0, 0, 0, 0.35);
    color: #ffffff;
    cursor: pointer;
    transition: background-color 0.22s ease, color 0.22s ease,
                border-color 0.22s ease, transform 0.15s ease;
}

.jv-arrow:hover {
    background-color: #E85D26;
    color: #ffffff;
    border-color: #E85D26;
    transform: scale(1.08);
}

/* ── Icon inside arrow ──
   font-size drives icon size.
   Elementor "Icon Size" slider targets these selectors.
   Default ~40% of button = 18px for 44px button.
────────────────────────────────────── */
.jv-arrow i {
    font-size: 18px;
    line-height: 1;
    display: block;
    pointer-events: none;
}

.jv-arrow svg {
    width: 18px;
    height: 18px;
    display: block;
    pointer-events: none;
    fill: currentColor;
}

/* ── Dots ────────────────────────────
   FIX: dots are <button> elements.
   Browsers apply min-width, padding,
   border — all must be zeroed out
   explicitly to guarantee circle shape.
────────────────────────────────────── */
.jv-dots {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
}

.jv-dot {
    box-sizing: border-box;
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.jv-dot.jv-active {
    background-color: #ffffff;
    transform: scale(1.4);
}

/* ══════════════════════════════════════
   RESPONSIVE SHELL
   Slide content is handled by the
   Elementor template — not here.
   No content is ever hidden by the plugin.
══════════════════════════════════════ */

/* Tablet */
@media (max-width: 1024px) {
    .jv-tab-bottom { font-size: 13px; }
    .jv-tab-top    { font-size: 10px; }
}

/* Mobile */
@media (max-width: 767px) {
    .jv-tabs { border-bottom-width: 1px; }

    .jv-tab-btn {
        padding: 10px 8px;
    }

    .jv-tab-top    { font-size: 9px;  letter-spacing: 0.08em; }
    .jv-tab-bottom { font-size: 11px; letter-spacing: 0.02em; }

    .jv-arrow { width: 38px; height: 38px; }
    .jv-arrow i   { font-size: 15px; }
    .jv-arrow svg { width: 15px; height: 15px; }

    .jv-nav-row { gap: 12px; padding: 12px 0 6px; }
}

/* Small mobile */
@media (max-width: 400px) {
    .jv-tab-top    { font-size: 8px; }
    .jv-tab-bottom { font-size: 10px; }

    .jv-arrow { width: 32px; height: 32px; }
    .jv-arrow i   { font-size: 13px; }
    .jv-arrow svg { width: 13px; height: 13px; }
}
