* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.gallery {
    max-width: 2400px;
    margin: 0 auto;
    background: #2a2a2a;
    padding: 10px;
}

.gallery-row {
    display: flex;
    gap:6px;
    margin-bottom: 6px;
    overflow: hidden;
}

.gallery-row.last-row {
    justify-content: center;
}

.gallery-item {
    flex-grow: 1;
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
    border-radius: 6px;
}

.gallery-row.last-row .gallery-item {
    flex-grow: 0;
    flex-shrink: 0;
}

.gallery-row.last-row .gallery-item img {
    object-fit: contain;
}

.gallery-item:hover img {
    transform: scale(1.05);
    border-radius: 24px;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: white;
    cursor: pointer;
    background: none;
    border: none;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 50px;
    color: white;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 20px 15px;
    transition: background 0.3s ease;
    user-select: none;
}

.lightbox-nav:hover {
    background: rgba(0,0,0,0.5);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

img {
    user-select: none;
    -webkit-user-drag: none;
}