.story-element .story-lists {
    width: 100%;
    padding: 15px 0;
}

/* Prevent Swiper's pre-initialization 100%-wide slide from flashing alone. */
.story-element .story-carousel {
    visibility: hidden;
}

.story-element .story-carousel.swiper-initialized {
    visibility: visible;
}

.story-element .story {
    position: relative;
    cursor: pointer;
}

.story-element .story img {
    width: 75px;
    height: 75px;
    -webkit-border-radius: 50%;
    border-radius: 50%;
    object-fit: cover;
    padding: 1px;
    transition: ease .3s;
    pointer-events: none;
}

.story-element .story-cover-img {
    position: relative;
    width: 75px;
    height: 75px;
    margin: 0 auto 15px auto;
}

.story-element .story-cover-img svg {
    position: absolute;
    top: 0;
    display: block;
    overflow: visible;
    fill: none;
    stroke-linecap: round;
    stroke-width: 3px;
    stroke-dasharray: 1;
    stroke-dashoffset: 0;
    width: 100%;
    height: auto;
    stroke: #e6123d;
}

/* Short ring spin + press feedback while the viewer zooms out of the cover. */
.story-element .story.is-opening .story-cover-img svg {
    animation: story-ring-spin .6s cubic-bezier(.4, 0, .2, 1);
}

.story-element .story.is-opening img {
    transform: scale(.88);
}

.story-element .story:focus-visible {
    outline: none;
}

.story-element .story:focus-visible .story-cover-img {
    border-radius: 50%;
    box-shadow: 0 0 0 3px #fff, 0 0 0 5px #2563eb;
}

@keyframes story-ring-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.story-element .story-title {
    text-align: center;
    margin-top: 5px;
    font-weight: 500;
    font-size: 14px;
    -webkit-transition: ease .3s;
    transition: ease .3s;
}

.story-element .story.seen .story-title {
    color: #9d9d9d;
}

.story-element .story.seen svg {
    stroke: #dbdbdb;
}

/* Story viewer: a 9:16 frame that zooms out of the clicked cover over a blurred backdrop. */
html.story-viewer-open {
    overflow: hidden;
}

.story-element-gallery-wrap {
    --story-frame-width: min(420px, calc(100vw - 32px), calc((100vh - 48px) * 9 / 16));
    position: fixed;
    inset: 0;
    z-index: -1;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(9, 11, 20, .82);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    backdrop-filter: blur(18px) saturate(140%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    -webkit-user-select: none;
    user-select: none;
    transition: opacity .35s ease, visibility 0s linear .45s, z-index 0s linear .45s;
}

@supports (height: 100dvh) {
    .story-element-gallery-wrap {
        --story-frame-width: min(420px, calc(100vw - 32px), calc((100dvh - 48px) * 9 / 16));
    }
}

.story-element-gallery-wrap.show {
    z-index: 2147483000;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity .35s ease;
}

.close-overlay {
    position: absolute;
    inset: 0;
    background-color: transparent;
    z-index: 1;
}

.story-element-gallery {
    position: relative;
    z-index: 5;
    width: var(--story-frame-width);
    aspect-ratio: 9 / 16;
    overflow: visible;
    transform: scale(.12);
    transform-origin: var(--story-origin-x, 50%) var(--story-origin-y, 50%);
    opacity: 0;
    transition: transform .45s cubic-bezier(.2, .8, .2, 1), opacity .3s ease;
}

.story-element-gallery-wrap.show .story-element-gallery {
    transform: none;
    opacity: 1;
}

.story-element .story-element-gallery .swiper-slide {
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
}

.story-content {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-radius: 22px;
    background: #111;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
    touch-action: pan-y;
}

/* Gradients keep the header and the link button readable on light media. */
.story-content::before,
.story-content::after {
    content: '';
    position: absolute;
    right: 0;
    left: 0;
    z-index: 2;
    pointer-events: none;
}

.story-content::before {
    top: 0;
    height: 130px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, .55), transparent);
}

.story-content::after {
    bottom: 0;
    height: 120px;
    background: linear-gradient(to top, rgba(0, 0, 0, .45), transparent);
}

.story-element .story-progressbar {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    z-index: 3;
    display: flex;
    gap: 4px;
    padding: 12px 12px 0;
    transition: opacity .25s ease;
}

.story-element .story-progress-segment {
    flex: 1 1 0;
    height: 3px;
    overflow: hidden;
    border-radius: 3px;
    background-color: rgba(255, 255, 255, .35);
}

.story-element .story-progress-segment span {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background-color: #fff;
    transform: scaleX(0);
    transform-origin: left center;
}

.story-element-gallery[dir="rtl"] .story-progress-segment span {
    transform-origin: right center;
}

.story-element .story-details {
    position: absolute;
    top: 24px;
    right: 0;
    left: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 12px;
    text-align: start;
    transition: opacity .25s ease;
}

.story-element .story-details img {
    display: block;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 0 2px #fff;
}

.story-element .story-g-title {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .35);
}

