/* Модальное окно для быстрых листовок на главной странице */
.image-modal-popup {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    padding: 20px;
}

.image-modal-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.modal-image {
    width: 100%;
    max-width: 1200px;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 20px;
}

.mySwiper {
    width: 100%;
    height: 100%;
    max-height: calc(100vh - 250px);
}

.mySwiper .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
}

.mySwiper .swiper-slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.swiper-button-next,
.swiper-button-prev {
    color: white;
    background: #007BFF;
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background: #0056b3;
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 20px;
}

.swiper-pagination-bullet {
    background: white;
    opacity: 0.5;
}

.swiper-pagination-bullet-active {
    opacity: 1;
}

.modal-info {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: 16px 16px 0 0;
    padding: 15px 20px;
    max-width: 100%;
    width: 100%;
    box-shadow: 0 -5px 30px rgba(0, 0, 0, 0.3);
    border-top: 2px solid #f5f5f5;
    z-index: 10001;
    max-height: 180px;
    overflow-y: auto;
}

.modal-info h1 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
    padding-right: 30px;
}

.modal-description {
    color: #666666;
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 12px;
}

.modal-links {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.modal-links a {
    padding: 10px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-links .primary-link {
    background: #ff6b00;
    color: white;
}

.modal-links .primary-link:hover {
    background: #e55f00;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 0, 0.3);
}

.close-window {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    background: #ff6b00;
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    z-index: 10002;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-window:hover {
    background: #e55f00;
    transform: rotate(90deg) scale(1.1);
}

.modal-info i.fa-times {
    position: absolute;
    top: 12px;
    right: 12px;
    cursor: pointer;
    color: #999999;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.modal-info i.fa-times:hover {
    color: #ff6b00;
}

/* Responsive */
@media (max-width: 900px) {
    .close-window {
        width: 40px;
        height: 40px;
        top: 15px;
        right: 15px;
    }

    .swiper-button-next,
    .swiper-button-prev {
        width: 40px;
        height: 40px;
    }

    .swiper-button-next:after,
    .swiper-button-prev:after {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .mySwiper {
        max-height: calc(100vh - 220px);
    }

    .modal-info {
        max-height: 160px;
        padding: 12px 15px;
    }

    .modal-info h1 {
        font-size: 1rem;
    }

    .modal-description {
        font-size: 0.8rem;
    }

    .modal-links a {
        font-size: 0.8rem;
        padding: 8px 16px;
    }
}
