/* Pure Fit Base — здоровый образ жизни, питание, диеты, фитнес */

:root {
    --color-bg: #f7f9f5;
    --color-surface: #ffffff;
    --color-text: #1a2418;
    --color-text-muted: #4a5c4a;
    --color-accent: #2d5a3d;
    --color-accent-soft: #e8f0ea;
    --color-lifestyle: #3d6b4a;
    --color-nutrition: #c17f3a;
    --color-diets: #7a5c9e;
    --color-fitness: #2b6b8a;
    --font-heading: "Literata", Georgia, serif;
    --font-body: "Source Sans 3", system-ui, sans-serif;
    --radius: 12px;
    --shadow: 0 2px 12px rgba(26, 36, 24, 0.06);
    --shadow-hover: 0 8px 24px rgba(26, 36, 24, 0.1);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--color-text);
    background: var(--color-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main {
    flex: 1;
    padding: 2rem 0 4rem;
}

.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.container--narrow {
    max-width: 720px;
}

/* Header */
.site-header {
    background: var(--color-surface);
    border-bottom: 1px solid rgba(26, 36, 24, 0.08);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

/* Реклама сразу под шапкой — визуально отдельный блок */
.header-ad {
    background: rgba(26, 36, 24, 0.03);
    border-bottom: 1px solid rgba(26, 36, 24, 0.08);
    padding: 0.5rem 0;
}

.page-home .header-ad {
    display: none;
}

.header-ad__slot {
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.35rem;
    color: var(--color-accent);
    text-decoration: none;
    letter-spacing: 0.02em;
}

.logo:hover {
    color: var(--color-text);
}

.nav {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.nav-link {
    padding: 0.5rem 0.85rem;
    color: var(--color-text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
}

.nav-link:hover {
    color: var(--color-accent);
    background: var(--color-accent-soft);
}

.lang-switcher {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.9rem;
}

.lang-switcher__link {
    color: var(--color-text-muted);
    text-decoration: none;
}

.lang-switcher__link:hover {
    color: var(--color-accent);
}

.lang-switcher__current {
    color: var(--color-accent);
    font-weight: 600;
}

.lang-switcher__sep {
    color: var(--color-text-muted);
    opacity: 0.7;
}

.lang-switcher__unavailable {
    color: var(--color-text-muted);
    opacity: 0.6;
    cursor: default;
}

/* Блоки под РСЯ: пустой блок не занимает места и незаметен */
.ad-slot {
    min-height: 0;
    width: 100%;
}

.ad-slot:empty {
    display: block;
    height: 0;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

.ad-slot:not(:empty) {
    min-height: 50px;
}

.ad-slot--header:not(:empty) {
    min-height: 50px;
}

/* Реклама в статье */
.article-ad {
    margin: 1.5rem 0;
}

.article-ad--top {
    margin-top: 0;
    margin-bottom: 1.5rem;
}

.article-ad .ad-slot:not(:empty) {
    min-height: 90px;
}

/* Hero */
.hero {
    margin-bottom: 2.5rem;
    text-align: center;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 700;
    color: var(--color-text);
    margin: 0 0 0.5rem;
    line-height: 1.25;
}

.hero-subtitle {
    margin: 0;
    color: var(--color-text-muted);
    font-size: 1.05rem;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

.page-content {
    max-width: 640px;
    margin: 0 auto;
    line-height: 1.6;
}

.page-content p {
    margin: 0 0 1rem;
}

.page-content p:last-child {
    margin-bottom: 0;
}

/* 404 — страница «не найдено» для ru/en */
.page-404 .header-ad {
    display: none;
}

.error-page {
    text-align: center;
    padding: 4rem 1.5rem 5rem;
    max-width: 520px;
    margin: 0 auto;
}

.error-page__code {
    display: block;
    font-family: var(--font-heading);
    font-size: clamp(5rem, 18vw, 9rem);
    font-weight: 700;
    line-height: 1;
    color: var(--color-accent-soft);
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
}

.error-page__title {
    font-family: var(--font-heading);
    font-size: clamp(1.35rem, 4vw, 1.65rem);
    font-weight: 600;
    color: var(--color-text);
    margin: 0 0 0.75rem;
    line-height: 1.3;
}

.error-page__message {
    color: var(--color-text-muted);
    font-size: 1.0625rem;
    line-height: 1.6;
    margin: 0 0 2rem;
}

.error-page__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    background: var(--color-accent);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: var(--radius);
    box-shadow: 0 2px 8px rgba(45, 90, 61, 0.25);
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

.error-page__btn:hover {
    background: #244a30;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(45, 90, 61, 0.3);
}

/* Страница «О нас» — секции */
.about-content {
    max-width: 640px;
    margin: 0 auto;
    line-height: 1.6;
}

.about-section {
    margin-bottom: 2rem;
}

.about-content__updated {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin: 0 0 1.5rem;
}

.about-section:last-child {
    margin-bottom: 0;
}

.about-section__title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-accent);
    margin: 0 0 0.6rem;
}

.about-section p {
    margin: 0 0 0.5rem;
}

.about-section p:last-of-type {
    margin-bottom: 0;
}

.about-section a {
    color: var(--color-accent);
    text-decoration: none;
}

.about-section a:hover {
    text-decoration: underline;
}

.about-list {
    margin: 0 0 0 1.25rem;
    padding: 0;
}

.about-list li {
    margin-bottom: 0.4rem;
}

.about-list li:last-child {
    margin-bottom: 0;
}

/* Article grid */
.article-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.article-card {
    background: var(--color-surface);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: box-shadow 0.2s, transform 0.2s;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.article-card__category {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.75rem;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    width: fit-content;
}

.article-card__category--lifestyle { background: #d4e8d9; color: var(--color-lifestyle); }
.article-card__category--nutrition { background: #f5e6d3; color: #9a5a1f; }
.article-card__category--diets { background: #e8e0f0; color: var(--color-diets); }
.article-card__category--fitness { background: #d6e8f0; color: var(--color-fitness); }

.article-card__link {
    text-decoration: none;
    color: inherit;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.article-card__title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
    line-height: 1.35;
    color: var(--color-text);
}

.article-card__link:hover .article-card__title {
    color: var(--color-accent);
}

.article-card__excerpt {
    margin: 0 0 0.75rem;
    color: var(--color-text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

.article-card__author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0.75rem 0;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(26, 36, 24, 0.08);
}

.article-card__author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.article-card__author-avatar--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-accent-soft);
    color: var(--color-accent);
    font-weight: 600;
    font-size: 0.95rem;
}

.article-card__author-info {
    flex: 1;
    min-width: 0;
}

.article-card__author-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--color-text);
    margin-bottom: 0.15rem;
}

.article-card__author-position {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    line-height: 1.3;
}

.article-card__stats {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0.75rem 0 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(26, 36, 24, 0.08);
}

.article-card__stat {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.article-card__stat svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    flex-shrink: 0;
}

.article-card__date {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin-top: auto;
}

/* Секции на главной: статьи дня и ленты категорий */
.section {
    margin-bottom: 2.5rem;
}

.section__title {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--color-text);
    margin: 0 0 0.25rem;
}

.section__title-link {
    color: var(--color-text);
    text-decoration: none;
}

.section__title-link:hover {
    color: var(--color-accent);
}

.section__subtitle {
    margin: 0 0 1.25rem;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.section--day {
    margin-bottom: 3rem;
}

.article-grid--day {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.25rem;
}

.category-feed {
    padding-top: 1.5rem;
    border-top: 1px solid rgba(26, 36, 24, 0.08);
}

.category-feed__more {
    margin: 1rem 0 0;
    text-align: right;
}

.category-feed__link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-accent);
    text-decoration: none;
}

.category-feed__link:hover {
    text-decoration: underline;
}

.article-grid--feed {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

@media (min-width: 900px) {
    .article-grid--day {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Empty state */
.empty-state {
    text-align: center;
    color: var(--color-text-muted);
    padding: 3rem 1rem;
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2.5rem;
    flex-wrap: wrap;
}

.pagination__link {
    color: var(--color-accent);
    font-weight: 500;
    text-decoration: none;
}

.pagination__link:hover {
    text-decoration: underline;
}

.pagination__current {
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

/* Article detail */
.article-page {
    padding-top: 0.5rem;
}

.article-header {
    margin-bottom: 2rem;
}

.article-header__category {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.75rem;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    text-decoration: none;
    color: inherit;
}

.article-header__category--lifestyle { background: #d4e8d9; color: var(--color-lifestyle); }
.article-header__category--nutrition { background: #f5e6d3; color: #9a5a1f; }
.article-header__category--diets { background: #e8e0f0; color: var(--color-diets); }
.article-header__category--fitness { background: #d6e8f0; color: var(--color-fitness); }

.article-header__category:hover {
    opacity: 0.9;
}

.article-header__title {
    font-family: var(--font-heading);
    font-size: clamp(1.6rem, 4vw, 2.1rem);
    font-weight: 700;
    margin: 0 0 1rem;
    line-height: 1.3;
    color: var(--color-text);
}

.article-header__author {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(26, 36, 24, 0.08);
}

.article-header__author-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.article-header__author-avatar--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-accent-soft);
    color: var(--color-accent);
    font-weight: 600;
    font-size: 1.25rem;
}

.article-header__author-info {
    flex: 1;
    min-width: 0;
}

.article-header__author-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--color-text);
    margin-bottom: 0.2rem;
}

.article-header__author-position {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    line-height: 1.4;
}

.article-header__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(26, 36, 24, 0.08);
}

.article-header__date {
    font-size: 0.95rem;
    color: var(--color-text-muted);
}

.article-header__stats {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.article-header__stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    color: var(--color-text-muted);
}

.article-header__stat svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    flex-shrink: 0;
}

.article-header__like-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--color-surface);
    border: 1px solid rgba(26, 36, 24, 0.15);
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.article-header__like-btn:hover {
    background: var(--color-accent-soft);
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.article-header__like-btn:active {
    transform: scale(0.98);
}

.article-header__like-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.article-header__like-btn--liked {
    background: #fff0f0;
    border-color: #ff6b6b;
    color: #ff6b6b;
}

.article-header__like-btn--liked:hover {
    background: #ffe0e0;
    border-color: #ff5252;
    color: #ff5252;
}

.article-header__like-btn svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 2;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.article-header__like-btn:not(:disabled):hover svg {
    transform: scale(1.1);
}

.article-header__like-count {
    font-weight: 600;
}

.article-header__excerpt {
    margin: 0;
    font-size: 1.1rem;
    color: var(--color-text-muted);
    line-height: 1.55;
}

/* Блок автора и статистики в конце статьи */
.article-end-meta {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(26, 36, 24, 0.08);
}

.article-end-meta__author {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.article-end-meta__author-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.article-end-meta__author-info {
    flex: 1;
    min-width: 0;
}

.article-end-meta__author-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--color-text);
    margin-bottom: 0.2rem;
}

.article-end-meta__author-position {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    line-height: 1.4;
}

.article-end-meta__stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.article-end-meta__date {
    font-size: 0.95rem;
    color: var(--color-text-muted);
}

.article-end-meta__stat-list {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.article-end-meta__stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    color: var(--color-text-muted);
}

.article-end-meta__stat svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    flex-shrink: 0;
}

.article-end-meta__like-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--color-surface);
    border: 1px solid rgba(26, 36, 24, 0.15);
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.article-end-meta__like-btn:hover {
    background: var(--color-accent-soft);
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.article-end-meta__like-btn--liked {
    background: #fff0f0;
    border-color: #ff6b6b;
    color: #ff6b6b;
}

.article-end-meta__like-btn--liked:hover {
    background: #ffe0e0;
    border-color: #ff5252;
    color: #ff5252;
}

.article-body {
    font-size: 1.0625rem;
    line-height: 1.75;
}

.article-body p {
    margin: 0 0 1.15em;
}

.article-body p:last-child {
    margin-bottom: 0;
}

/* Заголовки в статьях */
.article-body h1,
.article-body h2,
.article-body h3,
.article-body h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-text);
    margin: 1.5em 0 0.5em;
    line-height: 1.3;
}

.article-body h1:first-child,
.article-body h2:first-child,
.article-body h3:first-child,
.article-body h4:first-child {
    margin-top: 0;
}

.article-body h1 { font-size: 1.5rem; }
.article-body h2 { font-size: 1.35rem; border-bottom: 1px solid rgba(26, 36, 24, 0.1); padding-bottom: 0.35rem; }
.article-body h3 { font-size: 1.2rem; }
.article-body h4 { font-size: 1.08rem; }

/* Списки в статьях */
.article-body ul,
.article-body ol {
    margin: 0 0 1.25em;
    padding-left: 1.5em;
}

.article-body li {
    margin-bottom: 0.4em;
}

.article-body li:last-child {
    margin-bottom: 0;
}

.article-body ul {
    list-style-type: none;
    padding-left: 0;
}

.article-body ul li {
    position: relative;
    padding-left: 1.35em;
}

.article-body ul li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-accent);
    opacity: 0.8;
}

