/* ============================================================
   JD Hero Slider — Frontend Styles v1.2.0
   ============================================================ */


/* ── Wrapper & FOUC Prevention ───────────────────────────── */

.jd-hs-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.jd-hs-swiper {
    position: relative;
    overflow: hidden;
    width: 100%;
}

/* Prevent layout shift (vertical stacking) before Swiper initializes */
.jd-hs-swiper:not(.swiper-initialized) .swiper-wrapper {
    display: flex;
    flex-wrap: nowrap;
}

.jd-hs-swiper:not(.swiper-initialized) .jd-hs-slide {
    width: 100%;
    flex-shrink: 0;
}


/* ── Slide ───────────────────────────────────────────────── */

.jd-hs-slide {
    position: relative;
    overflow: hidden;
    display: block;
    text-decoration: none;
    color: inherit;
}

a.jd-hs-slide { cursor: pointer; }


/* ── Image — Fixed height mode (default) ─────────────────── */

.jd-hs-wrapper:not(.jd-hs-auto-height) .jd-hs-slide picture {
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.jd-hs-wrapper:not(.jd-hs-auto-height) .jd-hs-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}


/* ── Image — Auto height mode ────────────────────────────── */

.jd-hs-auto-height .jd-hs-slide picture {
    display: block;
    width: 100%;
}

.jd-hs-auto-height .jd-hs-image {
    display: block;
    width: 100%;
    height: auto;
}

/* ── Overlay scrim ───────────────────────────────────────── */

.jd-hs-slide--has-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}


/* ── Content overlay ─────────────────────────────────────── */

.jd-hs-overlay {
    position: absolute;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.jd-hs-pos--top-left      { top: 0; left: 0; }
.jd-hs-pos--top-center    { top: 0; left: 50%; transform: translateX(-50%); }
.jd-hs-pos--top-right     { top: 0; right: 0; }
.jd-hs-pos--center-left   { top: 50%; left: 0; transform: translateY(-50%); }
.jd-hs-pos--center-center { top: 50%; left: 50%; transform: translate(-50%, -50%); }
.jd-hs-pos--center-right  { top: 50%; right: 0; transform: translateY(-50%); }
.jd-hs-pos--bottom-left   { bottom: 0; left: 0; }
.jd-hs-pos--bottom-center { bottom: 0; left: 50%; transform: translateX(-50%); }
.jd-hs-pos--bottom-right  { bottom: 0; right: 0; }


/* ── Title / Subtitle / Desc ─────────────────────────────── */

.jd-hs-title,
.jd-hs-subtitle,
.jd-hs-desc { margin: 0; padding: 0; }

.jd-hs-title { font-weight: 700; line-height: 1.15; }

.jd-hs-subtitle {
    display: block;
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.jd-hs-desc { line-height: 1.6; }


/* ── CTA Button ──────────────────────────────────────────── */

.jd-hs-btn {
    display: inline-block;
    text-decoration: none;
    font-weight: 600;
    line-height: 1;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
    cursor: pointer;
    border: none;
    align-self: flex-start;
}

.jd-hs-btn:hover { transform: translateY(-1px); }

[style*="text-align: center"] .jd-hs-btn,
[style*="text-align:center"] .jd-hs-btn { align-self: center; }
[style*="text-align: right"] .jd-hs-btn,
[style*="text-align:right"] .jd-hs-btn { align-self: flex-end; }


/* ════════════════════════════════════════════════════════════
   CENTER MODE
   ════════════════════════════════════════════════════════════ */

.jd-hs-wrapper.jd-hs-centered .jd-hs-swiper { padding: 20px 0; }

.jd-hs-wrapper.jd-hs-centered .swiper-slide {
    opacity: 0.55;
    transform: scale(0.88);
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                opacity 0.5s ease;
}

.jd-hs-wrapper.jd-hs-centered .swiper-slide-active {
    opacity: 1;
    transform: scale(var(--jd-hs-center-scale, 1));
    z-index: 2;
}


/* ════════════════════════════════════════════════════════════
   FADE — stacking
   ════════════════════════════════════════════════════════════ */

.jd-hs-swiper .swiper-slide-active { z-index: 1; }



/* ════════════════════════════════════════════════════════════
   NAVIGATION — Arrows
   ════════════════════════════════════════════════════════════ */

.jd-hs-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 0;
    line-height: 0;
}

.jd-hs-arrow svg { display: block; stroke: currentColor; }

/* Hover-only (default) */
.jd-hs-wrapper:not(.jd-hs-arrows-always) .jd-hs-arrow { opacity: 0; }
.jd-hs-wrapper:not(.jd-hs-arrows-always):hover .jd-hs-arrow { opacity: 1; }

/* Always visible */
.jd-hs-arrows-always .jd-hs-arrow { opacity: 1; }

/* Touch devices */
@media (hover: none) { .jd-hs-arrow { opacity: 1 !important; } }


/* ════════════════════════════════════════════════════════════
   PAGINATION — Round dots
   ════════════════════════════════════════════════════════════ */

.jd-hs-pagination {
    text-align: center;
    z-index: 10;
}

.jd-hs-pagination--inside {
    position: absolute;
    left: 0;
    right: 0;
}

.jd-hs-pagination--outside {
    position: relative;
}

/* Base bullet reset */
.jd-hs-pagination .swiper-pagination-bullet {
    opacity: 1;
    margin: 0 4px;
    transition: background 0.3s ease, transform 0.3s ease, width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Round dots: width = height (perfect circles) ──────── */
.jd-hs-dots .swiper-pagination-bullet {
    border-radius: 50%;
}

.jd-hs-dots .swiper-pagination-bullet-active {
    transform: scale(1.35);
}


/* ── Pills: rounded capsule shape ──────────────────────── */
.jd-hs-pills .swiper-pagination-bullet {
    border-radius: 99px;
}

.jd-hs-pills .swiper-pagination-bullet-active {
    transform: none;
}


/* ════════════════════════════════════════════════════════════
   SWIPER INTERNALS
   ════════════════════════════════════════════════════════════ */

.jd-hs-swiper .swiper-wrapper { align-items: stretch; }
.jd-hs-swiper .swiper-slide { height: auto; }


/* ════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════ */

@media (max-width: 767px) {
    .jd-hs-wrapper:not(.jd-hs-arrows-always) .jd-hs-arrow {
        display: none;
    }
}
