/* Стили для списка новостей сервиса */

.news-list-title {
    font-size: 32px;
    font-weight: 400;
    margin: -60px 0px 20px 0px;
}

/* Контейнер для всей страницы */
.news-list-container {
    margin-top: -15px;
    max-width: 1200px; /* Ограничиваем ширину для центрирования */
    margin: 0 auto; /* Центрируем контейнер */
    padding: 20px;
}

/* Hero секция */
.news-hero {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    isolation: isolate;
    margin-bottom: 28px;
    background: var(--card-bg, #ffffff);
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
}

.news-hero__link { 
    position: absolute; 
    inset: 0; 
    z-index: 3; 
}

.news-hero__media {
    width: 100%;
    aspect-ratio: 16 / 7;
    background-size: cover;
    background-position: center;
}

.news-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(16,24,40,0.55) 0%, rgba(16,24,40,0.38) 40%, rgba(16,24,40,0.0) 100%);
    pointer-events: none;
}

.news-hero__content {
    position: absolute;
    inset: auto 0 0 0;
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    color: #fff;
    z-index: 2;
    background: linear-gradient(180deg, rgba(16,24,40,0.0) 0%, rgba(16,24,40,0.5) 38%, rgba(16,24,40,0.8) 100%);
}

.news-hero__title {
    font-size: clamp(22px, 3.2vw, 36px);
    line-height: 1.15;
    font-weight: 800;
}

.news-hero__excerpt {
    font-size: clamp(14px, 1.6vw, 16px);
    line-height: 1.45;
    opacity: 0.95;
    max-width: 80ch;
}

.news-hero__meta {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 13px;
    opacity: 0.9;
}

.news-hero__date, .news-hero__views { 
    display: inline-flex; 
    align-items: center; 
    gap: 6px; 
}

/* Сетка карточек новостей */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

/* Карточка новости - новая версия */
.news-card {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    background: transparent;
}

.news-card__link {
    position: absolute;
    inset: 0;
    z-index: 3;
}

.news-card__media {
    position: relative;
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    border-radius: 20px;
    box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.2);
}

.news-card__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(16, 24, 40, 0.24) 0%, rgba(16, 24, 40, 0) 100%);
    pointer-events: none;
    border-radius: 20px;
}

.news-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.news-card__body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0;
    margin-top: 10px;
}

.news-card__title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--foreground, #101828);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card__excerpt {
    font-size: 14px;
    line-height: 1.45;
    color: var(--muted-foreground, #667085);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 8px;
    margin-top: 4px;
    font-size: 12px;
    color: var(--muted-foreground, #667085);
}

.news-card__date, .news-card__views {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Пагинация */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 24px;
}

.pagination__btn {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border, #EAECF0);
    border-radius: 8px;
    color: var(--muted-foreground, #667085);
    background: var(--card-bg, #fff);
    transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
}

.pagination__btn:hover {
    border-color: #D0D5DD;
    color: #344054;
}

.pagination__list {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.pagination__item a, .pagination__item span {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border, #EAECF0);
    border-radius: 8px;
    color: var(--muted-foreground, #667085);
    background: var(--card-bg, #fff);
    text-decoration: none;
}

.pagination__item a:hover {
    border-color: #D0D5DD;
    color: #344054;
}

.pagination__item.is-active span {
    border-color: #228B22;
    background: #228B22;
    color: #ffffff;
}

/* Пустой список */
.news-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 48px 0;
    color: var(--muted-foreground, #667085);
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .module {
        margin: -12px 0 20px 0;
    }
    
    .news-hero { display: none; }
    .news-list-title {
        font-size: 24px;
        margin: 0 0 16px 0;
    }

    .news-hero__content { padding: 18px; }
    .news-hero__title { font-size: clamp(20px, 5.4vw, 28px); }
    .news-hero__excerpt { display: none; }

    /* Спрятать глобальный промо-блок на мобильных на страницах новостей */
    .container-area.promo { display: none !important; }
}