/* Новости этого шаблона: блок главной, список раздела и отдельная новость.
   Скоуп — только собственные классы, чужие (.section-title) не трогаем. */

/* ─── Блок на главной ─────────────────────────────────────────────────── */

.news-card__image {
    display: block;
    overflow: hidden;
    margin-bottom: 12px;
    border-radius: var(--radius, 16px);
    background: var(--tint, #EFF4E4);
}

.news-card__image img {
    display: block;
    width: 100%;
    height: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    object-position: center top;
}

/* Карточка новости: картинка не должна занимать половину высоты.
   Ограничиваем 140 px — текст важнее, а витрина компактнее. */
.news-card__image {
    max-height: 140px;
}

.news-card__text {
    overflow: hidden;
    margin-top: 8px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text, #4F5A52);
}

/* ─── Список раздела /news/ ───────────────────────────────────────────── */

.news-list {
    display: grid;
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.news-list__empty {
    padding: 24px 0;
    color: var(--muted, #6F7A72);
}

.news-item {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    padding: 24px;
    border-radius: var(--radius-lg, 24px);
    background: var(--tint, #EFF4E4);
}

/* Карточка с картинкой: картинка слева. Пустой колонки 260px не бывает,
   потому что класс добавляется только вместе с картинкой. */
.news-item--with-image {
    grid-template-columns: 260px minmax(0, 1fr);
}

.news-item__image {
    display: block;
    overflow: hidden;
    border-radius: var(--radius, 16px);
    background: var(--white, #fff);
}

.news-item__image img {
    display: block;
    width: 100%;
    height: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.news-item__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.news-item__date {
    font-size: 13px;
    color: var(--muted, #6F7A72);
}

.news-item__title {
    margin-top: 12px;
    font-size: 22px;
    line-height: 1.3;
    font-weight: 700;
}

.news-item__text {
    margin-top: 10px;
    font-size: 15px;
    line-height: 1.55;
    color: var(--text, #4F5A52);
}

.news-item__link {
    display: inline-block;
    margin-top: 14px;
    font-weight: 600;
    color: var(--green, #5A7350);
}

.news-item__link:hover {
    opacity: .75;
}

/* ─── Отдельная новость ───────────────────────────────────────────────── */

.news-page__nav {
    /* Отступ от шапки и от ссылки до заголовка: без него навигация
       прилипала к меню, а заголовок — к навигации. */
    margin: 32px 0 28px;
}

.news-page__back {
    font-size: 15px;
    color: var(--muted, #6F7A72);
}

/* Обложка — во всю ширину колонки, как просили. */
/* Обложка новости.
   Как и в акции: без жёсткой рамки 16:9. Фото события может быть любой
   пропорции — obект-fit: contain показывает его целиком, без обрезки. */
.news-page__cover {
    margin: 22px 0 0;
    overflow: hidden;
    border-radius: var(--radius, 16px);
    background: var(--tint, #EFF4E4);
    display: flex;
    justify-content: center;
}

.news-page__cover-image {
    display: block;
    width: 100%;
    height: auto;
    max-height: 420px;
    object-fit: contain;
}

/* ─── Галерея фото события ───────────────────────────────────────────
   Несколько фото листаются вручную: стрелки по краям, точки и счётчик
   внизу. Скругление как у обложки, чтобы одиночное фото и галерея
   выглядели одинаково. */

.news-gallery {
    position: relative;
    margin: 22px 0 0;
    overflow: hidden;
    border-radius: var(--radius, 16px);
    background: var(--tint, #EFF4E4);
}

.news-gallery__viewport {
    overflow: hidden;
}

.news-gallery__track {
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
    transition: transform .45s var(--ease, ease);
    will-change: transform;
}

.news-gallery__slide {
    flex: 0 0 100%;
    min-width: 0;
}

.news-gallery__image {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    max-height: 380px;
    object-fit: cover;
}

.news-gallery__arrow {
    position: absolute;
    top: 50%;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-top: -22px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    color: var(--green, #5A7350);
    box-shadow: 0 4px 14px rgba(24, 38, 29, .14);
    cursor: pointer;
    transition: background-color .2s, transform .2s;
}

.news-gallery__arrow:hover {
    background: #FFFFFF;
    transform: scale(1.06);
}

.news-gallery__arrow .icon {
    width: 20px;
    height: 20px;
}

.news-gallery__arrow--prev { left: 14px; }
.news-gallery__arrow--next { right: 14px; }

.news-gallery__dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 14px;
    z-index: 2;
    display: flex;
    justify-content: center;
    gap: 6px;
    pointer-events: none;
}

.news-gallery__dot {
    width: 7px;
    height: 7px;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: rgba(255, 255, 255, .6);
    box-shadow: 0 0 0 1px rgba(24, 38, 29, .14);
    cursor: pointer;
    pointer-events: auto;
    transition: width .25s, background-color .25s;
}

.news-gallery__dot--active,
.news-gallery__dot--active:hover {
    width: 20px;
    background: #FFFFFF;
}

.news-gallery__counter {
    position: absolute;
    right: 14px;
    bottom: 14px;
    z-index: 2;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(24, 38, 29, .55);
    color: #fff;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 575px) {
    .news-gallery__arrow {
        width: 38px;
        height: 38px;
        margin-top: -19px;
    }

    .news-gallery__arrow--prev { left: 8px; }
    .news-gallery__arrow--next { right: 8px; }

    .news-gallery__image {
        aspect-ratio: 4 / 3;
    }
}

.news-page__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    /* Та же колонка, что заголовок и текст: левый край, не центр. */
    max-width: none;
}

.news-page__date {
    font-size: 14px;
    color: var(--muted, #6F7A72);
}

.news-page__title {
    max-width: none;
    /* Тот же левый край, что у текста ниже: заголовок и абзацы —
       одна колонка, а не «заголовок слева, текст по центру». */
    margin: 16px 0 0;
    font-size: 38px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -.3px;
}

.news-page__text {
    max-width: none;
    /* Колонка для чтения по центру под обложкой во всю ширину. */
    margin: 28px 0 0;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text, #4F5A52);
}

.news-page__text p {
    margin-top: 14px;
}

.news-page__text p:first-child {
    margin-top: 0;
}

/* ─── Перелистывание новостей ─────────────────────────────────────────── */

.news-page__pager {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: start;
    gap: 16px;
    margin-top: 36px;
    padding-top: 24px;
    border-top: 1px solid var(--line, #E4E8E1);
}

.news-page__pager-cell {
    min-width: 0;
}

.news-page__pager-cell--next {
    text-align: right;
}

.news-page__pager-cell--back {
    align-self: center;
}

.news-page__pager-back {
    display: inline-block;
    font-size: 14px;
    font-weight: 700;
    color: var(--green, #5A7350);
    white-space: nowrap;
}

.news-page__pager-back:hover {
    text-decoration: underline;
}

.news-page__pager-link {
    display: inline-flex;
    flex-direction: column;
    gap: 4px;
    max-width: 100%;
    font-size: 14px;
    color: var(--green, #5A7350);
}

.news-page__pager-link--next {
    align-items: flex-end;
    text-align: right;
}

.news-page__pager-label {
    font-size: 12px;
    color: var(--muted, #6F7A72);
}

.news-page__pager-name {
    font-weight: 700;
    line-height: 1.3;
}

.news-page__pager-link:hover .news-page__pager-name {
    text-decoration: underline;
}

.news-page__notice {
    padding: 20px 0;
}

.news-page__notice-title {
    font-size: 30px;
    font-weight: 700;
}

.news-page__notice-text {
    margin-top: 12px;
    color: var(--muted, #6F7A72);
}

@media (max-width: 767px) {
    .news-item--with-image {
        grid-template-columns: minmax(0, 1fr);
    }

    .news-page__title {
        font-size: 28px;
    }

    /* На узком экране: «К списку» отдельной строкой сверху по центру. */
    .news-page__pager {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 16px 12px;
    }

    .news-page__pager-cell--back {
        grid-column: 1 / -1;
        grid-row: 1;
        justify-self: center;
        padding-bottom: 4px;
    }

    .news-page__pager-cell--prev {
        grid-column: 1;
        grid-row: 2;
    }

    .news-page__pager-cell--next {
        grid-column: 2;
        grid-row: 2;
    }
}
