/*
 * Divine Health Home Care
 * Homepage Hero Slider
 *
 * Desktop:
 * - Previous / Next arrows visible
 * - Smooth transition
 * - Navigation dots
 *
 * Mobile:
 * - Previous / Next arrows hidden
 * - Swipe navigation remains active
 * - Auto slide remains active
 * - Navigation dots remain visible
 */

.hero-slider.home-hero-slider {
    --home-slider-height: clamp(220px, 24.5vw, 500px);
    --home-slider-easing: cubic-bezier(0.22, 1, 0.36, 1);

    position: relative;
    z-index: 1;

    width: 100%;
    margin: 0 !important;

    overflow: hidden;

    color: #ffffff;
    background: #eef5f6;

    isolation: isolate;
    touch-action: pan-y;

    -webkit-tap-highlight-color: transparent;
}


/* =========================================================
   SLIDER VIEWPORT
   ========================================================= */

.home-hero-slider__viewport {
    position: relative;

    width: 100%;

    overflow: hidden;

    background: #eef5f6;
}


/* =========================================================
   SLIDER TRACK
   ========================================================= */

.home-hero-slider__track {
    display: flex;

    width: 100%;
    min-width: 0;

    align-items: stretch;

    transform: translate3d(0, 0, 0);

    transition:
        transform 780ms var(--home-slider-easing);

    will-change: transform;
}


/* =========================================================
   INDIVIDUAL SLIDE
   ========================================================= */

.hero-slider.home-hero-slider .home-hero-slide {
    position: relative;

    display: block !important;

    flex: 0 0 100%;

    width: 100% !important;
    max-width: 100%;
    min-width: 0;

    height: var(--home-slider-height) !important;

    margin: 0;

    overflow: hidden;

    background: #eef5f6;

    border-radius: 0 !important;
}


/* =========================================================
   SLIDE LINK / PICTURE
   ========================================================= */

.home-hero-slide__link,
.home-hero-slide__picture {
    display: block;

    width: 100%;
    height: 100%;
}


.home-hero-slide__link {
    color: inherit;

    text-decoration: none;
}


/* =========================================================
   SLIDER IMAGE
   ========================================================= */

.hero-slider.home-hero-slider .home-hero-slide__image {
    display: block;

    width: 100% !important;
    height: 100% !important;

    max-width: none;

    margin: 0;

    object-fit: contain !important;
    object-position: center center !important;

    background: #eef5f6;

    user-select: none;

    -webkit-user-drag: none;
}


/* =========================================================
   DRAG / SWIPE
   ========================================================= */

.home-hero-slider.is-dragging,
.home-hero-slider.is-dragging * {
    cursor: grabbing !important;
}


.home-hero-slider.is-dragging .home-hero-slider__track {
    transition: none;
}


/* =========================================================
   DESKTOP PREVIOUS / NEXT ARROWS
   ========================================================= */

.home-hero-slider__arrow {
    position: absolute;

    top: 50%;
    z-index: 8;

    display: none;

    width: 50px;
    height: 50px;

    padding: 0;

    place-items: center;

    color: #ffffff;

    background: rgba(3, 70, 75, 0.84);

    border: 1px solid rgba(255, 255, 255, 0.78);
    border-radius: 50%;

    box-shadow:
        0 10px 28px rgba(4, 44, 50, 0.28);

    cursor: pointer;

    opacity: 0.94;

    transform: translateY(-50%);

    transition:
        background-color 180ms ease,
        box-shadow 180ms ease,
        opacity 180ms ease,
        transform 180ms ease;

    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}


/*
 * Arrows become visible when
 * the slider JavaScript is ready.
 */

.home-hero-slider.is-ready .home-hero-slider__arrow {
    display: grid;
}


/* Previous Arrow */

.home-hero-slider__arrow--previous {
    left: 18px;
}


/*
 * Next Arrow
 *
 * Extra right spacing keeps it away
 * from floating Call / WhatsApp buttons.
 */

.home-hero-slider__arrow--next {
    right: 82px;
}


/* Arrow SVG */

.home-hero-slider__arrow svg {
    width: 25px;
    height: 25px;

    pointer-events: none;
}


/* Arrow Hover */

