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

.gallery-card {
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: .3s;
}

.gallery-card:hover {
    transform: translateY(-5px);
}

.gallery-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

/* Modal */

.gallery-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.95);
    z-index: 9999;

    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-viewer {
    width: min(1200px, 90%);
    text-align: center;
}

.gallery-viewer img {
    max-width: 100%;
    max-height: 75vh;
    border-radius: 16px;
}

.gallery-close {
    position: absolute;
    top: 25px;
    right: 25px;

    background: none;
    border: none;

    color: white;
    font-size: 40px;
    cursor: pointer;
}

.gallery-nav {
    background: rgba(255,255,255,.1);
    border: none;

    width: 55px;
    height: 55px;

    border-radius: 50%;

    color: white;
    font-size: 24px;

    cursor: pointer;
}

.gallery-note {
    margin-top: 15px;
    color: #cbd5e1;
}

.gallery-thumbnails {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
    overflow: hidden;
}

.gallery-thumbnails img {
    width: 70px;
    height: 120px;
    object-fit: cover;
    border-radius: 10px;
    opacity: .5;
    transition: all .25s ease;
}

.gallery-thumbnails img.active {
    opacity: 1;
    transform: scale(1.15);
    border: 2px solid #3b82f6;
}

.hidden {
    display: none;
}
