/*
Theme Name: dds_guru-trade.ru
Author: Алексей Гусев
Description: Тема информационного портала о медицинских профессиях и учебных заведениях.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: medpath
*/

:root {
    --bg: #F4F7FB;
    --bg-alt: #E8EFF7;
    --dark: #0B1C2F;
    --dark-2: #1A3A4F;
    --text: #1A2A3A;
    --accent: #1E88C2;
    --accent-dark: #0F5B8C;
    --teal: #4DB6AC;
    --muted: #7A8B9F;
    --line: #B0C4DE;
    --paper: #FFFFFF;
    --font: "Inter", "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

/* ---------- База ---------- */

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

html { scroll-behavior: smooth; }

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.7;
    letter-spacing: 0.01em;
    color: var(--text);
    background-color: var(--bg);
    background-image:
        linear-gradient(rgba(30, 136, 194, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(30, 136, 194, 0.03) 1px, transparent 1px);
    background-size: 20px 20px;
    background-attachment: fixed;
}

body::after {
    content: "";
    position: fixed;
    right: -60px;
    bottom: -50px;
    width: 340px;
    height: 340px;
    opacity: 0.03;
    pointer-events: none;
    z-index: 0;
    background-repeat: no-repeat;
    background-size: contain;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200' fill='none' stroke='%230B1C2F' stroke-width='3'%3E%3Cpath d='M60 10c0 40 80 40 80 80s-80 40-80 80'/%3E%3Cpath d='M140 10c0 40-80 40-80 80s80 40 80 80'/%3E%3Cpath d='M66 40h68M62 65h76M62 115h76M66 140h68'/%3E%3C/svg%3E");
}

.site-wrapper {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.shell {
    width: min(92%, 1180px);
    margin-inline: auto;
}

img { max-width: 100%; height: auto; }

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.18s ease;
}

a:hover {
    color: var(--accent-dark);
    text-decoration-line: overline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font);
    font-weight: 700;
    letter-spacing: -0.015em;
    line-height: 1.18;
    color: var(--text);
    margin: 0 0 0.7em;
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.15rem; }

p { margin: 0 0 1.1em; }

ul, ol { margin: 0 0 1.2em; padding-left: 1.3em; }
li { margin-bottom: 0.4em; }

blockquote {
    margin: 1.6rem 0;
    padding: 1.4rem 1.6rem;
    background: var(--paper);
    border-left: 3px solid var(--teal);
    color: var(--text);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 1.5rem;
    background: var(--paper);
}

table, th, td { border: 1px solid var(--line); }

th, td { padding: 0.65rem 0.85rem; text-align: left; }

th { background: var(--bg-alt); font-weight: 700; }

code, pre {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.92em;
}

pre {
    padding: 1rem;
    overflow: auto;
    background: var(--dark);
    color: #DCE7F2;
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}

/* ---------- Кнопки ---------- */

.btn {
    display: inline-block;
    padding: 0.72rem 1.5rem;
    border-radius: 4px;
    border: 1px solid var(--accent);
    background: var(--accent);
    color: #fff;
    font-weight: 600;
    font-size: 0.98rem;
    line-height: 1.3;
    cursor: pointer;
    transition: background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.btn:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    color: #fff;
    box-shadow: 0 6px 18px rgba(30, 136, 194, 0.28);
    text-decoration: none;
}

.btn-outline {
    background: transparent;
    color: var(--accent);
}

.btn-outline:hover {
    background: rgba(30, 136, 194, 0.08);
    color: var(--accent-dark);
    box-shadow: 0 4px 14px rgba(30, 136, 194, 0.18);
}

.btn-light {
    background: var(--teal);
    border-color: var(--teal);
    color: var(--dark);
}

.btn-light:hover {
    background: #35998f;
    border-color: #35998f;
    color: #fff;
}

/* ---------- Шапка ---------- */

.site-header {
    background: var(--dark);
    color: #E4EEF7;
    border-bottom: 3px solid var(--teal);
}

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

.brand {
    flex: 1 1 420px;
    max-width: 640px;
    display: flex;
    align-items: center;
    gap: 0.9rem;
    min-width: 0;
    text-decoration: none;
    color: #E4EEF7;
}

