/*
Theme Name: dds_pivpro.ru
Author: Алексей Смирнов
Description: Тема «Технологический журнал» для информационно-образовательного портала о пищевой промышленности и технологии напитков: швейцарская модульная сетка, холодная инженерная палитра, миллиметровка на фоне.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: pivpro
*/

/* ---------- Токены ---------- */
:root {
    --bg: #F4F7FA;
    --bg-alt: #E8EEF4;
    --head: #0F2A43;
    --foot: #0A1F33;
    --paper: #FFFFFF;
    --ink: #1B2A3A;
    --acc: #0077C2;
    --acc-deep: #005A94;
    --acc2: #00B4D8;
    --muted: #5A7085;
    --line: #D0DCE8;
    --line-dark: #1E3A5A;
    --soft: #B0C4D8;
    --font-head: "Inter Tight", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    --font-body: "IBM Plex Sans", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --gap: 5rem;
}

/* Скрытие элементов, которыми управляет JS (до основных стилей) */
.cookie-banner[hidden] { display: none !important; }

/* ---------- Сброс и база ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    overflow-x: hidden;
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--ink);
    background-color: var(--bg);
    background-image:
        linear-gradient(rgba(208, 220, 232, .55) 1px, transparent 1px),
        linear-gradient(90deg, rgba(208, 220, 232, .55) 1px, transparent 1px);
    background-size: 24px 24px;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* Контурный силуэт колбы в правом нижнем углу каждой страницы */
body::after {
    content: "";
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    width: 240px;
    height: 310px;
    opacity: .04;
    pointer-events: none;
    z-index: 1;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 260' fill='none' stroke='%230077C2' stroke-width='3' stroke-linejoin='round'%3E%3Cpath d='M74 8h52M82 8v74L26 198a28 28 0 0 0 25 44h98a28 28 0 0 0 25-44L118 82V8'/%3E%3Cpath d='M44 166h112'/%3E%3Cpath d='M82 34h14M82 52h14M82 70h14'/%3E%3Ccircle cx='84' cy='204' r='10'/%3E%3Ccircle cx='120' cy='188' r='6'/%3E%3Ccircle cx='112' cy='222' r='5'/%3E%3C/svg%3E") no-repeat center / contain;
}

img, svg, video { max-width: 100%; height: auto; }
img { display: block; }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-head);
    color: var(--ink);
    line-height: 1.18;
    letter-spacing: -0.015em;
    margin: 0 0 .7em;
    font-weight: 700;
}
h1 { font-size: clamp(2rem, 1.2rem + 3vw, 3.2rem); letter-spacing: -0.025em; }
h2 { font-size: clamp(1.55rem, 1.2rem + 1.3vw, 2.15rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.12rem; }

p { margin: 0 0 1.1em; }
ul, ol { margin: 0 0 1.1em; padding-left: 1.4em; }
li { margin-bottom: .35em; }

a {
    color: var(--acc);
    text-decoration: none;
}

/* Анимированное подчёркивание текстовых ссылок */
.entry-content a,
.archive-desc a,
.crumbs a,
.widget a,
.card-title a,
.form-note a,
.remark-text a {
    background-image: linear-gradient(var(--acc2), var(--acc2));
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 0 1px;
    transition: background-size .3s ease, color .2s ease;
}
.entry-content a:hover,
.archive-desc a:hover,
.crumbs a:hover,
.widget a:hover,
.card-title a:hover,
.form-note a:hover,
.remark-text a:hover { background-size: 100% 1px; }

:focus-visible { outline: 2px solid var(--acc2); outline-offset: 2px; }

table { width: 100%; border-collapse: collapse; margin: 0 0 1.4em; font-size: .95rem; }
table, th, td { border: 1px solid var(--line); }
th, td { padding: .6em .8em; text-align: left; vertical-align: top; }
th { background: var(--bg-alt); font-family: var(--font-head); font-weight: 600; }

blockquote {
    margin: 1.6em 0;
    padding: 1.2rem 1.5rem;
    background: var(--bg-alt);
    border-left: 3px solid var(--acc2);
    font-style: italic;
    quotes: none;
}
blockquote p:last-child { margin-bottom: 0; }

code, pre { font-family: "IBM Plex Mono", Consolas, monospace; font-size: .92em; }
pre { overflow-x: auto; padding: 1rem 1.2rem; background: var(--paper); border: 1px solid var(--line); }

hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }

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

