/*
Theme Name: dds_luckmedicine.ru
Theme URI: https://luckmedicine.ru/
Author: Игорь Лавров
Description: Тема для образовательного портала по фармацевтике: справочная база по лекарственным средствам, подготовка провизоров и фармацевтов.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: lckmed
*/

:root {
    --bg: #F8FAFC;
    --alt: #F1F5F9;
    --dark: #0F172A;
    --ink: #1E293B;
    --accent: #0EA5E9;
    --accent-deep: #0284C7;
    --teal: #14B8A6;
    --muted: #64748B;
    --line: #E2E8F0;
    --white: #FFFFFF;
    --face-head: "Inter", "Manrope", "Segoe UI", "Arial Narrow", sans-serif;
    --face-body: "Public Sans", "Roboto", "Helvetica Neue", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--face-body);
    font-size: 17px;
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

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

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--face-head);
    color: var(--dark);
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 2rem 0 0.9rem;
}

h1 { font-size: 3.5rem; margin-top: 0; }
h2 { font-size: 2rem; }
h3 { font-size: 1.45rem; }
h4 { font-size: 1.2rem; }

p { margin: 0 0 1.15rem; }

a { color: var(--accent); }

/* Иконка-префикс у заголовков второго уровня — стилизованная капля */
.entry-content h2::before,
.sec-title::before,
.blk-title::before {
    content: "";
    display: inline-block;
    width: 13px;
    height: 17px;
    margin-right: 0.6rem;
    vertical-align: -2px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 32'%3E%3Cpath d='M12 32C5.4 32 0 26.9 0 20.6 0 13 12 0 12 0s12 13 12 20.6C24 26.9 18.6 32 12 32z' fill='%230EA5E9'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* ---------- Заголовки секций ---------- */
.sec-head { margin-bottom: 1.9rem; }

.sec-head::before {
    content: "";
    display: block;
    width: 60px;
    height: 2px;
    background: var(--accent);
    margin-bottom: 0.95rem;
}

.sec-title {
    margin: 0;
    font-size: 2.1rem;
    color: #0B1220;
}

.sec-sub {
    margin: 0.65rem 0 0;
    color: var(--muted);
    max-width: 62ch;
}

/* ---------- Кнопки ---------- */
.btn {
    display: inline-block;
    padding: 0.85rem 1.7rem;
    border-radius: 6px;
    background: var(--accent);
    color: #fff;
    font-family: var(--face-head);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    border: 2px solid var(--accent);
    transition: background .22s ease, border-color .22s ease, box-shadow .22s ease;
}

.btn:hover,
.btn:focus {
    background: var(--accent-deep);
    border-color: var(--accent-deep);
    box-shadow: 0 8px 20px rgba(2, 132, 199, 0.28);
}

.btn-ghost {
    background: transparent;
    color: var(--dark);
    border: 2px solid var(--muted);
    box-shadow: none;
}

.btn-ghost:hover,
.btn-ghost:focus {
    background: var(--dark);
    border-color: var(--dark);
    color: #fff;
    box-shadow: none;
}

/* ---------- Текстовые ссылки ---------- */
.entry-content a,
.link-line {
    color: var(--accent);
    text-decoration: none;
    background-image: linear-gradient(var(--accent), var(--accent));
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 0 1px;
    transition: background-size .3s ease;
}

.entry-content a:hover,
.link-line:hover { background-size: 100% 1px; }

/* ---------- Шапка ---------- */
.site-head {
    position: relative;
    background: var(--dark);
    color: #E2E8F0;
    overflow: hidden;
}

.site-head::after {
    content: "";
    position: absolute;
    right: -40px;
    bottom: -70px;
    width: 320px;
    height: 320px;
    opacity: 0.07;
    pointer-events: none;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cg fill='none' stroke='%23ffffff' stroke-width='4'%3E%3Ccircle cx='60' cy='60' r='16'/%3E%3Ccircle cx='140' cy='48' r='12'/%3E%3Ccircle cx='104' cy='118' r='14'/%3E%3Ccircle cx='42' cy='146' r='11'/%3E%3Ccircle cx='158' cy='140' r='15'/%3E%3Cpath d='M74 66l54-12M70 74l24 34M114 128l32 8M56 76l-10 60M116 110l30-48'/%3E%3C/g%3E%3C/svg%3E") no-repeat center / contain;
}

.head-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.4rem;
    padding: 1.4rem 0;
    position: relative;
    z-index: 2;
}

