/*
Theme Name: dds_filleyphotography.com
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: flphoto
*/

/* ---------- Токены ---------- */
:root {
    --bg: #F4F6F8;
    --bg-alt: #E6EAF0;
    --bg-accent-end: #DCE3EA;
    --white: #FFFFFF;
    --foot: #2C3A47;
    --text: #1F2A36;
    --muted: #6B7A8A;
    --accent: #3D7EA6;
    --accent-dark: #2F6789;
    --amber: #F2A65A;
    --line: #D0D7DE;
    --font-head: "Barlow Condensed", "Roboto Condensed", "Arial Narrow", sans-serif;
    --font-body: "Inter", "Source Sans Pro", "Segoe UI", Arial, sans-serif;
    --radius: 6px;
}

/* ---------- Состояния hidden (до основных стилей) ---------- */
.cookie-banner[hidden] { display: none !important; }

/* ---------- База ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

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

body {
    margin: 0;
    overflow-x: hidden;
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--text);
    background-color: var(--bg);
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 220' fill='none' stroke='%233D7EA6' stroke-width='3' opacity='0.14'%3E%3Crect x='10' y='8' width='140' height='192'/%3E%3Crect x='22' y='20' width='116' height='168'/%3E%3Cline x1='80' y1='20' x2='80' y2='188'/%3E%3Cline x1='22' y1='78' x2='138' y2='78'/%3E%3Crect x='90' y='90' width='38' height='88' stroke-dasharray='4 5'/%3E%3Cline x1='2' y1='210' x2='158' y2='210'/%3E%3Ccircle cx='98' cy='134' r='3' fill='%233D7EA6'/%3E%3C/svg%3E"),
        repeating-linear-gradient(45deg, rgba(31, 42, 54, 0.035) 0 1px, transparent 1px 24px),
        repeating-linear-gradient(-45deg, rgba(31, 42, 54, 0.035) 0 1px, transparent 1px 24px);
    background-repeat: no-repeat, repeat, repeat;
    background-position: right 2.5% bottom 2.5%, 0 0, 0 0;
    background-size: 150px auto, auto, auto;
    background-attachment: fixed, scroll, scroll;
}

body::before {
    content: "";
    display: block;
    height: 3px;
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent) 55%, var(--amber) 100%);
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-head);
    font-weight: 600;
    line-height: 1.15;
    color: var(--text);
    margin: 1.6em 0 0.6em;
    letter-spacing: 0.005em;
}
h1 { font-size: 2.4rem; }
h2 { font-size: 1.9rem; }
h3 { font-size: 1.45rem; }
h4 { font-size: 1.2rem; }

p { margin: 0 0 1.1em; }

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}
a:hover { color: var(--accent-dark); }
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--amber);
    outline-offset: 2px;
}

/* Анимированное подчёркивание снизу вверх — для текстовых ссылок */
.entry-content a,
.card-excerpt a,
.page-lead a,
.crumbs a,
.sidebar .widget a,
.comment-content a {
    background-image: linear-gradient(currentColor, currentColor);
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 100% 0;
    padding-bottom: 1px;
    transition: background-size 0.25s ease, color 0.2s ease;
}
.entry-content a:hover,
.card-excerpt a:hover,
.page-lead a:hover,
.crumbs a:hover,
.sidebar .widget a:hover,
.comment-content a:hover { background-size: 100% 2px; }

table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 1.4em;
    border: 1px solid var(--line);
    background: var(--white);
}
th, td {
    border: 1px solid var(--line);
    padding: 0.6em 0.8em;
    text-align: left;
    vertical-align: top;
}
th { background: var(--bg-alt); font-weight: 600; }

blockquote {
    margin: 1.6em 0;
    padding: 1.1em 1.4em;
    border-left: 2px solid var(--accent);
    background: var(--white);
    color: var(--text);
}
blockquote p:last-child { margin-bottom: 0; }

code, pre { font-family: Consolas, "Courier New", monospace; font-size: 0.92em; }
pre { overflow-x: auto; padding: 1rem 1.2rem; background: var(--white); border: 1px solid var(--line); border-radius: 4px; }

