/* === SWIPER === */
    :root {
        --thumb-gap: 10px;
    }

    /* === horizontal layout === */
    .country-gallery-wrapper {
        max-width: 1500px;
        margin: 0 auto;
        padding: 0 24px;
    }

    .country-gallery {
        display: flex;
        gap: 0;
    }

    /* === Main SWIPER === */
    .swiper-main {
        flex: 0 0 70%;
        margin-right: 12px;
        height: 600px;
    }

    /* === Image always fills the slide === */
    .swiper-main img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    /* === THUMBS === */
    .swiper-thumbs {
        height: 100%;
        overflow: hidden;
    }

    /* ===  THUMBS container === */
    .swiper-thumbs .swiper-wrapper {
        height: 100% !important;
    }

    /* === Actual height, accounting for gaps === */
    .swiper-thumbs .swiper-slide {
        width: 100% !important;
        height: calc((100% - (2 * var(--thumb-gap))) / 3);
    }

    /* === Thumbnail image === */
    .swiper-thumbs img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 8px;
        cursor: pointer;
        opacity: 0.7;
        transition: transform 0.2s;
        padding: 6px 0;
    }

    .swiper-thumbs img:hover {
        transform: scale(1.03);
    }

    .swiper-slide-thumb-active img {
        opacity: 1;
    }

    .thumbs-wrapper {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 450px;
        height: 600px;
        gap: 0;
    }

    /* === buttons === */
    .thumbs-prev,
    .thumbs-next {
        position: static;
        width: 32px;
        height: 32px;
        margin: 0;
    }

    .thumbs-prev::after,
    .thumbs-next::after {
        font-size: 20px;
    }

    /* === Rotating icons === */
    .thumbs-prev::after {
        transform: rotate(90deg);
    }

    .thumbs-next::after {
        transform: rotate(90deg);
    }

    /* Container aligned with the slider */
    .country-actions {
        width: 70%;
    }

    /* Responsive */

    /* Desktops */
    @media (max-width: 1400px) {
        .swiper-main {
            height: 500px;
        }

        .thumbs-wrapper {
            width: 350px;
            height: 500px;
        }
    }

    /* Laptops */
    @media (max-width: 1200px) {
        .swiper-main {
            height: 450px;
        }

        .thumbs-wrapper {
            width: 300px;
            height: 450px;
        }

        .swiper-thumbs .swiper-slide {
            height: calc((100% - (2 * var(--thumb-gap))) / 3);
        }
    }

    /* Tablets */
    @media (max-width: 992px) {
        .country-gallery {
            flex-direction: column;
        }

        .swiper-main {
            flex: 0 0 auto;
            width: 100%;
            margin-right: 0;
            margin-bottom: 20px;
            height: 400px;
        }

        .thumbs-wrapper {
            width: 100%;
            height: auto;
            flex-direction: row;
            align-items: center;
            gap: 10px;
        }

        .swiper-thumbs {
            width: calc(100% - 80px);
            height: 120px;
        }

        .swiper-thumbs .swiper-wrapper {
            height: 100% !important;
        }

        .swiper-thumbs .swiper-slide {
            width: calc(25% - 10px) !important;
            height: 100%;
            margin-right: 10px;
        }

        .thumbs-prev,
        .thumbs-next {
            width: 32px;
            height: 32px;
        }

        .thumbs-prev::after,
        .thumbs-next::after {
            transform: rotate(0deg);
        }

        .swiper-button-prev,
        .swiper-button-next {
            display: flex;
        }
    }

    /* Large mobile devices */
    @media (max-width: 768px) {
        .swiper-main {
            height: 300px;
        }

        .thumbs-wrapper {
            gap: 5px;
        }

        .swiper-thumbs {
            width: calc(100% - 60px);
            height: 80px;
        }

        .swiper-thumbs .swiper-slide {
            width: calc(33.33% - 8px) !important;
        }

        .thumbs-prev,
        .thumbs-next {
            width: 24px;
            height: 24px;
        }

        .thumbs-prev::after,
        .thumbs-next::after {
            font-size: 16px;
        }
    }

    /* Small mobile devices */
    @media (max-width: 576px) {
        .country-gallery-wrapper {
            padding: 0 12px;
        }

        .swiper-main {
            height: 250px;
        }

        .swiper-thumbs {
            width: calc(100% - 50px);
            height: 60px;
        }

        .swiper-thumbs .swiper-slide {
            width: calc(33.33% - 6px) !important;
            margin-right: 6px;
        }

        .swiper-thumbs img {
            padding: 3px 0;
        }

        .thumbs-prev,
        .thumbs-next {
            width: 20px;
            height: 20px;
        }
    }

    .swiper-main img.complete-image {
        object-fit: contain;
        background-color: #f5f5f5;
    }

    /* For mobile devices/tablets (horizontal) */
    @media (max-width: 992px) {
        .country-gallery {
            flex-direction: column;
        }

        .swiper-main {
            flex: 0 0 auto;
            width: 100%;
            margin-right: 0;
            margin-bottom: 20px;
            height: 400px;
        }

        .thumbs-wrapper {
            width: 100%;
            height: auto;
            flex-direction: row;
            align-items: center;
            gap: 10px;
        }

        .swiper-thumbs {
            width: calc(100% - 80px);
            height: 120px;
        }

        .swiper-thumbs .swiper-slide {
            width: calc(33.333% - 8px) !important;
            height: 100%;
            margin-right: 8px;
        }

        .thumbs-prev::after,
        .thumbs-next::after {
            transform: rotate(0deg);
        }
    }

    @media (max-width: 576px) {
        .swiper-main {
            height: 300px;
        }

        .swiper-thumbs {
            height: 80px;
        }

        .swiper-thumbs .swiper-slide {
            width: calc(33.333% - 6px) !important;
            margin-right: 6px;
        }
    }

    /* For desktop (vertical) */
    @media (min-width: 993px) {

        .thumbs-prev::after,
        .thumbs-next::after {
            transform: rotate(90deg);
        }
    }

    /* Buttons */
    .country-btn {
        border: 1px solid var(--lc-orange);
        color: var(--lc-orange);
        background: transparent;
        min-width: 180px;
        margin: 4px;
    }

    .country-btn:hover {
        background: var(--lc-orange);
        color: #fff;
    }

    /* ==== MEDIA MODAL DARK THEME ==== */
    html[data-bs-theme='dark'] .lc-modal-content {
        background: #1e2227;
        color: #e9ecef;
    }

    /* Header / footer */
    html[data-bs-theme='dark'] .lc-modal-header,
    html[data-bs-theme='dark'] .lc-modal-footer {
        background: #242a30;
        border-color: #343a40;
    }

    /* Inputs y selects */
    html[data-bs-theme='dark'] .input-lcm,
    html[data-bs-theme='dark'] .select-lcm,
    html[data-bs-theme='dark'] #tagsearch {
        background: #2b3035;
        color: #f1f1f1;
        border: 1px solid #495057;
    }

    html[data-bs-theme='dark'] .input-lcm::placeholder {
        color: #adb5bd;
    }

    /* Buttons */
    html[data-bs-theme='dark'] .btn-lcm {
        background: #343a40;
        color: #f8f9fa;
        border: 1px solid #495057;
    }

    html[data-bs-theme='dark'] .btn-lcm:hover {
        background: #495057;
    }

    /* Cards */
    html[data-bs-theme='dark'] .title-file {
        color: #e9ecef;
    }

    html[data-bs-theme='dark'] .cont-file {
        background: transparent;
    }

    html[data-bs-theme='dark'] .wrapper-file {
        background: #2a2f34;
        border: 1px solid #343a40;
    }

    html[data-bs-theme='dark'] .title-file:hover {
        color: #ffffff;
    }

    /* Hover / file selection */
    html[data-bs-theme='dark'] .fileElement.ui-selected {
        background: #0d6efd33;
    }

    /* Tags */
    html[data-bs-theme='dark'] .tag-lctags {
        background: #343a40;
        color: #dee2e6;
        border: 1px solid #495057;
    }

    html[data-bs-theme='dark'] .tag-lctags:hover,
    html[data-bs-theme='dark'] .tag-lctags[data-selected='1'] {
        background: #adb5bd;
        color: #000;
        border-color: #ced4da;
    }

    /* Close button */
    html[data-bs-theme='dark'] .lc-close {
        color: #dee2e6;
    }

    /* ===== LC MEDIA — scrollable modal ===== */
    .lc-modal-content {
        max-height: 90vh;
        display: flex;
        flex-direction: column;
    }

    /* body scroll */
    .lc-modal-body {
        overflow-y: auto;
        flex: 1;
        padding-right: 8px;
    }

    /* header/footer */
    .lc-modal-header,
    .lc-modal-footer {
        flex-shrink: 0;
    }

    /* Tag search button */
    .input-search {
        position: relative;
    }

    #tagsearchclear {
        position: absolute;
        right: 0px;
        background: none;
        border: none;
    }

    #tagsearchclear::after {
        content: 'x';
    }

    /* Videos */
