/*
Theme Name: dds_pandaznaet.ru
Theme URI: https://pandaznaet.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: pndz
*/

:root {
    --bg: #F7FBF8;
    --bg-alt: #EAF4EE;
    --bg-aside: #F0F7F3;
    --line: #C5E0D0;
    --dot: #D4E8DD;
    --forest: #1E3A2F;
    --ink: #1C2E26;
    --emerald: #2E8B6E;
    --emerald-deep: #23705A;
    --amber: #F2A65A;
    --muted: #6B8A7A;
    --white: #FFFFFF;
    --font-head: "Nunito", "Quicksand", "Segoe UI", Arial, sans-serif;
    --font-body: "Source Sans 3", "Source Sans Pro", "Inter", "Segoe UI", Arial, sans-serif;
    --radius-card: 16px;
    --radius-btn: 24px;
    --shadow-card: 0 4px 12px rgba(46, 139, 110, 0.08);
    --shadow-card-hover: 0 12px 26px rgba(46, 139, 110, 0.16);
}

/* ---------- Сброс и основа ---------- */

*,
*::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;
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.65;
    background-color: var(--bg);
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 320'%3E%3Cg fill='%232E8B6E' fill-opacity='0.04'%3E%3Cpath d='M100 310 C96 220 92 130 104 10 C112 120 108 220 104 310 Z'/%3E%3Cpath d='M102 150 C60 140 26 110 8 60 C58 76 88 104 102 150 Z'/%3E%3Cpath d='M104 210 C150 196 180 166 194 118 C146 132 116 164 104 210 Z'/%3E%3Cpath d='M103 90 C136 80 158 56 168 20 C132 32 110 56 103 90 Z'/%3E%3C/g%3E%3C/svg%3E"),
        radial-gradient(circle, var(--dot) 1px, transparent 1.2px);
    background-repeat: no-repeat, repeat;
    background-size: 260px auto, 24px 24px;
    background-position: right 1.5rem bottom 1rem, 0 0;
    background-attachment: fixed, scroll;
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-head);
    color: var(--ink);
    line-height: 1.25;
    margin: 1.6em 0 0.6em;
    font-weight: 800;
}
h1 { font-size: 2.1rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.25rem; font-weight: 700; }
h4 { font-size: 1.1rem; font-weight: 700; }

h2::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-right: 0.55em;
    border-radius: 50%;
    background: var(--amber);
    vertical-align: 0.3em;
}

p { margin: 0 0 1em; }

a {
    color: var(--emerald);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: color 0.2s ease, text-decoration-color 0.2s ease, text-decoration-thickness 0.2s ease;
}
a:hover { color: var(--amber); text-decoration-thickness: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
    outline: 3px solid var(--amber);
    outline-offset: 2px;
}

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

blockquote {
    margin: 1.5em 0;
    padding: 1rem 1.4rem;
    border-left: 4px solid var(--emerald);
    background: var(--bg-alt);
    border-radius: 0 12px 12px 0;
}

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

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

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

/* ---------- Контейнер ---------- */

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

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

.btn {
    display: inline-block;
    padding: 0.72rem 1.5rem;
    border: 2px solid var(--emerald);
    border-radius: var(--radius-btn);
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}
.btn:hover { transform: translateY(-2px); text-decoration: none; }
.btn-fill { background: var(--emerald); color: var(--white); }
.btn-fill:hover { color: var(--white); box-shadow: 0 8px 18px rgba(46, 139, 110, 0.32); }
.btn-line { background: transparent; color: var(--emerald); }
.btn-line:hover { background: var(--emerald); color: var(--white); box-shadow: 0 8px 18px rgba(46, 139, 110, 0.25); }
.btn-line-light { border-color: var(--white); color: var(--white); }
.btn-line-light:hover { border-color: var(--emerald); }

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

.top-stripe {
    height: 4px;
    background: linear-gradient(100deg, var(--emerald) 0 50%, var(--amber) 50% 100%);
}

.masthead {
    background: var(--white);
    border-bottom: 1px solid var(--line);
}
.masthead-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1rem 0;
}
.brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    min-width: 0;
    flex: 1 1 auto;
    color: var(--ink);
    text-decoration: none;
}
.brand:hover { color: var(--ink); }
.brand-mark { flex: 0 0 auto; display: block; }
.brand-logo { display: block; width: 56px; height: 56px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; min-width: 0; max-width: 620px; }
.brand-name {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 0.98rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.brand-tagline {
    margin-top: 0.2rem;
    font-size: 0.8rem;
    line-height: 1.4;
    color: var(--muted);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.primary-nav { flex: 0 0 auto; }
.primary-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    list-style: none;
    margin: 0;
    padding: 0;
}
.primary-menu li { position: relative; }
.primary-menu a {
    display: block;
    padding: 0.5rem 0.9rem;
    border-radius: var(--radius-btn);
    color: var(--ink);
    font-family: var(--font-head);
    font-weight: 700;
    text-decoration: none;
}
.primary-menu a:hover { background: var(--bg-alt); color: var(--emerald); }
.primary-menu .current-menu-item > a,
.primary-menu .current_page_item > a { color: var(--emerald); background: var(--bg-alt); }
.primary-menu .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 20;
    min-width: 200px;
    list-style: none;
    margin: 0;
    padding: 0.5rem;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow-card);
}
.primary-menu li:hover > .sub-menu,
.primary-menu li:focus-within > .sub-menu { display: block; }

