/* Стили для галереи */
.gallery-slider1 .swiper-slide {
    cursor: pointer;
    position: relative;
    height: 300px; /* Фиксированная высота для всех слайдов */
}

.gallery-slider1 .img-wr {
    width: 100%;
    height: 100%;
}

.gallery-slider1 .img-wr img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Обрезает изображение, сохраняя пропорции */
}

/* Overlay для hover эффекта */
.slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.gallery-slider1 .swiper-slide:hover .slide-overlay {
    opacity: 1;
}

.overlay-content {
    color: white;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
}

/* Стили для модального окна */
.gallery-image-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(15px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-image-modal.show {
    opacity: 1;
}

/* Крестик всегда видимый */
.gallery-modal-close {
    opacity: 1 !important;
    visibility: visible !important;
}

.gallery-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 600px;
    text-align: center;
}

.gallery-modal-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.gallery-modal-close {
    position: absolute;
    top: 30px;
    right: 40px;
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10000;
    transition: all 0.3s ease;
}

.gallery-modal-close::before,
.gallery-modal-close::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 2px;
    background: white;
    transition: all 0.3s ease;
}

.gallery-modal-close::before {
    transform: rotate(45deg);
}

.gallery-modal-close::after {
    transform: rotate(-45deg);
}

.gallery-modal-close:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: rgba(255, 255, 255, 0.8);
    transform: scale(1.1);
}

.gallery-modal-close:hover::before,
.gallery-modal-close:hover::after {
    background: #bc251d;
}

/* Адаптивность для планшетов */
@media (max-width: 1024px) {
    .gallery-modal-content {
        width: 600px;
        height: 450px;
    }
}

/* Адаптивность для телефона */
@media (max-width: 768px) {
    .gallery-modal-content {
        width: 500px;
        height: 375px;
    }

    .gallery-modal-image {
        border-radius: 8px;
    }

    .gallery-modal-close {
        top: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
    }

    .gallery-modal-close::before,
    .gallery-modal-close::after {
        width: 16px;
        height: 2px;
    }
}

/* Адаптивность для очень маленьких экранов */
@media (max-width: 480px) {
    .gallery-modal-content {
        width: 350px;
        height: 262px;
    }

    .gallery-modal-image {
        border-radius: 4px;
    }

    .gallery-modal-close {
        top: 15px;
        right: 15px;
        width: 35px;
        height: 35px;
    }

    .gallery-modal-close::before,
    .gallery-modal-close::after {
        width: 14px;
        height: 2px;
    }
}