.screen-reader-text {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}
.skip-link:focus {
    clip: auto;
    width: auto; height: auto;
    top: 8px; left: 8px;
    z-index: 100;
    padding: 0.6em 1em;
    background: var(--white);
    color: var(--text);
}

/* ---------- Контейнер ---------- */
.shell {
    width: min(92%, 1180px);
    margin-inline: auto;
}

/* ---------- Кнопки ---------- */
.btn {
    display: inline-block;
    padding: 0.72em 1.4em;
    border: 1px solid var(--accent);
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn-primary { background: var(--accent); color: var(--white); }
.btn-primary:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(31, 42, 54, 0.18);
}
.btn-ghost { background: transparent; color: var(--accent); }
.btn-ghost:hover {
    background: rgba(61, 126, 166, 0.08);
    color: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(31, 42, 54, 0.1);
}
.btn-ghost-light { border-color: rgba(255, 255, 255, 0.75); color: var(--white); }
.btn-ghost-light:hover { background: rgba(255, 255, 255, 0.12); color: var(--white); }

/* ---------- Шапка ---------- */
.masthead { background: var(--white); border-bottom: 1px solid var(--line); }

.masthead-inner {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.1rem 0 1rem;
}
.brand-mark { flex: 0 0 auto; display: block; line-height: 0; }
.brand-logo { display: block; width: 56px; height: 56px; object-fit: contain; }
.brand-text { min-width: 0; max-width: 860px; }
.brand-name {
    margin: 0 0 0.35em;
    font-family: var(--font-head);
    font-size: 1.12rem;
    font-weight: 600;
    line-height: 1.3;
}
.brand-name a { color: var(--text); }
.brand-name a:hover { color: var(--accent); }
.brand-desc {
    margin: 0;
    font-size: 0.84rem;
    line-height: 1.5;
    color: var(--muted);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.navbar { border-top: 1px solid var(--bg-alt); }
.navbar-inner { position: relative; }

.nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0.6rem 0;
    padding: 0.5em 0.9em;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--white);
    color: var(--text);
    font: 600 0.95rem var(--font-body);
    cursor: pointer;
}
.nav-toggle-lines,
.nav-toggle-lines::before,
.nav-toggle-lines::after {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--text);
    content: "";
    position: relative;
}
.nav-toggle-lines::before { position: absolute; top: -6px; }
.nav-toggle-lines::after { position: absolute; top: 6px; }

.primary-nav { display: none; padding-bottom: 0.8rem; }
.primary-nav.is-open { display: block; }

.nav-list { list-style: none; margin: 0; padding: 0; }
.nav-list li { position: relative; }
.nav-list a {
    display: block;
    padding: 0.55em 0;
    font-family: var(--font-head);
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--text);
    border-bottom: 1px solid var(--bg-alt);
}
.nav-list a:hover,
.nav-list .current-menu-item > a { color: var(--accent); }
.nav-list .sub-menu { list-style: none; margin: 0; padding: 0 0 0 1rem; }

/* ---------- Хлебные крошки ---------- */
.crumbs {
    margin: 1.6rem 0 1.2rem;
    font-size: 0.86rem;
    color: var(--muted);
}
.crumbs a { color: var(--accent); }
.crumbs .sep { margin: 0 0.35em; color: var(--muted); }
.crumbs span:last-child { color: var(--text); }

/* ---------- Раскладки ---------- */
.site-body { padding-bottom: 4rem; }

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

.layout-with-sidebar { display: block; }
.content-area { min-width: 0; }

.sidebar {
    min-width: 0;
    margin-top: 2.5rem;
    padding: 1.5rem 1.4rem;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    align-self: start;
}

/* ---------- Заголовки страниц и секций ---------- */
.page-head { margin-bottom: 2rem; }
.page-title {
    margin: 0 0 0.4em;
    font-size: 2.4rem;
}
.page-lead { margin: 0; color: var(--muted); max-width: 64ch; }

.section-title {
    margin: 0 0 0.5em;
    padding-left: 14px;
    border-left: 2px solid var(--accent);
    font-size: 2.1rem;
    line-height: 1.1;
}
.section-lead { margin: 0 0 2rem; color: var(--muted); max-width: 62ch; }
.section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.8rem;
}
.section-head .section-title { margin: 0; }

