/* Модальное окно для изображений */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    cursor: pointer;
}

.image-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.image-modal-img {
    max-width: 100%;
    max-height: 90vh;
    display: block;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease;
    cursor: zoom-in;
}

.image-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 36px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1002;
    background: none;
    border: none;
    padding: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

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

/* Управление масштабированием изображения */
.image-modal-controls {
    margin-top: 15px;
    display: flex;
    gap: 10px;
}

/* Кнопки переключения изображений */
.image-modal-prev,
.image-modal-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border: 2px solid white;
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
    border-radius: 50%;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1002;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    transition: all 0.2s ease;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.image-modal-prev {
    left: 10px;
}

.image-modal-next {
    right: 10px;
}

.image-modal-prev:hover,
.image-modal-next:hover {
    background-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-50%) scale(1.1);
}

.image-modal-prev:active,
.image-modal-next:active {
    transform: translateY(-50%) scale(0.95);
}

.image-modal-prev:focus,
.image-modal-next:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.image-modal-controls button {
    width: 40px;
    height: 40px;
    border: 2px solid white;
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.image-modal-controls button:hover {
    background-color: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
}

.image-modal-controls button:active {
    transform: scale(0.95);
}

.image-modal-controls button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}
