/* =========================================================
   Offline Homepage Slider
   Add this file in the same folder as index.html.
   ========================================================= */

.home-slider {
    position: relative;
    width: 100%;
    height: clamp(320px, 46vw, 700px);
    min-height: 320px;
    overflow: hidden;
    background: #111;
    isolation: isolate;
}

.home-slider__viewport,
.home-slider__slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.home-slider__viewport {
    z-index: 1;
}

.home-slider__slide {
    margin: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 800ms ease-in-out, visibility 800ms ease-in-out;
}

.home-slider__slide.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    z-index: 2;
}

.home-slider__image {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center;
    user-select: none;
    -webkit-user-drag: none;
}

.home-slider__button {
    position: absolute;
    top: 50%;
    z-index: 4;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    color: #fff;
    background: rgba(0, 0, 0, 0.42);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transform: translateY(-50%);
    transition: background-color 200ms ease, transform 200ms ease;
    -webkit-tap-highlight-color: transparent;
}

.home-slider__button:hover {
    background: rgba(0, 0, 0, 0.72);
    transform: translateY(-50%) scale(1.06);
}

.home-slider__button:focus-visible,
.home-slider__dot:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 3px;
}

.home-slider__button--previous {
    left: clamp(12px, 2.5vw, 40px);
}

.home-slider__button--next {
    right: clamp(12px, 2.5vw, 40px);
}

.home-slider__button-icon {
    display: block;
    font-family: Arial, sans-serif;
    font-size: 30px;
    font-weight: 400;
    line-height: 1;
    transform: translateY(-1px);
}

.home-slider__dots {
    position: absolute;
    left: 50%;
    bottom: clamp(14px, 2vw, 28px);
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transform: translateX(-50%);
}

.home-slider__dot {
    width: 11px;
    height: 11px;
    padding: 0;
    border: 2px solid #fff;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.28);
    cursor: pointer;
    transition: width 200ms ease, border-radius 200ms ease, background-color 200ms ease;
    -webkit-tap-highlight-color: transparent;
}

.home-slider__dot.is-active {
    width: 28px;
    border-radius: 999px;
    background: #fff;
}

.home-slider__sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

@media (max-width: 1024px) {
    .home-slider {
        height: clamp(300px, 52vw, 540px);
        min-height: 300px;
    }
}

@media (max-width: 767px) {
    .home-slider {
        height: clamp(230px, 61vw, 390px);
        min-height: 230px;
    }

    .home-slider__button {
        width: 38px;
        height: 38px;
    }

    .home-slider__button-icon {
        font-size: 25px;
    }

    .home-slider__button--previous {
        left: 10px;
    }

    .home-slider__button--next {
        right: 10px;
    }

    .home-slider__dots {
        bottom: 12px;
        gap: 8px;
    }

    .home-slider__dot {
        width: 9px;
        height: 9px;
    }

    .home-slider__dot.is-active {
        width: 23px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-slider__slide,
    .home-slider__button,
    .home-slider__dot {
        transition: none;
    }
}
