/* Webify Hero Slider - Frontend */

.whs,
.whs *,
.whs *::before,
.whs *::after {
    box-sizing: border-box;
}

.whs {
    position: relative;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    background: #000;
    line-height: 0;
    user-select: none;
    --whs-h-d: 600px;
    --whs-h-t: 500px;
    --whs-h-m: 400px;
    --whs-anim-dur: 800ms;
    --whs-slide-dur: 5000ms;
    --whs-kb-dur: 6000ms;
    --whs-arrow-bg: rgba(0, 0, 0, 0.45);
    --whs-arrow-color: #fff;
    --whs-dot-color: rgba(255, 255, 255, 0.55);
    --whs-dot-active: #fff;
}

/* Allow Elementor / theme containers to size it. Heights are per breakpoint. */
.whs__viewport {
    position: relative;
    width: 100%;
    height: var(--whs-h-d);
    overflow: hidden;
}

@media (max-width: 1024px) {
    .whs__viewport { height: var(--whs-h-t); }
}
@media (max-width: 767px) {
    .whs__viewport { height: var(--whs-h-m); }
}

/* Auto-height: viewport follows the active image's aspect ratio (set by JS).
   The whole slider area shrinks/grows with the image as the window resizes. */
.whs--auto .whs__viewport {
    height: auto;
    aspect-ratio: var(--whs-ar, 16 / 9);
    min-height: 0;
}

.whs__track {
    position: relative;
    width: 100%;
    height: 100%;
}

.whs__slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    z-index: 1;
    transition:
        opacity var(--whs-anim-dur) ease,
        transform var(--whs-anim-dur) ease,
        visibility 0s linear var(--whs-anim-dur);
    text-decoration: none;
    color: inherit;
    display: block;
    will-change: transform, opacity;
}

.whs__slide.is-active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
    transition:
        opacity var(--whs-anim-dur) ease,
        transform var(--whs-anim-dur) ease,
        visibility 0s;
}

.whs__picture {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* !important guards against theme rules like `img { height: auto !important }`
   that would otherwise leave empty space below the image. */
.whs__image {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: cover !important;
    object-position: center center !important;
    display: block !important;
    margin: 0 !important;
}

/* ------- ENTRANCE ANIMATIONS ------- */
/* Defaults reset to fade. Each slide is positioned for entrance via class on the wrapper. */

/* Slide directional - entrance starts off-screen, exits go off the opposite side. */
.whs--anim-in-slide-left .whs__slide.is-entering   { transform: translateX(100%); opacity: 1; }
.whs--anim-in-slide-right .whs__slide.is-entering  { transform: translateX(-100%); opacity: 1; }
.whs--anim-in-slide-up .whs__slide.is-entering     { transform: translateY(100%); opacity: 1; }
.whs--anim-in-slide-down .whs__slide.is-entering   { transform: translateY(-100%); opacity: 1; }
.whs--anim-in-zoom-in .whs__slide.is-entering      { transform: scale(0.85); opacity: 0; }
.whs--anim-in-zoom-out .whs__slide.is-entering     { transform: scale(1.15); opacity: 0; }
.whs--anim-in-fade .whs__slide.is-entering         { opacity: 0; }

.whs__slide.is-entering {
    visibility: visible;
    z-index: 2;
    transition: none;
}

.whs__slide.is-active {
    transform: translate(0, 0) scale(1);
    opacity: 1;
}

/* Exit animations on the previous (now active->leaving) slide. */
.whs--anim-out-slide-left .whs__slide.is-leaving   { transform: translateX(-100%); opacity: 1; }
.whs--anim-out-slide-right .whs__slide.is-leaving  { transform: translateX(100%); opacity: 1; }
.whs--anim-out-slide-up .whs__slide.is-leaving     { transform: translateY(-100%); opacity: 1; }
.whs--anim-out-slide-down .whs__slide.is-leaving   { transform: translateY(100%); opacity: 1; }
.whs--anim-out-zoom-in .whs__slide.is-leaving      { transform: scale(1.15); opacity: 0; }
.whs--anim-out-zoom-out .whs__slide.is-leaving     { transform: scale(0.85); opacity: 0; }
.whs--anim-out-fade .whs__slide.is-leaving         { opacity: 0; }

.whs__slide.is-leaving {
    visibility: visible;
    z-index: 1;
}

/* ------- KEN BURNS (applied to image of active slide) ------- */
.whs--kenburns .whs__slide.is-active .whs__image,
.whs--kenburns .whs__slide.is-leaving .whs__image {
    animation: var(--whs-kb-name, whs-kb-zoom-in) var(--whs-kb-dur) ease-out forwards;
}

.whs--kb-zoom-in .whs__slide.is-active .whs__image,
.whs--kb-zoom-in .whs__slide.is-leaving .whs__image  { animation-name: whs-kb-zoom-in; }
.whs--kb-zoom-out .whs__slide.is-active .whs__image,
.whs--kb-zoom-out .whs__slide.is-leaving .whs__image { animation-name: whs-kb-zoom-out; }
.whs--kb-pan-left .whs__slide.is-active .whs__image,
.whs--kb-pan-left .whs__slide.is-leaving .whs__image { animation-name: whs-kb-pan-left; }
.whs--kb-pan-right .whs__slide.is-active .whs__image,
.whs--kb-pan-right .whs__slide.is-leaving .whs__image{ animation-name: whs-kb-pan-right; }

@keyframes whs-kb-zoom-in {
    from { transform: scale(1); }
    to   { transform: scale(1.15); }
}
@keyframes whs-kb-zoom-out {
    from { transform: scale(1.15); }
    to   { transform: scale(1); }
}
@keyframes whs-kb-pan-left {
    from { transform: scale(1.12) translateX(3%); }
    to   { transform: scale(1.12) translateX(-3%); }
}
@keyframes whs-kb-pan-right {
    from { transform: scale(1.12) translateX(-3%); }
    to   { transform: scale(1.12) translateX(3%); }
}

/* ------- ARROWS ------- */
.whs__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 0;
    background: var(--whs-arrow-bg);
    color: var(--whs-arrow-color);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.2s ease, transform 0.2s ease;
}

