/* Center the main gallery title */
.gallery-main-title {
    text-align: center;
    margin-top: 100px;
    margin-bottom: 40px;
}

      @import url('https://fonts.googleapis.com/css2?family=EB+Garamond&display=swap');

        * {
            box-sizing: border-box;
            font-family: "EB Garamond", serif;
            font-optical-sizing: auto;
        }

        body {
            margin: 0;
            padding: 0;
            background: #f5f5f5;
        }

        body::-webkit-scrollbar {
          display: none;
        }
        
        .gallery-container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 20px;
        }

        .gallery-section {
            display: flex;
            align-items: flex-start;
            gap: 40px;
            margin-bottom: 60px;
        }

        .gallery-titles {
            flex: 0 0 250px; /* Fixed width for title area */
            position: sticky;
            top: 160px;
            height: fit-content;
        }

        .gallery_title {
            font-size: 1.8rem;
            font-weight: 600;
            color: #333;
            margin: 0 0 10px 0;
            background: #f5f5f5;
            padding: 10px 0;
        }

        .gallery_subtitle {
            font-size: 0.9rem;
            color: #666;
            font-style: italic;
            margin: 0;
            background: #f5f5f5;
            padding: 0;
        }

        .gallery {
            flex: 1; /* Take remaining space */
            display: block;
            margin: 0;
            max-width: none;
            position: relative;
            border-radius: 8px;
        }

        .gallery__main {
            position: relative;
            width: 100%;
            padding-top: 66.67%; /* 3:2 aspect ratio */
            background: #f0f0f0;
            border-radius: 8px;
            overflow: hidden;
        }

        @media screen and (min-width: 600px) {
            .gallery__main {
                padding-top: 66.67%;
                min-height: 400px; /* Ensure consistent minimum height */
            }
        }

        .gallery__img {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
            opacity: 0;
            z-index: 0;
            transition: opacity 0.3s ease-in-out;
            cursor: pointer;
        }

        .gallery__selector {
            position: absolute;
            opacity: 0;
            visibility: hidden;
        }

        .gallery__selector:checked + .gallery__img {
            opacity: 1;
            z-index: 1;
        }

        .gallery__thumbnails {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 10px;
            padding: 15px;
            /* background: #fff; */
        }

        .gallery__thumb {
            width: 80px;
            height: 60px;
            border-radius: 4px;
            overflow: hidden;
            cursor: pointer;
            transition: all 0.3s ease;
            border: 2px solid transparent;
        }

        .gallery__thumb img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .gallery__thumb:hover,
        .gallery__thumb--active {
            border-color: #6a9bb0;
            transform: scale(1.05);
        }

        .gallery__thumb--active {
            border-color: #26180f;
        }

        .lightbox {
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            background: rgba(0, 0, 0, 0.90);
            display: none;
            justify-content: center;
            align-items: center;
            z-index: 9999;
        }

        .lightbox__img {
            max-width: 90%;
            max-height: 90%;
            border-radius: 6px;
            box-shadow: 0 0 20px #000;
        }

        .lightbox__close {
            position: absolute;
            top: 20px;
            right: 30px;
            color: #fff;
            font-size: 40px;
            cursor: pointer;
            z-index: 10000;
        }

        .lightbox__close:hover {
            color: #ccc;
        }

        .lightbox__prev,
        .lightbox__next {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            font-size: 48px;
            color: white;
            cursor: pointer;
            z-index: 10000;
            user-select: none;
            padding: 0 15px;
        }

        .lightbox__prev:hover,
        .lightbox__next:hover {
            color: #ccc;
        }

        .lightbox__prev {
            left: 10px;
        }

        .lightbox__next {
            right: 10px;
        }

        /* Mobile responsive adjustments */
        @media screen and (max-width: 768px) {
            .gallery-container {
                padding: 10px;
            }

            .gallery-section {
                flex-direction: column;
                gap: 15px;
                margin-bottom: 30px;
            }

            .gallery-titles {
                flex: none;
                position: relative;
                top: auto;
                text-align: center;
                margin-bottom: 10px;
            }

            .gallery_title {
                font-size: 1.5rem;
                margin: 0 0 5px 0;
                background: transparent;
                padding: 0;
            }

            .gallery_subtitle {
                background: transparent;
                margin: 0 0 10px 0;
            }

            .gallery {
                margin: 0;
                max-width: 100%;
                width: 100%;
            }

            /* FORCE uniform mobile gallery sizing */
            .gallery .gallery__main {
                width: 100% !important;
                height: 200px !important; /* Fixed height for all galleries */
                padding-top: 0 !important;
                position: relative !important;
                background: #f0f0f0 !important;
                border-radius: 8px !important;
                overflow: hidden !important;
                margin: 0 !important;
            }

            .gallery .gallery__img {
                position: absolute !important;
                top: 0 !important;
                left: 0 !important;
                width: 100% !important;
                height: 100% !important;
                object-fit: cover !important;
                object-position: center !important;
                border-radius: 8px !important;
                margin: 0 !important;
                padding: 0 !important;
            }

            /* Ensure thumbnails are consistent on mobile */
            .gallery__thumbnails {
                display: flex !important;
                flex-wrap: wrap !important;
                justify-content: center !important;
                gap: 8px !important;
                padding: 10px 0 !important;
                margin: 10px 0 0 0 !important;
            }

            .gallery__thumb {
                width: 60px !important;
                height: 45px !important;
                border-radius: 4px !important;
                overflow: hidden !important;
                cursor: pointer !important;
                transition: all 0.3s ease !important;
                border: 2px solid transparent !important;
                margin: 0 !important;
                padding: 0 !important;
            }

            .gallery__thumb img {
                width: 100% !important;
                height: 100% !important;
                object-fit: cover !important;
                object-position: center !important;
                margin: 0 !important;
                padding: 0 !important;
            }

            /* Override any other styles that might interfere */
            .gallery-section * {
                box-sizing: border-box !important;
            }
        }

        img {
            max-width: 100%;
            vertical-align: top;
        }