.article-body ol {
    list-style-type: none;
    counter-reset: list-item;
    padding-left: 0;
}

.article-body ol li {
    position: relative;
    padding-left: 2em;
    counter-increment: list-item;
}

.article-body ol li::before {
    content: counter(list-item) ".";
    position: absolute;
    left: 0;
    font-weight: 600;
    color: var(--color-accent);
    font-size: 0.95em;
}

/* Таблицы в статьях */
.article-body table {
    width: 100%;
    margin: 1.25em 0;
    border-collapse: collapse;
    font-size: 0.98em;
    background: var(--color-surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 1px 8px rgba(26, 36, 24, 0.06);
}

.article-body thead {
    background: var(--color-accent-soft);
}

.article-body th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--color-text);
    border-bottom: 2px solid rgba(45, 90, 61, 0.2);
}

.article-body td {
    padding: 0.65rem 1rem;
    border-bottom: 1px solid rgba(26, 36, 24, 0.08);
}

.article-body tbody tr:last-child td {
    border-bottom: none;
}

.article-body tbody tr:hover {
    background: rgba(232, 240, 234, 0.4);
}

.article-body tfoot td {
    border-top: 1px solid rgba(26, 36, 24, 0.12);
    font-weight: 500;
    background: rgba(26, 36, 24, 0.02);
}

