/* Video block styles (home.video_block) — Nordia polish */

.tf-section[data-tf-type="home.video_block"] {
    --tf-video-featured-max: 1200px;
    --tf-video-featured-aspect: 21 / 9;
    --tf-video-featured-max-height: 400px;
}

.tf-section[data-tf-type="home.video_block"] .tf-video-block--single,
.tf-section[data-tf-type="home.video_block"] .tf-video-block--style-video_1 {
    max-width: min(var(--tf-video-featured-max), 100%);
    width: 100%;
}

.tf-section[data-tf-type="home.video_block"] .tf-video-block--style-video_1 .tf-video-block__frame {
    aspect-ratio: var(--tf-video-aspect, var(--tf-video-featured-aspect));
    max-height: var(--tf-video-featured-max-height);
}

.tf-section[data-tf-type="home.video_block"] .tf-video-block__frame {
    box-shadow: 0 8px 28px rgba(17, 24, 39, 0.08);
}

.tf-section[data-tf-type="home.video_block"] .tf-video-block__play {
    width: 64px;
    height: 64px;
    backdrop-filter: blur(6px);
    background: rgba(0, 0, 0, 0.42);
}

.tf-section[data-tf-type="home.video_block"] .tf-video-block__caption {
    min-width: 0;
    max-width: 100%;
    font-family: var(--tf-video-caption-font, inherit);
    font-size: var(--tf-video-caption-size, 13px);
    font-weight: var(--tf-video-caption-weight, 500);
    color: var(--tf-video-caption-color, inherit);
    letter-spacing: 0.02em;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.tf-section[data-tf-type="home.video_block"] .tf-video-block__item,
.tf-section[data-tf-type="home.video_block"] .tf-video-block__figure {
    min-width: 0;
    max-width: 100%;
}

.tf-section[data-tf-type="home.video_block"] .tf-video-block--shorts .tf-video-block__caption {
    text-align: left;
    font-size: var(--tf-video-caption-size, 12px);
}

.tf-section[data-tf-type="home.video_block"] .tf-video-block__side-hint .bi {
    font-size: 22px;
}

.tf-section[data-tf-type="home.video_block"] .tf-video-block__shorts .tf-video-block__nav {
    background: rgba(255, 255, 255, 0.95);
}

.tf-section[data-tf-type="home.video_block"] .tf-video-block__shorts .tf-swiper:not(.swiper-initialized) .swiper-wrapper {
    display: flex;
    gap: 12px;
}

.tf-section[data-tf-type="home.video_block"] .tf-video-block__shorts .tf-swiper:not(.swiper-initialized) .swiper-slide {
    flex: 0 0 calc(100% / var(--tf-video-cols-desktop, 2));
    max-width: calc(100% / var(--tf-video-cols-desktop, 2));
}

.tf-section[data-tf-type="home.video_showcase"] .tf-video-showcase-discover .tf-btn-swiper-main > .tf-swiper {
    padding-left: max(15px, calc((100% - min(100%, 1790px)) / 2 + 15px));
    padding-right: max(15px, calc((100% - min(100%, 1790px)) / 2 + 15px));
    box-sizing: border-box;
}

.tf-section[data-tf-type="home.video_showcase"] .tf-btn-swiper-main {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.tf-section[data-tf-type="home.video_showcase"] .tf-swiper {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
}

.tf-section[data-tf-type="home.video_showcase"] .tf-swiper .swiper-slide {
    box-sizing: border-box;
    height: auto !important;
}

/* Section heading above video layers */
.tf-section[data-tf-type="home.video_showcase"] .sect-heading-v2,
.tf-section[data-tf-type="home.video_showcase"] .sect-heading {
    position: relative;
    z-index: 2;
}

/* Override theme `.tf-swiper .swiper-slide > * { height:100% }` — that collapses cards */
.tf-section[data-tf-type="home.video_showcase"] .tf-swiper .swiper-slide > .gallery-v02,
.tf-section[data-tf-type="home.video_showcase"] .tf-swiper .swiper-slide > .showcase-card {
    display: block;
    position: relative;
    width: 100%;
    height: auto !important;
    min-height: 420px;
    overflow: hidden;
    border-radius: 20px;
    background: #f4f6f8;
}

.tf-section[data-tf-type="home.video_showcase"] .tf-swiper .swiper-slide > .showcase-card {
    display: flex;
    isolation: isolate;
    overflow: visible;
    border-radius: 0;
    background: transparent;
}

.tf-section[data-tf-type="home.video_showcase"] .showcase-card .card-content {
    z-index: 5;
    pointer-events: auto;
}

.tf-section[data-tf-type="home.video_showcase"] .showcase-card .card-video {
    position: relative;
    z-index: 0;
}

.tf-section[data-tf-type="home.video_showcase"] .gallery-v02 .gallery-video,
.tf-section[data-tf-type="home.video_showcase"] .showcase-card .card-video .tf-video-block__frame {
    position: relative;
    display: block;
    width: 100%;
    min-height: 420px;
    aspect-ratio: 0.625;
    overflow: hidden;
    background: #111827;
    pointer-events: auto;
}

.tf-section[data-tf-type="home.video_showcase"] .showcase-card .card-video .tf-video-block__frame {
    aspect-ratio: 0.6666666667;
    border-radius: 32px;
    max-height: 687px;
}

.tf-section[data-tf-type="home.video_showcase"] .gallery-v02 .gallery-video iframe,
.tf-section[data-tf-type="home.video_showcase"] .gallery-v02 .gallery-video video,
.tf-section[data-tf-type="home.video_showcase"] .showcase-card .card-video iframe,
.tf-section[data-tf-type="home.video_showcase"] .showcase-card .card-video video {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    border: 0;
    object-fit: cover;
    transform: none;
}

.tf-section[data-tf-type="home.video_showcase"] .gallery-v02 .gallery-video .tf-video-block__poster,
.tf-section[data-tf-type="home.video_showcase"] .showcase-card .card-video .tf-video-block__poster {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.tf-section[data-tf-type="home.video_showcase"] .gallery-v02 .gallery-video .tf-video-block__play,
.tf-section[data-tf-type="home.video_showcase"] .showcase-card .card-video .tf-video-block__play {
    z-index: 3;
    width: 64px;
    height: 64px;
    backdrop-filter: blur(6px);
    background: rgba(0, 0, 0, 0.45);
}

.tf-section[data-tf-type="home.video_showcase"] .gallery-v02 .gallery-video .showcase-card__video-placeholder,
.tf-section[data-tf-type="home.video_showcase"] .showcase-card .card-video .showcase-card__video-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 420px;
    aspect-ratio: 0.625;
    background: #f4f6f8;
    color: #6b7280;
    pointer-events: none;
}

.tf-section[data-tf-type="home.video_showcase"] .gallery-v02 .gallery-content {
    z-index: 5;
    pointer-events: auto;
}

.tf-section[data-tf-type="home.video_showcase"] .tf-swiper:not(.swiper-initialized) .swiper-wrapper {
    display: flex;
    transform: none !important;
    justify-content: flex-start;
}

.tf-section[data-tf-type="home.video_showcase"] .tf-swiper .swiper-wrapper {
    justify-content: flex-start;
}


.tf-section[data-tf-type="home.video_showcase"] .tf-swiper:not(.swiper-initialized) .swiper-slide {
    flex: 0 0 auto;
    width: 100%;
    max-width: 100%;
}

.tf-section[data-tf-type="home.video_showcase"] .tf-swiper:not(.swiper-initialized)[data-mobile="1.2"] > .swiper-wrapper > .swiper-slide {
    width: 83.333%;
    max-width: 83.333%;
}

.tf-section[data-tf-type="home.video_showcase"] .tf-swiper:not(.swiper-initialized)[data-mobile="1.15"] > .swiper-wrapper > .swiper-slide {
    width: 86.956%;
    max-width: 86.956%;
}

@media (min-width: 575px) {
    .tf-section[data-tf-type="home.video_showcase"] .tf-swiper:not(.swiper-initialized)[data-mobile-sm="1.8"] > .swiper-wrapper > .swiper-slide {
        width: 55.555%;
        max-width: 55.555%;
    }

    .tf-section[data-tf-type="home.video_showcase"] .tf-swiper:not(.swiper-initialized)[data-mobile-sm="1.4"] > .swiper-wrapper > .swiper-slide {
        width: 71.428%;
        max-width: 71.428%;
    }
}

@media (min-width: 768px) {
    .tf-section[data-tf-type="home.video_showcase"] .tf-swiper:not(.swiper-initialized)[data-tablet="2"] > .swiper-wrapper > .swiper-slide {
        width: 50%;
        max-width: 50%;
    }

    .tf-section[data-tf-type="home.video_showcase"] .tf-swiper:not(.swiper-initialized)[data-tablet="2.2"] > .swiper-wrapper > .swiper-slide {
        width: 45.454%;
        max-width: 45.454%;
    }

    .tf-section[data-tf-type="home.video_showcase"] .tf-swiper:not(.swiper-initialized)[data-tablet="3.2"] > .swiper-wrapper > .swiper-slide {
        width: 31.25%;
        max-width: 31.25%;
    }
}

@media (min-width: 1200px) {
    .tf-section[data-tf-type="home.video_showcase"] .tf-swiper:not(.swiper-initialized)[data-preview="3"] > .swiper-wrapper > .swiper-slide {
        width: 33.333%;
        max-width: 33.333%;
    }

    .tf-section[data-tf-type="home.video_showcase"] .tf-swiper:not(.swiper-initialized)[data-preview="1"] > .swiper-wrapper > .swiper-slide {
        width: 100%;
        max-width: 100%;
    }

    .tf-section[data-tf-type="home.video_showcase"] .tf-swiper:not(.swiper-initialized)[data-preview="2"] > .swiper-wrapper > .swiper-slide {
        width: 50%;
        max-width: 50%;
    }

    .tf-section[data-tf-type="home.video_showcase"] .tf-swiper:not(.swiper-initialized)[data-preview="4"] > .swiper-wrapper > .swiper-slide {
        width: 25%;
        max-width: 25%;
    }

    .tf-section[data-tf-type="home.video_showcase"] .tf-swiper:not(.swiper-initialized)[data-preview="4.1545"] > .swiper-wrapper > .swiper-slide {
        width: 24.07%;
        max-width: 24.07%;
    }
}

/* Theme Studio device toggle (iframe width may not match real breakpoints) */
html[data-device="mobile"] .tf-section[data-tf-type="home.video_showcase"] .tf-swiper:not(.swiper-initialized) > .swiper-wrapper > .swiper-slide,
body[data-device="mobile"] .tf-section[data-tf-type="home.video_showcase"] .tf-swiper:not(.swiper-initialized) > .swiper-wrapper > .swiper-slide {
    width: 100%;
    max-width: 100%;
}

html[data-device="mobile"] .tf-section[data-tf-type="home.video_showcase"] .tf-swiper:not(.swiper-initialized)[data-mobile="1.15"] > .swiper-wrapper > .swiper-slide,
body[data-device="mobile"] .tf-section[data-tf-type="home.video_showcase"] .tf-swiper:not(.swiper-initialized)[data-mobile="1.15"] > .swiper-wrapper > .swiper-slide {
    width: 86.956%;
    max-width: 86.956%;
}

html[data-device="mobile"] .tf-section[data-tf-type="home.video_showcase"] .tf-swiper:not(.swiper-initialized)[data-mobile="1.2"] > .swiper-wrapper > .swiper-slide,
body[data-device="mobile"] .tf-section[data-tf-type="home.video_showcase"] .tf-swiper:not(.swiper-initialized)[data-mobile="1.2"] > .swiper-wrapper > .swiper-slide {
    width: 83.333%;
    max-width: 83.333%;
}

html[data-device="tablet"] .tf-section[data-tf-type="home.video_showcase"] .tf-swiper:not(.swiper-initialized)[data-tablet="2"] > .swiper-wrapper > .swiper-slide,
body[data-device="tablet"] .tf-section[data-tf-type="home.video_showcase"] .tf-swiper:not(.swiper-initialized)[data-tablet="2"] > .swiper-wrapper > .swiper-slide {
    width: 50%;
    max-width: 50%;
}

html[data-device="tablet"] .tf-section[data-tf-type="home.video_showcase"] .tf-swiper:not(.swiper-initialized)[data-tablet="2.2"] > .swiper-wrapper > .swiper-slide,
body[data-device="tablet"] .tf-section[data-tf-type="home.video_showcase"] .tf-swiper:not(.swiper-initialized)[data-tablet="2.2"] > .swiper-wrapper > .swiper-slide {
    width: 45.454%;
    max-width: 45.454%;
}

html[data-device="tablet"] .tf-section[data-tf-type="home.video_showcase"] .tf-swiper:not(.swiper-initialized)[data-tablet="3.2"] > .swiper-wrapper > .swiper-slide,
body[data-device="tablet"] .tf-section[data-tf-type="home.video_showcase"] .tf-swiper:not(.swiper-initialized)[data-tablet="3.2"] > .swiper-wrapper > .swiper-slide {
    width: 31.25%;
    max-width: 31.25%;
}

html[data-device="desktop"] .tf-section[data-tf-type="home.video_showcase"] .tf-swiper:not(.swiper-initialized)[data-preview="3"] > .swiper-wrapper > .swiper-slide,
body[data-device="desktop"] .tf-section[data-tf-type="home.video_showcase"] .tf-swiper:not(.swiper-initialized)[data-preview="3"] > .swiper-wrapper > .swiper-slide {
    width: 33.333%;
    max-width: 33.333%;
}

html[data-device="desktop"] .tf-section[data-tf-type="home.video_showcase"] .tf-swiper:not(.swiper-initialized)[data-preview="4.1545"] > .swiper-wrapper > .swiper-slide,
body[data-device="desktop"] .tf-section[data-tf-type="home.video_showcase"] .tf-swiper:not(.swiper-initialized)[data-preview="4.1545"] > .swiper-wrapper > .swiper-slide {
    width: 24.07%;
    max-width: 24.07%;
}