.brand {
    display: flex;
    flex: 0 1 auto;
    align-items: center;
    gap: 0.95rem;
    min-width: 0;
    text-decoration: none;
    color: inherit;
}

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

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

.brand-text { min-width: 0; }

.brand-name {
    display: block;
    font-family: var(--face-head);
    font-weight: 700;
    font-size: 1.06rem;
    letter-spacing: -0.01em;
    color: #F8FAFC;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.brand-tag {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.8rem;
    color: #94A3B8;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.nav-toggle {
    display: none;
    background: transparent;
    border: 2px solid #334155;
    border-radius: 6px;
    color: #E2E8F0;
    font-family: var(--face-head);
    font-size: 0.95rem;
    padding: 0.55rem 0.9rem;
    cursor: pointer;
}

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

.main-nav a {
    color: #CBD5E1;
    text-decoration: none;
    font-family: var(--face-head);
    font-size: 0.98rem;
    font-weight: 500;
    white-space: nowrap;
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
    transition: color .2s ease, border-color .2s ease;
}

.main-nav a:hover,
.main-nav .current-menu-item > a {
    color: #fff;
    border-bottom-color: var(--accent);
}

.head-strip { height: 3px; background: linear-gradient(90deg, var(--accent) 0 55%, var(--teal) 55% 100%); }

/* ---------- Хлебные крошки ---------- */
.breadcrumbs {
    padding: 1.1rem 0 0;
    font-size: 0.87rem;
    color: var(--muted);
}

.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs .sep { margin: 0 0.45rem; color: #CBD5E1; }

/* ---------- Раскладки ---------- */
.site-main { padding: 1.6rem 0 4rem; }

.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67fr) minmax(0, 27fr);
    justify-content: space-between;
    gap: 3rem;
    align-items: start;
}

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

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

/* ---------- Сайдбар ---------- */
.sidebar {
    min-width: 0;
    background: var(--white);
    border-left: 3px solid var(--line);
    padding: 1.5rem 1.4rem;
    color: var(--ink);
}

.sidebar .widget + .widget { margin-top: 2rem; }

.sidebar .widget-title {
    margin: 0 0 1rem;
    font-size: 1.08rem;
    color: var(--dark);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.sidebar .widget-title::before {
    content: "";
    display: block;
    width: 40px;
    height: 2px;
    background: var(--accent);
    margin-bottom: 0.7rem;
}

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

.sidebar li {
    padding: 0.55rem 0 0.55rem 1.1rem;
    border-bottom: 1px solid var(--line);
    position: relative;
    color: var(--ink);
    font-size: 0.97rem;
}

.sidebar li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 1.05rem;
    width: 6px;
    height: 6px;
    background: var(--teal);
}

.sidebar li:last-child { border-bottom: none; }
.sidebar a { color: var(--ink); text-decoration: none; }
.sidebar a:hover { color: var(--accent-deep); }
.sidebar .post-date,
.sidebar .rss-date { display: block; color: var(--muted); font-size: 0.82rem; }
.sidebar p { color: var(--ink); font-size: 0.95rem; }

/* ---------- Карточки записей ---------- */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: 1.9rem;
    margin-top: 1.2rem;
}

.card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--white);
    border: 1px solid var(--line);
    border-top: 3px solid var(--line);
    border-radius: 0;
    overflow: hidden;
    transition: transform .25s ease, border-top-color .25s ease;
}

.card:hover {
    transform: translateY(-6px);
    border-top-color: var(--accent);
}

