#tittle {
    text-align: center;
    color: rgb(215, 120, 67);
    font-size: 3vw;
}

.masonry {
    max-width: 1400px;
    margin: 60px auto;
    padding: 0 20px;

    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    grid-auto-rows: 220px; /* высота строки */
    gap: 16px;
}

/* Каждый элемент галереи */
.item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background-color: #000;
    box-shadow: 0 4px 8px rgb(0 0 0 / 0.2);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Картинка */
.item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

/* Эффект масштабирования при наведении */
.item:hover {
    transform: scale(1.04);
    box-shadow: 0 10px 20px rgb(0 0 0 / 0.35);
}

.item:hover img {
    transform: scale(1.1);
}

/* Размеры плиток — для разнообразия и красивого вида */
.item.big {
    grid-row: span 2;
}

.item.tall {
    grid-row: span 3;
}

.item.wide {
    grid-column: span 2;
}

/* Адаптив для маленьких экранов */
@media (max-width: 1024px) {
    .masonry {
        grid-auto-rows: 180px;
    }
}

@media (max-width: 600px) {
    .masonry {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        grid-auto-rows: 160px;
        gap: 12px;
    }

    .item.wide {
        grid-column: span 1;
    }
}
.fullscreen {
    display: none;
    position: fixed;   /* КЛЮЧЕВО */
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;

    background: rgba(0, 0, 0, 0.9);
    z-index: 99999;

    justify-content: center;
    align-items: center;
}

.fullscreen img {
    max-width: 95%;
    max-height: 95%;
    object-fit: contain;
}