/* Разделитель «как на плане»: пунктир с точкой на конце */
.plan-line {
    position: relative;
    height: 12px;
    margin: 3.5rem 0;
}
.plan-line::before {
    content: "";
    position: absolute;
    left: 0;
    right: 12px;
    top: 50%;
    border-top: 1px dashed #9AA8B6;
}
.plan-line::after {
    content: "";
    position: absolute;
    right: 0;
    top: 50%;
    width: 8px;
    height: 8px;
    margin-top: -4px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 3px var(--bg);
}

/* ---------- Главная ---------- */
.front-main {
    width: 85%;
    margin: 2.2rem auto 0;
}

.fp-section {
    margin: 3.5rem 0;
    padding: 3.2rem 3rem;
    border-radius: var(--radius);
}

/* Hero */
.fp-hero {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: 520px;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--foot);
}
.fp-hero-img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.fp-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, rgba(31, 42, 54, 0.9) 0%, rgba(44, 58, 71, 0.72) 42%, rgba(61, 126, 166, 0.32) 100%);
}
.fp-hero-body {
    position: relative;
    z-index: 1;
    max-width: 640px;
    padding: 3.2rem 3rem;
    text-align: left;
    color: var(--white);
}
.fp-hero-kicker {
    margin: 0 0 0.9rem;
    padding-left: 14px;
    border-left: 2px solid var(--amber);
    font-size: 0.92rem;
    color: #D5DEE6;
}
.fp-hero-title {
    margin: 0 0 0.5em;
    font-size: 3.2rem;
    line-height: 1.02;
    font-weight: 700;
    color: var(--white);
}
.fp-hero-lead { margin: 0 0 1.8rem; color: #DCE3EA; font-size: 1.04rem; }
.fp-hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; }

/* Статистика */
.fp-stats { background: var(--bg-alt); }
.stats-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.8rem 1.4rem;
}
.stat-item {
    min-width: 0;
    padding-top: 1rem;
    border-top: 1px solid #C5CFD9;
}
.stat-num {
    display: block;
    font-family: var(--font-head);
    font-size: 4.2rem;
    font-weight: 700;
    line-height: 1;
    color: var(--text);
}
.stat-num small {
    margin-left: 0.12em;
    font-size: 0.42em;
    font-weight: 600;
    color: var(--accent);
}
.stat-label {
    display: block;
    margin-top: 0.4rem;
    font-size: 0.95rem;
    color: var(--muted);
}

/* Последние записи */
.fp-latest { background: linear-gradient(180deg, var(--bg-alt) 0%, var(--bg-accent-end) 100%); }
.empty-note { color: var(--muted); }

/* Чек-лист */
.fp-checklist { background: var(--bg); border: 1px solid var(--bg-alt); }
.check-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-width: 780px;
}
.check-list li {
    position: relative;
    padding: 0.95rem 0 0.95rem 2.6rem;
    border-bottom: 1px solid var(--bg-alt);
}
.check-list li:last-child { border-bottom: 0; }
.check-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 1.15rem;
    width: 22px;
    height: 22px;
    border-radius: 3px;
    background: var(--accent);
}
.check-list li::after {
    content: "";
    position: absolute;
    left: 7px;
    top: 1.32rem;
    width: 7px;
    height: 12px;
    border: solid var(--white);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.check-list strong { color: var(--text); }

/* CTA */
.fp-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.6rem 2.4rem;
    margin: 3.5rem 0 0;
    padding: 3rem 2.8rem;
    border-radius: var(--radius);
    background: var(--foot);
    color: #D5DEE6;
}
.fp-cta-text { flex: 1 1 420px; min-width: 0; }
.fp-cta-title {
    position: relative;
    margin: 0 0 0.5em;
    padding-top: 1rem;
    font-size: 2.1rem;
    color: var(--white);
}
.fp-cta-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 40px;
    height: 3px;
    background: var(--amber);
}
.fp-cta p { margin: 0; color: #C6D1DB; max-width: 58ch; }
.fp-cta .btn-primary { flex: 0 0 auto; }
.fp-cta .btn-primary:hover { box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35); }

