/*
Theme Name: dds_miamimermaidelle.com
Theme URI: https://miamimermaidelle.com/
Author: Дмитрий Ковалёв
Description: Тема для информационного сайта о недвижимости. Японский минимализм, холодная палитра, архитектурная эстетика.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: mmelle
*/

/* =========================================================
   1. Переменные и базовые правила
   ========================================================= */

:root {
    --bg:        #F4F7FA;
    --bg-alt:    #EBF0F5;
    --surface:   #FFFFFF;
    --dark:      #1E2A3A;
    --text:      #263238;
    --muted:     #7A8A99;
    --accent:    #C49B5C;
    --accent-dk: #A87F42;
    --steel:     #4A6A7F;
    --line:      #D8E0E8;
    --font-head: "Montserrat", "Trebuchet MS", "Segoe UI", Arial, sans-serif;
    --font-body: "Literata", "Noto Serif", Georgia, "Times New Roman", serif;
    --shell:     1180px;
}

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

html {
    scroll-behavior: smooth;
}

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

/* зернистая текстура «бумаги» поверх основного фона */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    pointer-events: none;
    opacity: .5;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23g)' opacity='0.07'/%3E%3C/svg%3E");
}

.page-wrap {
    position: relative;
    z-index: 1;
}

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

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

p a,
.entry-content a,
.widget a,
.card-excerpt a {
    background-image: linear-gradient(currentColor, currentColor);
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 0 1px;
    transition: background-size .25s ease;
}

p a:hover,
.entry-content a:hover,
.widget a:hover,
.card-excerpt a:hover {
    background-size: 100% 1px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-head);
    color: var(--text);
    line-height: 1.25;
    font-weight: 600;
    margin: 0 0 .8em;
}

h1 {
    font-size: 2.8rem;
    letter-spacing: .04em;
}

h2 {
    font-size: 1.9rem;
    letter-spacing: .035em;
}

h3 {
    font-size: 1.35rem;
    letter-spacing: .02em;
}

h4 {
    font-size: 1.1rem;
}

p {
    margin: 0 0 1.15em;
}

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

blockquote {
    margin: 1.8em 0;
    padding: 1.6rem 1.8rem;
    background: linear-gradient(135deg, var(--bg) 0%, #DFE7EF 100%);
    border-left: 3px solid var(--accent);
    clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 0 100%);
    font-style: italic;
}

blockquote p:last-child {
    margin-bottom: 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.6em 0;
    border: 1px solid var(--line);
    font-size: .95rem;
}

th, td {
    border: 1px solid var(--line);
    padding: .7rem .9rem;
    text-align: left;
}

th {
    background: var(--bg-alt);
    font-family: var(--font-head);
    font-weight: 600;
}

code, pre {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: .9em;
}

pre {
    overflow-x: auto;
    padding: 1rem 1.2rem;
    background: var(--bg-alt);
    border: 1px solid var(--line);
}

/* =========================================================
   2. Контейнеры и раскладки
   ========================================================= */

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

.frame {
    width: min(85%, var(--shell));
    margin-inline: auto;
}

.site-main {
    padding: 2.6rem 0 4rem;
}

.front.site-main {
    padding-top: 0;
}

.layout {
    margin-inline: auto;
}

.layout-single {
    display: block;
    width: min(85%, var(--shell));
}

.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67fr) minmax(0, 27fr);
    gap: 3rem;
    width: min(92%, var(--shell));
}

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

/* =========================================================
   3. Шапка
   ========================================================= */

.site-header {
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 1.4rem 0;
}

.header-inner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.2rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: .95rem;
    min-width: 0;
    flex: 1 1 auto;
}

.brand-link {
    display: block;
    flex: 0 0 auto;
    line-height: 0;
}

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

.brand-mark {
    display: block;
}

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

.brand-name {
    display: block;
    font-family: var(--font-head);
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: .06em;
    color: var(--text);
    line-height: 1.35;
}

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

.brand-tagline {
    margin: .25rem 0 0;
    font-size: .82rem;
    line-height: 1.5;
    color: var(--muted);
    max-width: 46ch;
}

