/*
Theme Name: dds_atlantidekids.com
Author: Валерия Рожкова
Description: Тема для информационного сайта о детской литературе и чтении.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: atlkids
*/

/* =============================================================
   1. Переменные и база
   ============================================================= */

:root {
    --bg:        #F8F6FC;
    --bg-alt:    #EFEBF5;
    --ink:       #2A1E35;
    --accent:    #7C5D9E;
    --accent-2:  #B38BCE;
    --muted:     #8F849C;
    --line:      #D9CBE6;
    --plum:      #2D2438;
    --shadow:    0 10px 30px -10px rgba(44, 36, 56, .08);
    --shadow-up: 0 18px 40px -12px rgba(44, 36, 56, .16);
    --head-font: "Manrope", "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
    --body-font: "Roboto", "Literata", "Segoe UI", system-ui, -apple-system, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background-color: var(--bg);
    color: var(--ink);
    font-family: var(--body-font);
    font-size: 17px;
    line-height: 1.7;
    letter-spacing: .01em;
}

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

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

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* Тонкая градиентная полоса сверху страницы */
.topline {
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

/* =============================================================
   2. Типографика
   ============================================================= */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--head-font);
    color: var(--ink);
    line-height: 1.22;
    font-weight: 700;
    letter-spacing: -.01em;
    margin: 1.8rem 0 .9rem;
}

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

/* Декоративная точка перед H2 и H3 внутри контента */
.entry-body h2::before,
.entry-body h3::before {
    content: "";
    display: inline-block;
    width: .5em;
    height: .5em;
    border-radius: 50%;
    background: var(--accent-2);
    margin-right: .55em;
    vertical-align: .12em;
}

p { margin: 0 0 1.1em; }

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

.entry-body a,
.widget_text a,
.crumbs a {
    background-image: linear-gradient(var(--accent-2), var(--accent-2));
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 0 2px;
    transition: background-size .28s ease;
    padding-bottom: 1px;
}

.entry-body a:hover,
.widget_text a:hover,
.crumbs a:hover {
    background-size: 100% 2px;
}

blockquote {
    margin: 1.6rem 0;
    padding: .6rem 0 .6rem 1.4rem;
    border-left: 4px solid var(--accent);
    font-style: italic;
    color: #3C2E4B;
}

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

ul, ol { padding-left: 1.3rem; }
li { margin-bottom: .4em; }

code, pre {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    background: var(--bg-alt);
    border-radius: 4px;
}
code { padding: .1em .35em; font-size: .92em; }
pre { padding: 1rem; overflow-x: auto; }

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

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

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

.btn,
.entry-body .btn {
    display: inline-block;
    font-family: var(--head-font);
    font-weight: 600;
    font-size: .98rem;
    padding: .78rem 1.5rem;
    border-radius: 4px;
    border: 1px solid var(--accent);
    background: var(--accent);
    color: #fff;
    cursor: pointer;
    transition: background-color .2s ease, border-color .2s ease, transform .12s ease, color .2s ease;
    background-image: none;
}

.btn:hover {
    background: var(--accent-2);
    border-color: var(--accent-2);
    color: #fff;
    transform: translateY(1px);
}

.btn-outline {
    background: transparent;
    color: var(--accent);
}

.btn-outline:hover {
    background: rgba(179, 139, 206, .16);
    border-color: var(--accent-2);
    color: var(--accent);
}

.btn-light {
    background: #fff;
    border-color: #fff;
    color: var(--accent);
}

.btn-light:hover {
    background: #F3EBFA;
    border-color: #F3EBFA;
    color: var(--accent);
}

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

.site-head {
    background: rgba(255, 255, 255, .85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(217, 203, 230, .6);
}

.head-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.15rem 0;
    flex-wrap: wrap;
}

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

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

.brand-mark img,
.brand-mark svg {
    display: block;
    width: 46px;
    height: 46px;
}

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

.brand-title {
    display: block;
    font-family: var(--head-font);
    font-weight: 700;
    font-size: 1.02rem;
    line-height: 1.3;
    color: var(--ink);
    max-width: 34ch;
}

.brand-tagline {
    display: block;
    font-size: .8rem;
    color: var(--muted);
    line-height: 1.45;
    margin-top: .2rem;
    max-width: 52ch;
}

.nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: .5rem .8rem;
    font-family: var(--head-font);
    font-size: .9rem;
    color: var(--ink);
    cursor: pointer;
}

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

.main-nav li { margin: 0; }

.main-nav a {
    font-family: var(--head-font);
    font-weight: 600;
    font-size: .96rem;
    color: var(--ink);
    position: relative;
    padding-bottom: 3px;
}

.main-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background: var(--accent-2);
    transition: width .28s ease;
}