.video-container {
    position: relative;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.video-container video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* Imagen */
.video-poster {
    display: block;
}

.video-buttons-top {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 3;

    display: flex;
    flex-wrap: wrap;
    gap: 6px;

    max-width: calc(100% - 20px);
}

/* MAIN BUTTON */
.btnvideo {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 5px;
    padding: 6px 10px;
    font-size: 12px;
    cursor: pointer;

    backdrop-filter: blur(6px);
    transition: all 0.2s ease;
    z-index: 3;

    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
    white-space: nowrap;
}

.btnvideo:hover {
    background: var(--lc-orange);
}

/* VIDEO.JS */
.video-js .vjs-control-bar {
    transition:
        opacity 0.3s ease,
        visibility 0.3s ease;
}

.video-container:hover .video-js .vjs-control-bar {
    opacity: 1;
    visibility: visible;
}

.video-js.vjs-paused .vjs-control-bar {
    opacity: 1;
    visibility: visible;
}

/* ACTIVE */
.btnvideo.active {
    background: var(--lc-orange);
    color: #fff;
    box-shadow: 0 0 0 2px rgba(255, 140, 0, 0.4);
    transform: scale(1.05);
}

.btnvideo.active:hover {
    background: var(--lc-orange);
}

/* BADGES */
.badge-hd {
    margin-left: 5px;
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 3px;
    background: var(--lc-darkblue);
    color: #fff;
    font-weight: bold;
}

/* WRAPPER */
.video-menu-wrapper {
    position: relative;
}

.video-quality-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    display: none;
    flex-direction: column;
    gap: 4px;
    min-width: 70px;
    padding: 6px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(8px);
    z-index: 999;
    box-shadow: 0 4px 10px rgba(0,0,0,0.35);
}

.video-menu-wrapper.open .video-quality-menu {
    display: flex;
}

.video-quality-option {
    border: none;
    background: rgba(255,255,255,0.12);
    color: #fff;
    border-radius: 5px;
    padding: 6px 10px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.video-quality-option:hover {
    background: var(--lc-orange);
}

/* MOBILE */
@media (max-width: 768px) {
    .video-buttons-top {
        gap: 5px;
    }
    .btnvideo {
        padding: 5px 8px;
        font-size: 11px;
    }
    .video-quality-option {
        font-size: 11px;
        padding: 5px 8px;
    }
}