.card-thumb-wrap {
    position: relative;
    display: block;
    overflow: hidden;
    background: #E2E8F0;
}

.card-thumb-wrap img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    filter: grayscale(1) contrast(1.06);
    transition: filter .3s ease;
}

.card:hover .card-thumb-wrap img { filter: grayscale(0.55) contrast(1.02); }

.card-thumb-ph {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, #E2E8F0 0%, #CBD5E1 100%);
}

.card-cat-mark {
    position: absolute;
    left: 14px;
    bottom: 10px;
    margin: 0;
    font-family: var(--face-head);
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.72);
    text-shadow: 0 2px 10px rgba(15, 23, 42, 0.6);
    pointer-events: none;
}

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

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

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

.card-meta {
    font-size: 0.8rem;
    color: var(--muted);
    letter-spacing: 0.03em;
    margin-bottom: 0.7rem;
}

.card-excerpt { color: #334155; font-size: 0.96rem; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }

.card-more {
    margin-top: auto;
    padding-top: 0.9rem;
    font-family: var(--face-head);
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--accent-deep);
    text-decoration: none;
    align-self: flex-start;
}

.card-more:hover { color: var(--teal); }

.card.is-sticky { border-top-color: var(--teal); }

/* ---------- Пагинация ---------- */
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 2.6rem;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 0.85rem;
    border: 1px solid var(--line);
    background: var(--white);
    color: var(--ink);
    font-family: var(--face-head);
    font-size: 0.95rem;
    text-decoration: none;
    border-radius: 6px;
    transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.pagination a.page-numbers:hover {
    border-color: var(--accent);
    color: var(--accent-deep);
}

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

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

/* ---------- Записи и страницы ---------- */
.entry-header { margin-bottom: 1.6rem; }

.entry-title { font-size: 2.6rem; margin: 0.4rem 0 0.8rem; }

.entry-meta {
    font-size: 0.87rem;
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.entry-cat {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    background: rgba(20, 184, 166, 0.12);
    color: #0F766E;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-family: var(--face-head);
}

.entry-thumb { margin-bottom: 1.8rem; }
.entry-thumb img { display: block; width: 100%; object-fit: cover; }

.entry-content { font-size: 1.03rem; }
.entry-content img { display: block; height: auto; }
.entry-content ul, .entry-content ol { padding-left: 1.3rem; }
.entry-content li { margin-bottom: 0.5rem; }

.entry-content blockquote,
.lab-quote {
    position: relative;
    margin: 2rem 0;
    padding: 1.3rem 1.6rem 1.3rem 1.8rem;
    background: var(--alt);
    border-left: 4px solid var(--accent);
    font-size: 1.1rem;
}

.entry-content blockquote::before,
.lab-quote::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--teal);
}

.entry-content blockquote p:last-child,
.lab-quote p:last-child { margin-bottom: 0; }

.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.6rem 0;
    border: 1px solid var(--line);
}

.entry-content th,
.entry-content td {
    border: 1px solid var(--line);
    padding: 0.7rem 0.9rem;
    text-align: left;
}

.entry-content th { background: var(--alt); font-family: var(--face-head); }

.entry-tags { margin-top: 2rem; font-size: 0.9rem; color: var(--muted); }
.entry-tags a { color: var(--accent-deep); text-decoration: none; margin-right: 0.6rem; }

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

.post-nav a { color: var(--accent-deep); text-decoration: none; }

/* ---------- Комментарии ---------- */
.comments-area { margin-top: 3rem; }

.comments-title, .comment-reply-title {
    font-size: 1.5rem;
    margin-bottom: 1.2rem;
}

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

.comment-body {
    background: var(--white);
    border: 1px solid var(--line);
    border-top: 3px solid var(--line);
    padding: 1.1rem 1.3rem;
    margin-bottom: 1.2rem;
}

