/*
Theme Name: dds_sakurakitap.com
Author: Евгения Тарасова
Description: Информационная тема о книгах, комиксах и читательских увлечениях: жанры, визуальное повествование, перевод и коллекционирование.
Version: 1.1
Text Domain: skrbk
*/

/* ============================ Переменные ============================ */
:root {
    --paper: #faf7f2;
    --surface: #ffffff;
    --ink: #2b2521;
    --muted: #6f6459;
    --rose: #c85a7c;
    --rose-dark: #a83f62;
    --plum: #6d3b52;
    --border: #e8ded2;
    --border-soft: #f0e8dd;
    --footer-bg: #2a2029;
    --footer-ink: #e9ddd6;
    --footer-muted: #b9a99f;
    --shadow: 0 2px 14px rgba(60, 40, 45, 0.07);
    --radius: 12px;
}

/* ============================ Сброс/база ============================ */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: "Georgia", "Iowan Old Style", "Times New Roman", serif;
    color: var(--ink);
    background: var(--paper);
    line-height: 1.7;
    font-size: 17px;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: "Georgia", "Iowan Old Style", serif;
    line-height: 1.25;
    color: var(--ink);
    margin: 0 0 0.6em;
    font-weight: 700;
}

h1 { font-size: 2.1rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.22rem; }

p { margin: 0 0 1.1em; }

a {
    color: var(--rose-dark);
    text-decoration: none;
    transition: color 0.18s ease;
}
a:hover { color: var(--plum); text-decoration: underline; }

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

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

.shell-wide {
    width: 85%;
    max-width: 1180px;
    margin-inline: auto;
}

@media (max-width: 600px) {
    .shell-wide { width: 92%; }
}

/* ============================ Шапка ============================ */
.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0.9rem 0;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.branding {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
}
.brand-logo, .branding svg.brand-mark {
    display: block;
    width: 52px;
    height: 52px;
    flex: 0 0 auto;
}
.brand-text { min-width: 0; }
.site-title {
    font-size: 1.15rem;
    margin: 0;
    line-height: 1.2;
}
.site-title a { color: var(--ink); }
.site-title a:hover { color: var(--rose-dark); text-decoration: none; }
.site-desc {
    margin: 0.15rem 0 0;
    font-size: 0.83rem;
    color: var(--muted);
    line-height: 1.4;
}

/* Навигация */
.main-nav ul {
    list-style: none;
    display: flex;
    gap: 0.4rem;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}
.main-nav a {
    display: block;
    padding: 0.45rem 0.8rem;
    color: var(--ink);
    border-radius: 8px;
    font-size: 0.98rem;
    font-family: "Helvetica Neue", Arial, sans-serif;
}
.main-nav a:hover {
    background: var(--border-soft);
    color: var(--rose-dark);
    text-decoration: none;
}
.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.4rem 0.6rem;
    font-size: 1.1rem;
    cursor: pointer;
    color: var(--ink);
}

@media (max-width: 780px) {
    .nav-toggle { display: inline-block; }
    .main-nav {
        flex-basis: 100%;
    }
    .main-nav[hidden] { display: none !important; }
    .main-nav ul {
        flex-direction: column;
        gap: 0.15rem;
        margin-top: 0.6rem;
    }
    .main-nav a { padding: 0.6rem 0.7rem; }
}

/* ============================ Основная раскладка ============================ */
.site-main { padding: 2rem 0 3rem; }

.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67%) minmax(0, 27%);
    gap: 6%;
    align-items: start;
}
.layout-single .content-area {
    width: 85%;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}
.content-area { min-width: 0; }

@media (max-width: 960px) {
    .layout-with-sidebar {
        grid-template-columns: minmax(0, 1fr);
        gap: 2.5rem;
    }
    .layout-single .content-area { width: 100%; }
}

/* ============================ Хлебные крошки ============================ */
.breadcrumbs {
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 1.4rem;
    font-family: "Helvetica Neue", Arial, sans-serif;
}
.breadcrumbs a { color: var(--rose-dark); }
.breadcrumbs .sep { margin: 0 0.35rem; color: var(--muted); }

/* ============================ Карточки записей (A8, A10) ============================ */
.card-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
    gap: 1.6rem;
}
.card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    min-width: 0;
}
.card-thumb {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--border-soft);
}
.card-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.1rem 1.25rem 1.35rem;
    min-width: 0;
}
.card-title {
    font-size: 1.15rem;
    margin: 0 0 0.5rem;
}
.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--rose-dark); text-decoration: none; }
.card-meta {
    font-size: 0.78rem;
    color: var(--muted);
    margin-bottom: 0.6rem;
    font-family: "Helvetica Neue", Arial, sans-serif;
}
.card-excerpt {
    font-size: 0.95rem;
    color: #4a423b;
    flex: 1;
}
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-more {
    display: inline-block;
    margin-top: 0.7rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--rose-dark);
    font-family: "Helvetica Neue", Arial, sans-serif;
}