.brand:hover { text-decoration: none; color: #fff; }

.brand-logo { display: block; max-height: 56px; width: auto; }

.brand-mark { display: block; flex: 0 0 46px; }

.brand-text { min-width: 0; flex: 1 1 auto; }

.brand-name {
    display: block;
    max-width: 560px;
    font-size: 1.12rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.01em;
    color: #FFFFFF;
}

.brand-desc {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.82rem;
    line-height: 1.4;
    color: #9FB4C9;
    max-width: 460px;
}

.nav-toggle {
    display: none;
    padding: 0.55rem 0.9rem;
    border: 1px solid #33506B;
    border-radius: 4px;
    background: transparent;
    color: #E4EEF7;
    font-family: var(--font);
    font-size: 0.9rem;
    cursor: pointer;
}

.main-nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 1.6rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.main-nav li { margin: 0; }

.main-nav a {
    display: inline-block;
    padding: 0.2rem 0;
    color: #DCE7F2;
    font-size: 0.98rem;
    font-weight: 600;
}

.main-nav a:hover,
.main-nav .current-menu-item > a {
    color: var(--teal);
    text-decoration-line: overline;
}

/* ---------- Контентная зона ---------- */

.site-main {
    flex: 1 1 auto;
    padding: 2.4rem 0 3.4rem;
}

.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67%) minmax(0, 27%);
    column-gap: 6%;
    row-gap: 2.5rem;
    align-items: start;
}

.layout-single {
    display: block;
    width: 85%;
    margin-left: auto;
    margin-right: auto;
}

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

.breadcrumbs {
    margin-bottom: 1.6rem;
    font-size: 0.86rem;
    color: var(--muted);
}

.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs .sep { margin: 0 0.35rem; color: var(--line); }

.page-title {
    position: relative;
    margin: 0 0 1.6rem -1.15rem;
    padding-left: 1.15rem;
    font-size: 2.4rem;
}

.page-title::before,
.section-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.08em;
    width: 5px;
    height: 2.3em;
    background: var(--teal);
}

.section-title {
    position: relative;
    margin: 0 0 1.4rem -1.15rem;
    padding-left: 1.15rem;
}

.entry-content > *:last-child { margin-bottom: 0; }

.entry-content img { display: block; }

/* ---------- Карточки записей ---------- */

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
    gap: 1.7rem;
    margin-bottom: 2.4rem;
}

.card-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.7rem;
    margin-bottom: 2.4rem;
}

.card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border-radius: 0;
    border: none;
    background: var(--paper);
    box-shadow: 0 6px 20px rgba(30, 136, 194, 0.10);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 30px rgba(77, 182, 172, 0.22), 0 4px 14px rgba(30, 136, 194, 0.16);
}

.card-thumb {
    position: relative;
    display: block;
    overflow: hidden;
}

.card-thumb img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.card-thumb::after {
    content: "";
    position: absolute;
    left: -6%;
    bottom: 7px;
    width: 112%;
    height: 1px;
    background: var(--teal);
    transform: rotate(-1.6deg);
    opacity: 0.9;
}

.card-thumb-empty {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-2) 100%);
}

.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 1.3rem 1.4rem 1.5rem;
}

.card-title {
    margin: 0 0 0.6rem;
    font-size: 1.18rem;
    line-height: 1.3;
}

.card-title a { color: var(--text); }
.card-title a:hover { color: var(--accent); }

.card-excerpt {
    margin-bottom: 1rem;
    font-size: 0.95rem;
    color: #38495C;
}

.card-excerpt p {
    margin: 0 0 0.5em;
    background: none;
}

.card-excerpt p:last-child { margin-bottom: 0; }

.card-more { margin-top: auto; }

.post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.9rem;
    margin-bottom: 0.7rem;
    font-size: 0.8rem;
    color: var(--muted);
}

.post-meta .meta-cat {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.post-meta .sq {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--teal);
}

/* ---------- Сайдбар ---------- */

.sidebar {
    min-width: 0;
    padding: 1.4rem 1.5rem;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 6px 20px rgba(30, 136, 194, 0.10);
}

.sidebar .widget { margin-bottom: 1.8rem; }
.sidebar .widget:last-child { margin-bottom: 0; }

.sidebar .widget-title {
    position: relative;
    margin: 0 0 0.9rem;
    padding-left: 0.8rem;
    font-size: 1.05rem;
    color: var(--text);
}

.sidebar .widget-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.15em;
    width: 4px;
    height: 1.1em;
    background: var(--teal);
}