/* ---------- Карточки записей ---------- */
.cards-grid {
    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(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: border-color 0.2s ease, box-shadow 0.25s ease;
}
.card:hover {
    border-color: var(--accent);
    box-shadow: 0 12px 30px rgba(31, 42, 54, 0.09);
}
.card-thumb { display: block; overflow: hidden; }
.card-thumb img,
.card-img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}
.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 1.2rem 1.3rem 1.3rem;
}
.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem 0.8rem;
    margin-bottom: 0.6rem;
    font-size: 0.82rem;
    color: var(--muted);
}
.card-title {
    margin: 0 0 0.55em;
    font-size: 1.4rem;
    line-height: 1.18;
}
.card-title a { color: var(--text); }
.card-title a:hover { color: var(--accent); }
.card-title::before,
.entry-title::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 0.55em;
    background: var(--accent);
    vertical-align: 0.2em;
}
.card-excerpt {
    flex: 1;
    font-size: 0.94rem;
    color: #3A4756;
}
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-more {
    align-self: flex-start;
    margin-top: 0.8rem;
    font-weight: 600;
    font-size: 0.92rem;
}

/* Метки рубрик в квадратных скобках */
.cat-labels { display: inline-flex; flex-wrap: wrap; gap: 0.2rem 0.6rem; }
.cat-label { color: var(--accent); background: none; font-weight: 500; }
.cat-label::before { content: "["; color: var(--muted); margin-right: 0.1em; }
.cat-label::after { content: "]"; color: var(--muted); margin-left: 0.1em; }
.cat-label:hover { color: var(--accent-dark); }

/* ---------- Запись и страница ---------- */
.entry {
    padding: 2.4rem 2.2rem;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.entry-head { margin-bottom: 1.5rem; }
.entry-title { margin: 0 0 0.4em; font-size: 2.6rem; line-height: 1.08; }
.entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem 1rem;
    font-size: 0.88rem;
    color: var(--muted);
}
.entry-cover { margin: 0 0 1.8rem; }
.entry-cover img { display: block; width: 100%; height: auto; border-radius: 4px; }
.entry-content { font-size: 1.04rem; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content h2 {
    padding-left: 12px;
    border-left: 2px solid var(--accent);
}
.entry-content ul,
.entry-content ol { padding-left: 1.4em; margin: 0 0 1.2em; }
.entry-content li { margin-bottom: 0.35em; }
.entry-content img { display: block; border-radius: 4px; }
.entry-content figure { margin: 1.6em 0; }
.entry-content figcaption,
.wp-caption-text { font-size: 0.85rem; color: var(--muted); margin-top: 0.5em; }
.alignleft { float: left; margin: 0.3em 1.4em 1em 0; }
.alignright { float: right; margin: 0.3em 0 1em 1.4em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.entry-content::after { content: ""; display: table; clear: both; }
.page-links { margin-top: 1.5rem; font-weight: 600; }
.entry-tags {
    margin-top: 2rem;
    padding-top: 1.2rem;
    border-top: 1px dashed var(--line);
    font-size: 0.9rem;
}
.entry-tags a { margin-right: 0.6rem; }
.entry-tags a::before { content: "["; color: var(--muted); }
.entry-tags a::after { content: "]"; color: var(--muted); }
.tags-caption { color: var(--muted); margin-right: 0.4rem; }

.post-navigation { margin-top: 2rem; }
.post-navigation .nav-links {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
}
.post-navigation a {
    display: block;
    height: auto;
    padding: 1rem 1.2rem;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: border-color 0.2s ease;
}
.post-navigation a:hover { border-color: var(--accent); }
.nav-caption { display: block; font-size: 0.8rem; color: var(--muted); }
.nav-name { display: block; font-family: var(--font-head); font-size: 1.2rem; font-weight: 600; color: var(--text); }
.post-navigation .nav-next { text-align: right; }

/* ---------- Пагинация (type => plain) ---------- */
.pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    margin-top: 2.6rem;
}
.pager .page-numbers {
    display: inline-block;
    min-width: 2.5rem;
    padding: 0.5em 0.85em;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--white);
    color: var(--text);
    font-weight: 600;
    font-size: 0.92rem;
    text-align: center;
    line-height: 1.2;
    transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.pager a.page-numbers:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}
.pager .page-numbers.current {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--white);
}
.pager .page-numbers.dots {
    border: 0;
    background: none;
    min-width: 0;
    padding-left: 0.2em;
    padding-right: 0.2em;
}

