.main-content {
    padding-top: var(--header-height);
}

.gallery {
    padding: 60px 0;
    text-align: center;
}

.gallery-header {
    margin-bottom: 40px;
}

.gallery-title {
    font-family: 'Alethiapro-Regular';
    font-size: 40px;
    letter-spacing: 0.18rem;
    text-transform: uppercase;
    margin: 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 40px;
    justify-items: center;
}

.gallery-item {
    position: relative;
    width: 100%;
    max-width: 360px;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #f5f5f5;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.12);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 250ms ease;
}

.gallery-caption {
    position: absolute;
    inset: 0;
    background: rgba(32, 32, 32, 0.62);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    text-align: center;
    opacity: 0;
    transition: opacity 200ms ease;
}

.gallery-caption span {
    font-size: 14px;
    line-height: 1.4;
    font-family: 'Nunito-Light';
}

.gallery-item:hover img,
.gallery-item:focus-within img {
    transform: scale(1.06);
}

.gallery-item:hover .gallery-caption,
.gallery-item:focus-within .gallery-caption {
    opacity: 1;
}

@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 32px;
    }

    .gallery-item {
        max-width: 320px;
    }
}

@media (max-width: 640px) {
    .gallery-title {
        font-size: 32px;
        letter-spacing: 0.12rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 28px;
    }

    .gallery-item {
        max-width: 320px;
    }
}

.gallery-empty {
    font-size: 18px;
    text-align: center;
}