.skip-link {
    position: absolute;
    left: 1rem;
    top: -4rem;
    z-index: 100;
    padding: .6rem 1rem;
    background: var(--acc);
    color: #fff;
}
.skip-link:focus { top: 1rem; }

/* ---------- Контейнер ширины (единственный) ---------- */
.shell {
    width: min(var(--shell-w, 92%), 1180px);
    margin-inline: auto;
}
.home .shell { --shell-w: 85%; }

/* ---------- Кнопки ---------- */
.btn {
    display: inline-block;
    padding: .78rem 1.45rem;
    border: 1.5px solid var(--acc);
    border-radius: 2px;
    background: var(--acc);
    color: #fff;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.3;
    text-align: center;
    cursor: pointer;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}
.btn:hover {
    background: var(--acc-deep);
    border-color: var(--acc-deep);
    color: #fff;
    transform: translateY(-1px);
}
.btn--ghost {
    background: transparent;
    color: var(--acc);
}
.btn--ghost:hover { background: var(--acc-deep); border-color: var(--acc-deep); color: #fff; }

/* ---------- Шапка ---------- */
.masthead {
    position: relative;
    z-index: 5;
    background: var(--head);
    border-top: 4px solid var(--acc2);
    color: #fff;
}
.masthead-row { padding: 1.3rem 0 1.1rem; }

.brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #fff;
}
.brand-mark { flex: 0 0 auto; }
.brand-logo { width: 56px; height: 56px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.brand-name {
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.35;
    color: #fff;
    max-width: 62ch;
}
.brand-tagline {
    font-size: .85rem;
    line-height: 1.45;
    color: var(--soft);
    max-width: 80ch;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.navbar { border-top: 1px solid var(--line-dark); }
.navbar-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .6rem 1.5rem;
    padding: .55rem 0;
}

.nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    padding: .55rem .9rem;
    background: transparent;
    border: 1.5px solid var(--line-dark);
    border-radius: 2px;
    color: #fff;
    font: 600 .95rem var(--font-head);
    cursor: pointer;
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--acc2);
    content: "";
    position: relative;
}
.nav-toggle-bars::before { position: absolute; top: -6px; }
.nav-toggle-bars::after { position: absolute; top: 6px; }

.mainnav { display: none; flex: 1 1 100%; order: 3; }
.mainnav.is-open { display: block; }
.mainnav-list { list-style: none; margin: 0; padding: 0; }
.mainnav-list li { margin: 0; }
.mainnav-list a {
    display: block;
    padding: .7rem 0;
    color: #DCE6F0;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 1rem;
    border-bottom: 1px solid var(--line-dark);
    transition: color .2s ease;
}
.mainnav-list a:hover { color: var(--acc2); }
.mainnav-list .current-menu-item > a,
.mainnav-list .current_page_item > a { color: var(--acc2); }
.mainnav-list .sub-menu { list-style: none; margin: 0; padding-left: 1rem; }

.navbar-search { flex: 1 1 220px; max-width: 340px; }
.navbar .finder-input {
    background: rgba(255, 255, 255, .06);
    border-color: var(--line-dark);
    color: #fff;
}
.navbar .finder-input::placeholder { color: var(--soft); }

/* ---------- Поиск ---------- */
.finder { display: flex; gap: 0; min-width: 0; }
.finder-input {
    flex: 1 1 auto;
    min-width: 0;
    padding: .6rem .8rem;
    border: 1.5px solid var(--line);
    border-right: 0;
    border-radius: 2px 0 0 2px;
    background: var(--paper);
    color: var(--ink);
    font: inherit;
    font-size: .95rem;
}
.finder-btn {
    flex: 0 0 auto;
    padding: .6rem 1rem;
    border: 1.5px solid var(--acc);
    border-radius: 0 2px 2px 0;
    background: var(--acc);
    color: #fff;
    font: 600 .95rem var(--font-head);
    cursor: pointer;
    transition: background-color .2s ease;
}
.finder-btn:hover { background: var(--acc-deep); border-color: var(--acc-deep); }