/* ---------- Поиск ---------- */
.search-box {
    display: flex;
    gap: 0.5rem;
    max-width: 520px;
    margin: 1rem 0 1.4rem;
}
.search-field {
    flex: 1;
    min-width: 0;
    padding: 0.7em 0.9em;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--white);
    color: var(--text);
    font: 400 0.95rem var(--font-body);
}
.search-field:focus { border-color: var(--accent); }
.empty-block { padding: 1.6rem 1.8rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }

/* ---------- 404 ---------- */
.not-found { padding: 2rem 0; }
.not-found-code {
    margin: 0;
    font-family: var(--font-head);
    font-size: 7rem;
    font-weight: 700;
    line-height: 1;
    color: var(--accent);
}

/* ---------- Комментарии ---------- */
.comments {
    margin-top: 2rem;
    padding: 2rem 2.2rem;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.comments-title { margin-top: 0; font-size: 1.7rem; }
.comment-list { list-style: none; margin: 0 0 2rem; padding: 0; }
.comment-list .children { list-style: none; margin: 0; padding-left: 1.6rem; }
.comment-body {
    padding: 1rem 0;
    border-bottom: 1px solid var(--bg-alt);
}
.comment-author { display: flex; align-items: center; gap: 0.6rem; font-weight: 600; }
.comment-author .avatar { border-radius: 50%; display: block; }
.comment-author .says { display: none; }
.comment-metadata { font-size: 0.8rem; margin: 0.2rem 0 0.6rem; }
.comment-metadata a { color: var(--muted); }
.reply a { font-size: 0.85rem; font-weight: 600; }
.comment-respond { margin-top: 1rem; }
.comment-reply-title { margin-top: 0; font-size: 1.5rem; }
.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.7em 0.9em;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--bg);
    color: var(--text);
    font: 400 0.95rem var(--font-body);
}
.comment-form .comment-form-cookies-consent label { display: inline; font-weight: 400; }
.comment-form .submit {
    padding: 0.72em 1.4em;
    border: 1px solid var(--accent);
    border-radius: 4px;
    background: var(--accent);
    color: var(--white);
    font: 600 0.95rem var(--font-body);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.comment-form .submit:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(31, 42, 54, 0.18); }
.comment-notes, .logged-in-as { font-size: 0.85rem; color: var(--muted); }

/* ---------- Виджеты: сайдбар (светлый фон) ---------- */
.sidebar .widget { margin-bottom: 2rem; color: var(--text); }
.sidebar .widget:last-child { margin-bottom: 0; }
.sidebar .widget-title {
    margin: 0 0 0.9rem;
    padding-left: 12px;
    border-left: 2px solid var(--accent);
    font-size: 1.35rem;
    color: var(--text);
}
.sidebar .widget ul { list-style: none; margin: 0; padding: 0; }
.sidebar .widget li { padding: 0.55rem 0; border-bottom: 1px dashed var(--line); }
.sidebar .widget li:last-child { border-bottom: 0; }
.sidebar .widget a { color: var(--text); font-weight: 500; }
.sidebar .widget a:hover { color: var(--accent); }
.sidebar .widget .post-date { display: block; margin-top: 0.15rem; font-size: 0.8rem; color: var(--muted); }
.sidebar .widget p { color: var(--text); }