.main-nav a:hover { color: var(--accent); }
.main-nav a:hover::after { width: 100%; }

.main-nav .current-menu-item > a { color: var(--accent); }
.main-nav .current-menu-item > a::after { width: 100%; }

/* =============================================================
   5. Каркас страницы
   ============================================================= */

.site-main { padding: 2.4rem 0 3.6rem; }

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

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

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

.crumbs {
    font-size: .86rem;
    color: var(--muted);
    margin-bottom: 1.6rem;
    line-height: 1.6;
}

.crumbs a { color: var(--accent); }
.crumbs-sep { color: var(--line); margin: 0 .25rem; }

.page-title {
    font-size: 2.4rem;
    margin: 0 0 1.4rem;
}

/* Заголовок секции: линия слева, чуть выступающая за край текста */
.sec-head {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.8rem;
}

.sec-head::before {
    content: "";
    flex: 0 0 auto;
    width: 64px;
    height: 2px;
    background: var(--accent-2);
    margin-top: 1.35rem;
    margin-left: -14px;
}

.sec-head h2 {
    margin: 0;
    font-size: 2rem;
    transform: translateY(-6px);
}

.sec-sub {
    color: var(--muted);
    margin: -.6rem 0 2rem;
    max-width: 68ch;
}

/* =============================================================
   6. Волнистый разделитель
   ============================================================= */

.wave-sep {
    display: block;
    width: 100%;
    height: 14px;
    margin: 0;
    color: var(--line);
}

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

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 1.7rem;
}

.card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform .22s ease, box-shadow .22s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-up);
}

.card-thumb {
    display: block;
    line-height: 0;
    background: var(--bg-alt);
}

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

.card-thumb-empty {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, var(--bg-alt), #E3DAF0);
}

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

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

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

.card-excerpt {
    color: #4A3D57;
    font-size: .95rem;
    margin-bottom: 1.1rem;
}

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

.card-excerpt p:last-child { margin-bottom: 0; }

.card-foot { margin-top: auto; }

.post-meta {
    font-size: .8rem;
    color: var(--muted);
    font-family: var(--head-font);
    letter-spacing: .04em;
    text-transform: uppercase;
}

.card .post-meta { margin-bottom: .3rem; }

.card-more {
    display: inline-block;
    font-family: var(--head-font);
    font-weight: 600;
    font-size: .92rem;
    color: var(--accent);
    border-bottom: 2px solid transparent;
    transition: border-color .22s ease, color .22s ease;
}

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

/* =============================================================
   8. Главная — общие секции
   ============================================================= */

.front-section { padding: 4.2rem 0; }
.front-section.is-alt { background: var(--bg-alt); }

.front-lead {
    position: relative;
    overflow: hidden;
}

/* Силуэт раскрытой книги в правом верхнем углу главной */
.book-corner {
    position: absolute;
    top: 8px;
    right: -40px;
    width: 320px;
    height: 220px;
    pointer-events: none;
    color: var(--line);
    opacity: .85;
    z-index: 0;
}

/* --- Блок 1: hero --- */

.hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(120deg, var(--accent) 0%, var(--accent-2) 100%);
    color: #fff;
    border-radius: 10px;
    padding: 3.4rem 2.6rem;
    margin-top: 2.4rem;
}

.hero-blob {
    position: absolute;
    right: -120px;
    bottom: -160px;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: var(--accent-2);
    opacity: .14;
    filter: blur(6px);
    pointer-events: none;
}

.hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
    gap: 2.6rem;
    align-items: center;
}

.hero h1 {
    color: #fff;
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.hero-text p {
    color: rgba(255, 255, 255, .92);
    font-size: 1.08rem;
    max-width: 56ch;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .9rem;
    margin-top: 1.6rem;
}

.hero-art { min-width: 0; }

.hero-art img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: contain;
}

/* --- Блок 2: сетка иконок --- */

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

.icon-cell {
    min-width: 0;
    background: var(--bg-alt);
    border-radius: 8px;
    padding: 2rem 1.7rem;
}

