/**
 * Nečiūnas NT Elementor Video Content widget.
 */

.neciunasnt-video-content,
.neciunasnt-video-content *,
.neciunasnt-video-content *::before,
.neciunasnt-video-content *::after {
    box-sizing: border-box;
}

.neciunasnt-video-content {
    --neciunasnt-video-cream: var(--color-cream, #f2eee3);
    --neciunasnt-video-gap: 24px;

    width: 100%;
    overflow: hidden;
    padding-block: clamp(88px, 8.35vw, 120px);
    color: var(--neciunasnt-video-cream);
    background:
        radial-gradient(circle at 12% 16%, rgb(106 33 37 / 28%), transparent 42%),
        linear-gradient(115deg, #391214 0%, #160f0c 86%);
    font-family: var(--font-primary, "TT Firs Neue", Arial, sans-serif);
}

.neciunasnt-video-content__inner {
    width: min(calc(100% - 48px), 1240px);
    margin-inline: auto;
}

.neciunasnt-video-content__heading {
    margin: 0 0 64px;
    text-align: center;
}

.neciunasnt-video-content__eyebrow,
.neciunasnt-video-content__title {
    margin: 0;
}

.neciunasnt-video-content__eyebrow {
    margin-bottom: 12px;
    color: var(--neciunasnt-video-cream);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.18em;
    line-height: 1.4;
    text-transform: uppercase;
}

.neciunasnt-video-content__title {
    color: #fff;
    font-size: clamp(34px, 3.1vw, 40px);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.1;
    text-transform: uppercase;
}

.neciunasnt-video-content__viewport {
    width: 100%;
    min-width: 0;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-behavior: smooth;
    scroll-snap-type: inline mandatory;
    scrollbar-width: none;
}

.neciunasnt-video-content__viewport::-webkit-scrollbar {
    display: none;
}

.neciunasnt-video-content__cards {
    display: flex;
    width: 100%;
    align-items: stretch;
    gap: var(--neciunasnt-video-gap);
}

.neciunasnt-video-content.is-single-page .neciunasnt-video-content__cards {
    justify-content: center;
}

.neciunasnt-video-content__card {
    position: relative;
    min-width: 0;
    aspect-ratio: 292 / 411;
    flex: 0 0 calc((100% - (var(--neciunasnt-video-gap) * 3)) / 4);
    overflow: hidden;
    border: 1px solid var(--neciunasnt-video-cream);
    border-radius: 20px;
    background-color: rgb(242 238 227 / 8%);
    scroll-snap-align: start;
}

.neciunasnt-video-content__card > img,
.neciunasnt-video-content__poster-placeholder {
    position: absolute;
    width: 100%;
    height: 100%;
    inset: 0;
}

.neciunasnt-video-content__card > img {
    display: block;
    object-fit: cover;
    object-position: center;
}

.neciunasnt-video-content__poster-placeholder {
    display: block;
    background: linear-gradient(145deg, rgb(242 238 227 / 6%), rgb(242 238 227 / 16%));
}

.neciunasnt-video-content__play {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 50%;
    display: inline-grid;
    width: 56px;
    height: 56px;
    place-items: center;
    padding: 0;
    border: 1px solid #fff;
    border-radius: 50%;
    appearance: none;
    color: #fff;
    background-color: rgb(255 255 255 / 25%);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    cursor: pointer;
    transform: translate(-50%, -50%);
    transition: background-color 180ms ease, transform 180ms ease;
}

.neciunasnt-video-content__play svg {
    width: 24px;
    height: 24px;
    margin-left: 3px;
    fill: currentColor;
}

.neciunasnt-video-content__play-icon-image {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.neciunasnt-video-content__play:hover,
.neciunasnt-video-content__play:focus-visible {
    background-color: rgb(255 255 255 / 36%);
    transform: translate(-50%, -50%) scale(1.04);
}

.neciunasnt-video-content__play:focus-visible,
.neciunasnt-video-content__dot:focus-visible,
.neciunasnt-video-content__viewport:focus-visible {
    outline: 2px solid var(--neciunasnt-video-cream);
    outline-offset: 4px;
}

.neciunasnt-video-content__dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 36px;
}

.neciunasnt-video-content__dots[hidden],
.neciunasnt-video-content__dot[hidden] {
    display: none;
}

.neciunasnt-video-content__dot {
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    appearance: none;
    background-color: rgb(242 238 227 / 30%);
    cursor: pointer;
    transition: background-color 180ms ease, transform 180ms ease;
}

.neciunasnt-video-content__dot[aria-current="true"] {
    background-color: var(--neciunasnt-video-cream);
    transform: scale(1.2);
}

.neciunasnt-video-content__placeholder {
    padding: 24px;
    border: 1px dashed rgb(242 238 227 / 50%);
    border-radius: 12px;
    color: rgb(242 238 227 / 75%);
    text-align: center;
}

.neciunasnt-video-modal {
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
    margin: 0;
    padding: 24px;
    border: 0;
    color: #fff;
    background: transparent;
}

.neciunasnt-video-modal:not([open]):not(.is-open) {
    display: none;
}

.neciunasnt-video-modal[open],
.neciunasnt-video-modal.is-open {
    display: grid;
    place-items: center;
}

.neciunasnt-video-modal::backdrop {
    background: rgb(5 3 3 / 88%);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.neciunasnt-video-modal.is-open {
    position: fixed;
    z-index: 10000;
    inset: 0;
    background: rgb(5 3 3 / 88%);
}

.neciunasnt-video-modal__shell {
    position: relative;
    width: min(90vw, 440px, calc(88vh * 9 / 16));
    max-width: 100%;
    overflow: hidden;
    border: 1px solid rgb(242 238 227 / 40%);
    border-radius: 16px;
    aspect-ratio: 9 / 16;
    background: #000;
    box-shadow: 0 24px 80px rgb(0 0 0 / 45%);
}

.neciunasnt-video-modal[data-video-format="horizontal"] .neciunasnt-video-modal__shell {
    width: min(92vw, 1100px, calc(88vh * 16 / 9));
    aspect-ratio: 16 / 9;
}

.neciunasnt-video-modal[data-video-format="square"] .neciunasnt-video-modal__shell {
    width: min(88vw, 720px, 88vh);
    aspect-ratio: 1;
}

.neciunasnt-video-modal__player,
.neciunasnt-video-modal__player iframe,
.neciunasnt-video-modal__player video {
    position: absolute;
    width: 100%;
    height: 100%;
    inset: 0;
}

.neciunasnt-video-modal__player iframe,
.neciunasnt-video-modal__player video {
    display: block;
    border: 0;
    object-fit: contain;
    background: #000;
}

.neciunasnt-video-modal__close {
    position: absolute;
    z-index: 2;
    top: 12px;
    right: 12px;
    display: inline-grid;
    width: 44px;
    height: 44px;
    place-items: center;
    padding: 0;
    border: 1px solid rgb(255 255 255 / 70%);
    border-radius: 50%;
    appearance: none;
    color: #fff;
    background: rgb(0 0 0 / 55%);
    cursor: pointer;
}

.neciunasnt-video-modal .neciunasnt-video-modal__close:hover,
.neciunasnt-video-modal .neciunasnt-video-modal__close:focus,
.neciunasnt-video-modal .neciunasnt-video-modal__close:active {
    border-color: rgb(255 255 255 / 90%);
    color: #fff;
    background-color: rgb(0 0 0 / 72%);
}

.neciunasnt-video-modal__close svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-width: 1.8;
}

.neciunasnt-video-modal .neciunasnt-video-modal__close:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

body.neciunasnt-video-modal-open {
    overflow: hidden;
}

@media (max-width: 1024px) {
    .neciunasnt-video-content {
        padding-block: 88px;
    }

    .neciunasnt-video-content__heading {
        margin-bottom: 52px;
    }

    .neciunasnt-video-content__card {
        flex-basis: calc((100% - var(--neciunasnt-video-gap)) / 2);
    }
}

@media (max-width: 767px) {
    .elementor .e-con:has(> .elementor-widget-neciunasnt-video-content) {
        display: block;
    }

    .neciunasnt-video-content {
        --neciunasnt-video-gap: 18px;

        padding-block: 64px;
    }

    .neciunasnt-video-content__inner {
        width: min(calc(100% - 32px), 1240px);
    }

    .neciunasnt-video-content__heading {
        margin-bottom: 38px;
    }

    .neciunasnt-video-content__eyebrow {
        margin-bottom: 10px;
        font-size: 11px;
        letter-spacing: 0.15em;
    }

    .neciunasnt-video-content__title {
        font-size: clamp(30px, 10vw, 36px);
    }

    .neciunasnt-video-content__card {
        flex-basis: min(82%, 320px);
    }

    .neciunasnt-video-content__dots {
        margin-top: 28px;
    }

    .neciunasnt-video-modal {
        padding: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .neciunasnt-video-content__viewport {
        scroll-behavior: auto;
    }

    .neciunasnt-video-content__play,
    .neciunasnt-video-content__dot {
        transition: none;
    }
}
