/* ============================================================
   CleanLabel.Life — 09-news.css
   Раздел «Новости» (публичная часть).
   v2.9.9.4

   ВАЖНО: селекторы .catalog-* ограничены префиксом .news-page,
   чтобы не влиять на каталоги /additives, /products, /articles.
   ============================================================ */

/* ------------------------------------------------------------
   Общие отступы страниц новостей
   ------------------------------------------------------------ */

   .news-page .catalog-header {
    padding: 32px 0 24px;
    margin-bottom: 8px;
}

.news-page .catalog-header .breadcrumbs {
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--muted, #7a8580);
}

.news-page .catalog-header .breadcrumbs a {
    color: var(--muted, #7a8580);
    text-decoration: none;
}

.news-page .catalog-header .breadcrumbs a:hover {
    color: var(--green, #16a34a);
}

.news-page .catalog-header .breadcrumbs span {
    margin: 0 6px;
    color: #c5d0ca;
}

.news-page .catalog-header .section-label {
    margin-bottom: 6px;
}

.news-page .catalog-header h1 {
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.15;
    letter-spacing: -.5px;
    margin: 8px 0 14px;
    color: var(--text, #1f2937);
}

.news-page .catalog-header .section-description {
    font-size: 15px;
    line-height: 1.6;
    color: #52615a;
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
    padding-left: 0;
    padding-right: 0;
}

.news-page .catalog-header .section-description a {
    color: var(--green, #16a34a);
}

.news-page .catalog-search {
    padding: 8px 0 4px;
}

.news-page .catalog-filters {
    padding: 14px 0 10px;
}

.news-page .catalog-list {
    padding: 14px 0 40px;
}

.news-page .catalog-list .catalog-meta {
    font-size: 13px;
    color: var(--muted, #7a8580);
    margin-bottom: 18px;
}

/* ------------------------------------------------------------
   Список новостей
   ------------------------------------------------------------ */

.news-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* Карточка в списке */
.news-card {
    background: #fff;
    border: 1px solid var(--border, #eaeef0);
    border-radius: 14px;
    padding: 20px 24px;
    transition: border-color .15s, box-shadow .15s;
}

.news-card:hover {
    border-color: var(--green, #16a34a);
    box-shadow: 0 4px 16px rgba(23, 76, 59, .06);
}

.news-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    align-items: center;
    font-size: 12px;
    color: var(--muted, #7a8580);
    margin-bottom: 10px;
}

.news-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 9px;
    border-radius: 99px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    text-decoration: none;
    line-height: 1.6;
}

.news-badge--info {
    background: #eef6ff;
    color: #1d4ed8;
}

.news-badge--success {
    background: #e8f3ed;
    color: #1e7a4f;
}

.news-badge--warning {
    background: #fff8e5;
    color: #8a6a1f;
}

.news-badge--danger {
    background: #fdecec;
    color: #b22a25;
}

.news-page section h2,
.news-page .news-card-title {
    font-size: 18px !important;
    line-height: 1.35 !important;
    margin: 0 0 12px !important;
    font-weight: 800 !important;
    color: var(--text, #1f2937);
    letter-spacing: -.2px !important;
}

.news-card-title a {
    color: inherit;
    text-decoration: none;
}

.news-card-title a:hover {
    color: var(--green, #16a34a);
}

.news-card-excerpt {
    font-size: 14px;
    line-height: 1.6;
    color: #52615a;
    margin: 0 0 14px;
}

.news-card-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    align-items: center;
    font-size: 12px;
    color: var(--muted, #7a8580);
    padding-top: 2px;
}

.news-source a {
    color: var(--muted, #7a8580);
    text-decoration: none;
    border-bottom: 1px dashed #c5d0ca;
}

.news-source a:hover {
    color: var(--green, #16a34a);
}

.news-additive-tag {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 6px;
    background: #e8f3ed;
    color: #1e7a4f;
    font-weight: 800;
    font-size: 11px;
    text-decoration: none;
}

.news-additive-tag:hover {
    background: #d4ebe0;
}

.news-read-more {
    margin-left: auto;
    color: var(--green, #16a34a);
    font-weight: 800;
    text-decoration: none;
    font-size: 13px;
}

.news-read-more:hover {
    text-decoration: underline;
}

/* ------------------------------------------------------------
   Одна новость
   ------------------------------------------------------------ */

.news-single {
    margin: 24px auto 48px;
    padding: 36px 44px;
    background: #fff;
    border: 1px solid var(--border, #eaeef0);
    border-radius: 16px;
    position: relative;
    z-index: 1;
}

.news-single-head {
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border, #eaeef0);
}

.news-page .news-single-head h1 {
    font-size: clamp(26px, 4vw, 38px) !important;
    line-height: 1.2 !important;
    letter-spacing: -.5px !important;
    margin: 14px 0 18px !important;
    color: var(--text, #1f2937);
}

.news-single-lead {
    font-size: 17px;
    line-height: 1.6;
    color: #374151;
    margin: 0 0 20px;
}

.news-single-source {
    font-size: 13px;
    color: var(--muted, #7a8580);
    padding: 10px 14px;
    background: #f7faf8;
    border-radius: 10px;
    display: inline-block;
}

.news-source-label {
    font-weight: 800;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: .05em;
    margin-right: 6px;
    color: #52615a;
}

.news-single-source a {
    color: var(--green, #16a34a);
    text-decoration: none;
    font-weight: 700;
}

.news-single-source a:hover {
    text-decoration: underline;
}

.news-single-content {
    font-size: 16px;
    line-height: 1.7;
    color: var(--text, #1f2937);
}

.news-single-content > *:first-child {
    margin-top: 0;
}

.news-single-content p {
    margin: 0 0 18px;
}

.news-single-content h2 {
    font-size: 22px;
    margin: 32px 0 14px;
    font-weight: 800;
    line-height: 1.3;
}

.news-single-content h3 {
    font-size: 18px;
    margin: 26px 0 12px;
    font-weight: 800;
    line-height: 1.35;
}

.news-single-content a {
    color: var(--green, #16a34a);
}

.news-single-content a.additive-link {
    color: var(--green, #16a34a);
    text-decoration: none;
    font-weight: 700;
}

.news-single-content a.additive-link:hover {
    text-decoration: underline;
}

.news-single-tags {
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid var(--border, #eaeef0);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.news-tag {
    display: inline-block;
    padding: 5px 13px;
    border-radius: 99px;
    background: #f4f7f5;
    color: #52615a;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: background .15s, color .15s;
}

.news-tag:hover {
    background: #e8f3ed;
    color: var(--green, #16a34a);
}

.news-tag--code {
    background: #e8f3ed;
    color: #1e7a4f;
}

.news-tag--code:hover {
    background: #d4ebe0;
}

/* ------------------------------------------------------------
   Блок новостей на главной
   ------------------------------------------------------------ */

.news-home {
    padding: 40px 0;
}

.news-home .section-heading {
    margin-bottom: 24px;
}

/* ------------------------------------------------------------
   Адаптив
   ------------------------------------------------------------ */

@media (max-width: 720px) {
    .news-page .catalog-header {
        padding: 20px 0 16px;
    }

    .news-page .catalog-header h1 {
        font-size: 24px;
    }

    .news-card {
        padding: 16px 18px;
    }

    .news-card-title {
        font-size: 16px;
    }

    .news-read-more {
        margin-left: 0;
        width: 100%;
        margin-top: 4px;
    }

    .news-single {
        padding: 22px 20px;
        margin: 16px auto 32px;
        border-radius: 12px;
    }

    .news-single-head h1 {
        font-size: 22px;
    }

    .news-single-lead {
        font-size: 15px;
    }

    .news-single-source {
        display: block;
    }
}

/* ============================================================
 * v2.9.15.5: группировка новостей по дате + навигация по месяцам
 * ============================================================ */

/* ------------------------------------------------------------
   Группировка по дате
   ------------------------------------------------------------ */

   .news-day-group {
    margin-bottom: 40px;
}
.news-day-group:last-child {
    margin-bottom: 0;
}

.news-day-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 0 0 12px;
    margin-bottom: 18px;
    border-bottom: 2px solid var(--border, #eaeef0);
    position: relative;
}
.news-day-head::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 48px;
    height: 2px;
    background: var(--green, #16a34a);
}

.news-day-title {
    font-size: clamp(18px, 3vw, 22px) !important;
    font-weight: 800 !important;
    letter-spacing: -.3px !important;
    margin: 0 !important;
    color: var(--text, #1f2937);
    line-height: 1.2;
}
.news-day-title time { color: inherit; }

.news-day-count {
    font-size: 12px;
    font-weight: 700;
    color: var(--muted, #7a8580);
    padding: 3px 10px;
    background: #f4f7f5;
    border-radius: 99px;
    white-space: nowrap;
}

/* ------------------------------------------------------------
   Двухколоночный layout
   ------------------------------------------------------------ */

.news-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 32px;
    align-items: start;
}

.news-content {
    min-width: 0;
}

.news-sidebar {
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: sticky;
    top: 88px;
}

/* ------------------------------------------------------------
   Архив по годам/месяцам
   ------------------------------------------------------------ */

.news-archive-reset {
    display: inline-block;
    margin-bottom: 12px;
    font-size: 12px;
    font-weight: 700;
    color: #8a6a1f;
    text-decoration: none;
    padding: 4px 10px;
    background: #fff8e5;
    border-radius: 8px;
    border: 1px solid #f0cd80;
}
.news-archive-reset:hover {
    background: #f0cd80;
    color: #6a4a0f;
}

.news-archive {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.news-archive-year {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.news-archive-year-label {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: var(--muted, #7a8580);
    padding: 4px 0 6px;
    border-bottom: 1px solid var(--border, #eaeef0);
    margin-bottom: 4px;
}

.news-archive-months {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.news-archive-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 10px;
    font-size: 13px;
    color: var(--text, #1f2937);
    text-decoration: none;
    border-radius: 8px;
    transition: background .15s, color .15s;
    min-width: 0;
}

.news-archive-link:hover {
    background: var(--green-soft, #f0fdf4);
    color: var(--green, #16a34a);
}

.news-archive-link.is-active {
    background: var(--green, #16a34a);
    color: #fff;
    font-weight: 800;
}

.news-archive-link span:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.news-archive-count {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 99px;
    background: #eef3f0;
    color: var(--muted, #7a8580);
}

.news-archive-link.is-active .news-archive-count {
    background: rgba(255, 255, 255, .25);
    color: #fff;
}

.news-archive-link:hover .news-archive-count {
    background: rgba(22, 163, 74, .15);
    color: var(--green, #16a34a);
}

/* ------------------------------------------------------------
   Список топ-добавок в сайдбаре
   ------------------------------------------------------------ */

.news-additives-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.news-additive-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text, #1f2937);
    font-size: 12px;
    transition: background .15s;
    min-width: 0;
    border-left: 3px solid #e08c00;
    background: #f7faf8;
}

.news-additive-item.level-success {
    border-left-color: #22a04a;
}
.news-additive-item.level-warning {
    border-left-color: #e08c00;
}
.news-additive-item.level-danger {
    border-left-color: #d40024;
}

.news-additive-item:hover {
    background: var(--green-soft, #f0fdf4);
}

.news-additive-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-weight: 800;
    font-size: 11px;
    flex-shrink: 0;
    color: var(--green, #16a34a);
}

.news-additive-title {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
}

.news-additive-count {
    flex-shrink: 0;
    font-size: 10px;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 99px;
    background: #eef3f0;
    color: var(--muted, #7a8580);
}

/* ------------------------------------------------------------
   Адаптив
   ------------------------------------------------------------ */

@media (max-width: 900px) {
    .news-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .news-sidebar {
        position: static;
        top: auto;
        order: -1; /* Сайдбар — ВВЕРХУ на мобильном */
    }
    /* Архив на мобильном — горизонтальной полосой */
    .news-archive {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 12px;
    }
    .news-archive-year {
        flex: 0 0 auto;
    }
    .news-archive-months {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 4px;
    }
    .news-archive-link {
        padding: 5px 10px;
        font-size: 12px;
    }
    .news-archive-year-label {
        font-size: 10px;
        padding: 2px 0 4px;
    }
}

@media (max-width: 600px) {
    .news-day-group { margin-bottom: 28px; }
    .news-day-head { margin-bottom: 14px; padding-bottom: 10px; }
    .news-day-title { font-size: 17px !important; }
    .news-day-count { font-size: 11px; padding: 2px 8px; }

    .news-archive-link {
        padding: 4px 8px;
        font-size: 11px;
    }
    .news-archive-count {
        padding: 0 6px;
        font-size: 10px;
    }
}