.comment-author { font-family: var(--face-head); font-weight: 600; color: var(--dark); }
.comment-metadata { font-size: 0.8rem; color: var(--muted); margin-bottom: 0.6rem; }
.comment-metadata a { color: var(--muted); text-decoration: none; }

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: 6px;
    font-family: var(--face-body);
    font-size: 1rem;
    background: var(--white);
    color: var(--ink);
}

.comment-form label { display: block; font-size: 0.9rem; margin-bottom: 0.3rem; color: var(--muted); }
.comment-form p { margin-bottom: 1rem; }

.comment-form .submit {
    background: var(--accent);
    border: 2px solid var(--accent);
    color: #fff;
    padding: 0.8rem 1.7rem;
    border-radius: 6px;
    font-family: var(--face-head);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
}

.comment-form .submit:hover { background: var(--accent-deep); border-color: var(--accent-deep); }

/* ---------- Поиск ---------- */
.search-form { display: flex; gap: 0.6rem; max-width: 480px; }

.search-form input[type="search"] {
    flex: 1;
    min-width: 0;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: 6px;
    font-family: var(--face-body);
    font-size: 1rem;
    background: var(--white);
    color: var(--ink);
}

.search-form button {
    padding: 0.7rem 1.3rem;
    border: 2px solid var(--accent);
    background: var(--accent);
    color: #fff;
    border-radius: 6px;
    font-family: var(--face-head);
    font-weight: 600;
    cursor: pointer;
}

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

/* ---------- Главная: секции ---------- */
.front-section { padding: 4.2rem 0; }

.front-section--alt {
    background-color: var(--alt);
    background-image:
        radial-gradient(rgba(14, 165, 233, 0.28) 1.4px, transparent 1.4px),
        radial-gradient(rgba(14, 165, 233, 0.28) 1.4px, transparent 1.4px);
    background-size: 36px 62px;
    background-position: 0 0, 18px 31px;
}

/* Hero */
.hero {
    position: relative;
    min-height: 560px;
    display: flex;
    align-items: center;
    background: var(--dark);
    overflow: hidden;
}

.hero-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-veil {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.75);
}

.hero::after {
    content: "";
    position: absolute;
    right: -60px;
    bottom: -80px;
    width: 420px;
    height: 420px;
    opacity: 0.08;
    pointer-events: none;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 220'%3E%3Cg fill='none' stroke='%23ffffff' stroke-width='4'%3E%3Cpath d='M78 12h44M86 12v58L44 178c-6 15 5 30 21 30h70c16 0 27-15 21-30L114 70V12'/%3E%3Cpath d='M62 138h76'/%3E%3Ccircle cx='86' cy='160' r='7'/%3E%3Ccircle cx='112' cy='176' r='9'/%3E%3C/g%3E%3C/svg%3E") no-repeat center / contain;
}

.hero-inner {
    position: relative;
    z-index: 2;
    padding: 5.5rem 0;
    text-align: center;
}

.hero-plate {
    display: inline-block;
    max-width: 780px;
    padding: 2.6rem 2.8rem;
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(14, 165, 233, 0.45);
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 34px), calc(100% - 34px) 100%, 0 100%);
    text-align: left;
}

.hero-eyebrow {
    display: inline-block;
    margin-bottom: 1.1rem;
    font-family: var(--face-head);
    font-size: 0.82rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--teal);
}

.hero h1 { color: #fff; margin: 0 0 1.1rem; }

.hero-sub {
    color: #CBD5E1;
    font-size: 1.1rem;
    margin: 0 0 1.8rem;
    max-width: 56ch;
}

/* Таймлайн */
.tline { position: relative; margin-top: 2.6rem; padding: 0.5rem 0; }

.tline::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    margin-left: -1px;
    background: var(--accent);
}

.tline-row {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 76px minmax(0, 1fr);
    align-items: center;
    margin-bottom: 1.7rem;
}

.tline-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-top: 3px solid var(--line);
    padding: 1.25rem 1.5rem;
    min-width: 0;
    transition: border-top-color .25s ease, transform .25s ease;
}

.tline-row:hover .tline-card { border-top-color: var(--accent); transform: translateY(-4px); }

