/* ===== GALLERY PAGE STYLES (Masonry Layout) ===== */

.gallery-hero {
    padding: calc(var(--spacing-unit) * 12) 0 calc(var(--spacing-unit) * 8);
    padding-top: 120px;
    background: var(--graphite-black);
    text-align: center;
}

.hero-text {
    font-size: clamp(1.125rem, 2vw, 1.375rem);
    color: rgba(209, 213, 219, 0.8);
    margin-top: calc(var(--spacing-unit) * 3);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* Filter Section */
.gallery-filter-section {
    padding: calc(var(--spacing-unit) * 4) 0;
    background: var(--tungsten-gray);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.filter-buttons {
    display: flex;
    justify-content: center;
    gap: calc(var(--spacing-unit) * 2);
    flex-wrap: wrap;
}

.filter-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(140, 145, 150, 1);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: calc(var(--spacing-unit) * 1.5) calc(var(--spacing-unit) * 3);
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--molten-copper);
    color: var(--graphite-black);
    border-color: var(--molten-copper);
}

/* Gallery Grid */
.gallery-grid-section {
    padding: calc(var(--spacing-unit) * 8) 0;
    background: var(--graphite-black);
}

.gallery-masonry {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: calc(var(--spacing-unit) * 3);
    grid-auto-rows: 250px;
}

.gallery-item {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: 
        8px 8px 16px rgba(0, 0, 0, 0.3),
        -4px -4px 8px rgba(255, 255, 255, 0.02);
}

.gallery-item.large {
    grid-row: span 2;
}

.gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: 
        12px 12px 24px rgba(0, 0, 0, 0.4),
        -6px -6px 12px rgba(255, 255, 255, 0.03);
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: relative;
    transition: var(--transition-smooth);
    filter: brightness(1) contrast(1.05);
    opacity: 1;
}

[data-theme="dark"] .gallery-image {
    filter: brightness(0.85) contrast(1.1);
}

.gallery-item:hover .gallery-image {
    filter: brightness(1.05) contrast(1.1);
}

[data-theme="dark"] .gallery-item:hover .gallery-image {
    filter: brightness(0.95) contrast(1.15);
}

.gallery-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 10px,
            rgba(184, 115, 51, 0.05) 10px,
            rgba(184, 115, 51, 0.05) 12px
        );
}

.gallery-item:hover .gallery-image {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, 
        rgba(11, 13, 15, 0.95) 0%, 
        rgba(11, 13, 15, 0.7) 50%,
        transparent 100%);
    padding: calc(var(--spacing-unit) * 4);
    transform: translateY(100%);
    transition: var(--transition-smooth);
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-overlay h4 {
    font-size: 1.25rem;
    margin-bottom: calc(var(--spacing-unit) * 1);
    color: var(--titanium-silver);
}

.gallery-overlay p {
    font-size: 0.875rem;
    color: rgba(209, 213, 219, 0.7);
    max-width: 100%;
}

@media (max-width: 768px) {
    .gallery-masonry {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        grid-auto-rows: 200px;
    }
    
    .gallery-item.large {
        grid-row: span 1;
    }
    
    .filter-buttons {
        gap: calc(var(--spacing-unit) * 1);
    }
    
    .filter-btn {
        font-size: 0.75rem;
        padding: calc(var(--spacing-unit) * 1) calc(var(--spacing-unit) * 2);
    }
}

@media (max-width: 576px) {
    .gallery-masonry {
        grid-template-columns: 1fr;
    }
}