/* ---------- Заголовки секций и маркеры ---------- */
.sect-title {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.4rem;
}
.sect-title::before {
    content: "";
    flex: 0 0 36px;
    height: 4px;
    margin-top: .55em;
    background: var(--acc);
}
.sect-lead { max-width: 68ch; color: var(--muted); margin-bottom: 2.4rem; }

.entry-content h2::before,
.entry-content h3::before,
.remarks-title::before,
.widget-title::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: .6em;
    vertical-align: .2em;
    background: var(--acc);
}

/* ---------- Внутренние страницы ---------- */
.page-wrap { padding: 2rem 0 var(--gap); position: relative; z-index: 2; }

.crumbs {
    font-size: .88rem;
    color: var(--muted);
    margin-bottom: 1.8rem;
}
.crumbs-sep { margin: 0 .35em; color: var(--acc2); }

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

.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    row-gap: 3rem;
}
.content-area { min-width: 0; }

.page-head { margin-bottom: 2rem; }
.page-title { margin-bottom: .4em; }
.archive-desc { color: var(--muted); max-width: 70ch; }
.page-intro { margin-top: 1rem; }

.entry-head { margin-bottom: 1.6rem; }
.entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem 1rem;
    font-size: .9rem;
    color: var(--muted);
}
.entry-cover { margin: 0 0 2rem; border-bottom: 3px solid var(--acc2); }
.entry-cover img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }

.entry-content { max-width: 74ch; }
.entry-content h2 { margin-top: 1.8em; }
.entry-content h3 { margin-top: 1.5em; }
.entry-content img { height: auto; }
.entry-content figure { margin: 1.6em 0; }
.entry-content figcaption { font-size: .88rem; color: var(--muted); margin-top: .5em; }
.entry-content .alignleft { float: left; margin: .3em 1.4em 1em 0; }
.entry-content .alignright { float: right; margin: .3em 0 1em 1.4em; }
.entry-content .aligncenter { margin-left: auto; margin-right: auto; }

.entry-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1rem;
    margin-top: 2.4rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--line);
}

.post-cats a,
.entry-tags a { color: var(--muted); transition: color .2s ease; }
.post-cats a:hover,
.entry-tags a:hover { color: var(--acc); }

.empty-note { color: var(--muted); }
.empty-block .finder { max-width: 480px; }

/* ---------- Сайдбар ---------- */
.sidebar {
    min-width: 0;
    align-self: start;
    background: var(--paper);
    border-left: 2px solid var(--acc);
    padding: 1.7rem 1.6rem;
    color: var(--ink);
}
.sidebar .widget { margin-bottom: 2.2rem; }
.sidebar .widget:last-child { margin-bottom: 0; }
.sidebar .widget-title { font-size: 1.1rem; color: var(--ink); margin-bottom: 1rem; }
.sidebar .widget,
.sidebar .widget p,
.sidebar .widget li { color: var(--ink); }
.sidebar .widget a { color: var(--acc); }
.sidebar .widget a:hover { color: var(--acc-deep); }
.sidebar .post-date { color: var(--muted); font-size: .85rem; display: block; }
.sidebar ul { list-style: none; padding: 0; margin: 0; }
.sidebar li {
    padding: .65rem 0;
    margin: 0;
    border-bottom: 1px solid var(--line);
    line-height: 1.45;
}
.sidebar li:last-child { border-bottom: 0; }

/* ---------- Карточки ---------- */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
    gap: 1.6rem;
}

.card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 0;
    transition: border-color .2s ease, transform .2s ease;
}
.card:hover { border-color: var(--acc); transform: translateY(-2px); }

