/* Nanba Video Slider — front end styles (thumbnail + popup) */

.nanba-video-slider {
    width: 100%;
}

.nanba-vs-swiper {
    position: relative;
    width: 100%;
}

.nanba-vs-slide {
    display: block;
}


/* 2x2 checkerboard grid: two columns, square-ish cells.
   Row 1: [video][text]   Row 2: [text][video]  */

.nanba-vs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 360px;
    /* each cell height; 2 rows => 720px slide */
    gap: 0;
}

.nanba-vs-cell {
    position: relative;
    overflow: hidden;
}


/* ---- Video cell (clickable thumbnail) ---- */

.nanba-vs-cell--video {
    background: #e6e6e6;
}

.nanba-vs-poster {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    margin: 0;
    padding: 0;
    cursor: pointer;
    background-color: #e6e6e6;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nanba-vs-play {
    display: block;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 2px solid rgba( 255, 255, 255, 0.9);
    position: relative;
    transition: transform .25s ease, background .25s ease, border-color .25s ease;
    background: rgba( 0, 0, 0, 0.22);
}

.nanba-vs-poster:hover .nanba-vs-play {
    transform: scale( 1.08);
    background: rgba( 0, 0, 0, 0.45);
    border-color: rgba( 255, 255, 255, 1);
}

.nanba-vs-play::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 55%;
    transform: translate( -50%, -50%);
    border-style: solid;
    border-width: 12px 0 12px 21px;
    border-color: transparent transparent transparent rgba( 255, 255, 255, 0.95);
}


/* ---- Image overlay text (e.g. Silver Plaited Metal Cross badge) ---- */

.nanba-vs-cell--overlay .nanba-vs-poster::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient( to bottom, rgba( 0, 0, 0, 0.72) 0%, rgba( 0, 0, 0, 0.35) 45%, transparent 70%);
    pointer-events: none;
    z-index: 1;
}

.nanba-vs-overlay {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    padding: 34px 34px 30px 34px;
    text-align: left;
    z-index: 2;
    pointer-events: none;
}

.nanba-vs-overlay-title {
    display: block;
    font-size: 26px;
    font-weight: 500;
    line-height: 1.25;
    color: #fff;
    margin-bottom: 6px;
}

.nanba-vs-overlay-subtitle {
    display: block;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    color: rgba( 255, 255, 255, 0.78);
}


/* ---- Text cell (matches the reference panels) ---- */

.nanba-vs-cell--text {
    display: flex;
    align-items: center;
    justify-content: end;
    padding: 40px 50px;
}

.nanba-vs-text {
    text-align: end;
    max-width: 480px;
}

.nanba-vs-heading {
    margin: 0 0 18px;
    font-weight: 400;
    font-size: 46px;
    line-height: 1.18;
    color: #1a1a1a;
    letter-spacing: -0.5px;
}

.nanba-vs-hl {
    color: #0dbf5a;
    font-weight: 500;
}


/* green highlight from the reference */

.nanba-vs-subtitle {
    margin: 0;
    font-size: 16px;
    line-height: 1.65;
    color: #888888;
}

.nanba-vs-error {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
}


/* ---- Arrows ---- */

.nanba-vs-arrow {
    position: absolute;
    top: 50%;
    /* vertical centre of the 2x2 grid */
    transform: translateY( -50%);
    z-index: 5;
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: rgba( 0, 0, 0, 0.45);
    cursor: pointer;
    transition: background .2s ease;
}

.nanba-vs-arrow:hover {
    background: rgba( 0, 0, 0, 0.7);
}

.nanba-vs-arrow::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    border-top: 2px solid #fff;
    border-right: 2px solid #fff;
}

.nanba-vs-prev {
    left: 16px;
}

.nanba-vs-next {
    right: 16px;
}

.nanba-vs-prev::before {
    transform: translate( -40%, -50%) rotate( 225deg);
}

.nanba-vs-next::before {
    transform: translate( -60%, -50%) rotate( 45deg);
}

.nanba-vs-arrow.swiper-button-disabled {
    opacity: 0.35;
    cursor: default;
}


/* ---- Pagination dots ---- */

.nanba-vs-pagination {
    margin-top: 16px;
    text-align: center;
}

.nanba-vs-pagination .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: #bbb;
    opacity: 1;
    margin: 0 5px;
    display: inline-block;
    border-radius: 50%;
    cursor: pointer;
}

.nanba-vs-pagination .swiper-pagination-bullet-active {
    background: #333;
}


/* ---- Magnific Popup: video / embed in an inline popup ---- */

.nanba-vs-mfp-box {
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin: 24px auto;
    background: #000;
}


/* 16:9 responsive frame for YouTube/Vimeo iframes. */

.nanba-vs-mfp-ratio {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
}

.nanba-vs-mfp-ratio iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}


/* Hosted MP4. */

.nanba-vs-mfp-video video {
    display: block;
    width: 100%;
    height: auto;
    max-height: 85vh;
}


/* Make sure the Magnific content wrapper doesn't shrink our box. */

.nanba-vs-mfp .mfp-content {
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
}


/* ---- Fallback modal (only if Magnific Popup is unavailable) ---- */

.nanba-vs-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba( 0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4vw;
}

.nanba-vs-modal-inner {
    position: relative;
    width: 100%;
    max-width: 1000px;
    aspect-ratio: 16 / 9;
    background: #000;
}

.nanba-vs-modal-inner iframe,
.nanba-vs-modal-inner video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.nanba-vs-modal-close {
    position: absolute;
    top: -44px;
    right: 0;
    width: 40px;
    height: 40px;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
}


/* Tablet: smaller cells + heading. */

@media ( max-width: 1024px) {
    .nanba-vs-grid {
        grid-auto-rows: 240px;
    }
    .nanba-vs-heading {
        font-size: 30px;
    }
}


/* Mobile: stack into a single column. The checkerboard collapses to a
   readable vertical list: video, its text, next video, its text, … */

@media ( max-width: 600px) {
    .nanba-vs-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 200px;
    }
    /* Keep each text panel right after its own video. The DOM order is
	   videoA, textA, textB, videoB; reorder so it reads A then B. */
    .nanba-vs-cell:nth-child(4) {
        order: 0;
    }
    /* videoB */
    .nanba-vs-cell:nth-child(3) {
        order: 1;
    }
    /* textB  */
    .nanba-vs-arrow {
        width: 40px;
        height: 40px;
    }
    .nanba-vs-heading {
        font-size: 24px;
    }
    .nanba-vs-subtitle {
        font-size: 13px;
    }
    .nanba-vs-play {
        width: 64px;
        height: 64px;
    }
}