.tline-row:nth-child(odd) .tline-card { grid-column: 1; }
.tline-row:nth-child(even) .tline-card { grid-column: 3; }

.tline-num {
    grid-column: 2;
    justify-self: center;
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--dark);
    color: var(--teal);
    font-family: var(--face-head);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    border: 2px solid var(--accent);
    border-radius: 6px;
}

.tline-card h3 { margin: 0 0 0.45rem; font-size: 1.16rem; }
.tline-card p { margin: 0; color: #475569; font-size: 0.97rem; }

/* Статистика */
.stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 2.4rem;
    background: var(--white);
    border: 1px solid var(--line);
    border-left: 4px solid var(--accent);
    box-shadow: inset 6px 0 0 -1px var(--teal);
    padding: 2.2rem 2rem;
    gap: 1rem;
}

.stat {
    min-width: 0;
    padding: 0 1.2rem;
    border-right: 1px solid var(--line);
    text-align: center;
}

.stat:last-child { border-right: none; }

.stat-num {
    display: block;
    font-family: var(--face-head);
    font-size: 5rem;
    font-weight: 700;
    line-height: 1;
    color: var(--accent);
    letter-spacing: -0.03em;
}

.stat-label {
    display: block;
    margin-top: 0.7rem;
    color: var(--muted);
    font-size: 0.93rem;
}

/* Рубрикатор */
.rubrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.4rem;
    margin-top: 2.4rem;
}

.rubric {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.9rem;
    min-width: 0;
    padding: 1.7rem 1.5rem;
    background: var(--white);
    border: 1px solid #CBD5E1;
    border-radius: 0;
    color: var(--dark);
    text-decoration: none;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%);
    transition: background .24s ease, color .24s ease, border-color .24s ease, transform .24s ease;
}

.rubric svg { width: 40px; height: 40px; color: var(--accent); transition: color .24s ease; }

.rubric-name {
    font-family: var(--face-head);
    font-weight: 700;
    font-size: 1.1rem;
}

.rubric-note { font-size: 0.9rem; color: var(--muted); transition: color .24s ease; }

.rubric:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    transform: translateY(-5px);
}