.sidebar ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.sidebar li {
    margin-bottom: 0.7rem;
    padding-bottom: 0.7rem;
    border-bottom: 1px solid rgba(176, 196, 222, 0.5);
    font-size: 0.95rem;
    color: var(--text);
}

.sidebar li:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }

.sidebar a { color: var(--text); font-weight: 600; }
.sidebar a:hover { color: var(--accent); }

.sidebar .post-date { display: block; font-size: 0.8rem; color: var(--muted); }

.sidebar p { color: var(--text); font-size: 0.95rem; }

/* ---------- Пагинация ---------- */

.pager {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 2rem;
}

.pager .page-numbers {
    display: inline-block;
    min-width: 42px;
    padding: 0.5rem 0.8rem;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--paper);
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
}

.pager .page-numbers:hover {
    border-color: var(--accent);
    color: var(--accent);
    text-decoration: none;
}

.pager .page-numbers.current {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.pager .page-numbers.dots {
    border: none;
    background: none;
    color: var(--muted);
}

/* ---------- Главная ---------- */

.front-inner {
    width: 85%;
    margin-left: auto;
    margin-right: auto;
}

.front-section {
    margin-bottom: 2.6rem;
    padding: 2.6rem 2.2rem;
}

.front-section.is-plain {
    padding-left: 0;
    padding-right: 0;
}

.front-section.is-alt {
    background: var(--bg-alt);
}

.sec-sep {
    height: 1px;
    margin: 0 0 2.6rem 4rem;
    background: var(--line);
    opacity: 0.7;
}

.ecg-sep {
    display: block;
    width: 100%;
    height: 34px;
    margin-bottom: 2.6rem;
}

.ecg-sep svg { display: block; width: 100%; height: 34px; }

/* Блок 1 — Hero */

.hero {
    position: relative;
    margin-bottom: 2.6rem;
    padding: 4.6rem 2.6rem;
    overflow: hidden;
    background: var(--dark);
}

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: grayscale(35%) saturate(115%) hue-rotate(175deg) brightness(0.85);
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, rgba(11, 28, 47, 0.92) 0%, rgba(11, 28, 47, 0.72) 48%, rgba(26, 58, 79, 0.55) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 760px;
    min-width: 0;
}

.hero h1 {
    margin: 0 0 1rem;
    color: #FFFFFF;
    font-size: 3.5rem;
}

.hero-sub {
    margin: 0 0 1.8rem;
    color: #C8D8E8;
    font-size: 1.12rem;
    max-width: 640px;
}

.hero-kicker {
    display: inline-block;
    margin-bottom: 1.1rem;
    padding: 0.3rem 0.7rem;
    background: rgba(77, 182, 172, 0.16);
    border-left: 3px solid var(--teal);
    color: var(--teal);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* Блок 2 — Таймлайн */

.timeline {
    position: relative;
    margin: 0;
    padding: 0 0 0 1.4rem;
    list-style: none;
    border-left: 2px solid rgba(30, 136, 194, 0.35);
}

.tl-item {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 170px) minmax(0, 1fr);
    gap: 1.4rem;
    margin: 0 0 1.9rem;
    padding-left: 1.4rem;
}

.tl-item:last-child { margin-bottom: 0; }

.tl-item::before {
    content: "";
    position: absolute;
    left: -1.4rem;
    top: 0.5rem;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: var(--accent);
    transform: translateX(-6px);
    box-shadow: 0 0 0 4px rgba(30, 136, 194, 0.14);
}

.tl-item:nth-child(even)::before {
    transform: translateX(-1px);
    background: var(--teal);
    box-shadow: 0 0 0 4px rgba(77, 182, 172, 0.18);
}

.tl-step {
    min-width: 0;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--accent);
}

.tl-step small {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--muted);
}

.tl-body { min-width: 0; }
.tl-body h3 { margin: 0 0 0.35rem; font-size: 1.12rem; }
.tl-body p { margin: 0; font-size: 0.96rem; color: #38495C; }

/* Блок 3 — Статистика */

.stats {
    padding: 2.8rem 2.2rem;
    background: linear-gradient(120deg, var(--dark) 0%, var(--dark-2) 100%);
    background-image:
        linear-gradient(120deg, rgba(11, 28, 47, 0.96) 0%, rgba(26, 58, 79, 0.94) 100%),
        linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: auto, 20px 20px, 20px 20px;
}

.stats .section-title { color: #FFFFFF; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr));
    gap: 1.6rem;
    margin-top: 1.8rem;
}

.stat {
    min-width: 0;
    padding-left: 0.9rem;
    background-image: repeating-linear-gradient(to bottom, var(--teal) 0 16px, transparent 16px 24px);
    background-size: 3px 100%;
    background-repeat: no-repeat;
    background-position: left top;
}

.stat-num {
    display: block;
    font-size: 2.6rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--teal);
}

