
/* =====================================================
   K2 TO K7 ADVENTURE - GALLERY CSS
   Separate stylesheet; does not modify global layout
   ===================================================== */

/* Gallery headings */
.k2-gallery-section .k2-gallery-heading {
    margin: 30px 0 20px;
}

.k2-gallery-section .k2-gallery-heading h4 {
    display: inline-block;
    margin: 0;
    padding-bottom: 12px;
    border-bottom: 3px solid #f8e808;
    color: #222222;
    font-size: 25px;
    font-weight: 700;
    line-height: 1.4;
}

.k2-gallery-section .k2-video-heading {
    margin-top: 50px;
}

/* Gallery grid: three columns on desktop */
.k2-gallery-section .k2-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    width: 100%;
}

/* Gallery thumbnail */
.k2-gallery-section .k2-gallery-item {
    position: relative;
    height: 250px;
    min-width: 0;
    overflow: hidden;
    border-radius: 6px;
    background: #222222;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
    isolation: isolate;
}

.k2-gallery-section .k2-gallery-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.k2-gallery-section .k2-gallery-item:hover img,
.k2-gallery-section .k2-gallery-item:focus-visible img {
    transform: scale(1.06);
}

.k2-gallery-section .k2-gallery-item:focus-visible {
    outline: 3px solid #f8e808;
    outline-offset: 3px;
}

/* Video play icon */
.k2-gallery-section .k2-gallery-play {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    padding-left: 4px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: #f8e808;
    color: #222222;
    font-size: 23px;
    pointer-events: none;
}

/* =====================================================
   LIGHTBOX
   ===================================================== */

.k2-gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    padding: 65px 80px;
    background: rgba(0, 0, 0, 0.95);
}

.k2-gallery-lightbox.is-open {
    display: flex;
}

.k2-gallery-viewer {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
}

.k2-gallery-viewer img,
.k2-gallery-viewer video {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.k2-gallery-viewer video {
    background: #000000;
}

/* Close button */
.k2-gallery-close {
    position: absolute;
    top: 15px;
    right: 25px;
    z-index: 5;
    padding: 0 5px;
    border: none;
    background: transparent;
    color: #ffffff;
    font-family: Arial, sans-serif;
    font-size: 46px;
    line-height: 1;
    cursor: pointer;
}

.k2-gallery-close:hover,
.k2-gallery-close:focus-visible {
    color: #f8e808;
}

/* Previous / next buttons */
.k2-gallery-nav {
    position: absolute;
    top: 50%;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    transform: translateY(-50%);
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    font-size: 22px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.k2-gallery-nav:hover,
.k2-gallery-nav:focus-visible {
    background: #f8e808;
    color: #222222;
}

.k2-gallery-prev {
    left: 20px;
}

.k2-gallery-next {
    right: 20px;
}

/* Media counter */
.k2-gallery-counter {
    position: absolute;
    bottom: 16px;
    left: 0;
    width: 100%;
    padding: 0 15px;
    color: #ffffff;
    font-size: 14px;
    text-align: center;
    pointer-events: none;
}

/* Prevent accidental horizontal overflow */
.k2-gallery-section,
.k2-gallery-section * {
    box-sizing: border-box;
}

/* =====================================================
   TABLETS
   ===================================================== */

@media (max-width: 991px) {
    .k2-gallery-section .k2-gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }

    .k2-gallery-section .k2-gallery-item {
        height: 230px;
    }

    .k2-gallery-lightbox {
        padding: 60px 65px;
    }
}

/* =====================================================
   MOBILE
   ===================================================== */

@media (max-width: 575px) {
    .k2-gallery-section .k2-gallery-heading {
        margin-top: 25px;
        margin-bottom: 18px;
    }

    .k2-gallery-section .k2-gallery-heading h4 {
        font-size: 22px;
    }

    .k2-gallery-section .k2-gallery-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
    }

    .k2-gallery-section .k2-gallery-item {
        height: 250px;
    }

    .k2-gallery-section .k2-video-heading {
        margin-top: 40px;
    }

    .k2-gallery-lightbox {
        padding: 55px 42px;
    }

    .k2-gallery-close {
        top: 12px;
        right: 15px;
        font-size: 38px;
    }

    .k2-gallery-nav {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }

    .k2-gallery-prev {
        left: 4px;
    }

    .k2-gallery-next {
        right: 4px;
    }

    .k2-gallery-counter {
        bottom: 12px;
        font-size: 12px;
    }
}

