/* Tour hero gallery trigger + lightbox */
.tour-gallery-hero {
    position: relative;
}

@media (max-width: 767.98px) {
    .section-st-top {
        padding-bottom: 12px;
    }

    .section-st-top .tour_wrapper {
        padding-bottom: 0;
    }

    .section-tour-content .section_block.pt-0 {
        padding-top: 0;
    }

    .section-tour-content .section_block.pt-0 .tour-rating-row {
        padding-top: 6px;
        padding-bottom: 6px;
        margin-bottom: 12px;
    }

    .tour-gallery__view-all {
        display: none;
    }
}

.tour-gallery__view-all {
    position: absolute;
    top: 16px;
    left: 24px;
    z-index: 2;
    margin: 0;
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(48, 54, 44, 0.18);
    font-family: "Oxygen", sans-serif;
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--Neutral-Dark-Green, #30362c);
    cursor: pointer;
    transition: box-shadow 0.2s ease;
}

.tour-gallery__view-all:hover,
.tour-gallery__view-all:focus-visible {
    box-shadow: 0 4px 14px rgba(48, 54, 44, 0.22);
}

.tour-gallery__view-all:focus-visible {
    outline: 2px solid var(--CTA-Red, #8b0000);
    outline-offset: 2px;
}

.tour-gallery__hero-trigger {
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    text-align: inherit;
}

.tour-gallery__hero-trigger:focus-visible {
    outline: 2px solid var(--CTA-Red, #8b0000);
    outline-offset: 2px;
    border-radius: 20px;
}

.tour-gallery__hero-trigger .tour_img {
    transition: opacity 0.55s ease-in-out;
}

.tour-gallery__hero-trigger:hover .tour_img {
    opacity: 0.92;
}

.tour-gallery__source {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Lightbox modal */
.tour-gallery-modal {
    position: fixed;
    inset: 0;
    z-index: 1060;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px 16px;
}

.tour-gallery-modal[hidden] {
    display: none;
}

.tour-gallery-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(29, 26, 26, 0.88);
    border: none;
    padding: 0;
    cursor: pointer;
}

.tour-gallery-modal__dialog {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: min(100%, 960px);
    max-height: 100%;
    pointer-events: none;
    padding: 0 48px;
}

.tour-gallery-modal__dialog > * {
    pointer-events: auto;
}

.tour-gallery-modal__figure {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 0;
    min-height: 0;
}

.tour-gallery-modal__image {
    display: block;
    max-width: 100%;
    max-height: min(72vh, 640px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
}

.tour-gallery-modal__close,
.tour-gallery-modal__nav {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    background: transparent;
    color: #fff;
    cursor: pointer;
}

.tour-gallery-modal__close {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 2;
    width: 40px;
    height: 40px;
}

.tour-gallery-modal__close img {
    display: block;
    width: 24px;
    height: 24px;
    filter: brightness(0) invert(1);
}

.tour-gallery-modal__close:focus-visible,
.tour-gallery-modal__nav:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
    border-radius: 4px;
}

.tour-gallery-modal__nav {
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
}

.tour-gallery-modal__nav--prev {
    left: 8px;
}

.tour-gallery-modal__nav--next {
    right: 8px;
}

.tour-gallery-modal__nav img {
    display: block;
    width: 28px;
    height: 28px;
    filter: brightness(0) invert(1);
}

.tour-gallery-modal__thumbs {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    margin-top: 16px;
    padding: 4px 0 8px;
    overflow-x: auto;
}

.tour-gallery-modal__thumb {
    flex: 0 0 auto;
    width: 72px;
    height: 52px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
    background: transparent;
    cursor: pointer;
    opacity: 0.65;
    transition:
        opacity 0.2s ease,
        border-color 0.2s ease;
}

.tour-gallery-modal__thumb:hover {
    opacity: 0.9;
}

.tour-gallery-modal__thumb.is-active {
    border-color: #fff;
    opacity: 1;
}

.tour-gallery-modal__thumb:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.tour-gallery-modal__thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

body.tour-gallery-modal-open {
    overflow: hidden;
}

@media (max-width: 767.98px) {
    .tour-gallery-modal {
        padding: 56px 8px 12px;
    }

    .tour-gallery-modal__nav {
        width: 40px;
        height: 40px;
    }

    .tour-gallery-modal__nav--prev {
        left: 0;
    }

    .tour-gallery-modal__nav--next {
        right: 0;
    }

    .tour-gallery-modal__image {
        max-height: min(58vh, 480px);
    }

    .tour-gallery-modal__thumb {
        width: 56px;
        height: 40px;
    }
}