.nav-toggle {
    display: none;
    align-items: center;
    gap: .45rem;
    background: none;
    border: 1px solid var(--line);
    border-radius: 3px;
    padding: .5rem .8rem;
    cursor: pointer;
    font-family: var(--font-head);
    font-size: .85rem;
    letter-spacing: .06em;
    color: var(--text);
}

.nav-toggle-bar {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--steel);
}

.nav-toggle-bar + .nav-toggle-bar {
    margin-top: -2px;
}

.nav-toggle-label {
    margin-left: .2rem;
}

.primary-nav {
    flex: 0 1 auto;
}

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

.nav-list a {
    display: inline-block;
    font-family: var(--font-head);
    font-size: .9rem;
    letter-spacing: .06em;
    color: var(--text);
    padding-bottom: 3px;
    border-bottom: 2px solid transparent;
}

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

.nav-list .sub-menu {
    list-style: none;
    margin: .5rem 0 0;
    padding: 0 0 0 .9rem;
    display: flex;
    flex-direction: column;
    gap: .4rem;
}

/* =========================================================
   4. Кнопки
   ========================================================= */

.btn,
input[type="submit"],
button.submit,
.comment-form .submit {
    display: inline-block;
    font-family: var(--font-head);
    font-size: .9rem;
    letter-spacing: .07em;
    line-height: 1.2;
    padding: .82rem 1.6rem;
    border-radius: 3px;
    border: 1px solid transparent;
    cursor: pointer;
    text-align: center;
    transition: background-color .2s ease, color .2s ease, transform .2s ease, border-color .2s ease;
}

.btn-primary,
input[type="submit"],
.comment-form .submit {
    background: var(--accent);
    color: #FFFFFF;
    border-color: var(--accent);
}

.btn-primary:hover,
input[type="submit"]:hover,
.comment-form .submit:hover {
    background: var(--accent-dk);
    border-color: var(--accent-dk);
    color: #FFFFFF;
    transform: translateY(-2px);
}

.btn-ghost {
    background: transparent;
    color: var(--steel);
    border-color: var(--steel);
}

.btn-ghost:hover {
    background: transparent;
    color: var(--dark);
    border-color: var(--dark);
    transform: translateY(-2px);
}

/* =========================================================
   5. Заголовки секций
   ========================================================= */

.sec-head {
    display: flex;
    align-items: center;
    gap: 1.6rem;
    margin-bottom: 2.4rem;
}

.sec-head::after {
    content: "";
    flex: 1 1 auto;
    height: 1px;
    background: var(--line);
}

.sec-title {
    position: relative;
    margin: 0;
    padding-bottom: .55rem;
    min-width: 0;
    flex: 0 1 auto;
}

.sec-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 56px;
    height: 2px;
    background: var(--accent);
}

.entry-content h2::before,
.sec-title::before,
.page-title.has-dot::before {
    content: "";
    display: inline-block;
    width: .5em;
    height: .5em;
    margin-right: .45em;
    background: var(--accent);
    vertical-align: baseline;
}

/* =========================================================
   6. Главная — Hero
   ========================================================= */

.hero {
    position: relative;
    overflow: hidden;
    background: var(--dark);
    padding: 6rem 0 5.4rem;
}

.hero-photo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-veil {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(100deg, rgba(30, 42, 58, .88) 0%, rgba(30, 42, 58, .62) 55%, rgba(74, 106, 127, .42) 100%);
}

.hero::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    width: 460px;
    height: 340px;
    opacity: .04;
    pointer-events: none;
    background-repeat: no-repeat;
    background-position: right bottom;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='460' height='340' viewBox='0 0 460 340'%3E%3Cg fill='none' stroke='%234A6A7F' stroke-width='2'%3E%3Cpath d='M20 320 L200 60 L440 200'/%3E%3Cpath d='M60 320 L60 120 L300 120 L300 320'/%3E%3Cpath d='M0 220 L460 220'/%3E%3Cpath d='M140 0 L140 340'/%3E%3Cpath d='M340 40 L340 340'/%3E%3Crect x='200' y='160' width='120' height='120'/%3E%3Ccircle cx='340' cy='120' r='48'/%3E%3C/g%3E%3C/svg%3E");
}

