.slider {
    position: relative;
    width: 650px;
    height: 450px;
    margin: auto;
    overflow: hidden;
    border: 1px solid #ccc;
    box-sizing: border-box;
}

.slider-images {
    display: flex;
    transition: transform 0.5s ease-in-out;
    height: 100%;
}

.slider-images .slide {
    min-width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.slider-images img {
    object-fit: contain; /* Масштабирование с сохранением пропорций */
    width: 100%;
    height: 100%;
}

.slider-buttons {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
}

.slider-buttons button {
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
}

.slider-buttons button:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* Стили для всплывающего окна */
.modal {
    display: none; /* Скрываем по умолчанию */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8); /* Затемнение фона */
    justify-content: center;
    align-items: center;
}

.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    overflow: auto;
}

.modal img {
    width: auto;
    height: auto;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 30px;
    color: white;
    cursor: pointer;
}

.thumbnails {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.thumbnails img {
    width: 60px;
    height: 40px;
    margin: 0 5px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s;
    object-fit: cover;
}

.thumbnails img:hover, .thumbnails img.active {
    border-color: #007BFF;
}