/*
Theme Name: dds_woody-stool.ru
Theme URI: https://woody-stool.ru/
Author: Василиса Ершова
Author URI: https://woody-stool.ru/
Description: Информационная тема о детской мебели: растущие стулья, столы, опоры, материалы, размеры под возраст и безопасная организация детского пространства.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: woodystool
*/

/* ============================================================
   Переменные
   ============================================================ */
:root {
    --cream: #fbf7f0;
    --paper: #ffffff;
    --wood: #a5713f;
    --wood-dark: #7c5330;
    --sage: #6f9464;
    --sage-dark: #547a4b;
    --ink: #34291f;
    --muted: #6f6357;
    --line: #e7ddcd;
    --footer-bg: #2b2219;
    --footer-line: #453728;
    --footer-text: #ddd1c0;
    --footer-mute: #a99a86;
    --radius: 12px;
    --shadow: 0 6px 20px rgba(70, 50, 25, 0.08);
}

/* ============================================================
   Базовые сбросы
   ============================================================ */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: "Segoe UI", "PT Sans", "Helvetica Neue", Arial, sans-serif;
    color: var(--ink);
    background: var(--cream);
    line-height: 1.65;
    font-size: 17px;
    overflow-x: hidden;
}

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

a { color: var(--wood-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
    font-family: "Georgia", "PT Serif", serif;
    line-height: 1.25;
    color: var(--ink);
    margin: 0 0 0.6em;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.55rem; }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; }

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

.front-shell {
    width: min(85%, 1080px);
    margin-inline: auto;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--ink);
    color: #fff;
    padding: 8px 14px;
    z-index: 1000;
}
.skip-link:focus { left: 8px; top: 8px; }

/* ============================================================
   Шапка
   ============================================================ */
.site-header {
    background: var(--paper);
    border-bottom: 3px solid var(--wood);
    padding: 1rem 0;
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.branding {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    min-width: 0;
}
.brand-logo, .branding svg.brand-mark {
    display: block;
    flex: 0 0 auto;
}
.branding svg.brand-mark { width: 52px; height: 52px; }
.brand-text { min-width: 0; }
.site-title {
    font-family: "Georgia", "PT Serif", serif;
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}
.site-title a { color: var(--ink); }
.site-title a:hover { text-decoration: none; color: var(--wood-dark); }
.site-desc {
    margin: 0.2rem 0 0;
    font-size: 0.86rem;
    color: var(--muted);
    max-width: 46ch;
}

/* Навигация */
.main-nav { margin-left: auto; }
.nav-toggle {
    display: none;
    background: var(--wood);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.5rem 0.9rem;
    font-size: 1rem;
    cursor: pointer;
}
.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.5rem 0.85rem;
    color: var(--ink);
    border-radius: 8px;
    font-size: 0.98rem;
}
.main-nav a:hover {
    background: var(--cream);
    color: var(--wood-dark);
    text-decoration: none;
}
.main-nav .current-menu-item > a {
    background: var(--sage);
    color: #fff;
}

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

.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 2.45fr) minmax(0, 1fr);
    gap: 2.4rem;
    align-items: start;
}
.layout-single .content-area {
    width: 85%;
    margin-inline: auto;
}
.content-area { min-width: 0; }

/* Хлебные крошки */
.breadcrumbs {
    font-size: 0.85rem;
    color: var(--muted);
    margin: 0 0 1.4rem;
    line-height: 1.5;
}
.breadcrumbs a { color: var(--wood-dark); }
.breadcrumbs .sep { color: var(--line); margin: 0 0.15rem; }

/* ============================================================
   Записи / контент
   ============================================================ */
.entry {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 2rem 2.2rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}
.entry-title { font-size: 1.9rem; margin-bottom: 0.4rem; }
.entry-meta {
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 1.4rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--line);
}
.entry-meta a { color: var(--wood-dark); }
.entry-thumb {
    margin: 0 0 1.5rem;
    border-radius: 10px;
    overflow: hidden;
}
.entry-thumb img { display: block; width: 100%; height: auto; }
.entry-content { min-width: 0; }
.entry-content img { border-radius: 8px; height: auto; }
.entry-content h2 { margin-top: 1.6rem; }
.entry-content h3 { margin-top: 1.3rem; }
.entry-content ul, .entry-content ol { padding-left: 1.4rem; }
.entry-content li { margin-bottom: 0.4rem; }
.entry-content blockquote {
    margin: 1.5rem 0;
    padding: 1.1rem 1.4rem;
    background: var(--cream);
    border-left: 4px solid var(--sage);
    border-radius: 8px;
    color: var(--ink);
}
.entry-content blockquote p:last-child { margin-bottom: 0; }