.hero-inner {
    position: relative;
    z-index: 2;
}

.hero-kicker {
    margin: 0 0 1rem;
    font-family: var(--font-head);
    font-size: .82rem;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--accent);
}

.hero-title {
    margin: 0 0 1.1rem;
    color: #EEF3F7;
    font-size: 2.8rem;
    letter-spacing: .045em;
    max-width: 20ch;
}

.hero-accent {
    color: var(--accent);
}

.hero-lead {
    max-width: 56ch;
    margin: 0 0 2rem;
    color: #C7D2DC;
    font-size: 1.05rem;
}

/* =========================================================
   7. Секции главной
   ========================================================= */

.front-section {
    padding: 4.6rem 0;
}

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

/* Чек-лист */

.checklist {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 1.6rem;
}

.check-item {
    display: flex;
    align-items: flex-start;
    gap: 1.1rem;
    min-width: 0;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--line);
}

.check-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.check-mark {
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    margin-top: .45rem;
    position: relative;
    border: 2px solid var(--accent);
}

.check-mark::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 1px;
    width: 7px;
    height: 12px;
    border-right: 2px solid var(--accent);
    border-bottom: 2px solid var(--accent);
    transform: rotate(42deg);
}

.check-body {
    min-width: 0;
}

.check-title {
    display: block;
    font-family: var(--font-head);
    font-size: 1.22rem;
    font-weight: 600;
    letter-spacing: .02em;
    margin-bottom: .3rem;
}

.check-note {
    display: block;
    font-size: .95rem;
    color: var(--muted);
    line-height: 1.65;
}

/* Статистика */

.stats-section {
    padding: 0;
}

.stats-plate {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    background: var(--dark);
    padding: 3rem 2.4rem;
    clip-path: polygon(0 0, calc(100% - 26px) 0, 100% 26px, 100% 100%, 0 100%);
}

.stat {
    min-width: 0;
    padding: .4rem 1.2rem;
    border-left: 1px solid rgba(196, 155, 92, .35);
}

.stat:first-child {
    border-left: none;
    padding-left: 0;
}

.stat-num {
    display: block;
    font-family: var(--font-head);
    font-size: 3rem;
    font-weight: 600;
    letter-spacing: .02em;
    color: #F1F5F8;
    line-height: 1.1;
}

.stat-label {
    display: block;
    margin-top: .5rem;
    font-size: .9rem;
    color: var(--accent);
    line-height: 1.5;
}

/* Карта тем */

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

.topic-tile {
    display: block;
    min-width: 0;
    padding: 1.9rem 1.6rem;
    border: 1px solid var(--steel);
    color: var(--text);
    transition: border-color .2s ease, transform .2s ease;
}

.topic-tile:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.topic-name {
    display: block;
    font-family: var(--font-head);
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: .05em;
    margin-bottom: .45rem;
}

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

.topic-note {
    display: block;
    font-size: .9rem;
    color: var(--muted);
    line-height: 1.55;
}

.empty-note {
    color: var(--muted);
}

/* =========================================================
   8. Карточки записей
   ========================================================= */

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

.list-cards {
    display: grid;
    gap: 1.6rem;
}

.card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--surface);
    border: 1px solid var(--line);
    border-left: 3px solid var(--line);
    border-radius: 0;
    overflow: hidden;
    transition: border-left-color .2s ease;
}

.card:hover {
    border-left-color: var(--accent);
}

.card-body {
    flex: 1;
    min-width: 0;
    padding: 1.8rem 1.9rem;
}

.card-meta {
    margin: 0 0 .5rem;
    font-family: var(--font-head);
    font-size: .78rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted);
}

.card-title {
    margin: 0 0 .7rem;
    font-size: 1.3rem;
}

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

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

.card-excerpt {
    color: var(--text);
    font-size: .97rem;
}

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

.card-more {
    display: inline-block;
    margin-top: .5rem;
    font-family: var(--font-head);
    font-size: .85rem;
    letter-spacing: .07em;
    color: var(--accent);
    border-bottom: 1px solid transparent;
}

