.stories-container {
    max-width: 1920px;
    margin: 0 auto;
    padding: 0;
    margin-bottom: 40px;
}

.stories-title {
    text-align: center;
    margin-bottom: 30px;
    font-size: 32px;
}

.stories-slider {
    display: flex;
    overflow-x: auto;
    gap: 20px;
    padding: 20px 0;
    scroll-snap-type: x mandatory;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.stories-slider::-webkit-scrollbar {
    display: none;
}

.story-card {
    min-width: 100%;
    background: #fff;
    /*border-radius: 10px;*/
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.3s;
    scroll-snap-align: start;
    display: flex;
    gap: 30px;
align-items: center;
}

.story-image {
    max-width: 450px;
    height: 300px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
}

.story-name {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
}

.story-preview {
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

/* Стили для попапа */
.popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
}

.popup-content {
    position: relative;
    background: #fff;
    max-width: 800px;
    width: 90%;
    margin: 100px auto;
    padding: 30px;
    border-radius: 10px;
    max-height: 80vh;
    overflow-y: auto;
}

.popup-close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 24px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    border-radius: 50%;
}

.popup-flex-container {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.popup-image {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.popup-info {
    flex-grow: 1;
}

.popup-name {
    font-size: 24px;
    margin-bottom: 15px;
}

.popup-text {
    line-height: 1.6;
    color: #333;
}
.popup-text p {
    margin-bottom: 1em;
}
@media (max-width: 1023px) {
    .story-card {
            flex-wrap: wrap;
    justify-content: center;
    align-content: flex-start;
    }
}
@media (max-width: 768px) {
    .stories-title {
        font-size: 24px;
    }


.story-image {
    max-width: 100%;
    height: 350px;
}

    .popup-flex-container {
        flex-direction: column;
        gap: 20px;
    }

    .popup-image {
        width: 150px;
        height: 150px;
        margin: 0 auto;
    }
}

/* Добавляем стили для кнопок навигации */
.slider-nav {
    position: relative;
    margin: 0 40px; /* Отступы для кнопок */
}

.nav-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: background 0.3s;
}

.nav-button:hover {
    background: #f0f0f0;
}

.nav-button.prev {
    left: -40px;
}

.nav-button.next {
    right: -40px;
}

.nav-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Стрелки внутри кнопок */
.nav-button::before {
    content: '';
    width: 10px;
    height: 10px;
    border-style: solid;
    border-width: 2px 2px 0 0;
    display: inline-block;
}

.nav-button.prev::before {
    transform: rotate(-135deg);
}

.nav-button.next::before {
    transform: rotate(45deg);
}