/* ============================================================
   Reboot Hero Slider — slider.css
   ============================================================ */

/* ── Wrapper ───────────────────────────────────────────────── */
.rhs-wrapper {
    position: relative;
    width: 100%;
    min-height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 0 10px;
    box-sizing: border-box;
}

/* ── Backgrounds ───────────────────────────────────────────── */
.rhs-backgrounds {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.rhs-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1.1s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity;
}

.rhs-bg.active {
    opacity: 1;
}

.rhs-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        to right,
        rgba(0, 0, 0, 0.6) 0%,
        rgba(0, 0, 0, 0.35) 45%,
        rgba(0, 0, 0, 0.1) 100%
    );
    pointer-events: none;
}

/* ── Left / Right split ────────────────────────────────────── */
.rhs-left,
.rhs-right {
    position: relative;
    z-index: 2;
    width: 50%;
    height: 100%;
    display: flex;
    align-items: center;
}

.rhs-left {
    flex-direction: row;
}

.rhs-right {
    flex-direction: column;
    justify-content: center;
}

/* ── Vertical scroller ─────────────────────────────────────── */
.rhs-scroller {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0;
    width: 30px;
    height: 600px;
    max-height: 70vh;
    z-index: 5;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
}

.rhs-scroller-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    opacity: 0.35;
    transition: opacity 0.35s ease;
    flex: 1;
    justify-content: center;
    background: none;
    border: none;
    padding: 0;
    outline: none;
}

.rhs-scroller-item:focus-visible {
    outline: 2px solid rgba(255,255,255,0.6);
    outline-offset: 2px;
    border-radius: 2px;
}

.rhs-scroller-item.active {
    opacity: 1;
}

.rhs-scroller-line {
    display: block;
    width: 2px;
    height: 24px;
    background: #fff;
    border-radius: 2px;
    transition: height 0.35s ease, background 0.35s ease;
}

.rhs-scroller-item.active .rhs-scroller-line {
    height: 54px;
    background: #fff;
}

.rhs-scroller-num {
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1;
}

/* ── Text content ──────────────────────────────────────────── */
.rhs-content {
    position: relative;
    padding-left: 48px;
    padding-right: 20px;
    width: 100%;
    min-height: 280px;
    display: flex;
    align-items: center;
}

.rhs-slide-content {
    position: absolute;
    top: 50%;
    transform: translateY(calc(-50% + 28px));
    opacity: 0;
    transition:
        opacity  0.55s ease,
        transform 0.55s ease;
    pointer-events: none;
    will-change: opacity, transform;
}

.rhs-slide-content.active {
    opacity: 1;
    transform: translateY(-50%);
    pointer-events: auto;
}

.rhs-slide-content.exit {
    opacity: 0;
    transform: translateY(calc(-50% - 28px));
    pointer-events: none;
}

.rhs-heading {
    color: #fff;
    font-size: clamp(2rem, 4.5vw, 4rem);
    font-weight: 700;
    line-height: 1.15;
    margin: 0 0 18px;
    letter-spacing: -0.01em;
    max-width: 600px;
}

.rhs-description {
    color: rgba(255, 255, 255, 0.82);
    font-size: 16px;
    line-height: 1.65;
    margin: 0 0 28px;
    max-width: 600px;
}

.rhs-btn {
    display: inline-block;
    padding: 14px 32px;
    background: #3a7bd5;
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: 0;
    transition: background 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
    border: 2px solid transparent;
    max-width: 600px;
}

.rhs-btn:hover,
.rhs-btn:focus-visible {
    background: transparent;
    border-color: #fff;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    outline: none;
}

/* ── Carousel ──────────────────────────────────────────────── */
.rhs-carousel-wrapper {
    width: 100%;
    overflow: hidden;
    padding: 20px 20px 28px 20px;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    box-sizing: border-box;
    margin-bottom: -30px; /* aligns with nav area */
}

.rhs-carousel-wrapper.is-dragging {
    cursor: grabbing;
}

.rhs-carousel-wrapper.is-dragging .rhs-carousel-item {
    pointer-events: none;
}