.entry-tags {
    margin-top: 1.6rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
    font-size: 0.88rem;
}
.entry-tags a {
    display: inline-block;
    background: var(--cream);
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    margin: 0 0.3rem 0.3rem 0;
}

/* Таблицы */
table {
    border-collapse: collapse;
    width: 100%;
    margin: 1.4rem 0;
    font-size: 0.95rem;
}
table th, table td {
    border: 1px solid var(--line);
    padding: 0.6rem 0.8rem;
    text-align: left;
}
table th { background: var(--cream); font-weight: 700; }

/* ============================================================
   Карточки записей
   ============================================================ */
.card-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: 1.6rem;
    margin-bottom: 2rem;
}
.card {
    display: flex;
    flex-direction: column;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(70,50,25,0.12); }
.card-thumb { display: block; overflow: hidden; }
.card-thumb img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}
.card-thumb.placeholder {
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, var(--cream), #efe4d3);
    display: flex;
    align-items: center;
    justify-content: center;
}
.card-thumb.placeholder svg { width: 64px; height: 64px; opacity: 0.55; }
.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.2rem 1.3rem 1.4rem;
    min-width: 0;
}
.card-title { font-size: 1.15rem; margin: 0 0 0.4rem; }
.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--wood-dark); text-decoration: none; }
.card-meta { font-size: 0.8rem; color: var(--muted); margin-bottom: 0.6rem; }
.card-excerpt { font-size: 0.93rem; color: var(--ink); margin-bottom: 1rem; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-more {
    margin-top: auto;
    align-self: flex-start;
    font-weight: 600;
    color: var(--wood-dark);
    font-size: 0.92rem;
}

/* ============================================================
   Сайдбар / виджеты
   ============================================================ */
.sidebar { min-width: 0; }
.sidebar .widget {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.3rem 1.4rem;
    margin-bottom: 1.6rem;
    box-shadow: var(--shadow);
    color: var(--ink);
}
.sidebar .widget-title {
    font-size: 1.1rem;
    margin: 0 0 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 2px solid var(--sage);
    color: var(--ink);
}
.sidebar .widget ul { list-style: none; margin: 0; padding: 0; }
.sidebar .widget li {
    padding: 0.45rem 0;
    border-bottom: 1px solid var(--line);
    font-size: 0.94rem;
}
.sidebar .widget li:last-child { border-bottom: none; }
.sidebar .widget a { color: var(--wood-dark); }
.sidebar .widget a:hover { color: var(--sage-dark); }
.sidebar .widget .post-date { color: var(--muted); font-size: 0.8rem; }

/* ============================================================
   Пагинация
   ============================================================ */
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: center;
    margin: 2rem 0 0;
}
.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    padding: 0.5rem 0.75rem;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--wood-dark);
    font-size: 0.95rem;
    line-height: 1;
}
.pagination a.page-numbers:hover {
    background: var(--cream);
    border-color: var(--wood);
    text-decoration: none;
}
.pagination .page-numbers.current {
    background: var(--sage);
    border-color: var(--sage);
    color: #fff;
    font-weight: 700;
}
.pagination .page-numbers.dots {
    border: none;
    background: none;
    color: var(--muted);
}

/* ============================================================
   Комментарии
   ============================================================ */
