/* GALLERY GRID STYLES - Extracted from tr/galeri/index.html */

/* GALLERY GRID STYLES - CINEMATIC UPDATE V2 */

/* ==========================================================================

   SANTIS GALLERY V5.0 (CINEMATIC GRID ENGINE)

   Architecture: CSS-First, No-JS Layout, Quiet Luxury Aesthetics

   ========================================================================== */



/* --- V6.0 CORE MOVED TO GLOBAL STYLE.CSS --- */



/* --- 1. MAIN CONTAINER (Scatter Editorial Grid) --- */

#gallery-grid,

.editorial-grid-engine {

    position: relative;

    z-index: 1;

    display: grid;

    /* 12-Column Editorial Grid */

    grid-template-columns: repeat(12, 1fr);

    gap: 40px;

    /* Generous breathing room */

    row-gap: 120px;

    /* High-fashion vertical spacing */

    width: 100%;

    max-width: 1600px;

    margin: 0 auto;

    padding: 100px 40px 200px 40px;

    opacity: 0;

    animation: simpleFadeIn 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;

}



@keyframes simpleFadeIn {

    to {

        opacity: 1;

    }

}



/* --- 2. SCATTER PATTERNS (The Rhythm) --- */



/* DEFAULT: Standard 4-col vertical */

.gallery-item {

    grid-column: span 4;

    aspect-ratio: 4/5;

    background: #111;

    border-radius: 2px;

    cursor: pointer;

    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;

}



/* CLASS: The Anchor (Large Portrait) */

/* Was: nth-child(6n + 1) */

.g-hero {

    grid-column: span 6;

    aspect-ratio: 16/9;

    /* Phase 16 Update: 16:9 for Cinematic */

}



/* CLASS: The Detail (Small Offset) */

/* Was: nth-child(6n + 2) */

.g-detail {

    grid-column: span 4;

    aspect-ratio: 1/1;

    margin-top: 80px;

    /* Push down */

    margin-left: auto;

    /* Align right within track */

}



/* CLASS: The Landscape (Cinematic Wide) */

/* Was: nth-child(6n + 3) */

.g-wide {

    grid-column: span 8;

    /* Phase 16 Update: 8 cols */

    /* Center-ish */

    aspect-ratio: 16/9;

}



/* CLASS: The Overlap Left */

/* Was: nth-child(6n + 4) */

.g-overlap-left {

    grid-column: span 6;

    aspect-ratio: 4/5;

    transform: translateY(-50px);

    /* Lift up */

}



/* CLASS: The Overlap Right */

/* Was: nth-child(6n + 5) */

.g-overlap-right {

    grid-column: span 6;

    grid-column-start: 7;

    aspect-ratio: 4/5;

    margin-top: 150px;

    /* Big drop */

}



/* CLASS: The Spacer (Tiny) */

/* Was: nth-child(6n + 6) */

.g-spacer {

    grid-column: span 3;

    aspect-ratio: 3/4;

    margin: 0 auto;

}



/* Hover Levitation */

.gallery-item:hover {

    transform: translateY(-10px) scale(1.02);

    z-index: 5;

    /* Pop over everything */

    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);

}



/* --- 3. THE IMAGE (Quiet Luxury Filter) --- */

.gallery-item img {

    width: 100%;

    height: 100%;

    object-fit: cover;

    display: block;



    /* THE SANTIS LOOK: Low Saturation, Slight Dim */

    filter: brightness(0.85) saturate(0.8) contrast(1.05);

    transform: scale(1.01);

    /* Anti-aliasing fix */

    transition: all 0.8s ease;

}



/* Hover Reveal (Full Color) */

.gallery-item:hover img {

    filter: brightness(1) saturate(1.1) contrast(1);

    transform: scale(1.05);

    /* Gentle Zoom */

}



/* --- 4. OVERLAY TILES (Information) --- */

.gallery-overlay {

    position: absolute;

    inset: 0;

    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 60%);

    opacity: 0;

    display: flex;

    flex-direction: column;

    justify-content: flex-end;

    padding: 30px;

    transition: opacity 0.4s ease;

}



.gallery-item:hover .gallery-overlay {

    opacity: 1;

}



/* Typography */

.mood-badge {

    font-family: 'Inter', sans-serif;

    font-size: 10px;

    letter-spacing: 2px;

    text-transform: uppercase;

    color: #d4af37;

    /* Santis Gold */

    margin-bottom: 10px;

    transform: translateY(10px);

    transition: transform 0.4s ease 0.1s;

}



.caption-text {

    font-family: 'Cormorant Garamond', serif;

    font-size: 22px;

    font-style: italic;

    color: #fff;

    transform: translateY(10px);

    transition: transform 0.4s ease;

}



.gallery-item:hover .mood-badge,

.gallery-item:hover .caption-text {

    transform: translateY(0);

}