.front-section.is-alt .icon-cell { background: #fff; }

.icon-cell svg {
    display: block;
    width: 46px;
    height: 46px;
    color: var(--accent);
    margin-bottom: 1.1rem;
}

.icon-cell h3 { margin: 0 0 .5rem; font-size: 1.2rem; }
.icon-cell p { margin: 0; color: #4A3D57; font-size: .95rem; }

/* --- Блок 3: цитата --- */

.pull-quote {
    background: linear-gradient(120deg, var(--accent), var(--accent-2));
    color: #fff;
    border-radius: 10px;
    padding: 3.4rem 2.8rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.pull-quote .pq-text {
    font-family: var(--head-font);
    font-size: 2.5rem;
    line-height: 1.28;
    letter-spacing: .02em;
    font-weight: 700;
    margin: 0 auto;
    max-width: 22ch;
}

.pull-quote .pq-note {
    margin: 1.4rem auto 0;
    color: rgba(255, 255, 255, .85);
    max-width: 60ch;
    font-size: 1rem;
}

/* --- Блок 4: карта тем --- */

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

.topic-tile {
    min-width: 0;
    display: block;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 1.7rem 1.5rem;
    background: transparent;
    color: var(--ink);
    transition: background-color .22s ease, color .22s ease, border-color .22s ease, transform .22s ease;
}

.topic-tile svg {
    display: block;
    width: 40px;
    height: 40px;
    color: var(--accent);
    margin-bottom: 1rem;
    transition: color .22s ease;
}

.topic-tile h3 {
    margin: 0 0 .4rem;
    font-size: 1.12rem;
}

.topic-tile p {
    margin: 0;
    font-size: .9rem;
    color: var(--muted);
    transition: color .22s ease;
}

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

.topic-tile:hover svg,
.topic-tile:hover h3,
.topic-tile:hover p { color: #fff; }

/* --- Последние записи --- */

.front-latest .front-latest-foot {
    margin-top: 2.2rem;
    text-align: center;
}

/* =============================================================
   9. Записи и страницы
   ============================================================= */

.entry-head { margin-bottom: 1.6rem; }
.entry-head h1 { font-size: 2.7rem; margin-bottom: .7rem; }

.entry-thumb {
    display: block;
    margin: 0 0 1.8rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

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

.entry-body { font-size: 1.03rem; }
.entry-body img { border-radius: 8px; display: block; }
.entry-body h2 { font-size: 1.75rem; margin-top: 2.2rem; }
.entry-body h3 { font-size: 1.35rem; margin-top: 1.8rem; }

.entry-foot {
    margin-top: 2.4rem;
    padding-top: 1.4rem;
    border-top: 1px solid var(--line);
    font-size: .9rem;
    color: var(--muted);
}

.entry-foot a { color: var(--accent); }

.post-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
}

.post-nav a {
    font-family: var(--head-font);
    font-weight: 600;
    font-size: .95rem;
    max-width: 46ch;
}

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

.sidebar {
    min-width: 0;
    background: transparent;
}

.sidebar .widget {
    background: #fff;
    border-radius: 8px;
    padding: 1.5rem 1.5rem 1.6rem;
    margin-bottom: 1.6rem;
    box-shadow: var(--shadow);
}

.sidebar .widget-title {
    font-size: 1.12rem;
    margin: 0 0 1rem;
    color: var(--ink);
    padding-bottom: .6rem;
    border-bottom: 2px solid var(--accent-2);
}

.sidebar .widget,
.sidebar .widget p,
.sidebar .widget li { color: var(--ink); }

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

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

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

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

.sidebar .post-date {
    display: block;
    font-size: .78rem;
    color: var(--muted);
    margin-top: .2rem;
}

/* =============================================================
   11. Пагинация
   ============================================================= */

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

.pager .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 .8rem;
    border: 1px solid var(--line);
    border-radius: 4px;
    font-family: var(--head-font);
    font-weight: 600;
    font-size: .95rem;
    color: var(--accent);
    background: #fff;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .12s ease;
}

.pager a.page-numbers:hover {
    background: var(--accent-2);
    border-color: var(--accent-2);
    color: #fff;
    transform: translateY(1px);
}

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

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

/* =============================================================
   12. Форма поиска
   ============================================================= */

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

.search-form label { flex: 1 1 200px; min-width: 0; }

.search-form input[type="search"],
input[type="text"],
input[type="email"],
input[type="url"],
textarea {
    width: 100%;
    font-family: var(--body-font);
    font-size: 1rem;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: .72rem .9rem;
}

.search-form input[type="search"]:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
textarea:focus {
    outline: 2px solid var(--accent-2);
    outline-offset: 1px;
}

/* =============================================================
   13. Комментарии
   ============================================================= */

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

.comments-area h2 { font-size: 1.6rem; }

.comment-list {
    list-style: none;
    margin: 0 0 2rem;
    padding: 0;
}

.comment-list ul.children {
    list-style: none;
    margin: 1rem 0 0 1.4rem;
    padding: 0;
}

.comment-item {
    background: #fff;
    border-radius: 8px;
    padding: 1.2rem 1.4rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
}

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

.comment-author {
    font-family: var(--head-font);
    font-weight: 700;
}

.comment-date { font-size: .82rem; color: var(--muted); }
.comment-text p:last-child { margin-bottom: 0; }
.comment-actions { margin-top: .5rem; font-size: .9rem; }
.comment-hold { color: var(--muted); font-style: italic; }

.comment-respond {
    background: #fff;
    border-radius: 8px;
    padding: 1.6rem 1.6rem 1.4rem;
    box-shadow: var(--shadow);
}

.comment-form p { margin-bottom: 1rem; }
.comment-form label {
    display: block;
    font-family: var(--head-font);
    font-size: .9rem;
    margin-bottom: .35rem;
}

.comment-form .submit {
    display: inline-block;
    font-family: var(--head-font);
    font-weight: 600;
    font-size: .98rem;
    padding: .78rem 1.5rem;
    border-radius: 4px;
    border: 1px solid var(--accent);
    background: var(--accent);
    color: #fff;
    cursor: pointer;
    transition: background-color .2s ease, transform .12s ease;
}

.comment-form .submit:hover {
    background: var(--accent-2);
    border-color: var(--accent-2);
    transform: translateY(1px);
}

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

.site-foot {
    position: relative;
    overflow: hidden;
    background: var(--plum);
    color: #E4DCEE;
    padding: 3.4rem 0 1.6rem;
    margin-top: 2rem;
}

.foot-blob {
    position: absolute;
    left: -140px;
    top: -140px;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    background: var(--accent-2);
    opacity: .12;
    filter: blur(4px);
    pointer-events: none;
}

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

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

.site-foot .widget { margin-bottom: 1.4rem; }

.site-foot .widget-title {
    font-size: 1.05rem;
    color: #FFFFFF;
    margin: 0 0 .9rem;
    padding-bottom: .5rem;
    border-bottom: 2px solid var(--accent-2);
}

.site-foot .widget,
.site-foot .widget p,
.site-foot .widget li,
.site-foot .widget span { color: #E4DCEE; }

.site-foot .widget a { color: #E4DCEE; }
.site-foot .widget a:hover { color: var(--accent-2); }

.site-foot .widget .post-date,
.site-foot .widget .rss-date { color: #B7ABC9; }

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

.site-foot .widget li {
    padding: .4rem 0;
    border-bottom: 1px solid rgba(228, 220, 238, .16);
    font-size: .95rem;
}

.site-foot .widget li:last-child { border-bottom: 0; }

.foot-copy {
    position: relative;
    z-index: 1;
    margin-top: 2.4rem;
    padding-top: 1.2rem;
    border-top: 1px solid rgba(228, 220, 238, .18);
    font-size: .86rem;
    color: #B7ABC9;
}

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

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

.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.4rem;
    background: rgba(45, 36, 56, .97);
    color: #EDE6F5;
    box-shadow: 0 -10px 30px -14px rgba(44, 36, 56, .5);
}

.cookie-banner p {
    margin: 0;
    font-size: .9rem;
    max-width: 78ch;
    min-width: 0;
}

.cookie-banner a { color: var(--accent-2); }

/* =============================================================
   16. 404
   ============================================================= */

.notfound {
    text-align: center;
    padding: 1rem 0 2rem;
}

.notfound .nf-code {
    font-family: var(--head-font);
    font-size: 6rem;
    line-height: 1;
    color: var(--accent-2);
    margin: 0 0 .6rem;
}

.notfound .search-form {
    max-width: 520px;
    margin: 1.6rem auto 1.4rem;
    justify-content: center;
}

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

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

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

    .layout-single { width: 100%; }

    .hero-inner { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
    .icon-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .topic-map { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .book-corner { width: 220px; height: 150px; right: -60px; }
}

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

    h1 { font-size: 2.1rem; }
    h2 { font-size: 1.6rem; }
    .page-title { font-size: 1.9rem; }
    .entry-head h1 { font-size: 1.95rem; }

    .nav-toggle { display: inline-block; }

    .head-inner { align-items: flex-start; }

    .main-nav {
        flex-basis: 100%;
        width: 100%;
    }

    .main-nav[hidden] { display: none !important; }

    .main-nav ul {
        flex-direction: column;
        gap: .1rem;
        padding-top: .8rem;
    }

    .main-nav li {
        border-bottom: 1px solid var(--line);
    }

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

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

    .hero {
        padding: 2.2rem 1.4rem;
        margin-top: 1.6rem;
    }

    .hero h1 { font-size: 1.95rem; }

    .pull-quote { padding: 2.2rem 1.4rem; }
    .pull-quote .pq-text { font-size: 1.55rem; max-width: none; }

    .icon-grid { grid-template-columns: minmax(0, 1fr); }
    .icon-cell { padding: 1.5rem 1.3rem; }

    .topic-map { grid-template-columns: minmax(0, 1fr); }
    .topic-tile { padding: 1.4rem 1.3rem; }

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

    .book-corner { display: none; }

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

    .comment-list ul.children { margin-left: .7rem; }

    .sidebar .widget { padding: 1.3rem 1.2rem; }
}
