/* ==========================================================================
   Split Slider – hervin-child
   Two panels (left / right) that slide in opposite vertical directions.
   ========================================================================== */

/* ── Wrapper ─────────────────────────────────────────────────────────────── */
.hc-split-slider {
    position: relative;
    display: flex;
    width: 100%;
    height: 100vh;          /* full screen by default; overridden inline by JS */
    overflow: hidden;
    user-select: none;
    background: #fff;       /* white shows through the border gaps */
}

/* ── Panels ──────────────────────────────────────────────────────────────── */
.hc-split-left,
.hc-split-right {
    width: 50%;
    height: 100%;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

/* ── Individual slides ───────────────────────────────────────────────────── */
.hc-split-slide {
    position: absolute;
    inset: 0; /* top/right/bottom/left: 0 */
    will-change: transform;
    /*
     * Initial off-screen positions:
     *   left panel  → slides rest BELOW the viewport
     *   right panel → slides rest ABOVE the viewport
     * JS overrides these on every transition.
     */
}

.hc-split-left  .hc-split-slide { transform: translateY(101%); }
.hc-split-right .hc-split-slide { transform: translateY(-101%); }

/* The first (active) slide is visible */
.hc-split-left  .hc-split-slide.is-active,
.hc-split-right .hc-split-slide.is-active { transform: translateY(0); }

/* ── Image fill ──────────────────────────────────────────────────────────── */
.hc-split-img {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* ── Centre navigation ───────────────────────────────────────────────────── */
.hc-split-nav {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    pointer-events: none; /* container pass-through */
}

.hc-split-prev,
.hc-split-next {
    pointer-events: all;
    width: 46px;
    height: 46px;
    border: 2px solid rgba(255, 255, 255, 0.85);
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.15);
    color: #fff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.hc-split-prev:hover,
.hc-split-next:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: #fff;
    color: #000;
    transform: scale(1.08);
}

.hc-split-prev:active,
.hc-split-next:active {
    transform: scale(0.95);
}

/* ── White border overlay (14 px outer edges, 7 px at the centre seam) ───── */
/*
 * A pseudo-element sits on top of each slide and draws the white border
 * without affecting the background-image layout.
 * Left  panel: 14px top/bottom/left, 7px right  → centre gap = 7+7 = 14px
 * Right panel: 14px top/bottom/right, 7px left
 */
.hc-split-left  .hc-split-slide::after,
.hc-split-right .hc-split-slide::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 14px solid #fff;
    pointer-events: none;
    z-index: 2;
}

.hc-split-left  .hc-split-slide::after { border-right-width:  7px; }
.hc-split-right .hc-split-slide::after { border-left-width:   7px; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 767px) {
    .hc-split-slider {
        flex-direction: column;
    }
    .hc-split-left,
    .hc-split-right {
        width: 100%;
        height: 50%;
    }
    .hc-split-nav {
        flex-direction: row;
        top: 50%;
    }

    /*
     * Mobile borders: panels stack vertically.
     * Top panel (left):  14px top/left/right, 7px bottom
     * Bottom panel (right): 14px bottom/left/right, 7px top
     */
    .hc-split-left  .hc-split-slide::after {
        border-width: 14px;        /* reset desktop asymmetry */
        border-bottom-width: 7px;
        border-right-width: 14px;  /* restore right border on mobile */
    }
    .hc-split-right .hc-split-slide::after {
        border-width: 14px;        /* reset desktop asymmetry */
        border-top-width: 7px;
        border-left-width: 14px;   /* restore left border on mobile */
    }
}