/* ── Evidence-based статьи (v2): скролл таблиц, график, сноски, источники ── */
.article-body .tbl-scroll {
    overflow-x: auto;
    margin: 1.25em 0;
    -webkit-overflow-scrolling: touch;
}
.article-body .tbl-scroll table { margin: 0; }
.article-body svg {
    display: block;
    max-width: 480px;
    width: 100%;
    height: auto;
    margin: 1.25rem auto 0.5rem;
}
.article-body svg rect { fill: var(--color-accent); }
.article-body svg text { fill: var(--color-text); }
.article-body svg line { stroke: var(--color-text-muted); }
.article-body sup {
    line-height: 0;
    font-size: 0.68em;
    font-weight: 700;
    color: var(--color-accent);
    background: var(--color-accent-soft);
    padding: 0.1em 0.32em;
    border-radius: 4px;
    margin: 0 1px;
}
.article-body sup a { color: inherit; text-decoration: none; }
.article-body sup a:hover { text-decoration: underline; }
.article-body .article-sources { margin-top: 2.5rem; }
.article-body .article-sources h2 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--color-text-muted);
    border-bottom: none;
    padding: 1.25rem 0 0;
    border-top: 1px solid rgba(26, 36, 24, 0.1);
}
.article-body .article-sources ol {
    list-style: none;
    counter-reset: none;
    display: grid;
    gap: 0.55rem;
    padding: 0;
    margin: 1rem 0 0;
}
.article-body .article-sources li {
    position: static;
    padding: 0.7rem 0.85rem;
    background: var(--color-surface);
    border: 1px solid rgba(26, 36, 24, 0.1);
    border-radius: 10px;
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--color-text-muted);
    box-shadow: 0 1px 6px rgba(26, 36, 24, 0.04);
}
.article-body .article-sources li::before { content: none; }
.article-body .article-sources a {
    color: var(--color-accent);
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}
.article-body .article-sources a:hover { text-decoration: underline; }

