/* Gallery page */

.page-header {
    padding: 160px 0 60px;
    background-color: var(--bg-light);
    text-align: center;
}

.page-header h1 {
    font-size: 42px;
    margin-bottom: 10px;
}

.page-header p {
    margin-bottom: 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.gallery-item {
    position: relative;
    display: block;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    aspect-ratio: 4 / 3;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: var(--transition);
}

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

.gallery-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 12px 16px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0));
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}

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

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(20, 20, 20, 0.92);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 30px;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 90vw;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
    color: #fff;
    margin-top: 16px;
    font-weight: 600;
}

.lightbox-close {
    position: absolute;
    top: 24px;
    right: 30px;
    background: none;
    border: none;
    color: #fff;
    font-size: 36px;
    line-height: 1;
    cursor: pointer;
}

@media (max-width: 576px) {
    .page-header {
        padding: 130px 0 40px;
    }
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 16px;
    }
}