.whs__arrow svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.whs__arrow:hover,
.whs__arrow:focus-visible {
    background: rgba(0, 0, 0, 0.7);
    outline: none;
}

.whs__arrow--prev { left: 16px; }
.whs__arrow--next { right: 16px; }

.whs--arrows-outside .whs__arrow--prev { left: 8px; }
.whs--arrows-outside .whs__arrow--next { right: 8px; }

@media (max-width: 767px) {
    .whs__arrow { width: 36px; height: 36px; }
    .whs__arrow svg { width: 20px; height: 20px; }
    .whs__arrow--prev { left: 8px; }
    .whs__arrow--next { right: 8px; }
}

.whs--no-arrows .whs__arrow { display: none; }

/* ------- DOTS ------- */
.whs__dots {
    position: absolute;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(2px);
    line-height: 0;
}

.whs--dots-bottom-center .whs__dots { bottom: 18px; left: 50%; transform: translateX(-50%); }
.whs--dots-bottom-left .whs__dots   { bottom: 18px; left: 18px; }
.whs--dots-bottom-right .whs__dots  { bottom: 18px; right: 18px; }
.whs--dots-top-center .whs__dots    { top: 18px; left: 50%; transform: translateX(-50%); }
.whs--dots-top-left .whs__dots      { top: 18px; left: 18px; }
.whs--dots-top-right .whs__dots     { top: 18px; right: 18px; }

.whs__dot {
    position: relative;
    appearance: none;
    border: 0;
    margin: 0;
    padding: 0;
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: var(--whs-dot-color);
    cursor: pointer;
    overflow: hidden;
    transition: width 0.4s ease, background 0.3s ease;
}

.whs__dot.is-active {
    width: 36px;
    background: rgba(255, 255, 255, 0.35);
}

.whs__dot-progress {
    position: absolute;
    inset: 0;
    width: 0;
    background: var(--whs-dot-active);
    border-radius: 999px;
    transform-origin: left center;
    pointer-events: none;
}

.whs__dot.is-active .whs__dot-progress {
    width: 100%;
    transform: scaleX(0);
    animation: whs-dot-fill var(--whs-slide-dur) linear forwards;
}

.whs__dot.is-active.is-paused .whs__dot-progress {
    animation-play-state: paused;
}

/* When autoplay is off, just show full active dot (no progress fill animation). */
.whs--no-autoplay .whs__dot.is-active .whs__dot-progress {
    animation: none;
    transform: scaleX(1);
}

@keyframes whs-dot-fill {
    from { transform: scaleX(0); }
    to   { transform: scaleX(1); }
}

.whs--no-dots .whs__dots { display: none; }

/* ------- A11Y ------- */
@media (prefers-reduced-motion: reduce) {
    .whs__slide,
    .whs__image,
    .whs__dot,
    .whs__dot-progress {
        animation: none !important;
        transition: none !important;
    }
}

.whs__slide:focus-visible,
.whs__arrow:focus-visible,
.whs__dot:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}