.card-more:hover {
    border-bottom-color: var(--accent);
}

/* карточка сетки — миниатюра сверху */

.card-thumb-top {
    width: 100%;
}

.card-thumb-top a {
    display: block;
}

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

/* карточка списка — миниатюра сбоку */

.card-row {
    flex-direction: row;
}

.card-thumb-wrap {
    flex: 0 0 280px;
    position: relative;
    overflow: hidden;
    min-width: 0;
}

.card-thumb-wrap a {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.card-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* =========================================================
   9. Хлебные крошки, заголовки страниц, пагинация
   ========================================================= */

.trail {
    margin-bottom: 1.6rem;
    font-family: var(--font-head);
    font-size: .82rem;
    letter-spacing: .05em;
    color: var(--muted);
}

.trail a {
    color: var(--steel);
}

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

.trail-sep {
    margin: 0 .4rem;
    color: var(--line);
}

.page-head {
    margin-bottom: 2.4rem;
    padding-bottom: 1.4rem;
    border-bottom: 1px solid var(--line);
}

.page-title {
    margin: 0 0 .5rem;
}

.page-sub {
    margin: 0;
    color: var(--muted);
    font-size: .98rem;
}

.err-code {
    margin: 0 0 .4rem;
    font-family: var(--font-head);
    font-size: 3.4rem;
    font-weight: 600;
    letter-spacing: .1em;
    color: var(--accent);
    line-height: 1;
}

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

.pager {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: 2.6rem;
}

.pager .page-numbers {
    display: inline-block;
    min-width: 42px;
    padding: .6rem .85rem;
    border: 1px solid var(--line);
    border-radius: 3px;
    background: var(--surface);
    font-family: var(--font-head);
    font-size: .88rem;
    letter-spacing: .05em;
    color: var(--text);
    text-align: center;
    transition: border-color .2s ease, color .2s ease, transform .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: #FFFFFF;
}

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

.comments-area .navigation .page-numbers {
    display: inline-block;
    padding: .4rem .7rem;
    border: 1px solid var(--line);
    border-radius: 3px;
    margin-right: .4rem;
}

/* =========================================================
   10. Запись и страница
   ========================================================= */

.entry {
    min-width: 0;
}

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

.entry-title {
    margin: 0 0 .6rem;
}

.entry-meta {
    margin: 0;
    font-family: var(--font-head);
    font-size: .82rem;
    letter-spacing: .08em;
    color: var(--muted);
}

.entry-meta .meta-sep {
    margin: 0 .5rem;
}

.entry-cat {
    color: var(--steel);
}

.entry-cover {
    margin: 0 0 2rem;
}

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

.entry-content {
    font-size: 1.02rem;
}

.entry-content h2 {
    margin-top: 2.2rem;
}

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

.entry-content img {
    display: block;
    height: auto;
}

.entry-content ul li,
.entry-content ol li {
    margin-bottom: .5em;
}

.entry-pages {
    margin-top: 1.6rem;
    font-family: var(--font-head);
    font-size: .9rem;
}

.entry-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    margin-top: 2rem;
}

.tag-chip {
    display: inline-block;
    padding: .35rem .8rem;
    border: 1px solid var(--line);
    border-radius: 3px;
    font-family: var(--font-head);
    font-size: .8rem;
    letter-spacing: .05em;
    color: var(--steel);
}

.tag-chip:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.entry-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.2rem;
    margin-top: 2.8rem;
}

.entry-nav-link {
    display: block;
    min-width: 0;
    padding: 1.2rem 1.4rem;
    border: 1px solid var(--line);
    color: var(--text);
    transition: border-color .2s ease;
}

.entry-nav-link:hover {
    border-color: var(--accent);
}

.entry-nav-next {
    text-align: right;
}

.entry-nav-label {
    display: block;
    font-family: var(--font-head);
    font-size: .75rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: .3rem;
}

.entry-nav-title {
    display: block;
    font-family: var(--font-head);
    font-size: 1rem;
    line-height: 1.4;
}

/* =========================================================
   11. Комментарии и формы
   ========================================================= */

