/* Стили для галереи */
.gallery-container {
    width: 100%;
    margin: 0 auto;
    padding: 20px 0;
}

/* Контейнер галереи */
.gallery {
    width: 100%;
}

/* Стили для слайдов */
.gallery .swiper-slide {
    height: 220px;
}

/* Десктоп: статичная сетка из 4 изображений */
@media (min-width: 769px) {
    .gallery .swiper-wrapper {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }

    .gallery .swiper-slide {
        width: 100% !important;
        margin-right: 0 !important;
    }

    /* Отключаем Swiper на десктопах */
    .gallery.swiper {
        overflow: visible;
        margin: 0;
    }

    .gallery .swiper-wrapper {
        transform: none !important;
    }
}

/* Мобильные устройства: один слайд за раз */
@media (max-width: 768px) {
    .gallery .swiper-slide {

    }
}

/* Стили для изображений в галерее */
.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.gallery-img:hover {
    transform: scale(1.02);
}

/* Скрываем стрелки навигации на десктопе */
@media (min-width: 769px) {
    .gallery .swiper-button-next,
    .gallery .swiper-button-prev {
        display: none;
    }
}

/* Стили для лайтбокса */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.lightbox-content {
    position: relative;
    width: 85%;
    max-width: 1200px;
    height: 85vh;
}

.lightbox-swiper {
    width: 100%;
    height: 100%;
}

.lightbox-slide {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    z-index: 10000;
}

/* Навигационные стрелки в лайтбоксе */
.lightbox .swiper-button-next,
.lightbox .swiper-button-prev {
    color: #ffde00;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.lightbox .swiper-button-next:hover,
.lightbox .swiper-button-prev:hover {
    opacity: 1;
}

/* Кнопка закрытия лайтбокса */
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    cursor: pointer;
    z-index: 10001;
    transition: background-color 0.3s;
}

.lightbox-close:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* Мобильная адаптация */
@media (max-width: 768px) {
    .lightbox-content {
        width: 95%;
    }

    .lightbox .swiper-button-next,
    .lightbox .swiper-button-prev {
        transform: scale(0.7);
    }

    .lightbox-close {
        top: 10px;
        right: 10px;
    }
}