/* Скрываем кнопку "Показать ещё" на десктопе по умолчанию */
.news-page__show-more {
    display: none;
}

/* Мобильные стили для страницы новостей (max-width: 768px) */
@media (max-width: 768px) {
    /* Предотвращаем горизонтальную прокрутку на странице новостей */
    body {
        overflow-x: hidden;
    }
    
    .news-page {
        /* Общие стили для страницы */
        overflow-x: hidden;
        width: 100%;
        position: relative;
    }
    .news-page  .section-hero__glow {
        top: 0;
        height: 540px;
        width: 990px; /* Ширина должна оставаться 990px для правильного растягивания */
        left: 50%;
        overflow: hidden;
        transform: translateX(-50%);
        position: absolute;
        /* Плавное размытие внизу для сглаживания перехода */
        -webkit-mask-image: linear-gradient(to bottom, 
            rgba(0, 0, 0, 1) 0%, 
            rgba(0, 0, 0, 1) 75%, 
            rgba(0, 0, 0, 0.8) 85%, 
            rgba(0, 0, 0, 0.5) 92%, 
            rgba(0, 0, 0, 0.2) 96%, 
            rgba(0, 0, 0, 0) 100%);
        mask-image: linear-gradient(to bottom, 
            rgba(0, 0, 0, 1) 0%, 
            rgba(0, 0, 0, 1) 75%, 
            rgba(0, 0, 0, 0.8) 85%, 
            rgba(0, 0, 0, 0.5) 92%, 
            rgba(0, 0, 0, 0.2) 96%, 
            rgba(0, 0, 0, 0) 100%);
    }
    .news-page__wrapper {
        padding-top: 120px; /* Отступ сверху как в hero */
        padding-bottom: 50px;
        gap: 20px;
    }


    .news-page__container {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
    }

    .news-page__text {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
    }

    .news-page__text-decoration {
        left: 3px;
        top: -14px;
        gap: 8px;
    }

    .news-page__text-decoration span {
        width: 6px;
        height: 6px;
        background: #fff;
        border-radius: 50%;
    }

    .news-page__title {
        font-size: 1.75rem; /* 28px */
        line-height: 1.2em;
        letter-spacing: 0.02em;
        white-space: nowrap;
        width: 100%;
    }

    .news-page__subtitle {
        display: none; /* Скрываем подзаголовок на мобильных */
    }

    /* Тумблер */
    .news-page__tabs {
        margin-top: 0;
    }

    .news-page__toggle {
        width: auto;
        gap: 20px;
        position: relative;
    }

    .news-page__toggle-label {
        font-size: 0.75rem; /* 12px */
        line-height: 1.2em;
        top: auto; /* Сбрасываем top из десктопной версии */
    }

    .news-page__toggle-track {
        position: relative !important; /* Важно для правильного позиционирования */
        width: 57px;
        height: 30px;
    }

    .news-page__toggle-knob {
        position: absolute !important; /* Переопределяем десктопные стили */
        left: 2px !important; /* Позиционируем относительно трека */
        top: 2px !important;
        width: 26px;
        height: 26px;
        margin: 0;
    }

    .news-page__toggle[data-state='right'] .news-page__toggle-knob {
        /* Ширина трека 57px - ширина кнопки 26px - отступ справа 2px = 29px */
        transform: translateX(27px) !important;
    }


    .news-page__list-container {
        gap: 20px;
    }

    /* Сетка новостей - вертикальная на мобильных */
    .news-page .news-grid {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    /* Первая карточка */
    .news-page .news-card:first-child {
        grid-column: unset;
        width: 100%;
    }

    .news-page .news-card:first-child .news-card__link {
        height: 280px;
        padding: 10px 12px;
        border-radius: 10px;
    }

    .news-page .news-card:first-child .news-card__image {
        padding: 10px 12px;
    }

    .news-page .news-card:first-child .news-card__title {
        font-size: 1rem; /* 16px */
        line-height: 1.2em;
        font-weight: 700;
        margin: 0;
    }

    .news-page .news-card:first-child .news-card__excerpt {
        font-size: 0.75rem; /* 12px */
        line-height: 1.2em;
        margin: 0;
    }

    .news-page .news-card:first-child .news-card__date {
        font-size: 0.75rem; /* 12px */
        padding: 8px 12px;
        margin-bottom: 0;
    }

    /* Остальные карточки - горизонтальная раскладка */
    .news-page .news-card:not(:first-child) .news-card__link {
        height: auto;
        min-height: 280px;
        padding: 10px 12px;
        border-radius: 10px;
    }

    .news-page .news-card:not(:first-child) .news-card__image {
        flex-shrink: 0;
        width: auto;
        min-width: 60px;
        height: 60px;
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        position: relative;
        flex-direction: row;
        gap: 8px;
    }

    .news-page .news-card:not(:first-child) .news-card__image img:not(.svg-plus) {
        width: 60px;
        height: 60px;
        border-radius: 5px;
        object-fit: cover;
        position: relative;
        z-index: 0;
    }
    
    .news-page .news-card:not(:first-child) .news-card__image .svg-plus {
        margin-left: auto;
        align-self: flex-start;
    }

    .news-page .news-card:not(:first-child) .news-card__content {
        margin-top: auto;
    }

    .news-page .news-card:not(:first-child) .news-card__date {
        font-size: 0.75rem; /* 12px */
        padding: 8px 12px;
        margin-bottom: 0;
        align-self: flex-start;
    }

    .news-page .news-card:not(:first-child) .news-card__title {
        font-size: 0.875rem; /* 14px */
        line-height: 1.2em;
        font-weight: 700;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        margin: 10px 0 4px 0; /* Отступ между заголовком и описанием 4px */
    }

    .news-page .news-card:not(:first-child) .news-card__excerpt {
        font-size: 0.75rem; /* 12px */
        line-height: 1.2em;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        margin: 0;
    }

    /* Иконка плюса */
    .news-page .news-card__image .svg-plus {
        width: 20px;
        height: 20px;
    }

    /* Кнопка "Показать ещё" */
    .news-page__pagination {
        display: flex;
        justify-content: center;
        align-items: center;
        margin-top: 30px;
        gap: 0;
    }

    .news-page__pagination .news-page__pager {
        display: none; /* Скрываем кнопки "Назад" и "Вперёд" */
    }

    .news-page__pagination .news-page__pages {
        display: none; /* Скрываем пагинацию */
    }

    /* Кнопка "Показать ещё" - показываем на мобильных */
    .news-page__show-more {
        display: inline-block;
        padding: 18px 20px;
        border-radius: 50px;
        background: rgba(255, 255, 255, 0.1);
        color: #fff;
        font-family: Geometria, sans-serif;
        font-size: 0.75rem; /* 12px */
        line-height: 1.2em;
        cursor: pointer;
        transition: background 0.2s ease;
        text-align: center;
        border: none;
        outline: none;
    }

    .news-page__show-more:hover {
        background: rgba(255, 255, 255, 0.15);
    }

    .news-page__show-more:active {
        transform: translateY(1px);
    }

    /* Скрываем кнопку, если больше нет карточек */
    .news-page__pagination.news-page__pagination--hidden .news-page__show-more {
        display: none;
    }
}
