.advanced-slider {
    --as-height-desktop: 600px;
    --as-height-tablet: 450px;
    --as-height-mobile: 300px;
    --as-speed: 700ms;
    --as-image-fit: cover;

    position: relative;
    width: 100%;
    height: var(--as-height-desktop);
    overflow: hidden;
    background: #111827;
    isolation: isolate;
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

.advanced-slider.as-full-bleed {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

.advanced-slider *,
.advanced-slider *::before,
.advanced-slider *::after {
    box-sizing: border-box;
}

.as-viewport,
.as-track {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.as-slide {
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
    transform: translateZ(0);
    filter: none;
    clip-path: inset(0);

    transition:
        opacity var(--as-speed) ease,
        transform var(--as-speed)
            cubic-bezier(.22, .72, .25, 1),
        filter var(--as-speed) ease,
        clip-path var(--as-speed)
            cubic-bezier(.22, .72, .25, 1),
        visibility 0s linear var(--as-speed);

    will-change:
        opacity,
        transform,
        filter,
        clip-path;
}

.as-slide.is-active {
    z-index: 2;
    opacity: 1;
    visibility: visible;
    transform:
        translate3d(0, 0, 0)
        scale(1)
        rotateY(0);
    filter: none;
    clip-path: inset(0);
    transition-delay: 0s;
}

/* Animation starting states */

.as-slide[data-animation="slide-left"] {
    transform: translate3d(8%, 0, 0);
}

.as-slide[data-animation="slide-right"] {
    transform: translate3d(-8%, 0, 0);
}

.as-slide[data-animation="slide-up"] {
    transform: translate3d(0, 8%, 0);
}

.as-slide[data-animation="slide-down"] {
    transform: translate3d(0, -8%, 0);
}

.as-slide[data-animation="zoom-in"] {
    transform: scale(.92);
}

.as-slide[data-animation="zoom-out"] {
    transform: scale(1.10);
}

.as-slide[data-animation="flip"] {
    transform:
        perspective(1200px)
        rotateY(10deg)
        scale(.98);
    transform-origin: center;
}

.as-slide[data-animation="blur"] {
    filter: blur(16px);
    transform: scale(1.06);
}

.as-slide[data-animation="rotate"] {
    transform: rotate(4deg) scale(1.09);
}

.as-slide[data-animation="reveal-left"] {
    clip-path: inset(0 100% 0 0);
}

.as-slide[data-animation="reveal-right"] {
    clip-path: inset(0 0 0 100%);
}

.as-slide[data-animation="curtain"] {
    clip-path: inset(50% 0 50% 0);
}

.as-slide[data-animation="parallax"] {
    transform: translate3d(6%, 0, 0);
}

.as-slide[data-animation="bounce-in"] {
    transform:
        translate3d(0, 32px, 0)
        scale(.72);
}

.as-slide[data-animation="bounce-in"].is-active {
    transition-timing-function:
        cubic-bezier(.2, 1.45, .45, 1);
}

/*
 * यह rule animation rules के बाद ही रखें।
 * इसी से image trapezoid या आधी दिखाई देने वाली समस्या ठीक होती है।
 */
.as-slide[data-animation].is-active {
    opacity: 1 !important;
    visibility: visible !important;

    transform:
        translate3d(0, 0, 0)
        scale(1)
        rotate(0deg)
        rotateY(0deg) !important;

    filter: none !important;
    clip-path: inset(0) !important;
}

/* Image media */

.as-picture,
.as-image {
    display: block;
    width: 100%;
    height: 100%;
}

.as-image {
    object-fit: var(--as-image-fit);
    object-position: center;
    user-select: none;
    -webkit-user-drag: none;

    transition:
        transform calc(var(--as-speed) * 1.35)
            cubic-bezier(.22, .72, .25, 1),
        filter var(--as-speed) ease;
}

/* Uploaded video and YouTube media */

.as-video,
.as-youtube,
.as-youtube-frame,
.as-youtube-poster {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
}

.as-video,
.as-youtube-poster {
    object-fit: var(--as-image-fit);
    object-position: center;
    background: #000;
}

.as-video {
    z-index: 0;
}

.as-youtube {
    z-index: 0;
    overflow: hidden;
    background: #000;
}

.as-youtube-poster {
    z-index: 0;
}

.as-youtube-frame {
    z-index: 1;
    border: 0;
    background: #000;
}

/* Image animation effects */

.as-slide[data-animation="ken-burns"] .as-image {
    transform: scale(1.02);
}

.as-slide[data-animation="ken-burns"].is-active .as-image {
    animation: as-ken-burns 9s ease-out both;
}

.as-slide[data-animation="parallax"] .as-image {
    transform:
        translate3d(-9%, 0, 0)
        scale(1.12);
}

.as-slide[data-animation="parallax"].is-active .as-image {
    transform:
        translate3d(0, 0, 0)
        scale(1.02);
}

@keyframes as-ken-burns {
    from {
        transform: scale(1.02);
    }

    to {
        transform:
            scale(1.14)
            translate3d(-1.5%, -1%, 0);
    }
}

/* Overlay */

.as-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: var(--as-overlay-color, #000);
    opacity: var(--as-overlay-opacity, .3);
    pointer-events: none;
}

/* Content */

.as-content-layer {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    padding: clamp(24px, 5vw, 82px);
    pointer-events: none;
}

.as-position-top-left {
    align-items: flex-start;
    justify-content: flex-start;
}

.as-position-top-center {
    align-items: flex-start;
    justify-content: center;
}

.as-position-top-right {
    align-items: flex-start;
    justify-content: flex-end;
}

.as-position-center-left {
    align-items: center;
    justify-content: flex-start;
}

.as-position-center {
    align-items: center;
    justify-content: center;
}

.as-position-center-right {
    align-items: center;
    justify-content: flex-end;
}

.as-position-bottom-left {
    align-items: flex-end;
    justify-content: flex-start;
}

.as-position-bottom-center {
    align-items: flex-end;
    justify-content: center;
}

.as-position-bottom-right {
    align-items: flex-end;
    justify-content: flex-end;
}

.as-content {
    width: min(680px, 82vw);
    text-shadow: 0 2px 18px rgba(0, 0, 0, .24);
    opacity: 0;
    transform: translateY(24px);

    transition:
        opacity .55s ease .2s,
        transform .65s
            cubic-bezier(.2, .72, .25, 1)
            .2s;
}

.as-slide.is-active .as-content {
    opacity: 1;
    transform: translateY(0);
}

.as-subtitle {
    margin: 0 0 10px;
    font-size: clamp(12px, 1.4vw, 17px);
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.as-title {
    margin: 0;
    color: inherit;
    font-size: clamp(28px, 5vw, 68px);
    line-height: 1.05;
    font-weight: 850;
    letter-spacing: -.035em;
}

.as-description {
    margin-top: 16px;
    font-size: clamp(14px, 1.7vw, 20px);
    line-height: 1.55;
    font-weight: 500;
}

.as-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    margin-top: 24px;
    padding: 11px 22px;
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 11px;
    color: #fff;
    background:
        linear-gradient(
            135deg,
            #7259ee,
            #4338ca
        );
    box-shadow:
        0 10px 25px
        rgba(24, 20, 90, .28);
    text-decoration: none;
    text-shadow: none;
    font-weight: 800;
    pointer-events: auto;

    transition:
        transform .2s ease,
        box-shadow .2s ease;
}

.as-button:hover {
    transform: translateY(-2px);

    box-shadow:
        0 14px 30px
        rgba(24, 20, 90, .35);
}

/* Navigation arrows */

.as-arrow {
    position: absolute;
    top: 50%;
    z-index: 8;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, .32);
    border-radius: 50%;
    color: #fff;
    background: rgba(12, 18, 31, .34);
    backdrop-filter: blur(8px);
    transform: translateY(-50%);
    cursor: pointer;

    transition:
        background .2s ease,
        transform .2s ease,
        opacity .2s ease;
}

.as-arrow:hover {
    background: rgba(12, 18, 31, .68);
    transform:
        translateY(-50%)
        scale(1.06);
}

.as-arrow:disabled {
    opacity: .3;
    cursor: default;
}

.as-prev {
    left: clamp(10px, 2.4vw, 32px);
}

.as-next {
    right: clamp(10px, 2.4vw, 32px);
}

/* Slider dots */

.as-dots {
    position: absolute;
    z-index: 9;
    left: 50%;
    bottom: clamp(12px, 2.4vw, 28px);
    display: flex;
    align-items: center;
    gap: 8px;
    transform: translateX(-50%);
}

.as-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, .58);
    box-shadow:
        0 1px 5px
        rgba(0, 0, 0, .25);
    cursor: pointer;

    transition:
        width .25s ease,
        background .25s ease;
}

.as-dot.is-active {
    width: 30px;
    background: #fff;
}

.as-live {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* Tablet */

@media (max-width: 991px) {
    .advanced-slider {
        height: var(--as-height-tablet);
    }
}

/* Mobile */

@media (max-width: 767px) {
    .advanced-slider {
        height: var(--as-height-mobile);
    }

    .as-content-layer {
        padding: 20px 44px;
    }

    .as-content {
        width: min(520px, 100%);
    }

    .as-title {
        font-size: clamp(24px, 8vw, 44px);
    }

    .as-description {
        margin-top: 10px;
        font-size: 14px;
    }

    .as-button {
        min-height: 40px;
        margin-top: 15px;
        padding: 8px 16px;
        border-radius: 9px;
        font-size: 13px;
    }

    .as-arrow {
        width: 36px;
        height: 36px;
    }

    .as-prev {
        left: 7px;
    }

    .as-next {
        right: 7px;
    }
}

/* Accessibility */

@media (prefers-reduced-motion: reduce) {
    .as-slide,
    .as-content,
    .as-button {
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
    }
}