.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.gallery-item.reveal {
    transition-delay: calc(var(--reveal-index, 0) * 0.05s);
}
@media (prefers-reduced-motion: reduce) {
    .reveal {
        transition: none;
    }
}

.page-banner {
    background: linear-gradient(135deg, #ab00e8, #3e867b);
    color: #fff;
    text-align: center;
    padding: 70px 20px;
}
.page-banner h1 {
    font-size: 40px;
    margin-bottom: 10px;
}
.page-banner p {
    font-size: 17px;
    max-width: 640px;
    margin: 0 auto;
    opacity: 0.95;
}

.gallery-page {
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 20px 20px;
}

.gallery-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 36px;
}
.gallery-filter {
    font-family: inherit;
    font-size: 14px;
    font-weight: bold;
    color: #ab00e8;
    background: #faf6fc;
    border: 1px solid #ecdcf5;
    padding: 10px 22px;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.25s ease, color 0.25s ease;
}
.gallery-filter:hover {
    background: #3e867b;
    color: #fff;
    border-color: #3e867b;
}
.gallery-filter.active {
    background: #ab00e8;
    color: #fff;
    border-color: #ab00e8;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 22px;
}
.gallery-item {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: none;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
    background: #eee;
    aspect-ratio: 4 / 3;
}
.gallery-item.gallery-item--hidden {
    display: none;
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
.gallery-item__caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 28px 14px 12px;
    font-size: 14px;
    font-weight: bold;
    color: #fff;
    text-align: left;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75), transparent);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.gallery-item:hover img {
    transform: scale(1.08);
}
.gallery-item:hover .gallery-item__caption {
    opacity: 1;
    transform: translateY(0);
}

.lightbox {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    padding: 20px;
}
.lightbox.is-open {
    opacity: 1;
    visibility: visible;
}
.lightbox__img {
    max-width: min(90vw, 1000px);
    max-height: 75vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}
.lightbox__caption {
    color: #fff;
    font-size: 16px;
    text-align: center;
}
.lightbox__close {
    position: absolute;
    top: 20px;
    right: 28px;
    background: none;
    border: none;
    color: #fff;
    font-size: 40px;
    line-height: 1;
    cursor: pointer;
}
.lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    font-size: 20px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.25s ease;
}
.lightbox__nav:hover {
    background: #ab00e8;
}
.lightbox__prev {
    left: 20px;
}
.lightbox__next {
    right: 20px;
}

@media (max-width: 768px) {
    .page-banner {
        padding: 50px 20px;
    }
    .page-banner h1 {
        font-size: 30px;
    }
    .gallery-page {
        margin: 40px auto;
    }
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 14px;
    }
    .lightbox__nav {
        width: 38px;
        height: 38px;
        font-size: 16px;
    }
    .lightbox__close {
        top: 12px;
        right: 16px;
        font-size: 32px;
    }
}
