/* ============================================================
   HBL Parallax Slider
   
   Desktop (>768px): side-by-side parallax layout.
   Mobile (<=768px): touch swipeable slider with dots.
   
   Uses CSS custom properties from Avada theme where possible.
   Accessibility: respects prefers-reduced-motion (WCAG 2.3.3).
============================================================ */

/* ----------------------------------------------------------
   Outer wrapper
---------------------------------------------------------- */
.hbl-parallax-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
}

/* ----------------------------------------------------------
   Track — contains all slides side by side on mobile,
   stacked (each visible) on desktop.
---------------------------------------------------------- */
.hbl-parallax-slider__track {
    display: flex;
    width: 100%;
}

/* ----------------------------------------------------------
   Single slide
---------------------------------------------------------- */
.hbl-slide {
    display: flex;
    align-items: center;
    gap: 4%;
    padding: 60px 0;
    width: 100%;
    flex-shrink: 0;
}

/* ----------------------------------------------------------
   Image column
---------------------------------------------------------- */
.hbl-slide__images {
    position: relative;
    flex: 0 0 45%;
    max-width: 45%;
    min-height: 400px;
}

.hbl-slide__image-bg {
    position: absolute;
    top: 0;
    right: -8%;
    width: 75%;
    height: 100%;
    border-radius: 16px;
    overflow: hidden;
    z-index: 0;
}

.hbl-slide__image-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hbl-slide__image-main {
    position: relative;
    width: 85%;
    border-radius: 16px;
    overflow: hidden;
    z-index: 1;
    box-shadow: 0 8px 40px rgba(72, 0, 115, 0.12);
}

.hbl-slide__image-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ----------------------------------------------------------
   Content column
---------------------------------------------------------- */
.hbl-slide__content {
    flex: 1;
    padding-left: 2%;
}

.hbl-slide__eyebrow {
    font-family: 'Manrope', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    color: var(--awb-color3, #480073);
    margin: 0 0 0.5rem;
    line-height: 1.5;
}

.hbl-slide__title {
    font-family: 'Manrope', sans-serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: var(--awb-color3, #480073);
    line-height: 1.1;
    margin: 0 0 1.25rem;
    letter-spacing: -0.02em;
}

/* Tag pills */
.hbl-slide__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.hbl-slide__tag {
    display: inline-block;
    padding: 0.4em 1em;
    border-radius: 999px;
    background: hsl(
        var(--awb-color7-h, 180),
        var(--awb-color7-s, 100%),
        85%
    );
    color: var(--awb-color3, #480073);
    font-family: 'Manrope', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.4;
}

.hbl-slide__body {
    font-family: 'Manrope', sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--awb-color3, #480073);
    margin: 0 0 1.5rem;
    opacity: 0.85;
}

.hbl-slide__link {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    font-family: 'Manrope', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--awb-color3, #480073);
    text-decoration: none;
    border-bottom: 2px solid currentColor;
    padding-bottom: 2px;
    transition: opacity 0.2s ease;
}

.hbl-slide__link:hover {
    opacity: 0.7;
}

/* Focus style for keyboard navigation (WCAG SC 2.4.7) */
.hbl-slide__link:focus-visible {
    outline: 2px solid var(--awb-color3, #480073);
    outline-offset: 4px;
    border-radius: 2px;
}

/* ----------------------------------------------------------
   Parallax layers — JS sets --parallax-offset via transform.
   Only active on desktop. Mobile ignores the transform.
---------------------------------------------------------- */
.hbl-parallax-layer {
    will-change: transform;
    transition: transform 0.05s linear;
}

/* ----------------------------------------------------------
   Dots navigation — hidden on desktop, visible on mobile
---------------------------------------------------------- */
.hbl-parallax-slider__dots {
    display: none;
    justify-content: center;
    gap: 0.5rem;
    padding: 1.25rem 0 0.5rem;
}

.hbl-dot {
    width: 28px;
    height: 4px;
    border-radius: 999px;
    background: var(--awb-color3, #480073);
    opacity: 0.25;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: opacity 0.2s ease, width 0.2s ease;
}

.hbl-dot.is-active {
    opacity: 1;
    width: 48px;
}

/* Focus style on dots (WCAG SC 2.4.7) */
.hbl-dot:focus-visible {
    outline: 2px solid var(--awb-color3, #480073);
    outline-offset: 3px;
    border-radius: 4px;
}

/* ----------------------------------------------------------
   Mobile — slider mode
   Breakpoint matches Avada's default mobile breakpoint.
---------------------------------------------------------- */
@media only screen and (max-width: 768px) {

    /* Enable horizontal scroll snapping */
    .hbl-parallax-slider {
        overflow: visible;
    }

    .hbl-parallax-slider__track {
        overflow-x: scroll;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
    }

    .hbl-parallax-slider__track::-webkit-scrollbar {
        display: none; /* Chrome/Safari */
    }

    /* Each slide snaps to full width */
    .hbl-slide {
        flex-direction: column;
        scroll-snap-align: start;
        padding: 0 0 2rem;
        gap: 1.5rem;
        min-width: 100%;
    }

    /* Images stack on top, full width */
    .hbl-slide__images {
        flex: none;
        max-width: 100%;
        width: 100%;
        min-height: 260px;
    }

    .hbl-slide__image-bg {
        right: -4%;
        width: 60%;
    }

    .hbl-slide__image-main {
        width: 80%;
    }

    /* Content below image */
    .hbl-slide__content {
        padding-left: 0;
        width: 100%;
    }

    /* Show dots on mobile */
    .hbl-parallax-slider__dots {
        display: flex;
    }

    /* Disable parallax transforms on mobile */
    .hbl-parallax-layer {
        will-change: auto;
        transform: none !important;
        transition: none !important;
    }
}

/* ----------------------------------------------------------
   Reduced motion — disable all transforms (WCAG SC 2.3.3)
---------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    .hbl-parallax-layer {
        will-change: auto;
        transform: none !important;
        transition: none !important;
    }
}