.rhs-carousel {
    display: flex;
    gap: 20px;
    transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.rhs-carousel.no-transition {
    transition: none;
}

.rhs-carousel-item {
    flex: 0 0 140px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    opacity: 1;
    transform: scale(0.88);
    transition: opacity 0.45s ease, transform 0.45s ease, box-shadow 0.45s ease;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.rhs-carousel-item.active {
    opacity: 1;
    transform: scale(1.06);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    z-index: 2;
}

.rhs-carousel-item:hover:not(.active) {
    opacity: 0.72;
    transform: scale(0.92);
}

.rhs-carousel-item img {
    display: block;
    width: 100%;
    height: 180px;
    object-fit: cover;
    pointer-events: none;
    border-radius: 10px;
}

.rhs-carousel-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px 10px 10px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, transparent 100%);
    color: #fff;
    border-radius: 0 0 10px 10px;
}

.rhs-carousel-name {
    display: block;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
}

.rhs-carousel-title {
    display: block;
    font-size: 12px;
    opacity: 0.78;
    margin-top: 2px;
}

/* ── Nav buttons ───────────────────────────────────────────── */
.rhs-nav {
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 0 0 0;
    pointer-events: none;
    margin-top: 12px;
    position: relative;
    z-index: 6;
    gap: 20px;
    justify-content: center;
}

.rhs-nav-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.78);
    color: #222;
    font-size: 18px;
    cursor: pointer;
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.22);
    outline: none;
    flex-shrink: 0;
}

.rhs-nav-btn:hover {
    background: #fff;
    transform: scale(1.1);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.28);
}

.rhs-nav-btn:focus-visible {
    outline: 2px solid #3a7bd5;
    outline-offset: 2px;
}

.rhs-nav-btn svg {
    pointer-events: none;
}

/* ── Tablet ────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .rhs-slide-content {
        padding-left: 50px;
        padding-right: 50px;
    }

    .rhs-scroller {
        height: 500px;
    }

    .rhs-heading {
        font-size: clamp(1.8rem, 4vw, 3rem);
    }

    .rhs-carousel-item {
        flex: 0 0 120px;
    }

    .rhs-carousel-item img {
        height: 150px;
    }
}

/* ── Mobile ────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .rhs-wrapper {
        flex-direction: column;
        padding: 0;
        align-items: flex-start;
    }

    .rhs-left,
    .rhs-right {
        width: 100%;
    }

    .rhs-left {
        min-height: 58vh;
        padding: 0;
        position: relative;
    }

    /* On mobile the scroller goes horizontal at the bottom */
    .rhs-scroller {
        position: absolute;
        left: 50%;
        bottom: 18px;
        top: auto;
        transform: translateX(-50%);
        flex-direction: row;
        width: 200px;
        height: 30px;
        max-height: none;
        gap: 6px;
        align-items: center;
    }

    .rhs-scroller-item {
        flex-direction: row;
        gap: 4px;
        flex: 0 0 auto;
    }

    .rhs-scroller-line {
        width: 22px;
        height: 2px;
    }

    .rhs-scroller-item.active .rhs-scroller-line {
        width: 44px;
        height: 2px;
    }

    .rhs-scroller-num {
        display: none;
    }

    .rhs-content {
        padding-left: 20px;
        padding-right: 20px;
        padding-bottom: 60px;
        min-height: 0;
        width: 100%;
        box-sizing: border-box;
    }

    /* ── FIX: description wrapping on mobile ── */

    /* 1. Anchor the slide content to the full available width.
          No extra padding here — .rhs-content already provides 20px on each side. */
    .rhs-slide-content {
        left: 0;
        right: 0;
        padding-left: 0;
        padding-right: 0;
        width: 100%;
        box-sizing: border-box;
    }

    /* 2. Kill the Elementor-injected left/right margins that crush text to ~1 word per line.
          Reset all three text elements to use the full column width. */
    .rhs-heading,
    .rhs-description,
    .rhs-btn {
        margin-left: 0 !important;
        margin-right: 0 !important;
        max-width: 100% !important;
        width: 100%;
        box-sizing: border-box;
    }

    /* 3. Drop the font slightly so long descriptions breathe better on small screens. */
    .rhs-description {
        font-size: 14px;
        line-height: 1.6;
    }

    /* 4. Button should stay auto-width (don't force it full-width). */
    .rhs-btn {
        width: auto;
        display: inline-block;
    }

    .rhs-heading {
        font-size: clamp(2rem, 8vw, 3rem);
    }

    .rhs-right {
        padding-top: 10px;
        min-height: 42vh;
    }

    .rhs-carousel-item {
        flex: 0 0 100px;
    }

    .rhs-carousel-item img {
        height: 130px;
    }

    .rhs-nav-btn {
        width: 38px;
        height: 38px;
    }
}