* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: url("../images/background.jpg");
    background-size: auto;
    background-position: center;
    font-family: sans-serif;
}

/* GALLERY */
.gallery {
    display: grid;
    width: 80%;
    margin: 50px auto;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    grid-auto-rows: 180px;
    gap: 12px;
    padding: 20px;
}

.item {
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
}

.item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.3s;
}

.item:hover img {
    transform: scale(1.08);
}

.tall { grid-row: span 2; }
.wide { grid-column: span 2; }

/* LIGHTBOX */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 90vw;
    max-height: 85vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 2%;
}

/* BUTTONS */
.close, .nav {
    position: absolute;
    color: white;
    font-size: 45px;
    cursor: pointer;
    user-select: none;
}

.close {
    top: 20px;
    right: 30px;
}

.prev {
    left: 20px;
    top: 50%;
}

.next {
    right: 20px;
    top: 50%;
}

.nav:hover, .close:hover {
    transform: scale(1.2);
}

/* mobile */
@media (max-width: 900px) {
    .nav {
        font-size: 35px;
    }
    *:hover{
        transform: none !important;
        filter: none !important;
        opacity: 1 !important;
    }

    .next:hover, .prev:hover{
        transform: none !important;
    }
}