.home-hero-slider__arrow:hover {
    color: #ffffff;

    background: #00a79d;

    box-shadow:
        0 12px 30px rgba(0, 105, 99, 0.35);

    opacity: 1;

    transform:
        translateY(-50%)
        scale(1.06);
}


/* Arrow Active */

.home-hero-slider__arrow:active {
    transform:
        translateY(-50%)
        scale(0.96);
}


/* Keyboard Accessibility */

.home-hero-slider__arrow:focus-visible {
    outline: 3px solid #ffffff;

    outline-offset: 3px;
}


/* =========================================================
   NAVIGATION DOTS
   ========================================================= */

.home-hero-slider__dots {
    position: absolute;

    top: 12px;
    left: 16px;

    z-index: 7;

    display: none;

    min-height: 24px;

    padding: 4px 7px;

    align-items: center;
    justify-content: center;

    gap: 8px;

    background:
        rgba(255, 255, 255, 0.70);

    border:
        1px solid rgba(0, 111, 105, 0.20);

    border-radius: 999px;

    box-shadow:
        0 4px 14px rgba(4, 44, 50, 0.12);

    pointer-events: none;

    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}


/* Show Dots After Slider Loads */

.home-hero-slider.is-ready .home-hero-slider__dots {
    display: flex;
}


/* Individual Dot */

.home-hero-slider__dot {
    display: block;

    width: 10px;
    height: 10px;

    padding: 0;

    background:
        rgba(255, 255, 255, 0.82);

    border:
        1px solid rgba(0, 79, 76, 0.70);

    border-radius: 999px;

    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.18);

    cursor: pointer;

    pointer-events: auto;

    transition:
        width 240ms ease,
        background-color 240ms ease,
        border-color 240ms ease,
        transform 240ms ease;
}


/* Dot Hover */

.home-hero-slider__dot:hover,
.home-hero-slider__dot:focus-visible {
    background: #ffffff;

    border-color: #006f69;

    transform: scale(1.12);
}


/* Dot Keyboard Focus */

.home-hero-slider__dot:focus-visible {
    outline: 2px solid #ffffff;

    outline-offset: 3px;
}


/* Active Dot */

.home-hero-slider__dot.is-active,
.home-hero-slider__dot[aria-current="true"] {
    width: 28px;

    background: #00a79d;

    border-color: #ffffff;
}


/* =========================================================
   SCREEN READER STATUS
   ========================================================= */

.home-hero-slider__status {
    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;
}


/* =========================================================
   MOBILE VERSION
   ========================================================= */

@media (max-width: 767px) {

    /*
     * Mobile Slider Height
     */

    .hero-slider.home-hero-slider {
        --home-slider-height:
            clamp(170px, 38vw, 220px);
    }


    /*
     * IMPORTANT:
     * Hide BOTH slider arrows on mobile.
     *
     * Swipe navigation and automatic
     * sliding still continue to work.
     */

    .home-hero-slider__arrow,
    .home-hero-slider.is-ready .home-hero-slider__arrow {
        display: none !important;
    }


    /*
     * Mobile Navigation Dots
     */

    .home-hero-slider__dots {
        top: 6px;
        left: 8px;

        gap: 6px;

        padding: 3px 6px;

        min-height: 20px;
    }


    .home-hero-slider__dot {
        width: 8px;
        height: 8px;
    }


    .home-hero-slider__dot.is-active,
    .home-hero-slider__dot[aria-current="true"] {
        width: 22px;
    }
}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 480px) {

    .hero-slider.home-hero-slider {
        --home-slider-height:
            clamp(155px, 40vw, 195px);
    }


    .home-hero-slider__dots {
        top: 5px;
        left: 6px;
    }
}


/* =========================================================
   VERY SMALL MOBILE
   ========================================================= */

@media (max-width: 360px) {

    .hero-slider.home-hero-slider {
        --home-slider-height:
            clamp(145px, 42vw, 175px);
    }


    .home-hero-slider__dot {
        width: 7px;
        height: 7px;
    }


    .home-hero-slider__dot.is-active,
    .home-hero-slider__dot[aria-current="true"] {
        width: 19px;
    }
}


/* =========================================================
   REDUCED MOTION ACCESSIBILITY
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .home-hero-slider__track,
    .home-hero-slider__arrow,
    .home-hero-slider__dot {
        transition-duration: 0.01ms !important;
    }
}