﻿.gallery-intro {
    margin-bottom: 4rem;
    max-width: 600px;
}

    .gallery-intro p {
        font-size: 1rem;
        line-height: 1.8;
        color: var(--mid);
        margin-top: 1rem;
    }

.gallery-filter {
    display: flex;
    gap: 0;
    margin-bottom: 3rem;
    width: fit-content;
    flex-wrap:wrap;
}

.filter-btn {
    padding: 0.75rem 1.75rem;
    background: var(--light);
    border: none;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    font-family: var(--sans);
    color: var(--mid);
    transition: background 0.2s, color 0.2s;
}

    .filter-btn.active, .filter-btn:hover {
        background: var(--clay);
        color: var(--white);
    }

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: 325px;
    gap: 1px;
    background: var(--light);
    grid-auto-flow: dense;
}

/* ── GRID CELL ── */
.gallery-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.gallery-item-inner {
    position: absolute; /* ← this is the key fix */
    inset: 0; /* top/right/bottom/left: 0 */
    overflow: hidden;
}

    .gallery-item.span-4 {
        grid-column: span 4;
    }

    .gallery-item.span-6 {
        grid-column: span 6;
    }

    .gallery-item.span-8 {
        grid-column: span 8;
    }

    .gallery-item.span-3 {
        grid-column: span 3;
    }

    .gallery-item.row-2 {
        grid-row: span 2;
    }

    .gallery-item.row-3 {
        grid-row: span 3;
    }

.gallery-item-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* crops to fill, never squashes */
    object-position: center;
    display: block;
    transition: transform 0.6s ease;
}

.gallery-item:hover .gallery-item-inner img {
    transform: scale(1.04);
}

/* ── LABEL overlay ── */
.gallery-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.65));
    padding: 3rem 1.25rem 1.25rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.gallery-item:hover .gallery-label {
    opacity: 1;
}

.gallery-label-text {
    color: white;
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.gallery-item-inner {
    width: 100%;
    height: 100%;
    background: linear-gradient(160deg, #c8c8c8 0%, #a0a0a0 50%, #888 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.6s ease;
    position: relative;
}

.gallery-item:hover .gallery-item-inner {
    transform: scale(1.04);
}

.gallery-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    padding: 3rem 1.5rem 1.5rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.gallery-item:hover .gallery-label {
    opacity: 1;
}

.gallery-label-text {
    color: white;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    font-weight: 400;
}

.gallery-item-inner::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient( 45deg, transparent, transparent 3px, rgba(255,255,255,0.04) 3px, rgba(255,255,255,0.04) 4px );
}

.gallery-cta {
    margin-top: 4rem;
    text-align: center;
    padding: 4rem;
    background: var(--white);
    border: 1px solid var(--light);
}

    .gallery-cta p {
        color: var(--mid);
        margin: 1rem 0 2rem;
        font-size: 1rem;
    }