/* ============================ Одиночная запись / страница ============================ */
.entry {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem 2.2rem;
    box-shadow: var(--shadow);
}
.entry-title { font-size: 2rem; }
.entry-meta {
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 1.4rem;
    font-family: "Helvetica Neue", Arial, sans-serif;
}
.entry-thumb {
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 1.5rem;
}
.entry-thumb img { display: block; width: 100%; }
.entry-content h2 { margin-top: 1.8rem; }
.entry-content h3 { margin-top: 1.4rem; }
.entry-content img { border-radius: 8px; }
.entry-content ul, .entry-content ol { padding-left: 1.3rem; }

@media (max-width: 600px) {
    .entry { padding: 1.4rem 1.2rem; }
    .entry-title { font-size: 1.6rem; }
}

/* Таблицы */
.entry-content table {
    border-collapse: collapse;
    width: 100%;
    margin: 1.2rem 0;
}
.entry-content table, .entry-content th, .entry-content td {
    border: 1px solid var(--border);
}
.entry-content th, .entry-content td { padding: 0.6rem 0.8rem; text-align: left; }
.entry-content th { background: var(--border-soft); }

blockquote {
    margin: 1.4rem 0;
    padding: 1rem 1.3rem;
    border-left: 4px solid var(--rose);
    background: #fdf3f6;
    border-radius: 0 8px 8px 0;
    color: #52424a;
    font-style: italic;
}

/* ============================ Сайдбар / виджеты ============================ */
.sidebar { min-width: 0; }
.widget {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.2rem 1.3rem;
    margin-bottom: 1.5rem;
}
.widget-title {
    font-size: 1.1rem;
    margin: 0 0 0.9rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--rose);
    color: var(--ink);
}
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { margin-bottom: 0.55rem; padding-bottom: 0.55rem; border-bottom: 1px solid var(--border-soft); }
.widget li:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.widget a { color: var(--ink); }
.widget a:hover { color: var(--rose-dark); }
.widget .post-date { display: block; font-size: 0.76rem; color: var(--muted); }

/* ============================ Пагинация (D5) ============================ */
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: center;
    margin-top: 2.2rem;
}
.pagination .page-numbers {
    display: inline-block;
    padding: 0.5rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink);
    font-size: 0.92rem;
    font-family: "Helvetica Neue", Arial, sans-serif;
    line-height: 1.2;
}
.pagination a.page-numbers:hover {
    background: var(--border-soft);
    color: var(--rose-dark);
    text-decoration: none;
}
.pagination .page-numbers.current {
    background: var(--rose);
    border-color: var(--rose);
    color: #fff;
}
.pagination .page-numbers.dots {
    border: none;
    background: none;
}

/* ============================ Главная ============================ */
.front-section { padding: 2.6rem 0; }
.front-section + .front-section { border-top: 1px solid var(--border-soft); }
.section-head { margin-bottom: 1.6rem; }
.section-head h2 { margin-bottom: 0.35rem; }
.section-head .lead { color: var(--muted); margin: 0; }

/* Блок текст + иллюстрация */
.split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 2.4rem;
    align-items: center;
}
.split.reverse .split-media { order: 2; }
.split-media img {
    display: block;
    width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.split-text h2 { margin-top: 0; }

@media (max-width: 780px) {
    .split { grid-template-columns: minmax(0, 1fr); gap: 1.4rem; }
    .split.reverse .split-media { order: 0; }
}

/* Сетка рубрик */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
    gap: 1.4rem;
}
.feature-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem 1.4rem;
    box-shadow: var(--shadow);
    min-width: 0;
}
.feature-card .ic {
    width: 44px;
    height: 44px;
    display: block;
    margin-bottom: 0.9rem;
}
.feature-card h3 { margin: 0 0 0.45rem; }
.feature-card p { margin: 0; font-size: 0.95rem; color: #4a423b; }

/* Шаги */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: 1.4rem;
    counter-reset: step;
}
.step {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem 1.4rem 1.4rem;
    min-width: 0;
}
.step .num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--rose);
    color: #fff;
    font-weight: 700;
    font-family: "Helvetica Neue", Arial, sans-serif;
    margin-bottom: 0.8rem;
}
.step h3 { margin: 0 0 0.4rem; font-size: 1.1rem; }
.step p { margin: 0; font-size: 0.94rem; color: #4a423b; }

/* Цитата-акцент (A14) */
.quote-band {
    background: var(--plum);
    color: #fbeef3;
    border-radius: var(--radius);
    padding: 2.6rem 2.4rem;
    text-align: center;
}
.quote-band blockquote {
    border: none;
    background: none;
    color: #fbeef3;
    font-size: 1.4rem;
    font-style: italic;
    margin: 0 auto;
    max-width: 720px;
    padding: 0;
}
.quote-band .cite { display: block; margin-top: 1rem; font-size: 0.9rem; color: #e5bccc; font-style: normal; }

@media (max-width: 600px) {
    .quote-band { padding: 1.8rem 1.4rem; }
    .quote-band blockquote { font-size: 1.15rem; }
}

/* Факты */
.facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
    gap: 1.4rem;
    text-align: center;
}
.fact {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.6rem 1.2rem;
    min-width: 0;
}
.fact .big {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--rose-dark);
    display: block;
    line-height: 1;
    margin-bottom: 0.4rem;
}
.fact p { margin: 0; font-size: 0.9rem; color: var(--muted); }

