/* ============================= */
/* GALLERY SECTION */
/* ============================= */

.gallery-section {
    padding: 5rem 0;
    background-color: #fafafa; /* Subtle contrast from pure white */
}

.gallery-hero {
    text-align: center;
    margin-bottom: 3.5rem;
}

/* Masonry-inspired Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    grid-auto-rows: 250px; /* Base row height */
    gap: 1.5rem;
}

/* Allows some images to be taller for a modern look */
.gallery-item.tall {
    grid-row: span 2;
}

.gallery-card {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: var(--radius-lg, 20px);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    background: #eee;
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.33, 1, 0.68, 1);
}

/* Hover Overlay */
.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.8) 0%,
        rgba(0, 0, 0, 0.4) 50%,
        transparent 100%
    );
    display: flex;
    align-items: flex-end;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.overlay-content {
    color: #fff;
    transform: translateY(20px);
    transition: transform 0.4s ease;
}

.category-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--color-primary);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 50px;
    margin-bottom: 0.75rem;
    letter-spacing: 0.5px;
}

.overlay-content h4 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
    color: #fff;
}

.overlay-content p {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.8);
    margin: 0;
    line-height: 1.4;
}

/* Hover Effects */
.gallery-card:hover .gallery-img {
    transform: scale(1.1);
}

.gallery-card:hover .gallery-overlay {
    opacity: 1;
}

.gallery-card:hover .overlay-content {
    transform: translateY(0);
}

/* Stats Bar */
.gallery-stats-bar {
    margin-top: 4rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: #fff;
    padding: 3rem;
    border-radius: var(--radius-lg, 20px);
    text-align: center;
    border: 1px solid rgba(0,0,0,0.05);
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--color-primary);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 1rem;
    color: var(--color-muted);
    font-weight: 500;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 300px;
    }
    .gallery-item.tall {
        grid-row: span 1;
    }
    .gallery-stats-bar {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}