.comments-area {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.8rem 2rem;
    box-shadow: var(--shadow);
    margin-top: 2rem;
}
.comments-title { font-size: 1.4rem; margin-bottom: 1.2rem; }
.comment-list { list-style: none; margin: 0 0 1.5rem; padding: 0; }
.comment-list ul.children { list-style: none; margin: 1rem 0 0 1.5rem; padding: 0; }
.comment-item { margin-bottom: 1.2rem; }
.comment-body {
    background: var(--cream);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 1rem 1.2rem;
}
.comment-meta {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}
.comment-author { font-weight: 700; color: var(--ink); }
.comment-date { color: var(--muted); }
.comment-text { font-size: 0.95rem; }
.comment-text p:last-child { margin-bottom: 0; }
.comment-awaiting { font-size: 0.82rem; color: var(--wood-dark); font-style: italic; }
.comment-reply a {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--sage-dark);
}
.comment-respond {
    margin-top: 1.5rem;
    border-top: 1px solid var(--line);
    padding-top: 1.4rem;
}
.comment-form label { display: block; font-size: 0.9rem; margin-bottom: 0.3rem; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.6rem 0.7rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    background: var(--paper);
    color: var(--ink);
}
.comment-form textarea { min-height: 130px; }

/* ============================================================
   Кнопки / формы поиска
   ============================================================ */
.btn, .comment-form input[type="submit"], .search-form button {
    display: inline-block;
    background: var(--wood);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.7rem 1.4rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s ease;
}
.btn:hover, .comment-form input[type="submit"]:hover, .search-form button:hover {
    background: var(--wood-dark);
    text-decoration: none;
    color: #fff;
}

.search-form {
    display: flex;
    gap: 0.5rem;
    min-width: 0;
}
.search-form input.search-field {
    flex: 1;
    min-width: 0;
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    background: var(--paper);
    color: var(--ink);
}
.sidebar .widget .search-form { margin: 0; }

/* ============================================================
   Главная — секции
   ============================================================ */
.front-section { padding: 3rem 0; }
.front-section.alt { background: var(--paper); border-block: 1px solid var(--line); }
.section-head { max-width: 60ch; margin-bottom: 1.8rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-kicker {
    display: inline-block;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--sage-dark);
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.section-head h2 { font-size: 1.8rem; margin: 0 0 0.5rem; }
.section-head p { color: var(--muted); margin: 0; }

/* Блок текст + иллюстрация */
.media-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 2.5rem;
    align-items: center;
}
.media-row.reverse .media-figure { order: -1; }
.media-figure {
    margin: 0;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    min-width: 0;
}
.media-figure img { display: block; width: 100%; height: auto; }
.media-copy { min-width: 0; }
.media-copy h2 { margin-top: 0; }
.media-copy p { color: var(--ink); }

/* Сетка направлений (иконки) */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 1.5rem;
}
.feature-card {
    background: var(--cream);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.6rem 1.5rem;
    text-align: left;
    min-width: 0;
}
.front-section.alt .feature-card { background: var(--cream); }
.feature-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 12px;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
}
.feature-icon svg { width: 30px; height: 30px; }
.feature-card h3 { font-size: 1.15rem; margin: 0 0 0.5rem; }
.feature-card p { margin: 0; font-size: 0.94rem; color: var(--muted); }

/* Пошаговый блок */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: 1.5rem;
    counter-reset: step;
}
.step {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.6rem 1.5rem;
    position: relative;
    min-width: 0;
}
.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--sage);
    color: #fff;
    font-weight: 700;
    font-family: "Georgia", serif;
    margin-bottom: 0.9rem;
}
.step h3 { font-size: 1.1rem; margin: 0 0 0.4rem; }
.step p { margin: 0; font-size: 0.93rem; color: var(--muted); }

/* Последние записи на главной */
.latest-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: 1.6rem;
}
.front-cards-foot { text-align: center; margin-top: 2rem; }

/* FAQ */
.faq { max-width: 820px; margin-inline: auto; }
.faq-item {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 10px;
    margin-bottom: 0.9rem;
    padding: 0 1.4rem;
    overflow: hidden;
}
.faq-item summary {
    cursor: pointer;
    padding: 1.1rem 0;
    font-weight: 600;
    font-family: "Georgia", serif;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: "+";
    color: var(--sage-dark);
    font-size: 1.4rem;
    line-height: 1;
    flex: 0 0 auto;
}
.faq-item[open] summary::after { content: "–"; }
.faq-item .faq-body { padding: 0 0 1.2rem; color: var(--muted); font-size: 0.96rem; }
.faq-item .faq-body p:last-child { margin-bottom: 0; }

