/* ========================================
   Our Moment Gallery - Horizontal Scroll Grid
======================================== */

.gallery-section {
    background: linear-gradient(rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.75)),
                url('https://jnista.com/wp-content/uploads/2025/12/21829358_6534868-min-min.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    padding: 0;
    overflow: hidden;
    height: 100vh;
    min-height: 600px;
}

.section-header-ourmoment {
    position: absolute;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    text-align: center;
    pointer-events: none;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    padding: 2rem 3rem;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.section-title-ourmoment {
    font-family: 'Great Vibes', cursive;
    font-size: 4rem;
    color: #FFD700;
    margin-bottom: 0.5rem;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.8),
                 0 0 30px rgba(255, 215, 0, 0.5);
    pointer-events: none;
}

.section-subtitle-ourmoment {
    font-family: 'Lato', sans-serif;
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.95);
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 300;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    pointer-events: none;
}

/* Gallery Viewport */
.gallery-viewport {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
    cursor: default;
}

.gallery-canvas-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: 0 0;
    will-change: transform;
}

.gallery-grid-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.gallery-grid-item {
    position: absolute;
    width: 280px;
    height: 400px;
    background: #000;
    cursor: pointer;
    will-change: transform, opacity;
    z-index: 1;
    opacity: 0.6;
    transition: opacity 0.8s ease, box-shadow 0.8s ease;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.gallery-grid-item.out-of-view {
    opacity: 0.3;
}

.gallery-grid-item.selected {
    z-index: 2 !important;
}

.gallery-grid-item.highlighted {
    opacity: 1 !important;
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.8),
                0 10px 50px rgba(0, 0, 0, 0.6) !important;
    z-index: 10 !important;
    transition: opacity 0.8s ease, box-shadow 0.8s ease !important;
}

.gallery-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    user-select: none;
    pointer-events: none;
}

/* Split Screen for Zoom */
.gallery-split-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.gallery-split-screen.active {
    opacity: 1;
    pointer-events: all;
}

.gallery-split-left {
    position: relative;
    width: 50vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
    cursor: pointer;
}

.gallery-split-right {
    position: relative;
    width: 50vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 4rem;
    z-index: 1;
    overflow-y: auto;
}

.gallery-poem-container {
    max-width: 500px;
    text-align: center;
}

.gallery-poem-title {
    font-family: 'Great Vibes', cursive;
    font-size: 3rem;
    color: #FFD700;
    margin-bottom: 2rem;
    text-shadow: 0 2px 10px rgba(255, 215, 0, 0.5);
}

.gallery-poem-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.3rem;
    line-height: 2;
    color: rgba(255, 255, 255, 0.9);
    font-style: italic;
    margin-bottom: 2rem;
}

.gallery-poem-author {
    font-family: 'Dancing Script', cursive;
    font-size: 1.5rem;
    color: var(--color-gold);
    margin-top: 1rem;
}

.gallery-zoom-target {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

/* Image Overlay */
.gallery-scaling-overlay {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1001;
    pointer-events: none;
    will-change: transform;
}

.gallery-scaling-overlay img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 12px;
}

/* Image Info Overlay */
.gallery-image-info {
    position: absolute;
    bottom: 40px;
    left: 40px;
    color: white;
    z-index: 1002;
    opacity: 0;
    pointer-events: none;
    max-width: 500px;
    transition: opacity 0.6s ease;
}

.gallery-image-info.active {
    opacity: 1;
}

.gallery-image-number {
    font-family: 'Playfair Display', serif;
    font-size: 14px;
    color: var(--color-gold);
    margin-bottom: 0.5rem;
    letter-spacing: 2px;
}

.gallery-image-title {
    font-family: 'Great Vibes', cursive;
    font-size: 48px;
    color: var(--color-white);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.gallery-image-description {
    font-family: 'Lato', sans-serif;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
}

/* Close Button */
.gallery-close-button {
    position: fixed;
    top: 2rem;
    right: 2rem;
    width: 80px;
    height: 80px;
    background: rgba(212, 175, 55, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1003;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

.gallery-close-button.active {
    opacity: 1;
    pointer-events: all;
}

.gallery-close-button:hover {
    background: var(--color-gold-light);
    transform: scale(1.1);
}

.gallery-close-button i {
    font-size: 32px;
    color: var(--color-dark);
}

/* Controls - HIDDEN */
.gallery-controls {
    display: none !important;
}

.gallery-zoom-indicator,
.gallery-zoom-buttons,
.gallery-zoom-btn {
    display: none !important;
}

/* Responsive */
@media (max-width: 1024px) {
    .gallery-grid-item {
        width: 240px;
        height: 280px;
    }
}

@media (max-width: 768px) {
    .gallery-section {
        height: 80vh;
        min-height: 500px;
    }

    /* Hide header in mobile */
    .section-header-ourmoment {
        display: none !important;
    }

    /* Mobile - Single row, larger images */
    .gallery-grid-item {
        width: 90vw !important;
        max-width: 400px;
        height: 70vh !important;
        max-height: 500px;
    }

    .gallery-split-left,
    .gallery-split-right {
        width: 100vw;
    }

    .gallery-split-right {
        display: none;
    }

    .gallery-image-info {
        bottom: 20px;
        left: 20px;
        max-width: calc(100vw - 40px);
    }

    .gallery-image-title {
        font-size: 36px;
    }

    .gallery-image-description {
        font-size: 14px;
    }

    .gallery-close-button {
        width: 60px;
        height: 60px;
        top: 1rem;
        right: 1rem;
    }

    .gallery-close-button i {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .gallery-grid-item {
        width: 95vw !important;
        height: 65vh !important;
    }

    .gallery-image-title {
        font-size: 28px;
    }
}

@media (max-width: 390px) {
    .gallery-grid-item {
        width: 95vw !important;
        height: 60vh !important;
    }
}