/* Подборка «Читайте также» в конце статьи */
.article-related {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(26, 36, 24, 0.1);
}

.article-related__title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--color-text);
    margin: 0 0 1rem;
}

.article-related__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.article-related__item {
    margin-bottom: 0.5rem;
}

.article-related__item:last-child {
    margin-bottom: 0;
}

.article-related__link {
    display: inline-block;
    color: var(--color-accent);
    text-decoration: none;
    font-weight: 500;
    line-height: 1.4;
    transition: color 0.15s;
}

.article-related__link:hover {
    color: #244a30;
    text-decoration: underline;
}

.article-footer {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(26, 36, 24, 0.1);
}

.article-footer__back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--color-surface);
    border: 1px solid rgba(26, 36, 24, 0.15);
    border-radius: 8px;
    color: var(--color-accent);
    font-weight: 500;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.2s;
    font-family: inherit;
}

.article-footer__back:hover {
    background: var(--color-accent-soft);
    border-color: var(--color-accent);
    color: var(--color-accent);
    text-decoration: none;
    transform: translateX(-2px);
}

.article-footer__back:active {
    transform: translateX(-1px);
}

.article-footer__back svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.article-footer__back:hover svg {
    transform: translateX(-2px);
}

/* Footer — компактный, в столбцах */
.site-footer {
    background: linear-gradient(180deg, #f0f5f1 0%, #e8efe9 100%);
    border-top: 1px solid rgba(26, 36, 24, 0.1);
    padding: 1.5rem 0 1rem;
    margin-top: auto;
}

.footer-row {
    display: grid;
    grid-template-columns: 1fr minmax(140px, max-content) minmax(100px, max-content);
    gap: 2rem 3rem;
    align-items: start;
}

.footer-col {
    min-width: 0;
}

.footer-col--brand {
    max-width: 320px;
}

.footer-brand {
    display: block;
    text-decoration: none;
    color: inherit;
}

.footer-brand:hover .footer-brand__logo {
    color: var(--color-accent);
}

.footer-brand__logo {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-accent);
    letter-spacing: 0.02em;
    display: block;
    margin-bottom: 0.35rem;
    transition: color 0.2s;
}

