/* ==========================================================
   auto-sliding-hero.css — Auto-Sliding Hero
   Parallax: target site pattern
     enter: translateY(0%) scale(1.0)   — scale starts at 1.0
     scroll: translateY(n%)  scale(1+n*0.015)
     trigger: top bottom → bottom top   (full scroll range)
   Transition: opacity fade (crossfade between slides)
   ========================================================== */

/* ── Section ─────────────────────────────────────────────── */
.jyl-ash {
    position: relative;
    overflow: hidden;
    background: var(--jyl-grey-dark);
    min-height: 70vh;
}

/* ── Slide stack ─────────────────────────────────────────── */
.jyl-ash__stack {
    position: absolute;
    inset: 0;
}

/* ── Slide
   NO opacity rule — JS controls entirely via inline style  ── */
.jyl-ash__slide {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.jyl-ash__slide-link {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 5;
}

/* ── Parallax wrap
   Mirrors target site: absolute inset-0, will-change-transform
   GSAP scrubs: translateY(0%)scale(1.0) → translateY(n%)scale(1+n*0.015)
   JS controls opacity for crossfade between slides         ── */
.jyl-ash__parallax-wrap {
    position: absolute;
    inset: 0;
    will-change: transform;
    transform: translateY(0%) scale(1.0) translateZ(0px);
}

/* Image fills the wrap */
.jyl-ash__parallax-wrap img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

/* ── Per-slide content ───────────────────────────────────── */
.jyl-ash__content {
    position: absolute;
    z-index: 15;
    pointer-events: auto;
    bottom: 4rem;
    left: 4rem;
}
.jyl-ash__content-inner { pointer-events: auto; }

.jyl-ash__content-heading {
    font-size: var(--jyl-fs-64);
    font-weight: var(--jyl-fw-bold);
    color: var(--jyl-white);
    margin: 0 0 20px;
    line-height: 1.1;
    letter-spacing: -.02em;
}
.jyl-ash__content-subtitle {
    font-size: var(--jyl-fs-18);
    color: rgba(255,255,255,.80);
    margin: 0 0 2rem;
    line-height: 1.6;
}
.jyl-ash__content-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 1.5rem;
}
.jyl-ash__content-btns .jyl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: var(--jyl-fw-medium);
    letter-spacing: .04em;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: 4px;
    padding: 12px 28px;
    cursor: pointer;
    transition:
        background-color 200ms ease,
        color            200ms ease,
        border-color     200ms ease;
}
.jyl-ash__content-btns .jyl-btn:focus-visible {
    outline: 2px solid rgba(255,255,255,.8);
    outline-offset: 3px;
}

/* ── Arrows ──────────────────────────────────────────────── */
.jyl-ash__arrow {
    position: absolute;
    top: 50%;
    z-index: 20;
    transform: translateY(-50%);
}
.jyl-ash__arrow--prev { left: 1.5rem; }
.jyl-ash__arrow--next { right: 1.5rem; }

/* ── Controls ────────────────────────────────────────────── */
.jyl-ash__controls {
    position: absolute;
    z-index: 20;
    display: flex;
    gap: 8px;
    top: 1.5rem;
    right: 1.5rem;
}
.jyl-icon-btn[data-jyl-ash-pause] .jyl-icon-play  { display: none; }
.jyl-icon-btn[data-jyl-ash-pause] .jyl-icon-pause { display: block; }
.jyl-icon-btn[data-jyl-ash-pause].is-paused .jyl-icon-pause { display: none; }
.jyl-icon-btn[data-jyl-ash-pause].is-paused .jyl-icon-play  { display: block; }

/* ── Pagination ──────────────────────────────────────────── */
.jyl-ash__pagination {
    position: absolute;
    z-index: 20;
    display: flex;
    gap: 8px;
    bottom: 2rem;
    right: 2rem;
}
.jyl-progress-bullet {
    position: relative;
    display: block;
    width: 28px;
    height: 2px;
    min-height: 2px;
    background: rgba(255,255,255,.30);
    border: none;
    padding: 0;
    cursor: pointer;
    overflow: hidden;
    border-radius: 1px;
    transition: width 300ms ease;
    appearance: none;
    -webkit-appearance: none;
}
.jyl-progress-bullet::before {
    content: '';
    position: absolute;
    inset: -8px 0;
}
.jyl-progress-bullet.is-active {
    width: 80px;
    background: rgba(255,255,255,.50);
}
.jyl-progress-bar-inner {
    display: block;
    position: absolute;
    left: 0; top: 0;
    height: 100%;
    width: 0%;
    background: #fff;
    border-radius: 1px;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1197px) {
    .jyl-ash { min-height: 60vh; }
    .jyl-ash__content-heading { font-size: var(--jyl-fs-48); }
    .jyl-ash__arrow--prev { left: 1rem; }
    .jyl-ash__arrow--next { right: 1rem; }
    .jyl-ash__content { max-width: calc(100vw - 4rem); }
}
@media (max-width: 597px) {
    .jyl-ash { min-height: 55vh; }
    .jyl-ash__content-heading { font-size: 36px; }
    .jyl-ash__content-subtitle { font-size: 15px; }
    .jyl-ash__arrow { display: none; }
    .jyl-progress-bullet { width: 20px; }
    .jyl-progress-bullet.is-active { width: 52px; }
    .jyl-ash__content { max-width: calc(100vw - 2.5rem); }
}

@media (prefers-reduced-motion: reduce) {
    .jyl-ash__parallax-wrap { will-change: auto; transform: none !important; }
    .jyl-progress-bullet { transition: none; }
}