﻿
/* =========================================
   FULL-WIDTH SCENIC IMAGE GALLERY
   ========================================= */

#scenicGallery {
    --gallery-radius: 28px;
    --thumbnail-width: 86px;
    --thumbnail-height: 68px;
    position: relative;
    width: 100%;
    max-width: none;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    overflow: hidden;
    isolation: isolate;
    background: #ffffff;
    border-radius: 0 0 var(--gallery-radius) var(--gallery-radius);
    font-family: inherit;
}

    #scenicGallery,
    #scenicGallery * {
        box-sizing: border-box;
    }

        #scenicGallery .scenic-gallery__stage {
            position: relative;
            width: 100%;
            height: clamp(480px, 88vh, 820px);
            min-height: 480px;
            overflow: hidden;
            background: #e8edf1;
        }

        /* Main image: original colours, no filters or overlays */
        #scenicGallery .scenic-gallery__image {
            position: absolute;
            inset: 0;
            z-index: 0;
            display: block;
            width: 100%;
            height: 100%;
            object-fit: cover;
            object-position: center center;
            opacity: 1;
            filter: none;
            transition: opacity 0.3s ease;
        }

            #scenicGallery .scenic-gallery__image.is-changing {
                opacity: 0.5;
            }

        /* Thumbnail navigation */
        #scenicGallery .scenic-gallery__thumbnails {
            position: absolute;
            z-index: 2;
            left: 50%;
            bottom: 0;
            display: flex;
            align-items: flex-end;
            gap: 7px;
            width: max-content;
            max-width: 100%;
            padding: 10px 12px 0;
            overflow-x: auto;
            overflow-y: hidden;
            transform: translateX(-50%);
            scrollbar-width: none;
            -webkit-overflow-scrolling: touch;
        }

            #scenicGallery .scenic-gallery__thumbnails::-webkit-scrollbar {
                display: none;
            }

        /* Individual thumbnail */
        #scenicGallery .scenic-gallery__thumbnail {
            position: relative;
            flex: 0 0 var(--thumbnail-width);
            width: var(--thumbnail-width);
            height: var(--thumbnail-height);
            padding: 0;
            margin: 0;
            overflow: hidden;
            border: 2px solid rgba(255, 255, 255, 0.75);
            border-bottom: 0;
            border-radius: 9px 9px 0 0;
            background: #ffffff;
            cursor: pointer;
            opacity: 0.8;
            transform: translateY(3px);
            transition: opacity 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
        }

            /* Thumbnail image */
            #scenicGallery .scenic-gallery__thumbnail img {
                display: block;
                width: 100%;
                height: 100%;
                object-fit: cover;
                object-position: center;
                filter: none;
            }

            /* Hover state */
            #scenicGallery .scenic-gallery__thumbnail:hover {
                opacity: 1;
                transform: translateY(0);
            }

            /* Selected thumbnail */
            #scenicGallery .scenic-gallery__thumbnail.is-active {
                border: 3px solid #ffffff;
                border-bottom: 0;
                opacity: 1;
                transform: translateY(0);
            }

        /* Selected thumbnail check mark */
        #scenicGallery .scenic-gallery__check {
            position: absolute;
            top: 4px;
            right: 4px;
            display: grid;
            place-items: center;
            width: 21px;
            height: 21px;
            border-radius: 50%;
            color: #ffffff;
            background: #4d89b5;
            border: 1px solid rgba(255, 255, 255, 0.85);
            font-size: 13px;
            font-weight: 700;
            opacity: 0;
            transform: scale(0.8);
            transition: opacity 0.2s ease, transform 0.2s ease;
        }

        #scenicGallery .scenic-gallery__thumbnail.is-active
        .scenic-gallery__check {
            opacity: 1;
            transform: scale(1);
        }

        /* Keyboard accessibility */
        #scenicGallery .scenic-gallery__thumbnail:focus-visible {
            outline: 3px solid #ffffff;
            outline-offset: -5px;
        }

/* Tablet */
@media (max-width: 768px) {
    #scenicGallery {
        --thumbnail-width: 72px;
        --thumbnail-height: 58px;
        --gallery-radius: 22px;
    }

        #scenicGallery .scenic-gallery__stage {
            height: 75vh;
            min-height: 440px;
            max-height: 700px;
        }

        #scenicGallery .scenic-gallery__thumbnails {
            left: 0;
            right: 0;
            width: 100%;
            max-width: 100%;
            justify-content: flex-start;
            padding: 10px 12px 0;
            transform: none;
        }
}

/* Mobile */
@media (max-width: 480px) {
    #scenicGallery {
        --thumbnail-width: 64px;
        --thumbnail-height: 52px;
        --gallery-radius: 16px;
    }

        #scenicGallery .scenic-gallery__stage {
            height: 68vh;
            min-height: 400px;
            max-height: 600px;
        }

        #scenicGallery .scenic-gallery__image {
            object-position: center center;
        }

        #scenicGallery .scenic-gallery__thumbnails {
            gap: 6px;
            padding-right: 10px;
            padding-left: 10px;
        }
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
    #scenicGallery *,
    #scenicGallery *::before,
    #scenicGallery *::after {
        transition-duration: 0.01ms !important;
    }
}
