/* Модальное окно для просмотра изображений */
.image-viewer-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
}

.image-viewer-modal.active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

.image-viewer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    cursor: pointer;
}

.image-viewer-container {
    position: relative;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    cursor: pointer;
}

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

.image-viewer-image {
    max-width: 100%;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    cursor: default;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.image-viewer-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: #ffffff;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10002;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.image-viewer-close:hover {
    background: rgba(255, 107, 107, 0.9);
    border-color: rgba(255, 107, 107, 1);
    transform: scale(1.1);
}

.image-viewer-close:active {
    transform: scale(0.95);
}

.image-viewer-close span {
    display: block;
    line-height: 1;
    margin-top: -2px;
}

/* Курсор pointer для изображений в карточках */
.menu-item-image {
    cursor: pointer;
}

.menu-item-image img {
    cursor: pointer;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .image-viewer-container {
        width: 95%;
        padding: 10px;
    }

    .image-viewer-close {
        width: 40px;
        height: 40px;
        font-size: 28px;
        top: 5px;
        right: 5px;
    }

    .image-viewer-image {
        max-height: 85vh;
        border-radius: 4px;
    }
}

@media (max-width: 480px) {
    .image-viewer-container {
        width: 100%;
        padding: 5px;
    }

    .image-viewer-close {
        width: 35px;
        height: 35px;
        font-size: 24px;
        top: 5px;
        right: 5px;
    }

    .image-viewer-image {
        max-height: 80vh;
    }
}