.footer-brand__desc {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.45;
    color: var(--color-text-muted);
}

.footer-col__title {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-text);
    margin: 0 0 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.3rem;
}

.footer-links a {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--color-accent);
}

.footer-bottom {
    padding-top: 0.9rem;
    margin-top: 1rem;
    border-top: 1px solid rgba(26, 36, 24, 0.08);
}

.footer-copy {
    margin: 0;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    text-align: center;
}

@media (max-width: 520px) {
    .footer-row {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    .footer-col--brand {
        max-width: none;
    }
}

@media (max-width: 640px) {
    .nav {
        width: 100%;
        justify-content: center;
    }
    .article-grid {
        grid-template-columns: 1fr;
    }
}

/* Кнопка «Прокрутить вверх» — только правый нижний угол */
.scroll-to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    left: auto;
    z-index: 90;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-surface);
    border: 1px solid rgba(26, 36, 24, 0.12);
    border-radius: 50%;
    color: var(--color-accent);
    box-shadow: 0 4px 20px rgba(26, 36, 24, 0.12);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.25s, visibility 0.25s, transform 0.25s, box-shadow 0.2s;
}

.scroll-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background: var(--color-accent-soft);
    color: var(--color-accent);
    box-shadow: 0 6px 28px rgba(26, 36, 24, 0.18);
}

.scroll-to-top:active {
    transform: translateY(0) scale(0.96);
}

.scroll-to-top svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    flex-shrink: 0;
}

/* Небольшая полоска закладок — прижата к центру низа экрана */
.bookmark-bar {
    position: fixed;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%) translateY(8px);
    z-index: 85;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px 6px 12px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(26, 36, 24, 0.1);
    border-radius: 20px;
    box-shadow: 0 2px 12px rgba(26, 36, 24, 0.08);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s, transform 0.25s;
}

.bookmark-bar.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.bookmark-bar__text {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    white-space: nowrap;
}

.bookmark-bar__btn {
    padding: 4px 10px;
    font-size: 0.7rem;
    font-weight: 500;
    line-height: 1.3;
    color: var(--color-accent);
    background: var(--color-accent-soft);
    border: none;
    border-radius: 14px;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s, color 0.2s;
}

.bookmark-bar__btn:hover {
    background: rgba(45, 90, 61, 0.2);
    color: var(--color-accent);
}

.bookmark-bar__close {
    width: 20px;
    height: 20px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 2px;
    background: transparent;
    border: none;
    border-radius: 50%;
    font-size: 1rem;
    line-height: 1;
    color: var(--color-text-muted);
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s, background 0.2s;
}

.bookmark-bar__close:hover {
    opacity: 1;
    background: rgba(26, 36, 24, 0.06);
}

@media (max-width: 480px) {
    .scroll-to-top {
        right: 16px;
        bottom: 16px;
        width: 44px;
        height: 44px;
    }
    .scroll-to-top svg {
        width: 20px;
        height: 20px;
    }
}
