/* ================= GALLERY ================= */
.gallery-section {
    padding: 0 0 50px;
    background: #fff;
}

/* HEADER */
.gallery-header {
    height: 25vh;
    background: radial-gradient(circle at top, #1e3a8a, #020617);
    padding: 30px 20px;
    color: #d3d8da;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.gallery-header h1 {
    font-size: 2.6rem;
    font-weight: 800;
}

.gallery-header span {
    color: #0984e3;
}

.header-accent {
    width: 100px;
    height: 5px;
    background: #0984e3;
    margin: 10px auto;
    border-radius: 10px;
}

/* FILTER */
.gallery-filter-nav {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 40px 0;
}

.filter-btn {
    padding: 10px 18px;
    border: 2px solid #f1f2f6;
    background: #fff;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: .3s;
    color: #636e72;
}

.filter-btn.active,
.filter-btn:hover {
    background: #0984e3;
    color: #fff;
    border-color: #0984e3;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(9,132,227,.25);
}

/* GRID */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

/* ITEM */
.img-mask {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 15px;
    position: relative;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0,0,0,.07);
}

.img-mask img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: .5s;
}

.img-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 15px 10px;
    background: linear-gradient(transparent, rgba(0,0,0,.8));
    color: #fff;
    font-weight: 600;
    opacity: 0;
    transition: .3s;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item:hover .img-caption {
    opacity: 1;
}

/* MODAL */
.image-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.85);
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 99999;
}

.image-modal img {
    max-width: 90%;
    max-height: 80vh;
    border-radius: 12px;
}

.modal-caption {
    margin-top: 15px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
}

.modal-close {
    position: absolute;
    top: 25px;
    right: 35px;
    font-size: 36px;
    color: #fff;
    cursor: pointer;
}

/* MOBILE */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}
