.slider-section {
    margin-top: 40px;
    height: calc(100vh - 40px);
    background: #000000;
    padding: 40px 20px;
    scroll-snap-align: start;
    overflow: hidden;
}

.slider-container {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
    height: 100%;
}

.card {
    width: calc(100vh - 150px);
    height: calc(100vh - 150px);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: absolute;
    transition: transform 0.5s ease-in-out, opacity 0.5s ease-in-out;
    cursor: pointer;
}

.card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.card-content {
    position: absolute; /* Изменено на absolute для плашки */
    z-index: 2;
    left: 0;
    right: 0;
    bottom: 0; /* Прижато к низу для мобильных */
    padding: 20px;
    background: rgba(0, 0, 0, 0.8); /* Темная полупрозрачная плашка */
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

/* Улучшение типографики */
.card h3 {
    font-size: clamp(1em, 4vw, 1.2em);
    margin-bottom: 10px;
    text-align: left; /* По умолчанию для мобильных */
}

.card p {
    font-size: clamp(0.8em, 3vw, 0.9em);
    color: #fff; /* Изменен цвет для лучшей видимости */
}

/* Анимации */
@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(-100%); opacity: 0; }
}

/* Контейнер статьи */
.article-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    min-height: calc(100vh - 200px); /* Учитываем header и footer */
}

/* Стили для статьи */
.article {
    background: rgb(0, 0, 0);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Заголовок */
.article-header {
    padding: 30px;
    background: #000;
    color: white;
    text-align: center;
}

.article-title {
    font-size: clamp(1.5em, 5vw, 2.5em);
    margin: 0;
    line-height: 1.2;
}

/* Изображение */
.article-image-wrapper {
    margin: 0;
    padding: 0;
}

.article-image {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    display: block;
}

/* Текст статьи */
.article-content {
    padding: 30px;
}

.article-text {
    font-size: 1.1em;
    line-height: 1.8;
    color: #ffffff;
    margin: 0;
}

/* Кнопка возврата */
.article-footer {
    padding: 0 30px 30px;
    text-align: center;
}

.back-button {
    display: inline-block;
    padding: 12px 24px;
    background: #000;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 1em;
    transition: background 0.3s ease;
}

.back-button:hover {
    background: #333;
}

/* Стили для ошибок */
.error-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
    text-align: center;
}

.error-message {
    font-size: 1.2em;
    color: #721c24;
    background: #f8d7da;
    padding: 20px;
    border-radius: 8px;
    display: inline-block;
}

/* Медиа-запросы для десктопа */
@media (min-width: 769px) {
    .card-content {
        top: 0; /* Растягиваем на всю высоту */
        bottom: 0;
        padding: 40px;
        justify-content: center; /* Центрирование по вертикали */
        background: rgba(0, 0, 0, 0.7); /* Чуть светлее для десктопа */
    }

    .card h3 {
        font-size: 1.5em;
        text-align: center; /* Центрирование текста */
    }

    .card p {
        font-size: 1em;
        text-align: center;
        max-width: 80%; /* Ограничение ширины текста */
        margin: 0 auto; /* Центрирование параграфа */
    }
}

/* Медиа-запросы для мобильных */
@media (max-width: 768px) {
    .slider-section {
        padding: 20px 10px;
        height: calc(100vh - 20px);
    }

    .card {
        width: 90%;
        height: auto;
        aspect-ratio: 4/3;
        min-height: 300px;
    }

    .card-content {
        padding: 15px;
    }
    .article-container {
        padding: 20px 10px;
    }

    .article-header {
        padding: 20px;
    }

    .article-title {
        font-size: clamp(1.2em, 4vw, 2em);
    }

    .article-content {
        padding: 20px;
    }

    .article-text {
        font-size: 1em;
    }

    .article-footer {
        padding: 0 20px 20px;
    }

    .back-button {
        padding: 10px 20px;
    }
}

@media (max-width: 480px) {
    .slider-section {
        padding: 10px 5px;
    }

    .card {
        width: 95%;
        min-height: 250px;
    }

    .card-content {
        padding: 10px;
    }

    .article-image {
        max-height: 300px;
    }

    .article-text {
        font-size: 0.95em;
    }
}

@media (orientation: landscape) and (max-height: 500px) {
    .slider-section {
        height: auto;
        min-height: 100vh;
    }

    .card {
        width: 70%;
        height: auto;
        aspect-ratio: 16/9;
    }
}