.stat-label {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.9rem;
    color: #9FB4C9;
}

/* Блок 4 — Рубрикатор */

.topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
    gap: 1.4rem;
    margin-top: 1.6rem;
}

.topic-tile {
    display: block;
    min-width: 0;
    padding: 1.4rem 1.4rem 1.5rem;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 0;
    color: var(--text);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.topic-tile:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 12px 26px rgba(30, 136, 194, 0.16);
    color: var(--text);
    text-decoration: none;
}

.topic-tile svg {
    display: block;
    margin-bottom: 0.9rem;
    color: var(--muted);
    transition: color 0.2s ease;
}

.topic-tile:hover svg { color: var(--accent); }

.topic-name {
    display: block;
    font-size: 1.08rem;
    font-weight: 700;
    line-height: 1.25;
}

.topic-desc {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.88rem;
    color: var(--muted);
}

/* Последние записи на главной */

.latest-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
}

.latest-head .section-title { margin-bottom: 0.9rem; }

.front-lead {
    max-width: 720px;
    margin-bottom: 1.6rem;
    color: #38495C;
}

/* ---------- Запись ---------- */

.entry-header { margin-bottom: 1.6rem; }

.entry-thumb {
    display: block;
    width: 100%;
    margin-bottom: 1.6rem;
}

.entry-thumb img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.entry-content h2,
.entry-content h3 {
    margin-top: 1.8rem;
}

.entry-content h2 {
    position: relative;
    padding-left: 0.9rem;
}

.entry-content h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.12em;
    width: 4px;
    height: 1.1em;
    background: var(--teal);
}

.post-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2.2rem;
    padding-top: 1.4rem;
    border-top: 1px solid var(--line);
    font-size: 0.94rem;
}

/* ---------- Комментарии ---------- */

.comments-area {
    margin-top: 2.6rem;
    padding: 1.8rem 1.8rem 2rem;
    background: var(--paper);
    box-shadow: 0 6px 20px rgba(30, 136, 194, 0.10);
}

.comments-area .section-title { margin-left: 0; padding-left: 1.15rem; }

.comment-list {
    margin: 0 0 1.6rem;
    padding: 0;
    list-style: none;
}

.comment-list .children {
    margin: 1rem 0 0 1.4rem;
    padding: 0;
    list-style: none;
}

.comment-item {
    margin-bottom: 1.2rem;
    padding: 1rem 1.2rem;
    background: var(--bg-alt);
    border-left: 3px solid var(--teal);
}

.comment-head {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 0.4rem;
    font-size: 0.86rem;
}

.comment-author { font-weight: 700; }
.comment-date { color: var(--muted); }
.comment-text p:last-child { margin-bottom: 0; }
.comment-hold { font-size: 0.85rem; color: var(--muted); }
.comment-actions { margin-top: 0.5rem; font-size: 0.88rem; }

.comment-form label {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.65rem 0.8rem;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: #fff;
    font-family: var(--font);
    font-size: 0.96rem;
    color: var(--text);
}

.comment-form textarea { min-height: 150px; resize: vertical; }

.comment-form .form-submit input[type="submit"] {
    padding: 0.72rem 1.5rem;
    border: 1px solid var(--accent);
    border-radius: 4px;
    background: var(--accent);
    color: #fff;
    font-family: var(--font);
    font-weight: 600;
    cursor: pointer;
}

.comment-form .form-submit input[type="submit"]:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
}

/* ---------- Поиск ---------- */

.search-form {
    display: flex;
    gap: 0.6rem;
    max-width: 480px;
}

.search-form input[type="search"] {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0.65rem 0.8rem;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: #fff;
    font-family: var(--font);
    font-size: 0.96rem;
    color: var(--text);
}

.search-form button {
    padding: 0.65rem 1.2rem;
    border: 1px solid var(--accent);
    border-radius: 4px;
    background: var(--accent);
    color: #fff;
    font-family: var(--font);
    font-weight: 600;
    cursor: pointer;
}

