/* Specific Gallery Overrides */
.gallery-header {
    padding: 120px 0 60px;
    text-align: center;
}

/* ── Gallery Grid ── */
/* We use a unified 6-column grid so we can span cards differently */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 32px;
    padding: 0 20px 100px;
    max-width: 1400px;
    margin: 0 auto;
}

/* First two cards: each takes 3 columns (= 2 per row, BIG) */
.gallery-card:nth-child(1),
.gallery-card:nth-child(2) {
    grid-column: span 3;
}

/* Cards 3–12: each takes 2 columns (= 3 per row, standard) */
.gallery-card:nth-child(n+3) {
    grid-column: span 2;
}

/* Big cards get a taller image */
.gallery-card:nth-child(1) .gallery-image-wrapper,
.gallery-card:nth-child(2) .gallery-image-wrapper {
    aspect-ratio: 16 / 10;
}

/* ── Card Base ── */
.gallery-card {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    cursor: pointer;
}

.gallery-image-wrapper {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background-color: #F2F2F2;
    border-radius: 12px;
    position: relative;
}

.gallery-img {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: scale(1.0);
    transition: transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: transform;
}

.gallery-card:hover .gallery-img {
    transform: scale(1.02);
}

.gallery-name {
    transition: text-shadow 0.6s ease;
}

.gallery-card:hover .gallery-name {
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.gallery-info {
    text-align: center;
    color: var(--color-secondary);
}

.gallery-category {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--clr-text-light);
    margin-bottom: 0.5rem;
    display: block;
}

.gallery-name {
    font-size: 1.2rem;
    font-weight: 400;
    margin: 0;
    color: var(--clr-navy);
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    /* Switch to 4-column grid on tablets */
    .gallery-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 24px;
    }
    /* Big cards still 2-per-row */
    .gallery-card:nth-child(1),
    .gallery-card:nth-child(2) {
        grid-column: span 2;
    }
    /* Smaller cards 2-per-row */
    .gallery-card:nth-child(n+3) {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    /* Single column on mobile */
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .gallery-card:nth-child(1),
    .gallery-card:nth-child(2),
    .gallery-card:nth-child(n+3) {
        grid-column: span 1;
    }
}

/* Contact section overrides for gallery page */
#contact .section-title,
#contact .contact-intro {
    text-align: left;
}