.rubric:hover svg,
.rubric:hover .rubric-note { color: #fff; }

/* Последние записи на главной */
.front-latest { padding: 4.2rem 0; }
.front-latest .cards { margin-top: 1.8rem; }
.front-latest-more { margin-top: 2.2rem; }

/* ---------- Подвал ---------- */
.site-foot {
    position: relative;
    background: var(--dark);
    color: #CBD5E1;
    padding: 3.4rem 0 1.6rem;
    overflow: hidden;
}

.site-foot::after {
    content: "";
    position: absolute;
    right: -50px;
    bottom: -60px;
    width: 360px;
    height: 360px;
    opacity: 0.06;
    pointer-events: none;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cg fill='none' stroke='%23ffffff' stroke-width='4'%3E%3Cpath d='M40 20c30 20 30 40 0 60s-30 40 0 60 30 40 0 60M160 20c-30 20-30 40 0 60s30 40 0 60-30 40 0 60'/%3E%3Cpath d='M52 44h96M46 80h108M46 120h108M52 156h96'/%3E%3C/g%3E%3C/svg%3E") no-repeat center / contain;
}

.foot-cols {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.4rem;
}

.foot-col { min-width: 0; color: #CBD5E1; }
.foot-col .widget + .widget { margin-top: 1.8rem; }

.foot-col .widget-title {
    margin: 0 0 1rem;
    font-size: 1.02rem;
    color: #F8FAFC;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.foot-col .widget-title::before {
    content: "";
    display: block;
    width: 40px;
    height: 2px;
    background: var(--teal);
    margin-bottom: 0.7rem;
}

.foot-col p { color: #CBD5E1; font-size: 0.94rem; }
.foot-col ul { list-style: none; margin: 0; padding: 0; }

.foot-col li {
    padding: 0.42rem 0 0.42rem 1rem;
    position: relative;
    font-size: 0.94rem;
    color: #CBD5E1;
}

.foot-col li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.95rem;
    width: 5px;
    height: 5px;
    background: var(--accent);
}

.foot-col a { color: #E2E8F0; text-decoration: none; }
.foot-col a:hover { color: var(--accent); }
.foot-col .post-date { display: block; color: #94A3B8; font-size: 0.8rem; }

.foot-bottom {
    position: relative;
    z-index: 2;
    margin-top: 2.8rem;
    padding-top: 1.3rem;
    border-top: 1px solid rgba(226, 232, 240, 0.14);
    font-size: 0.86rem;
    color: #94A3B8;
}

/* ---------- 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: #0B1220;
    border-top: 3px solid var(--accent);
    color: #E2E8F0;
    font-size: 0.9rem;
}

.cookie-banner p { margin: 0; max-width: 70ch; }
.cookie-banner .btn { padding: 0.6rem 1.4rem; font-size: 0.92rem; }

/* ---------- 404 ---------- */
.err-code {
    font-family: var(--face-head);
    font-size: 7rem;
    line-height: 1;
    color: var(--accent);
    margin: 0 0 0.6rem;
}

.err-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.6rem; }

/* ---------- Адаптив ---------- */
@media (max-width: 960px) {
    h1 { font-size: 2.6rem; }
    .entry-title { font-size: 2.1rem; }
    .layout-with-sidebar { grid-template-columns: minmax(0, 1fr); gap: 2.4rem; }
    .layout-single { width: 100%; }
    .sidebar { border-left: none; border-top: 3px solid var(--line); }
    .rubrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 2rem; }
    .stat:nth-child(2) { border-right: none; }
    .stat-num { font-size: 3.8rem; }
}

@media (max-width: 760px) {
    .nav-toggle { display: block; }

    .main-nav {
        display: none;
        width: 100%;
        margin-top: 0.8rem;
    }

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

    .main-nav ul {
        flex-direction: column;
        gap: 0.2rem;
        border-top: 1px solid rgba(226, 232, 240, 0.16);
        padding-top: 0.7rem;
    }

    .main-nav a { display: block; padding: 0.6rem 0; }

    .head-inner { flex-wrap: wrap; }
}

@media (max-width: 600px) {
    body { font-size: 16px; }
    h1 { font-size: 2.1rem; }
    h2 { font-size: 1.6rem; }
    .sec-title { font-size: 1.6rem; }
    .entry-title { font-size: 1.8rem; }

    .front-section { padding: 2.8rem 0; }
    .front-latest { padding: 2.8rem 0; }

    .hero { min-height: 440px; }
    .hero-inner { padding: 3.2rem 0; }
    .hero-plate { padding: 1.7rem 1.4rem; }

    .tline::before { left: 20px; }

    .tline-row {
        grid-template-columns: 44px minmax(0, 1fr);
        align-items: start;
        gap: 1rem;
    }

    .tline-row:nth-child(odd) .tline-card,
    .tline-row:nth-child(even) .tline-card { grid-column: 2; }

    .tline-num {
        grid-column: 1;
        grid-row: 1;
        width: 42px;
        height: 42px;
        font-size: 0.9rem;
        justify-self: start;
    }

    .stats {
        grid-template-columns: minmax(0, 1fr);
        padding: 1.7rem 1.4rem;
    }

    .stat { border-right: none; border-bottom: 1px solid var(--line); padding: 0 0 1.2rem; }
    .stat:last-child { border-bottom: none; padding-bottom: 0; }
    .stat-num { font-size: 3.4rem; }

    .rubrics { grid-template-columns: minmax(0, 1fr); }
    .rubric { padding: 1.4rem 1.2rem; }

    .foot-cols { grid-template-columns: minmax(0, 1fr); gap: 1.9rem; }

    .cookie-banner { padding: 0.9rem 1.1rem; }

    .err-code { font-size: 4.6rem; }
}