.comments-area {
    margin-top: 3.2rem;
    padding-top: 2.4rem;
    border-top: 1px solid var(--line);
}

.comments-title {
    font-size: 1.5rem;
}

.comments-count {
    color: var(--muted);
    font-weight: 400;
}

.comment-list,
.comment-list .children {
    list-style: none;
    margin: 0;
    padding: 0;
}

.comment-list .children {
    margin-left: 1.6rem;
    padding-left: 1.4rem;
    border-left: 1px solid var(--line);
}

.comment-item {
    padding: 1.3rem 1.5rem;
    margin-bottom: 1.2rem;
    background: var(--surface);
    border: 1px solid var(--line);
}

.comment-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: .8rem;
    margin-bottom: .6rem;
}

.comment-author {
    font-family: var(--font-head);
    font-weight: 600;
    letter-spacing: .03em;
}

.comment-date {
    font-size: .8rem;
    color: var(--muted);
}

.comment-text p:last-child {
    margin-bottom: 0;
}

.comment-hold {
    color: var(--muted);
    font-size: .9rem;
}

.comment-actions {
    margin-top: .6rem;
    font-family: var(--font-head);
    font-size: .85rem;
}

.comment-respond {
    margin-top: 2rem;
    padding: 1.8rem 1.9rem;
    background: var(--bg-alt);
    border: 1px solid var(--line);
}

.comment-reply-title {
    margin-top: 0;
    font-size: 1.25rem;
}

.comment-form label {
    display: block;
    font-family: var(--font-head);
    font-size: .85rem;
    letter-spacing: .05em;
    margin-bottom: .35rem;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea,
.search-field {
    width: 100%;
    padding: .7rem .9rem;
    border: 1px solid var(--line);
    border-radius: 3px;
    background: var(--surface);
    color: var(--text);
    font-family: var(--font-body);
    font-size: .98rem;
}

.comment-form input:focus,
.comment-form textarea:focus,
.search-field:focus {
    outline: none;
    border-color: var(--steel);
}

.comment-form p {
    margin-bottom: 1rem;
}

.search-form {
    margin: 1.6rem 0;
}

.search-label {
    display: block;
    font-family: var(--font-head);
    font-size: .85rem;
    letter-spacing: .06em;
    margin-bottom: .4rem;
}

.search-row {
    display: flex;
    gap: .6rem;
}

.search-row .search-field {
    min-width: 0;
    flex: 1 1 auto;
}

.search-submit {
    flex: 0 0 auto;
}

/* =========================================================
   12. Сайдбар и виджеты
   ========================================================= */

.sidebar {
    min-width: 0;
}

.sidebar .widget {
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: 0 6px 22px rgba(38, 50, 56, .06);
    padding: 1.6rem 1.7rem;
    margin-bottom: 1.6rem;
    color: var(--text);
}

.sidebar .widget-title {
    position: relative;
    margin: 0 0 1.1rem;
    padding-bottom: .5rem;
    font-size: 1.05rem;
    letter-spacing: .06em;
    color: var(--text);
}

.sidebar .widget-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
    background: var(--accent);
}

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

.widget li {
    padding: .5rem 0;
    border-bottom: 1px solid var(--line);
    font-size: .95rem;
    line-height: 1.55;
}

.widget li:last-child {
    border-bottom: none;
}

.sidebar .widget a {
    color: var(--text);
}

.sidebar .widget a:hover {
    color: var(--accent);
}

.sidebar .widget .post-date,
.sidebar .widget .rss-date {
    display: block;
    font-size: .8rem;
    color: var(--muted);
}

/* =========================================================
   13. Подвал
   ========================================================= */

.site-footer {
    background: var(--dark);
    color: #C7D2DC;
    padding: 3.4rem 0 2rem;
    margin-top: 3rem;
}

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

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

.site-footer .widget {
    margin-bottom: 1.6rem;
    color: #C7D2DC;
    font-size: .95rem;
}

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

.site-footer .widget-title {
    position: relative;
    margin: 0 0 1.1rem;
    padding-bottom: .5rem;
    font-size: 1rem;
    letter-spacing: .08em;
    color: #F1F5F8;
}