/* --- 5. RESPONSIVE --- */

@media (max-width: 768px) {



    #gallery-grid,

    .editorial-grid-engine {

        grid-template-columns: 1fr;

        /* Single Column on Mobile */

        gap: 20px;

        padding: 0 20px 80px 20px;

    }



    .gallery-item {

        aspect-ratio: 1/1;

        /* Square on mobile for impact */

    }



    /* MOBILE SNAP ADDITION (Phase 16) */

    .snap-mobile-track {

        display: flex;

        overflow-x: auto;

        scroll-snap-type: x mandatory;

        padding-bottom: 20px;

        /* Space for scrollbar if any */

        /* Hide scrollbar Firefox */

        -ms-overflow-style: none;



        /* Hide scrollbar IE */

        @supports (scrollbar-width: none) {

            scrollbar-width: none;

        }

    }



    .snap-mobile-track::-webkit-scrollbar {

        display: none;

        /* Hide scrollbar Chrome */

    }



    .snap-mobile-track .gallery-item {

        flex: 0 0 85vw;

        /* Peeking card */

        scroll-snap-align: center;

        margin-right: 15px;

        transform: none !important;

        /* Disable overlap transforms on mobile */

        margin-top: 0 !important;

    }



    .gallery-overlay {

        opacity: 1;

        /* Always visible on mobile */

        background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 40%);

    }



    .gallery-item img {

        filter: brightness(0.95);

        /* Brighter on mobile */

    }

}



/* FX ENGINE STYLES */



/* 1. Custom Cursor */

body {

    cursor: none;

    /* Hide default cursor */

}



/* Fallback for mobile or if JS fails */

@media (pointer: coarse) {

    body {

        cursor: auto;

    }



    .nv-cursor {

        display: none;

    }

}



.nv-cursor {

    position: fixed;

    top: 0;

    left: 0;

    width: 20px;

    height: 20px;

    pointer-events: none;

    z-index: 999999;

    mix-blend-mode: difference;

    /* Creates visibility on light/dark */

    transform: translate3d(-50%, -50%, 0);

    /* Center pivot */

}



.nv-cursor-inner {

    width: 100%;

    height: 100%;

    border-radius: 50%;

    background-color: #fff;

    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),

        width 0.2s, height 0.2s, background-color 0.2s;

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 8px;

    color: #000;

    font-weight: 600;

}



/* Hover State */

.nv-cursor.is-hovering .nv-cursor-inner {

    transform: scale(2.5);

    background-color: rgba(255, 255, 255, 0.9);

}



/* View State (Gallery) */

.nv-cursor.is-viewing .nv-cursor-inner {

    transform: scale(4);

    background-color: var(--gold);

    color: #111;

}



/* 2. Liquid Gallery Effect */

.gallery-item {

    /* Existing styles remain... */

    position: relative;

    /* Ensures we can apply filter safely */

}



/* Let's try a pure CSS ripple simulation instead of heavy SVG for now */

.gallery-item::after {

    content: '';

    position: absolute;

    inset: 0;

    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.1) 0%, transparent 60%);

    opacity: 0;

    transition: opacity 0.4s;

    pointer-events: none;

    mix-blend-mode: overlay;

}



.gallery-item:hover::after {

    opacity: 1;

}

/* --- 6. LIGHTBOX STYLES (Added via Fix) --- */
.lightbox {
    display: none;
    /* Hidden by default */
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(10, 10, 10, 0);
    /* Start transparent */
    -webkit-backdrop-filter: blur(0px);
    /* Safari Support */
    backdrop-filter: blur(0px);
    justify-content: center;
    align-items: center;
    flex-direction: column;
    transition: background-color 0.4s ease, backdrop-filter 0.4s ease, -webkit-backdrop-filter 0.4s ease;
}

.lightbox.is-active {
    background-color: rgba(10, 10, 10, 0.95);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.lightbox-content {
    max-width: 90%;
    max-height: 80vh;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform: scale(0.9);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: 300;
    transition: 0.3s;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: var(--gold, #d4af37);
    text-decoration: none;
    cursor: pointer;
    transform: rotate(90deg);
}

#caption {
    margin: 20px 0;
    width: 80%;
    text-align: center;
    color: #ccc;
    font-family: 'Cormorant Garamond', serif;
    font-size: 24px;
    font-style: italic;
    opacity: 0;
    animation: slideUp 0.5s ease 0.2s forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes zoomIn {
    from {
        transform: scale(0.95);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}
/* =========================================
   GALLERY CHIP FILTER (extracted from inline)
   ========================================= */
.nv-chip {
    padding: 10px 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nv-chip:hover, .nv-chip.is-active {
    background: rgba(212, 175, 55, 0.15);
    border-color: var(--gold);
    color: var(--gold);
}