.card-thumb { border-bottom: 3px solid var(--acc2); }
.card-thumb a { display: block; }
.card-thumb img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 1.2rem 1.3rem 1.4rem;
}
.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .3rem .9rem;
    font-size: .84rem;
    color: var(--muted);
    margin-bottom: .6rem;
}
.card-title { font-size: 1.18rem; line-height: 1.3; margin-bottom: .7rem; }
.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--acc); }
.card-excerpt { flex: 1; font-size: .96rem; color: #34465A; }
.card-excerpt p { margin: 0 0 .5em; background: none; }
.card-more {
    align-self: flex-start;
    margin-top: .8rem;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: .95rem;
    color: var(--acc);
    background-image: linear-gradient(var(--acc2), var(--acc2));
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 0 1px;
    transition: background-size .3s ease;
}
.card-more:hover { background-size: 100% 1px; }

.sticky .card-body { box-shadow: inset 4px 0 0 var(--acc2); }

/* ---------- Пагинация (type => plain) ---------- */
.pager {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    margin-top: 2.8rem;
}
.pager .page-numbers,
.pager > a,
.pager > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.6rem;
    padding: .5rem .85rem;
    border: 1px solid var(--line);
    border-radius: 2px;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-head);
    font-weight: 600;
    font-size: .95rem;
    line-height: 1.2;
    transition: border-color .2s ease, color .2s ease, background-color .2s ease;
}
.pager a.page-numbers:hover,
.pager > a:hover { border-color: var(--acc); color: var(--acc); }
.pager .page-numbers.current,
.pager > .current {
    background: var(--acc);
    border-color: var(--acc);
    color: #fff;
}
.pager .page-numbers.dots { border: 0; background: none; min-width: auto; padding-inline: .3rem; }

/* ---------- Главная ---------- */
.fp-section { position: relative; z-index: 2; padding: var(--gap) 0; }

/* Hero */
.fp-hero {
    position: relative;
    z-index: 2;
    overflow: hidden;
    background: var(--head);
    color: #fff;
}
.fp-hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.fp-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(15, 42, 67, .7);
}
.fp-hero-inner {
    position: relative;
    z-index: 2;
    padding: 6rem 0 6.5rem;
}
.fp-hero-text {
    max-width: 46rem;
    border-left: 4px solid var(--acc2);
    padding: .4rem 0 .4rem 1.8rem;
}
.fp-hero-title { color: #fff; margin-bottom: 1.1rem; }
.fp-hero-lead { color: var(--soft); font-size: 1.15rem; max-width: 58ch; margin-bottom: 2rem; }
.fp-hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; }
.fp-hero .btn--ghost { color: #fff; }

/* Шаги */
.fp-steps { background: var(--bg-alt); }
.steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
}
.step {
    margin: 0;
    padding: 1.6rem 0;
    min-width: 0;
    border-top: 1px dashed var(--line);
}
.step:first-child { border-top: 0; padding-top: 0; }
.step-num {
    display: block;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 3.2rem;
    line-height: 1;
    letter-spacing: -0.03em;
    color: var(--acc);
    margin-bottom: 1rem;
}
.step-title { font-size: 1.25rem; margin-bottom: .5rem; }
.step-text { color: var(--muted); font-size: .97rem; margin: 0; }

/* Последние записи */
.fp-latest-more { margin-top: 2.4rem; }

/* Статистика */
.fp-facts {
    background-color: var(--head);
    background-image:
        linear-gradient(var(--line-dark) 1px, transparent 1px),
        linear-gradient(90deg, var(--line-dark) 1px, transparent 1px);
    background-size: 24px 24px;
    color: #fff;
}
.fp-facts .sect-title { color: #fff; }
.facts {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    background: var(--head);
    border: 1px solid var(--line-dark);
}
.fact {
    margin: 0;
    padding: 2rem 1.5rem;
    min-width: 0;
    border-right: 1px solid var(--line-dark);
    border-bottom: 1px solid var(--line-dark);
}
.fact:nth-child(2n) { border-right: 0; }
.fact:nth-child(n+3) { border-bottom: 0; }
.fact-num {
    display: block;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: clamp(2.6rem, 2rem + 2.4vw, 3.8rem);
    line-height: 1;
    letter-spacing: -0.03em;
    color: var(--acc2);
    margin-bottom: .7rem;
}
.fact-label { display: block; color: var(--soft); font-size: 1rem; line-height: 1.4; }

/* Глоссарий */
.glossary {
    margin: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2.2rem 4rem;
}
.term {
    min-width: 0;
    border-left: 2px solid var(--acc2);
    padding: .1rem 0 .1rem 1.2rem;
}
.term dt {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--ink);
    margin-bottom: .4rem;
}
.term dd { margin: 0; color: var(--muted); }