.search-form button:hover { background: var(--accent-dark); border-color: var(--accent-dark); }

/* ---------- 404 ---------- */

.error-box {
    width: 85%;
    margin-left: auto;
    margin-right: auto;
    padding: 2.4rem 2.2rem;
    background: var(--paper);
    box-shadow: 0 6px 20px rgba(30, 136, 194, 0.10);
}

.error-actions { margin-top: 1.4rem; }

.error-code {
    font-size: 4.4rem;
    font-weight: 700;
    line-height: 1;
    color: var(--teal);
}

/* ---------- Подвал ---------- */

.site-footer {
    background: var(--dark);
    color: #C8D8E8;
    border-top: 3px solid var(--teal);
}

.footer-cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 2rem;
    padding: 2.6rem 0 2rem;
}

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

.site-footer .widget { margin-bottom: 1.4rem; }
.site-footer .widget:last-child { margin-bottom: 0; }

.site-footer .widget-title {
    position: relative;
    margin: 0 0 0.9rem;
    padding-left: 0.8rem;
    font-size: 1.02rem;
    color: #FFFFFF;
}

.site-footer .widget-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.15em;
    width: 4px;
    height: 1.1em;
    background: var(--teal);
}

.site-footer p,
.site-footer li,
.site-footer .textwidget {
    color: #C8D8E8;
    font-size: 0.93rem;
}

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

.site-footer li { margin-bottom: 0.55rem; }

.site-footer a { color: #DCE7F2; }
.site-footer a:hover { color: var(--teal); }

.site-footer .post-date { display: block; font-size: 0.8rem; color: #8FA6BC; }

.footer-bottom {
    padding: 1.1rem 0 1.4rem;
    border-top: 1px solid rgba(176, 196, 222, 0.18);
    font-size: 0.86rem;
    color: #9FB4C9;
}

/* ---------- Cookie-баннер ---------- */

.cookie-banner[hidden] { display: none !important; }

.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.6rem;
    background: var(--dark);
    border-top: 3px solid var(--teal);
    color: #DCE7F2;
    font-size: 0.9rem;
}

.cookie-banner p { margin: 0; min-width: 0; max-width: 820px; color: #DCE7F2; }
.cookie-banner a { color: var(--teal); }

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

@media (max-width: 960px) {
    h1 { font-size: 2.6rem; }
    .hero h1 { font-size: 2.6rem; }
    .hero { padding: 3.4rem 1.8rem; }
    .page-title { font-size: 2rem; }

    .layout-with-sidebar {
        grid-template-columns: minmax(0, 1fr);
        column-gap: 0;
    }

    .layout-single,
    .front-inner,
    .error-box { width: 100%; }
}

@media (max-width: 600px) {
    body { font-size: 16px; }
    h1 { font-size: 2.1rem; }
    h2 { font-size: 1.6rem; }
    .hero h1 { font-size: 2.1rem; }
    .hero { padding: 2.6rem 1.3rem; }
    .hero-sub { font-size: 1rem; }

    .header-inner { padding: 1.1rem 0; }

    .nav-toggle { display: inline-block; }

    .main-nav {
        flex: 1 1 100%;
        display: none;
    }

    .main-nav.is-open { display: block; }

    .main-nav ul {
        flex-direction: column;
        gap: 0.7rem;
        padding-top: 0.9rem;
        border-top: 1px solid rgba(176, 196, 222, 0.18);
    }

    .front-section { padding: 1.9rem 1.3rem; margin-bottom: 2rem; }
    .front-section.is-plain { padding-left: 0; padding-right: 0; }
    .stats { padding: 1.9rem 1.3rem; }
    .comments-area { padding: 1.3rem 1.2rem 1.5rem; }
    .error-box { padding: 1.6rem 1.3rem; }
    .sidebar { padding: 1.2rem 1.2rem; }
    .cookie-banner { padding: 0.9rem 1.1rem; }
    .sec-sep { margin-left: 2rem; margin-bottom: 2rem; }
    .ecg-sep { margin-bottom: 2rem; }

    .tl-item {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.4rem;
    }

    .stat-num { font-size: 2.1rem; }

    .page-title,
    .section-title {
        margin-left: -0.75rem;
        padding-left: 0.85rem;
    }
}
