
/* --- Before/After Slider --- */
.ba-slider {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 80%;
    overflow: hidden;
    border-radius: 12px;
}
.ba-slider img {
    pointer-events: none;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    user-select: none;
    -webkit-user-drag: none;
}
.ba-slider img.after { z-index: 1; }
.ba-slider img.before {
    clip-path: inset(0 50% 0 0);
    z-index: 2;
}
.ba-slider .instr-img {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    object-fit: contain;
    z-index: 6;
    background: rgba(255,255,255,0);
    transition: opacity 0.2s ease;
}
.ba-slider .instr-img.hidden { opacity: 0; pointer-events: none; }
.ba-slider .divider-line {
    position: absolute;
    top: 0; left: 50%;
    width: 3px; height: 100%;
    background: rgba(255,255,255,0.9);
    z-index: 3;
    transform: translateX(-50%);
}
.ba-slider .handle {
    position: absolute;
    top: 50%; left: 50%;
    width: 40px; height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.85);
    border: 2px solid #333;
    transform: translate(-50%, -50%);
    cursor: ew-resize;
    z-index: 4;
    display: flex; align-items: center; justify-content: center;
    transition: transform 0.2s ease-in-out;
}
.ba-slider .handle:hover { transform: translate(-50%, -50%) scale(1.1); }
.ba-slider .handle::before,
.ba-slider .handle::after {
    content: "";
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border-style: solid;
}
.ba-slider .handle::before {
    border-width: 6px 8px 6px 0;
    border-color: transparent #333 transparent transparent;
    left: 8px;
}
.ba-slider .handle::after {
    border-width: 6px 0 6px 8px;
    border-color: transparent transparent transparent #333;
    right: 8px;
}
/* Before / After labels */
.ba-slider .before-label,
.ba-slider .after-label {
    position: absolute;
    bottom: 10px;
    padding: 4px 10px;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    background: rgba(0, 0, 0, 0.55); /* transparent */
    border-radius: 4px;
    pointer-events: none;
    white-space: nowrap;

    opacity: 1; /* ✅ visible by default */
    transition: opacity 0.25s ease;
}

.ba-slider .before-label {
    left: 10px;
    z-index: 5;
}

.ba-slider .after-label {
    right: 10px;
    z-index: 3;
}

/* ✅ HIDE labels when mouse enters image */
.ba-slider:hover .before-label,
.ba-slider:hover .after-label {
    opacity: 0;
}


/* --- Video Container --- */
.video-container {
    position: relative;
    width: 100%; height: 0;
    padding-bottom: 56.25%;
    border-radius: 12px; overflow: hidden;
}
.video-container video {
    width: 100%; height: 100%;
    position: absolute; top: 0; left: 0;
    object-fit: cover;
}
.play-button {
    position: absolute;

    bottom: 4px; /* This is equivalent to a 'bottom-8' class (32px) in Tailwind */
    left: 50%;
    transform: translateX(-50%);
    width: 56px; /* w-14 */
    height: 56px; /* h-14 */
    border-radius: 50%; /* rounded-full */
    background-color: rgba(17, 24, 39, 0.6); /* bg-gray-900/60 */
    display: flex; /* flex */
    align-items: center; /* items-center */
    justify-content: center; /* justify-center */
    transition: all 0.2s ease-in-out; /* transition */
    z-index: 10;
}

/* Style for the SVG inside the button */
.play-button svg {
    width: 24px; /* w-6 */
    height: 24px; /* h-6 */
    fill: currentColor;
    color: white; /* text-white */
}

/* Hover effect */
.play-button:hover {
    background-color: rgba(17, 24, 39, 0.8); /* hover:bg-gray-900/80 */
}

/* For a larger button/icon on medium screens (md:w-12, md:h-12, md:bottom-8) */
@media (min-width: 768px) {
    .play-button {
        bottom: 4px; /* md:bottom-8 (same as above, ensuring it overrides any smaller value) */
    }
    
    .play-button svg {
        width: 48px; /* md:w-12 */
        height: 48px; /* md:h-12 */
    }
}


/* --- Scrollable Links --- */
.all-link-scroll {
    max-height: 250px;
    overflow-y: auto;
    overflow-x: hidden;
}
.all-link-scroll::-webkit-scrollbar {
    width: 6px;
}
.all-link-scroll::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}
.all-link-scroll::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

