/* Tour Featured Image clickable when gallery exists */
.tour-featured-image.rt-has-gallery {
    cursor: pointer;
}

.tour-featured-image.rt-has-gallery img {
    border-radius: 14px;
    transition: opacity 0.2s ease;
}

.tour-featured-image.rt-has-gallery:hover img {
    opacity: 0.96;
}

/* Gallery Thumbnail Carousel */
.rt-tour-gallery-wrap {
    margin-top: 10px;
    margin-bottom: 18px;
    width: 100%;
    user-select: none;
}

.rt-tour-gallery-viewport {
    overflow: hidden;
    width: 100%;
    touch-action: pan-y;
}

.rt-tour-gallery-track {
    display: flex;
    gap: 10px;
    transition: transform 0.32s cubic-bezier(0.25, 0.8, 0.25, 1);
    will-change: transform;
}

.rt-tour-gallery-thumb {
    flex: 0 0 calc((100% - 20px) / 3); /* Mobile: 3 visible */
    aspect-ratio: 4 / 3;
    padding: 0;
    border: none;
    border-radius: 10px;
    overflow: hidden;
    background: #f3f4f6;
    cursor: pointer;
    position: relative;
}

.rt-tour-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.22s ease;
}

.rt-tour-gallery-thumb:hover img {
    transform: scale(1.04);
}

.rt-tour-gallery-thumb:focus-visible {
    outline: 2px solid #111827;
    outline-offset: 2px;
}

@media (min-width: 768px) {
    .rt-tour-gallery-thumb {
        flex: 0 0 calc((100% - 30px) / 4); /* Tablet: 4 visible */
    }
}

@media (min-width: 1024px) {
    .rt-tour-gallery-thumb {
        flex: 0 0 calc((100% - 40px) / 5); /* Desktop: 5 visible */
    }
}

/* Navigation Arrows + Dots Underneath Thumbnails */
.rt-tour-gallery-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 10px;
}

.rt-tour-gallery-nav.is-hidden {
    display: none;
}

.rt-tour-gallery-arrow {
    background: transparent;
    border: none;
    color: #4b5563;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.rt-tour-gallery-arrow:hover:not(:disabled) {
    background: #f3f4f6;
    color: #111827;
}

.rt-tour-gallery-arrow:disabled {
    opacity: 0.35;
    cursor: default;
}

.rt-tour-gallery-dots {
    display: flex;
    align-items: center;
    gap: 6px;
}

.rt-tour-gallery-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    border: none;
    padding: 0;
    background: #d1d5db;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.15s ease;
}

.rt-tour-gallery-dot.is-active {
    background: #111827;
    transform: scale(1.15);
}

/* Full-screen Lightbox */
.rt-lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(10, 10, 12, 0.96);
    display: flex;
    flex-direction: column;
    color: #ffffff;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.rt-lightbox-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

.rt-lightbox-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    flex-shrink: 0;
}

.rt-lightbox-counter {
    font-size: 13.5px;
    font-weight: 500;
    color: #e5e7eb;
}

.rt-lightbox-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rt-lightbox-icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: background-color 0.15s ease;
}

.rt-lightbox-icon-btn:hover {
    background: rgba(255, 255, 255, 0.22);
}

.rt-lightbox-stage {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 56px;
    overflow: hidden;
    touch-action: pan-y;
}

.rt-lightbox-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
    transition: transform 0.22s ease;
    user-select: none;
}

.rt-lightbox-img.is-zoomed {
    transform: scale(1.65);
    cursor: zoom-out;
}

.rt-lightbox-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    transition: background-color 0.15s ease;
}

.rt-lightbox-nav-btn:hover {
    background: rgba(255, 255, 255, 0.28);
}

.rt-lightbox-prev {
    left: 14px;
}

.rt-lightbox-next {
    right: 14px;
}

.rt-lightbox-strip {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    padding: 10px 18px 14px;
    overflow-x: auto;
    scrollbar-width: none;
}

.rt-lightbox-strip::-webkit-scrollbar {
    display: none;
}

@media (min-width: 768px) {
    .rt-lightbox-strip {
        justify-content: safe center;
    }
}

.rt-lightbox-strip-item {
    flex: 0 0 64px;
    height: 46px;
    border-radius: 5px;
    overflow: hidden;
    border: 2px solid transparent;
    padding: 0;
    background: #1f2937;
    opacity: 0.55;
    cursor: pointer;
    transition: opacity 0.15s ease, border-color 0.15s ease;
}

.rt-lightbox-strip-item:hover {
    opacity: 0.85;
}

.rt-lightbox-strip-item.is-active {
    opacity: 1;
    border-color: #ffffff;
}

.rt-lightbox-strip-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 640px) {
    .rt-lightbox-stage {
        padding: 8px 12px;
    }

    .rt-lightbox-nav-btn {
        width: 36px;
        height: 36px;
    }

    .rt-lightbox-prev {
        left: 6px;
    }

    .rt-lightbox-next {
        right: 6px;
    }
}
