/* === СТИЛИ ДЛЯ ГАЛЕРЕИ ТАТУ-РАБОТ (gallery.css) === */

.tattoo-gallery-grid {
    display: grid;
    /* 4 колонки на больших экранах */
    grid-template-columns: repeat(4, 1fr); 
    gap: 15px; /* Отступ между фото */
    margin-top: 30px;
}

.gallery-item {
    overflow: hidden;
    border-radius: 8px;
    aspect-ratio: 1 / 1; /* Делает ячейки квадратными */
    cursor: pointer;
    transition: box-shadow 0.3s ease;
}

.gallery-item:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Изображение заполняет ячейку, обрезая лишнее */
    transition: transform 0.4s ease;
}

.gallery-item:hover img {
    transform: scale(1.1); /* Легкое увеличение при наведении */
}

/* --- Стили для модального окна (просмотр фото) --- */

.gallery-modal {
    display: none; /* Скрыто по умолчанию */
    position: fixed;
    z-index: 1000;
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
}

.gallery-modal-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 800px;
    animation-name: zoom;
    animation-duration: 0.4s;
}

@keyframes zoom {
    from {transform: scale(0.5)}
    to {transform: scale(1)}
}

.gallery-modal-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.gallery-modal-close:hover,
.gallery-modal-close:focus {
    color: #bbb;
    text-decoration: none;
}


/* --- Адаптивность для мобильных устройств --- */

/* 2 колонки на планшетах */
@media (max-width: 992px) {
    .tattoo-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 2 колонки на телефонах */
@media (max-width: 576px) {
    .tattoo-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .gallery-modal-content {
        width: 95%;
    }
}