.nav-toggle {
    display: none;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.9rem;
    border: 2px solid var(--emerald);
    border-radius: var(--radius-btn);
    background: transparent;
    color: var(--emerald);
    font-family: var(--font-head);
    font-weight: 700;
    cursor: pointer;
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
    display: block;
    width: 18px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    position: relative;
}
.nav-toggle-bars::before,
.nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

/* ---------- Хлебные крошки ---------- */

.page-top { padding-top: 1.6rem; }
.crumbs { font-size: 0.92rem; color: var(--muted); }
.crumbs a { color: var(--emerald); }
.crumbs-sep { margin: 0 0.25rem; color: var(--amber); }

/* ---------- Раскладки ---------- */

.site-main { display: block; }

.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67fr) minmax(0, 27fr);
    gap: 6%;
    align-items: start;
    padding: 1.5rem 0 5rem;
}
.layout-single {
    display: block;
    padding: 1.5rem 0 5rem;
}
.layout-single > .content-area { width: 85%; margin-left: auto; margin-right: auto; }
.content-area { min-width: 0; }

.page-head { margin-bottom: 2rem; }
.page-title { font-size: 2.3rem; margin: 0.4rem 0 0.6rem; }
.page-intro { color: var(--muted); }

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

.entry-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.7rem; color: var(--muted); font-size: 0.95rem; }
.entry-thumb { margin: 1.5rem 0 2rem; }
.entry-thumb img { display: block; width: 100%; border-radius: var(--radius-card); }
.entry-content { min-width: 0; overflow-wrap: break-word; }
.entry-content img { border-radius: 12px; }
.entry-content > *:first-child { margin-top: 0; }
.entry-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 2rem; }

.card-tag {
    display: inline-block;
    padding: 0.12rem 0.65rem;
    border-radius: 999px;
    background: rgba(242, 166, 90, 0.18);
    color: #8A5217;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
}
a.card-tag:hover { background: var(--amber); color: var(--ink); }

/* ---------- Карточки ---------- */

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

.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    background: var(--white);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--emerald);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
    z-index: 2;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card-hover); }
.card:hover::before { transform: scaleX(1); }