/* Галерея */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
    gap: 1rem;
}
.gallery-grid figure {
    margin: 0;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    min-width: 0;
}
.gallery-grid img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

/* CTA (A14) */
.cta-band {
    background: linear-gradient(120deg, #fbeef2, #f6e9df);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.4rem 2.2rem;
    text-align: center;
}
.cta-band h2 { margin-top: 0; }
.cta-band p { max-width: 640px; margin: 0 auto 1.3rem; color: #52453d; }

@media (max-width: 600px) {
    .cta-band { padding: 1.8rem 1.4rem; }
}

.btn {
    display: inline-block;
    background: var(--rose);
    color: #fff;
    padding: 0.7rem 1.5rem;
    border-radius: 30px;
    font-weight: 700;
    font-family: "Helvetica Neue", Arial, sans-serif;
    font-size: 0.95rem;
}
.btn:hover { background: var(--rose-dark); color: #fff; text-decoration: none; }

/* Последние записи на главной */
.latest-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.6rem;
    flex-wrap: wrap;
}
.latest-head h2 { margin: 0; }
.latest-head a { font-size: 0.92rem; font-family: "Helvetica Neue", Arial, sans-serif; }

/* ============================ Форма поиска ============================ */
.search-form {
    display: flex;
    gap: 0.5rem;
}
.search-form input[type="search"] {
    flex: 1;
    min-width: 0;
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
}
.search-form button {
    padding: 0.6rem 1.1rem;
    background: var(--rose);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
}
.search-form button:hover { background: var(--rose-dark); }

/* ============================ Комментарии ============================ */
.comments-area {
    margin-top: 2.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.6rem 1.8rem;
}
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list ul.children { list-style: none; margin: 0 0 0 1.5rem; padding: 0; }
.comment-item { margin-bottom: 1.2rem; }
.comment-body {
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    padding: 1rem 1.2rem;
}
.comment-meta {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.82rem;
    margin-bottom: 0.5rem;
    font-family: "Helvetica Neue", Arial, sans-serif;
}
.comment-author { font-weight: 700; }
.comment-date { color: var(--muted); }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    margin-bottom: 0.8rem;
}
.comment-form .submit {
    background: var(--rose);
    color: #fff;
    border: none;
    padding: 0.65rem 1.5rem;
    border-radius: 30px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 700;
}
.comment-form .submit:hover { background: var(--rose-dark); }

/* ============================ 404 ============================ */
.error-404 {
    text-align: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 3rem 2rem;
    box-shadow: var(--shadow);
}
.error-404 .code { font-size: 4rem; color: var(--rose); margin: 0; line-height: 1; }
.error-404 .search-form { max-width: 420px; margin: 1.6rem auto 0; }

/* ============================ Подвал ============================ */
.site-footer {
    background: var(--footer-bg);
    color: var(--footer-ink);
    padding: 2.6rem 0 1.4rem;
    margin-top: 2rem;
}
.footer-cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 2rem;
}
.footer-cols .widget {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    color: var(--footer-ink);
}
.footer-cols .widget-title {
    color: #fff;
    border-bottom-color: var(--rose);
}
.footer-cols .widget,
.footer-cols .widget p,
.footer-cols .widget li { color: var(--footer-ink); }
.footer-cols .widget a { color: var(--footer-ink); }
.footer-cols .widget a:hover { color: #fff; }
.footer-cols .widget li { border-bottom-color: rgba(255,255,255,0.12); }
.footer-cols .widget .post-date { color: var(--footer-muted); }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.14);
    margin-top: 2rem;
    padding-top: 1.2rem;
    text-align: center;
    font-size: 0.84rem;
    color: var(--footer-muted);
}

/* ============================ Cookie-баннер (D6, A11) ============================ */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 999;
    background: rgba(30, 22, 27, 0.97);
    color: #f3e7e2;
    padding: 1rem 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
    flex-wrap: wrap;
    font-size: 0.9rem;
    font-family: "Helvetica Neue", Arial, sans-serif;
}
.cookie-banner p { margin: 0; max-width: 720px; }
.cookie-banner a { color: #f0b8ca; }
.cookie-banner button {
    background: var(--rose);
    color: #fff;
    border: none;
    padding: 0.55rem 1.4rem;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.9rem;
    flex: 0 0 auto;
}
.cookie-banner button:hover { background: var(--rose-dark); }

/* ============================ Утилиты ============================ */
.screen-reader-text {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}
.page-title { margin-bottom: 1.6rem; }