/* ---------- Подвал (тёмный фон) ---------- */
.site-foot {
    background: var(--foot);
    color: #C6D1DB;
}
.foot-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2.2rem;
    padding: 3.2rem 0 2.4rem;
}
.foot-col { min-width: 0; }
.site-foot .widget { margin-bottom: 1.6rem; color: #C6D1DB; }
.site-foot .widget:last-child { margin-bottom: 0; }
.site-foot .widget-title {
    margin: 0 0 0.9rem;
    padding-left: 12px;
    border-left: 2px solid var(--amber);
    font-size: 1.3rem;
    color: #FFFFFF;
}
.site-foot .widget p,
.site-foot .widget .textwidget { color: #C6D1DB; font-size: 0.92rem; }
.site-foot .widget ul { list-style: none; margin: 0; padding: 0; }
.site-foot .widget li { padding: 0.35rem 0; }
.site-foot .widget a { color: #E3EAF0; }
.site-foot .widget a:hover { color: var(--amber); }
.site-foot .widget .post-date { color: #9FB0C0; font-size: 0.8rem; }
.foot-bottom { border-top: 1px solid rgba(255, 255, 255, 0.1); }
.copyright {
    margin: 0;
    padding: 1.2rem 0 1.4rem;
    font-size: 0.82rem;
    line-height: 1.5;
    color: #9FB0C0;
}

/* ---------- Cookie-баннер ---------- */
.cookie-banner {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 90;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.9rem 1.4rem;
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
    padding: 1rem 1.3rem;
    background: var(--white);
    border: 1px solid var(--line);
    border-top: 3px solid var(--accent);
    border-radius: var(--radius);
    box-shadow: 0 14px 34px rgba(31, 42, 54, 0.18);
}
.cookie-text { flex: 1 1 320px; min-width: 0; margin: 0; font-size: 0.88rem; color: var(--text); }

/* ---------- Адаптив ---------- */
@media (max-width: 600px) {
    h1, .page-title { font-size: 2rem; }
    .entry-title { font-size: 2rem; }
    .section-title { font-size: 1.75rem; }
    .brand-logo { width: 46px; height: 46px; }
    .brand-name { font-size: 1rem; }
    .brand-desc { -webkit-line-clamp: 2; }
    .layout-single .content-area { width: 100%; }
    .front-main { width: 100%; }
    .fp-hero { min-height: 460px; }
    .fp-hero-body { padding: 2.2rem 1.4rem; }
    .fp-hero-title { font-size: 2.3rem; }
    .fp-section { padding: 2.2rem 1.4rem; margin: 2.4rem 0; }
    .fp-cta { padding: 2.2rem 1.4rem; }
    .fp-cta-title { font-size: 1.75rem; }
    .stat-num { font-size: 3.2rem; }
    .plan-line { margin: 2.4rem 0; }
    .entry { padding: 1.6rem 1.2rem; }
    .comments { padding: 1.5rem 1.2rem; }
    .search-box { flex-direction: column; }
    .alignleft, .alignright { float: none; margin: 1em 0; }
}

@media (min-width: 601px) {
    .stats-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .post-navigation .nav-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 601px) and (max-width: 959px) {
    .layout-single .content-area { width: 100%; }
    .front-main { width: 100%; }
    .fp-hero-title { font-size: 2.8rem; }
}

@media (min-width: 960px) {
    .masthead-inner { padding: 1.3rem 0 1.1rem; }
    .nav-toggle { display: none; }
    .primary-nav { display: block; padding-bottom: 0; }
    .nav-list { display: flex; flex-wrap: wrap; gap: 0 2rem; }
    .nav-list a {
        position: relative;
        padding: 0.8em 0;
        border-bottom: 0;
    }
    .nav-list > li > a::after {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        height: 2px;
        background: var(--accent);
        transform: scaleX(0);
        transform-origin: left;
        transition: transform 0.25s ease;
    }
    .nav-list > li > a:hover::after,
    .nav-list > .current-menu-item > a::after { transform: scaleX(1); }
    .nav-list .sub-menu {
        position: absolute;
        top: 100%;
        left: -1rem;
        z-index: 20;
        min-width: 220px;
        padding: 0.4rem 1rem;
        background: var(--white);
        border: 1px solid var(--line);
        border-radius: 4px;
        display: none;
    }
    .nav-list li:hover > .sub-menu,
    .nav-list li:focus-within > .sub-menu { display: block; }
    .nav-list .sub-menu a { font-size: 1.05rem; padding: 0.45em 0; }

    .layout-with-sidebar {
        display: grid;
        grid-template-columns: minmax(0, 67%) minmax(0, 27%);
        justify-content: space-between;
        align-items: start;
    }
    .layout-with-sidebar .sidebar { margin-top: 0; }

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

    .fp-hero { min-height: 560px; }
    .fp-hero-body { padding: 3.6rem 3.4rem; }
    .fp-section { padding: 3.6rem 3.4rem; }
    .fp-cta { padding: 3.2rem 3.2rem; }
    .page-title { font-size: 3.2rem; }
    h1 { font-size: 3.2rem; }
}