.site-footer .widget-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
    background: var(--accent);
}

.site-footer .widget p {
    color: #C7D2DC;
}

.site-footer .widget li {
    border-bottom: 1px solid rgba(199, 210, 220, .16);
}

.site-footer .widget a {
    color: #DCE4EC;
}

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

.site-footer .widget .post-date {
    display: block;
    font-size: .8rem;
    color: #94A5B4;
}

.footer-copy {
    margin: 2.4rem 0 0;
    padding-top: 1.4rem;
    border-top: 1px solid rgba(199, 210, 220, .18);
    font-family: var(--font-head);
    font-size: .84rem;
    letter-spacing: .06em;
    color: #94A5B4;
}

/* =========================================================
   14. Cookie-баннер
   ========================================================= */

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

.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    gap: 1.4rem;
    padding: 1.1rem 1.6rem;
    background: var(--dark);
    border-top: 2px solid var(--accent);
    color: #DCE4EC;
}

.cookie-text {
    margin: 0;
    min-width: 0;
    flex: 1 1 auto;
    font-size: .9rem;
    line-height: 1.55;
}

.cookie-accept {
    flex: 0 0 auto;
}

/* =========================================================
   15. Адаптив
   ========================================================= */

@media (max-width: 960px) {
    h1 {
        font-size: 2.2rem;
    }

    .hero-title {
        font-size: 2.2rem;
    }

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

    .layout-single,
    .layout-with-sidebar,
    .frame {
        width: min(92%, var(--shell));
    }

    .grid-cards,
    .topic-map {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .stats-plate {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.6rem;
        padding: 2.4rem 1.8rem;
    }

    .stat:nth-child(3) {
        border-left: none;
        padding-left: 0;
    }

    .nav-toggle {
        display: inline-flex;
        flex-wrap: wrap;
        order: 3;
    }

    .primary-nav {
        flex: 1 0 100%;
        order: 4;
        display: none;
    }

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

    .nav-list {
        flex-direction: column;
        gap: .9rem;
        padding-top: 1rem;
        border-top: 1px solid var(--line);
    }
}

@media (max-width: 600px) {
    body {
        font-size: 16px;
    }

    h1,
    .hero-title {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.45rem;
    }

    .site-main {
        padding: 2rem 0 3rem;
    }

    .hero {
        padding: 4rem 0 3.6rem;
    }

    .front-section {
        padding: 3rem 0;
    }

    .stats-section {
        padding: 0;
    }

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

    .stat,
    .stat:nth-child(3) {
        border-left: none;
        padding-left: 0;
    }

    .grid-cards,
    .topic-map,
    .entry-nav {
        grid-template-columns: minmax(0, 1fr);
    }

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

    .card-row {
        flex-direction: column;
    }

    .card-thumb-wrap {
        flex: none;
        width: 100%;
        position: static;
    }

    .card-thumb-wrap a {
        position: static;
    }

    .card-thumb-wrap img {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }

    .card-body {
        padding: 1.4rem 1.3rem;
    }

    .comment-respond {
        padding: 1.4rem 1.2rem;
    }

    blockquote {
        padding: 1.3rem 1.3rem;
    }

    .cookie-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: .9rem;
        padding: 1.1rem 1.2rem;
    }

    .entry-nav-next {
        text-align: left;
    }

    .sec-head {
        gap: 1rem;
        margin-bottom: 1.8rem;
    }
}

/* =========================================================
   16. Прозрачная шапка поверх hero на главной (десктоп)
   ========================================================= */

@media (min-width: 961px) {
    .home .site-header {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        z-index: 5;
        background: transparent;
        border-bottom-color: rgba(238, 243, 247, .18);
    }

    .home .site-header .brand-name,
    .home .site-header .nav-list a {
        color: #EEF3F7;
    }

    .home .site-header .brand-tagline {
        color: #A9B8C6;
    }

    .home .site-header .brand-name:hover,
    .home .site-header .nav-list a:hover,
    .home .site-header .nav-list .current-menu-item > a {
        color: var(--accent);
    }

    .home .hero {
        padding-top: 11rem;
    }
}