/* ---------- Комментарии ---------- */
.remarks { margin-top: 3.5rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.remarks-title { font-size: 1.5rem; }
.remarks-list, .remarks-list .children { list-style: none; margin: 0; padding: 0; }
.remarks-list .children { padding-left: 1.6rem; border-left: 1px solid var(--line); }
.remark { margin: 0 0 1.2rem; }
.remark-body {
    background: var(--paper);
    border: 1px solid var(--line);
    padding: 1.1rem 1.3rem;
}
.remark-head { display: flex; align-items: center; gap: .8rem; margin-bottom: .6rem; }
.remark-head img { border-radius: 0; }
.remark-who { display: flex; flex-direction: column; }
.remark-author { font-family: var(--font-head); font-weight: 600; }
.remark-date { font-size: .84rem; color: var(--muted); }
.remark-wait { font-size: .9rem; color: var(--acc-deep); }
.remark-reply a { font-family: var(--font-head); font-weight: 600; font-size: .9rem; }
.remarks-closed { color: var(--muted); }

.comment-respond {
    margin-top: 2rem;
    background: var(--paper);
    border: 1px solid var(--line);
    padding: 1.6rem 1.6rem 1.8rem;
}
.comment-reply-title { font-size: 1.3rem; }
.comment-reply-title small { margin-left: .8rem; font-size: .85rem; }
.comment-form label { display: block; font-weight: 500; margin-bottom: .3rem; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    display: block;
    width: 100%;
    padding: .65rem .8rem;
    border: 1.5px solid var(--line);
    border-radius: 2px;
    background: var(--bg);
    color: var(--ink);
    font: inherit;
}
.comment-form input:focus,
.comment-form textarea:focus { border-color: var(--acc); outline: none; }
.comment-form-cookies-consent { display: flex; gap: .6rem; align-items: flex-start; }
.comment-form-cookies-consent label { display: inline; font-weight: 400; font-size: .92rem; }
.comment-form .submit {
    padding: .78rem 1.45rem;
    border: 1.5px solid var(--acc);
    border-radius: 2px;
    background: var(--acc);
    color: #fff;
    font: 600 1rem var(--font-head);
    cursor: pointer;
    transition: background-color .2s ease, transform .2s ease;
}
.comment-form .submit:hover { background: var(--acc-deep); border-color: var(--acc-deep); transform: translateY(-1px); }
.form-note { font-size: .9rem; color: var(--muted); }
.req { color: var(--acc); }

/* ---------- 404 ---------- */
.nf { padding: 2rem 0; }
.nf-code {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: clamp(5rem, 3rem + 8vw, 9rem);
    line-height: 1;
    letter-spacing: -0.04em;
    color: var(--acc);
    margin-bottom: .2em;
}
.nf-text { color: var(--muted); max-width: 60ch; }
.nf .finder { max-width: 480px; margin: 1.6rem 0; }

/* ---------- Подвал ---------- */
.sitefoot {
    position: relative;
    z-index: 2;
    background: var(--foot);
    color: #C3D2E0;
    border-top: 4px solid var(--acc2);
}
.sitefoot-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2.5rem;
    padding: 3.5rem 0 3rem;
}
.sitefoot-col { min-width: 0; }
.sitefoot .widget { margin-bottom: 1.5rem; }
.sitefoot .widget-title { color: #fff; font-size: 1.08rem; margin-bottom: 1rem; }
.sitefoot .widget-title::before { background: var(--acc2); }
.sitefoot .widget,
.sitefoot .widget p,
.sitefoot .widget li,
.sitefoot .textwidget { color: #C3D2E0; font-size: .95rem; line-height: 1.6; }
.sitefoot .widget a { color: #7FD3EA; }
.sitefoot .widget a:hover { color: #fff; }
.sitefoot ul { list-style: none; margin: 0; padding: 0; }
.sitefoot li { margin: 0 0 .55rem; }
.sitefoot .post-date { color: #8FA5BA; }
.sitefoot-bottom { border-top: 1px solid var(--line-dark); }
.copyright { margin: 0; padding: 1.2rem 0; font-size: .88rem; color: #8FA5BA; }

/* ---------- Cookie-баннер ---------- */
.cookie-banner {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 50;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
    padding: 1.2rem 1.4rem;
    background: var(--head);
    border-top: 3px solid var(--acc2);
    color: #DCE6F0;
}
.cookie-banner-text { margin: 0; font-size: .93rem; line-height: 1.5; color: #DCE6F0; }
.cookie-banner-btn { align-self: flex-start; }

/* ---------- Адаптив: от 600px ---------- */
@media (min-width: 600px) {
    .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 2rem; }
    .step,
    .step:first-child { padding: 1.6rem 1.6rem 1.6rem 0; border-top: 1px dashed var(--line); }
    .step:nth-child(-n+2) { border-top: 0; padding-top: 0; }
    .glossary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sitefoot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cookie-banner { flex-direction: row; align-items: center; justify-content: space-between; gap: 1.5rem; padding: 1.1rem 1.6rem; }
    .cookie-banner-btn { align-self: center; flex: 0 0 auto; }
}

/* ---------- Адаптив: от 960px ---------- */
@media (min-width: 960px) {
    .nav-toggle { display: none; }
    .mainnav,
    .mainnav.is-open { display: block; flex: 1 1 auto; order: 0; }
    .mainnav-list { display: flex; flex-wrap: wrap; gap: 0 2rem; }
    .mainnav-list > li { position: relative; }
    .mainnav-list a {
        padding: .55rem 0;
        border-bottom: 0;
        box-shadow: inset 0 -2px 0 transparent;
        transition: color .2s ease, box-shadow .2s ease;
    }
    .mainnav-list .current-menu-item > a,
    .mainnav-list .current_page_item > a { box-shadow: inset 0 -2px 0 var(--acc2); }
    .mainnav-list .sub-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        z-index: 10;
        min-width: 220px;
        padding: .4rem 1rem;
        background: var(--head);
        border-top: 2px solid var(--acc2);
    }
    .mainnav-list li:hover > .sub-menu,
    .mainnav-list li:focus-within > .sub-menu { display: block; }

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

    .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 0; }
    .step,
    .step:first-child,
    .step:nth-child(-n+2) {
        border-top: 0;
        padding: 0 1.8rem;
        border-left: 1px dashed var(--line);
    }
    .step:first-child { border-left: 0; padding-left: 0; }

    .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .fact,
    .fact:nth-child(2n),
    .fact:nth-child(n+3) { border-bottom: 0; border-right: 1px solid var(--line-dark); padding: 2.4rem 1.8rem; }
    .fact:last-child { border-right: 0; }

    .cards--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

    .sitefoot-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3.5rem; }
    .fp-hero-inner { padding: 8rem 0 8.5rem; }
}

/* ---------- Адаптив: до 600px ---------- */
@media (max-width: 599px) {
    :root { --gap: 3.5rem; }
    .home .shell { --shell-w: 92%; }
    .layout-single .content-area { width: auto; }
    .brand-logo { width: 46px; height: 46px; }
    .brand-name { font-size: .92rem; }
    .brand-tagline { display: none; }
    .navbar-search { max-width: none; flex-basis: 100%; }
    .fp-hero-inner { padding: 4rem 0 4.5rem; }
    .fp-hero-text { padding-left: 1.2rem; }
    .fp-hero-lead { font-size: 1.02rem; }
    .fact { padding: 1.6rem 1.1rem; }
    .sidebar { padding: 1.4rem 1.2rem; }
    .comment-respond { padding: 1.3rem 1.2rem 1.5rem; }
    .cookie-banner { padding: 1.1rem 1.2rem; }
    .entry-content .alignleft,
    .entry-content .alignright { float: none; margin: 1em 0; }
}

@media (max-width: 959px) {
    .layout-single .content-area { width: auto; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; animation: none !important; }
}