.card-thumb { display: block; border-radius: var(--radius-card) var(--radius-card) 0 0; overflow: hidden; }
.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.4rem 1.4rem;
}
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; color: var(--muted); font-size: 0.85rem; }
.card-title { margin: 0.5rem 0 0.6rem; font-size: 1.2rem; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { color: var(--emerald); }
.card-excerpt { color: #3D5248; font-size: 0.98rem; flex: 1; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-excerpt img, .card-excerpt figure, .card-excerpt iframe { display: none; }
.card-more { margin-top: 0.8rem; align-self: flex-start; font-family: var(--font-head); font-weight: 700; }

.sticky .card-meta::before {
    content: "Закреплено";
    padding: 0.12rem 0.6rem;
    border-radius: 999px;
    background: var(--emerald);
    color: var(--white);
    font-size: 0.75rem;
}

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

.pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    margin-top: 2.6rem;
}
.pager .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.6rem;
    height: 2.6rem;
    padding: 0 0.9rem;
    border: 2px solid var(--line);
    border-radius: var(--radius-btn);
    background: var(--white);
    color: var(--ink);
    font-family: var(--font-head);
    font-weight: 700;
    text-decoration: none;
    transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.pager a.page-numbers:hover { border-color: var(--emerald); color: var(--emerald); transform: translateY(-2px); }
.pager .page-numbers.current { background: var(--emerald); border-color: var(--emerald); color: var(--white); }
.pager .page-numbers.dots { border: 0; background: none; min-width: auto; padding: 0 0.3rem; }

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

.sidebar {
    min-width: 0;
    padding: 1.6rem 1.5rem;
    background: var(--bg-aside);
    border-radius: var(--radius-card);
    color: var(--ink);
}
.sidebar .widget { margin-bottom: 2rem; }
.sidebar .widget:last-child { margin-bottom: 0; }
.sidebar .widget-title { margin: 0 0 0.9rem; font-size: 1.1rem; color: var(--ink); }
.sidebar a { color: var(--emerald); }
.sidebar a:hover { color: #B8691F; }
.sidebar ul { list-style: none; padding: 0; margin: 0; }
.sidebar li { padding: 0.55rem 0; border-bottom: 1px dashed var(--line); }
.sidebar li:last-child { border-bottom: 0; }
.sidebar .post-date { display: block; font-size: 0.82rem; color: var(--muted); }

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

.search-box { display: flex; gap: 0.5rem; max-width: 520px; }
.search-field {
    flex: 1;
    min-width: 0;
    padding: 0.7rem 1.1rem;
    border: 2px solid var(--line);
    border-radius: var(--radius-btn);
    background: var(--white);
    color: var(--ink);
    font: inherit;
}
.search-field:focus { border-color: var(--emerald); outline: none; }

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

.front-wrap { width: 85%; max-width: 1180px; margin-left: auto; margin-right: auto; }

.fsec { padding: 80px 0; }
.fsec-alt {
    background-color: var(--bg-alt);
    background-image: radial-gradient(circle, #CFE5D8 1px, transparent 1.2px);
    background-size: 16px 16px;
}
.fsec-title { margin: 0 0 0.7rem; font-size: 2rem; }
.fsec-lead { max-width: 62ch; color: var(--muted); margin-bottom: 2.4rem; }

/* Hero */
.hero {
    position: relative;
    overflow: hidden;
    min-height: 520px;
    display: flex;
    align-items: center;
    background: #3D7A62;
}
.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(20, 46, 36, 0.62) 0%, rgba(20, 46, 36, 0.28) 60%, rgba(20, 46, 36, 0.1) 100%);
}
.hero-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
    padding: 90px 0;
}
.hero-copy { max-width: 620px; min-width: 0; }
.hero-title {
    margin: 0 0 1rem;
    font-size: 2.8rem;
    color: var(--white);
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.3);
}
.hero-lead {
    margin-bottom: 2rem;
    font-size: 1.2rem;
    color: #F2FAF5;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; }
.hero-panda {
    display: block;
    flex: 0 0 auto;
    width: 200px;
    height: auto;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.25));
}

/* Темы */
.topics-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.8rem; }
.topic {
    min-width: 0;
    padding: 2rem 1.8rem;
    background: var(--white);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
}
.topic-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--emerald);
    box-shadow: 0 0 0 8px rgba(46, 139, 110, 0.12);
}
.topic-icon svg { display: block; }
.topic-name { margin: 1.4rem 0 0.5rem; font-size: 1.3rem; }
.topic p { margin: 0; color: #3D5248; }

/* Свежие записи */
.latest-more { margin-top: 2.4rem; text-align: center; }
.empty-note { color: var(--muted); }
.dots-divider {
    width: 120px;
    height: 6px;
    margin: 60px auto 0;
    background-image: radial-gradient(circle, var(--emerald) 2px, transparent 2.4px);
    background-size: 14px 6px;
    background-position: center;
    opacity: 0.6;
}

/* Цитата */
.quote-sec { background: var(--forest); }
.big-quote {
    position: relative;
    margin: 0;
    padding: 1rem 1rem 1rem 6rem;
}
.big-quote-mark {
    position: absolute;
    top: -1.6rem;
    left: 0.5rem;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 9rem;
    line-height: 1;
    color: var(--amber);
}
.big-quote blockquote {
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    border-radius: 0;
}
.big-quote blockquote p {
    margin: 0 0 1.4rem;
    max-width: 30ch;
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 2.2rem;
    line-height: 1.3;
    color: var(--white);
}
.big-quote figcaption { color: #A9CBBB; font-size: 1rem; }

/* Чек-лист */
.checklist-layout {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 4rem;
    align-items: start;
}
.checklist-head .fsec-lead { margin-bottom: 0; }
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--line);
}
.checklist li:first-child { padding-top: 0.3rem; }
.check-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--emerald);
}
.check-mark svg { display: block; }
.check-link {
    min-width: 0;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--ink);
    text-decoration: none;
    background-image: linear-gradient(var(--amber), var(--amber));
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 0 2px;
    padding-bottom: 2px;
    transition: background-size 0.3s ease, color 0.2s ease;
}
.check-link:hover { color: var(--emerald); background-size: 100% 2px; text-decoration: none; }

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

.lost { text-align: center; }
.lost-panda { display: block; width: 180px; margin: 1rem auto 0; }
.lost .search-box { margin: 1.5rem auto; }
.lost-home { margin-top: 1.5rem; }

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