.story-element .close-story {
    position: static;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, .16);
    color: #fff;
    font-size: 16px;
    line-height: 1;
    text-shadow: none;
    cursor: pointer;
    transition: background-color .2s ease;
}

.story-element .close-story:hover,
.story-element .close-story:focus-visible {
    background-color: rgba(255, 255, 255, .3);
    outline: none;
}

.story-element-gallery-wrap.is-paused .story-progressbar,
.story-element-gallery-wrap.is-paused .story-details,
.story-element-gallery-wrap.is-paused .story-cta {
    opacity: 0;
}

/* Media: images are shown whole on a blurred copy of themselves instead of black bars. */
.story-element .story-image-content,
.story-video-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.story-element .story-image-content .story-media-blur {
    position: absolute;
    inset: -40px;
    width: calc(100% + 80px);
    max-width: none;
    height: calc(100% + 80px);
    object-fit: cover;
    filter: blur(28px) brightness(.75) saturate(1.2);
}

.story-element .story-image-content .story-media-main,
.story-video-content video {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    max-width: 100%;
    height: 100%;
    border-radius: 0;
    object-fit: contain;
    pointer-events: none;
}

.story-text-content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 28px;
    background: radial-gradient(circle at 30% 20%, #4f46e5, transparent 55%), radial-gradient(circle at 80% 85%, #db2777, transparent 50%), #111827;
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.8;
    text-align: center;
}

.story-element .story-cta {
    position: absolute;
    bottom: 22px;
    left: 50%;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 24px;
    border-radius: 999px;
    background-color: rgba(255, 255, 255, .94);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
    color: #111827;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    text-decoration: none;
    transform: translateX(-50%);
    transition: transform .2s ease, opacity .25s ease;
}

.story-element .story-cta:hover {
    color: #111827;
    transform: translateX(-50%) translateY(-2px);
}

.story-element .story-cta .fa {
    font-size: 11px;
}

/* Desktop arrows sit outside the frame as round glass buttons. */
.story-element .story-element-gallery .sbn {
    top: 50%;
    width: 46px;
    height: 46px;
    margin-top: -23px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, .14);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    color: #fff;
    cursor: pointer;
    transition: background-color .2s ease, opacity .2s ease;
}

.story-element .story-element-gallery .sbn:hover {
    background-color: rgba(255, 255, 255, .28);
}

.story-element .story-element-gallery .sbn::after {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
}

.story-element .story-element-gallery .swiper-button-next {
    right: -68px;
    left: auto;
}

.story-element .story-element-gallery .swiper-button-prev {
    left: -68px;
    right: auto;
}

.story-element .story-element-gallery.swiper-rtl .swiper-button-next {
    left: -68px;
    right: auto;
}

.story-element .story-element-gallery.swiper-rtl .swiper-button-prev {
    right: -68px;
    left: auto;
}

.story-element .story-element-gallery .sbn.swiper-button-disabled {
    opacity: 0;
    pointer-events: none;
}

@media screen and (max-width: 767px) {
    .story-element-gallery-wrap {
        --story-frame-width: 100vw;
        background-color: #000;
    }

    .story-element-gallery {
        height: 100vh;
        aspect-ratio: auto;
    }

    @supports (height: 100dvh) {
        .story-element-gallery {
            height: 100dvh;
        }
    }

    .story-content {
        border-radius: 0;
        box-shadow: none;
    }

    .story-element .story-element-gallery .sbn {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .story-element-gallery,
    .story-element .story.is-opening img,
    .story-element .story.is-opening .story-cover-img svg {
        transition: none;
        animation: none;
    }
}

.elementor .swiper-slide-shadow-left,
.elementor .swiper-slide-shadow-right {
    opacity: 0 !important;
}

.story-element .story-lists .swiper-slide {
    display: inline-block;
    padding: 0;
    box-shadow: none;
    border: none;
    text-align: center;
    background-color: unset;
}

.story-element .story-lists .swiper-slide:hover {
    box-shadow: none;
}

.story-element .story-lists {
    position: relative;
}

/* Centre the arrows on the cover circles (list top padding + half the cover), not on the whole row. */
.story-element .story-list-nav {
    position: absolute;
    top: calc(15px + var(--story-cover-size, 75px) / 2);
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    color: #666;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
    cursor: pointer;
    z-index: 10;
    /* The customizer's ".elementor-element :where(div, ...)" font reset outranks ".fa" on these divs. */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    font-size: 12px;
    transition: ease .3s;
}

.story-element .story-list-nav:hover {
    color: #222;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .2);
}

.story-element .story-list-prev {
    left: 0;
}

.story-element .story-list-next {
    right: 0;
}

.story-element .story-list-nav.swiper-button-disabled {
    opacity: 0;
    pointer-events: none;
}

body.rtl .story-element .story-list-prev {
    left: auto;
    right: 10px;
}

body.rtl .story-element .story-list-next {
    right: auto;
    left: 10px;
}

/* Phones swipe the stories; arrows there only cover the edge circles. */
@media screen and (max-width: 767px) {
    .story-element .story-list-nav {
        display: none;
    }
}