/* CTA */
.cta-band {
    background: linear-gradient(135deg, var(--wood-dark), var(--wood));
    color: #fff;
    border-radius: 16px;
    padding: 2.6rem 2.4rem;
    text-align: center;
    box-shadow: var(--shadow);
}
.cta-band h2 { color: #fff; margin-top: 0; }
.cta-band p { color: rgba(255,255,255,0.9); max-width: 56ch; margin: 0 auto 1.4rem; }
.cta-band .btn {
    background: #fff;
    color: var(--wood-dark);
}
.cta-band .btn:hover { background: var(--cream); color: var(--wood-dark); }

/* ============================================================
   Подвал
   ============================================================ */
.site-footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 2.6rem 0 0;
    margin-top: 2rem;
}
.footer-cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 2rem;
    padding-bottom: 2.2rem;
}
.footer-cols .widget { color: var(--footer-text); min-width: 0; }
.footer-cols .widget-title {
    color: #fff;
    font-size: 1.1rem;
    margin: 0 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--footer-line);
}
.footer-cols .widget p { color: var(--footer-text); font-size: 0.92rem; }
.footer-cols .widget ul { list-style: none; margin: 0; padding: 0; }
.footer-cols .widget li { padding: 0.35rem 0; font-size: 0.92rem; }
.footer-cols .widget a { color: var(--footer-mute); }
.footer-cols .widget a:hover { color: #fff; }
.footer-cols .widget .post-date { color: var(--footer-mute); font-size: 0.8rem; }
.site-info {
    border-top: 1px solid var(--footer-line);
    padding: 1.2rem 0;
    text-align: center;
    font-size: 0.85rem;
    color: var(--footer-mute);
}

/* ============================================================
   Cookie-баннер
   ============================================================ */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 900;
    background: var(--ink);
    color: #fff;
    padding: 1rem 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
    flex-wrap: wrap;
    box-shadow: 0 -4px 18px rgba(0,0,0,0.2);
}
.cookie-banner p { margin: 0; font-size: 0.9rem; max-width: 72ch; }
.cookie-banner a { color: #f0d9b8; text-decoration: underline; }
.cookie-banner .btn { flex: 0 0 auto; padding: 0.55rem 1.3rem; }

/* ============================================================
   404
   ============================================================ */
.error-404 {
    text-align: center;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 3rem 2rem;
    box-shadow: var(--shadow);
}
.error-404 .big { font-size: 4rem; color: var(--wood); margin: 0; font-family: "Georgia", serif; }
.error-404 .search-form { max-width: 420px; margin: 1.6rem auto 0; }

/* ============================================================
   Page-hero (заголовок обычных страниц)
   ============================================================ */
.page-hero { margin-bottom: 1.6rem; }
.page-hero h1 { margin: 0; }

/* ============================================================
   Адаптив
   ============================================================ */
@media (max-width: 960px) {
    .layout-with-sidebar { grid-template-columns: 1fr; }
    .sidebar { margin-top: 1rem; }
    .media-row { grid-template-columns: 1fr; gap: 1.6rem; }
    .media-row.reverse .media-figure { order: 0; }
    h1 { font-size: 1.7rem; }
    .entry-title { font-size: 1.6rem; }
}

@media (max-width: 600px) {
    body { font-size: 16px; }
    .front-shell { width: 90%; }
    .layout-single .content-area { width: 100%; }
    .main-nav { margin-left: 0; width: 100%; }
    .nav-toggle { display: inline-block; }
    .main-nav ul {
        display: none;
        flex-direction: column;
        gap: 0.2rem;
        margin-top: 0.8rem;
        width: 100%;
    }
    .main-nav.open ul { display: flex; }
    .main-nav a { padding: 0.7rem 0.8rem; border: 1px solid var(--line); }
    .header-inner { align-items: flex-start; }
    .entry { padding: 1.4rem 1.3rem; }
    .front-section { padding: 2.2rem 0; }
    .cta-band { padding: 2rem 1.5rem; }
    .comments-area { padding: 1.4rem 1.3rem; }
    .cookie-banner { flex-direction: column; text-align: center; gap: 0.8rem; }
}
