/* ==========================================================================
   HECTOR AUTOMOTIVE - INTERACTIVE BEFORE / AFTER RESTORATION SLIDER
   ========================================================================== */

.before-after-section {
    padding: 90px 8%;
    background: #ffffff;
    border-top: 1px solid var(--border, #e2e8f0);
    border-bottom: 1px solid var(--border, #e2e8f0);
}

.before-after-header {
    text-align: center;
    max-width: 780px;
    margin: 0 auto 40px auto;
}

.before-after-header span {
    font-size: 0.68rem;
    letter-spacing: 5px;
    text-transform: uppercase;
    color: var(--accent, #9a6712);
    display: inline-block;
    margin-bottom: 12px;
    font-weight: 700;
}

.before-after-header h2 {
    font-family: var(--font-serif, 'Cinzel', serif);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 400;
    color: #0f172a;
    line-height: 1.2;
    margin-bottom: 16px;
}

.before-after-header p {
    font-size: 0.92rem;
    color: var(--text-muted, #526071);
    line-height: 1.8;
}

/* Tabs voor verschillende restauraties */
.before-after-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 35px;
    flex-wrap: wrap;
}

.ba-tab-btn {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    color: #475569;
    padding: 9px 18px;
    border-radius: 30px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    cursor: pointer;
    transition: all 0.25s;
}

.ba-tab-btn:hover,
.ba-tab-btn.active {
    background: #0f172a;
    color: #ffffff;
    border-color: #0f172a;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
}

/* Slider Container */
.ba-container {
    max-width: 1080px;
    margin: 0 auto;
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    border: 2px solid #e2e8f0;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
    background: #0f172a;
    user-select: none;
    -webkit-user-select: none;
    touch-action: pan-y;
}

.ba-media-wrapper {
    position: relative;
    width: 100%;
    height: 520px;
    overflow: hidden;
}

@media (max-width: 768px) {
    .ba-media-wrapper { height: 340px; }
    .before-after-section { padding: 60px 20px; }
}

/* Foto's */
.ba-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.ba-img-before-wrap {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    overflow: hidden;
    z-index: 2;
    transition: width 0.05s ease-out;
}

.ba-img-before-wrap .ba-img {
    width: 1080px; /* Moet breedte van container matchen */
    max-width: none;
}

/* Badges */
.ba-badge {
    position: absolute;
    top: 20px;
    padding: 7px 16px;
    border-radius: 4px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 5;
    pointer-events: none;
}

.ba-badge-before {
    left: 20px;
    background: rgba(15, 23, 42, 0.85);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.ba-badge-after {
    right: 20px;
    background: rgba(154, 103, 18, 0.92);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(154, 103, 18, 0.35);
}

/* Slider Handle & Divider Line */
.ba-divider {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 3px;
    background: #ffffff;
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.6);
    z-index: 10;
    transform: translateX(-50%);
    pointer-events: none;
    transition: left 0.05s ease-out;
}

.ba-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #ffffff;
    border: 3px solid #9a6712;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 15px rgba(154, 103, 18, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9a6712;
    font-size: 0.95rem;
    cursor: ew-resize;
    pointer-events: auto;
}

/* Verborgen range input voor perfecte accessibility & touch */
.ba-range-slider {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: ew-resize;
    z-index: 20;
    margin: 0;
}

/* Caption bar onder de vergelijking */
.ba-caption-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: #f8fafc;
    border-top: 1.5px solid #e2e8f0;
    font-size: 0.80rem;
    color: #526071;
    flex-wrap: wrap;
    gap: 10px;
}

.ba-caption-bar strong {
    color: #0f172a;
}