.comments { margin-top: 3.5rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.comment-list { list-style: none; padding: 0; margin: 0 0 2rem; }
.comment-list .children { list-style: none; padding-left: 1.6rem; }
.comment-body {
    margin-bottom: 1.2rem;
    padding: 1.2rem 1.4rem;
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-card);
}
.comment-author { display: flex; align-items: center; gap: 0.6rem; font-family: var(--font-head); font-weight: 700; }
.comment-author img { display: block; border-radius: 50%; }
.comment-author .says { display: none; }
.comment-metadata { font-size: 0.85rem; }
.comment-metadata a { color: var(--muted); }
.comment-respond { padding: 1.6rem 1.6rem 1.8rem; background: var(--bg-alt); border-radius: var(--radius-card); }
.comment-reply-title { margin-top: 0; }
.comment-form label { display: block; margin-bottom: 0.3rem; 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.7rem 0.9rem;
    border: 2px solid var(--line);
    border-radius: 12px;
    background: var(--white);
    color: var(--ink);
    font: inherit;
}
.comment-form-cookies-consent label { display: inline; font-weight: 400; }

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

.site-foot {
    padding: 70px 0 30px;
    background: var(--forest);
    color: #D8EBE1;
}
.foot-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 3rem;
}
.foot-col { min-width: 0; }
.site-foot .widget { margin-bottom: 1.6rem; color: #D8EBE1; }
.site-foot .widget-title { margin: 0 0 0.9rem; font-size: 1.1rem; color: var(--white); }
.site-foot .widget p, .site-foot .textwidget { color: #D8EBE1; }
.site-foot a { color: #A8DCC4; }
.site-foot a:hover { color: var(--amber); }
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot li { padding: 0.3rem 0; }
.site-foot .post-date { display: block; font-size: 0.82rem; color: #A9CBBB; }
.foot-copy {
    margin: 2.5rem 0 0;
    padding-top: 1.4rem;
    border-top: 1px solid rgba(197, 224, 208, 0.2);
    font-size: 0.9rem;
    color: #A9CBBB;
}

/* ---------- Cookie ---------- */

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

.cookie-banner {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    max-width: 880px;
    margin: 0 auto;
    padding: 1rem 1.4rem;
    background: var(--white);
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    box-shadow: 0 12px 30px rgba(30, 58, 47, 0.18);
}
.cookie-text { margin: 0; font-size: 0.95rem; min-width: 0; }
.cookie-accept { flex: 0 0 auto; }

/* ---------- Выравнивания WP ---------- */

.alignleft { float: left; margin: 0.3rem 1.4rem 1rem 0; }
.alignright { float: right; margin: 0.3rem 0 1rem 1.4rem; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption-text, figcaption { font-size: 0.88rem; color: var(--muted); }
.wp-block-image img { display: block; }

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

@media (max-width: 960px) {
    .layout-with-sidebar { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
    .layout-single > .content-area { width: 100%; }
    .front-wrap { width: 92%; }
    .cards-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .topics-grid { grid-template-columns: minmax(0, 1fr); }
    .checklist-layout { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
    .foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .masthead-row { flex-wrap: wrap; }
    .nav-toggle { display: inline-flex; }
    .primary-nav { display: none; width: 100%; }
    .primary-nav.is-open { display: block; }
    .primary-menu { flex-direction: column; padding: 0.5rem 0; }
    .primary-menu .sub-menu { position: static; display: block; border: 0; box-shadow: none; padding-left: 1rem; }
    .hero-panda { width: 150px; }
}

@media (max-width: 600px) {
    body { font-size: 1rem; background-size: 160px auto, 24px 24px; }
    h1, .page-title { font-size: 1.8rem; }
    .fsec { padding: 56px 0; }
    .fsec-title { font-size: 1.6rem; }
    .cards-grid-3, .cards-grid-2 { grid-template-columns: minmax(0, 1fr); }
    .brand-logo { width: 46px; height: 46px; }
    .brand-name { font-size: 0.88rem; }
    .brand-tagline { display: none; }
    .hero { min-height: 460px; }
    .hero-inner { flex-direction: column; align-items: flex-start; padding: 64px 0; }
    .hero-title { font-size: 2.1rem; }
    .hero-lead { font-size: 1.05rem; }
    .hero-panda { width: 110px; align-self: flex-end; }
    .big-quote { padding: 3.2rem 0.5rem 0.5rem; }
    .big-quote-mark { top: -1.5rem; left: 0; font-size: 6rem; }
    .big-quote blockquote p { font-size: 1.55rem; }
    .check-link { font-size: 1.05rem; }
    .foot-cols { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
    .sidebar { padding: 1.3rem 1.2rem; }
    .comment-respond { padding: 1.3rem 1.2rem; }
    .cookie-banner { flex-direction: column; align-items: stretch; text-align: left; padding: 1rem 1.2rem; }
    .search-box { flex-direction: column; }
}
