/* ── Key Slider ───────────────────────────────────────────── */

.key-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #282828;
    cursor: grab;
    /* clear the fixed navigation (matches .grid-project) */
    margin-top: 144px;
}

/* Desktop: constrain to match col-xl-10 gallery width */
@media only screen and (min-width: 1201px) {
    .key-slider {
        width: 83.333%;
        margin-left: auto;
        margin-right: auto;
    }
}

@media only screen and (min-width: 1441px) {
    .key-slider {
        margin-top: 194px;
    }
}

@media only screen and (max-width: 1200px) {
    .key-slider {
        margin-top: 80px;
    }
}

.key-slider:active {
    cursor: grabbing;
}

.key-slider-track {
    display: flex;
    align-items: center;
    transition: transform 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

.key-slide {
    min-width: 100%;
    position: relative;
    overflow: hidden;
}

.key-slide video,
.key-slide img {
    width: 100%;
    height: auto;
    display: block;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

/* ── Dots ─────────────────────────────────────────────────── */

.key-slider-dots {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap-reverse;
    gap: 8px;
    max-width: calc(100% - 40px);
    z-index: 10;
}

.key-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    cursor: pointer;
    transition: background 0.35s ease, transform 0.35s ease;
    flex-shrink: 0;
}

.key-dot.active {
    background: rgba(255, 255, 255, 0.85);
    transform: scale(1.3);
}

/* Hide dots when only one slide */
.key-slider[data-slides="1"] .key-slider-dots {
    display: none;
}

/* ── Video controls ───────────────────────────────────────── */

.key-video-controls {
    position: absolute;
    bottom: 20px;
    left: 20px;
    z-index: 10;
    display: flex;
    gap: 14px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.key-video-controls.visible {
    opacity: 1;
    pointer-events: auto;
}

.key-video-ctrl {
    color: #ffffff;
    font-family: "Simapranata Light", sans-serif;
    font-size: 12px;
    letter-spacing: 1.5px;
    opacity: 0.35;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    transition: opacity 0.25s ease;
    text-transform: lowercase;
}

.key-video-ctrl:hover {
    opacity: 0.75;
}

/* ── Spacing after slider ─────────────────────────────────── */

.key-slider + .grid-project {
    margin-top: 48px;
}

@media only screen and (max-width: 1200px) {
    .key-slider + .grid-project {
        margin-top: 24px;
    }
}
