/*
Theme Name: dds_artzacepka.ru
Theme URI: https://artzacepka.ru/
Author: Анна Зацепина
Author URI: https://artzacepka.ru/
Description: Образовательный портал, объединяющий мастер-классы для домашнего творчества и методические материалы для педагогов.
Version: 1.1
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: artz
*/

/* ---------- Базовый сброс и переменные ---------- */
:root {
    --paper: #f9f6f0;
    --paper-shade: #f1ecdf;
    --terracotta: #c45c3e;
    --terracotta-dark: #a64b30;
    --graphite: #2c2e31;
    --graphite-soft: #3e4146;
    --ochre: #e0b84d;
    --ochre-soft: #efd58a;
    --mint: #448c7a;
    --mint-soft: #6fae9d;
    --text: #2c2e31;
    --text-muted: #5b5e64;
    --line: #d8d2c1;
    --footer-bg: #25272a;
    --footer-text: #e8e4d8;
    --footer-link: #efd58a;
    --shadow: 0 4px 18px rgba(44, 46, 49, 0.08);
    --shadow-strong: 0 10px 28px rgba(44, 46, 49, 0.14);
}

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

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--paper);
    color: var(--text);
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 17px;
    line-height: 1.65;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Helvetica Neue', 'Segoe UI', Arial, sans-serif;
    font-weight: 700;
    color: var(--graphite);
    text-align: left;
    line-height: 1.25;
    margin: 1.4em 0 0.6em;
}

h1 { font-size: 2.2rem; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.15rem; }

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    font-family: 'Georgia', serif;
    max-width: 680px;
    margin: 0.4em auto 1.6em;
    min-width: 0;
}

.section-subtitle::before,
.section-subtitle::after {
    content: '|';
    color: var(--terracotta);
    margin: 0 0.6em;
    font-style: normal;
}

p { margin: 0 0 1em; }
img { max-width: 100%; height: auto; }
a { color: var(--terracotta); text-decoration: none; }
a:hover { color: var(--terracotta-dark); text-decoration: underline; }

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

/* ---------- Шапка ---------- */
.site-header {
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 18px 0;
}
.site-header .shell {
    display: flex;
    align-items: center;
    gap: 28px;
    min-width: 0;
    flex-wrap: wrap;
}
.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    flex: 1 1 auto;
}
.brand-logo,
.brand svg {
    width: 56px;
    height: 56px;
    flex: 0 0 56px;
    display: block;
}
.brand-text {
    min-width: 0;
}
.brand-name {
    display: block;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--graphite);
    line-height: 1.3;
    max-width: 640px;
}
.brand-name a { color: inherit; }
.brand-name a:hover { color: var(--terracotta); text-decoration: none; }
.brand-tag {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
    line-height: 1.4;
    max-width: 640px;
}

.primary-nav {
    flex: 0 0 auto;
}
.primary-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.primary-nav a {
    display: inline-block;
    padding: 9px 16px;
    border-radius: 24px;
    color: var(--graphite);
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    transition: background 0.18s, color 0.18s;
}
.primary-nav a:hover,
.primary-nav .current-menu-item > a {
    background: var(--graphite);
    color: var(--paper);
    text-decoration: none;
}

.nav-toggle {
    display: none;
    background: transparent;
    border: 2px solid var(--graphite);
    border-radius: 8px;
    padding: 8px 14px;
    color: var(--graphite);
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
}

/* ---------- Хлебные крошки ---------- */
.breadcrumbs {
    padding: 14px 0;
    font-size: 0.88rem;
    color: var(--text-muted);
}
.breadcrumbs .shell {
    display: block;
}
.breadcrumbs a { color: var(--graphite-soft); }
.breadcrumbs a:hover { color: var(--terracotta); }
.breadcrumbs .sep {
    color: var(--terracotta);
    margin: 0 6px;
}

/* ---------- Основная раскладка ---------- */
.site-main {
    padding: 24px 0 48px;
}
.layout {
    display: block;
}
.layout.with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67%) minmax(0, 27%);
    gap: 6%;
    align-items: start;
}
.content-narrow {
    width: 85%;
    margin-left: auto;
    margin-right: auto;
    min-width: 0;
}
.content-area {
    min-width: 0;
}

/* ---------- Тематические блоки на главной ---------- */
.theme-block {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 36px 32px;
    margin: 28px 0;
    box-shadow: var(--shadow);
    min-width: 0;
}
.theme-block.dark {
    background: var(--graphite);
    color: var(--paper);
    border-color: var(--graphite);
}
.theme-block.dark h2,
.theme-block.dark h3 { color: #fff; }
.theme-block.dark p { color: var(--paper); }
.theme-block.accent {
    background: linear-gradient(135deg, #fff 0%, var(--paper-shade) 100%);
    border-left: 6px solid var(--terracotta);
}
.theme-block h2 {
    margin-top: 0;
    font-size: 1.55rem;
}
.theme-block-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin-top: 20px;
}
.theme-block-grid .item {
    background: var(--paper);
    border-radius: 14px;
    padding: 18px;
    min-width: 0;
}
.theme-block.dark .theme-block-grid .item {
    background: var(--graphite-soft);
}
.theme-block-grid .item h4 {
    margin: 0 0 6px;
    color: var(--graphite);
}
.theme-block.dark .theme-block-grid .item h4 { color: var(--ochre-soft); }

/* Таймлайн «Путь проекта» */
.project-timeline {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 32px;
    margin: 28px 0;
    box-shadow: var(--shadow);
    overflow: hidden;
}
.timeline-track {
    display: flex;
    gap: 18px;
    align-items: stretch;
    overflow-x: auto;
    padding: 12px 4px 18px;
    scroll-snap-type: x mandatory;
}
.timeline-step {
    flex: 0 0 200px;
    background: var(--paper-shade);
    border-radius: 16px;
    padding: 18px;
    position: relative;
    scroll-snap-align: start;
    min-width: 0;
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s, transform 0.6s;
}
.timeline-step.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.timeline-step .step-num {
    display: inline-block;
    background: var(--terracotta);
    color: #fff;
    width: 32px;
    height: 32px;
    line-height: 32px;
    text-align: center;
    border-radius: 50%;
    font-weight: 700;
    margin-bottom: 10px;
    font-family: 'Helvetica Neue', sans-serif;
}
.timeline-step h4 { margin: 0 0 6px; font-size: 1.02rem; }
.timeline-step p { margin: 0; font-size: 0.9rem; color: var(--text-muted); }

/* ---------- Кнопки ---------- */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 30px;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    border: 2px solid transparent;
    cursor: pointer;
    transition: box-shadow 0.18s, transform 0.18s, background 0.18s, color 0.18s;
    text-decoration: none;
    line-height: 1.2;
}
.btn:hover {
    box-shadow: inset 0 -2px 6px rgba(0, 0, 0, 0.18);
    text-decoration: none;
}
.btn:hover .btn-text { transform: translateY(1px); }
.btn-text {
    display: inline-block;
    transition: transform 0.18s;
}
.btn-primary {
    background: var(--terracotta);
    color: #fff;
    border-color: var(--terracotta);
}
.btn-primary:hover { color: #fff; background: var(--terracotta-dark); border-color: var(--terracotta-dark); }
.btn-secondary {
    background: var(--graphite);
    color: #fff;
    border-color: var(--terracotta);
}
.btn-secondary:hover { color: #fff; background: var(--graphite-soft); }

/* Кнопка "Начать проект" — со срезанным углом */
.btn-kulman {
    background: var(--terracotta);
    color: #fff;
    border: 2px solid var(--terracotta);
    padding: 14px 32px 14px 24px;
    border-radius: 30px 6px 30px 30px;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-weight: 700;
    font-size: 1rem;
    display: inline-block;
    text-decoration: none;
    transition: box-shadow 0.18s, background 0.18s;
    clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 100%, 0 100%);
}
.btn-kulman:hover {
    color: #fff;
    background: var(--terracotta-dark);
    box-shadow: inset 0 -2px 8px rgba(0, 0, 0, 0.2);
    text-decoration: none;
}

/* ---------- Карточки записей ---------- */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin: 24px 0;
}
.card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.18s, box-shadow 0.18s;
    min-width: 0;
}
.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-strong);
}

/* Карточка для категории «Педагогам» — пунктир */
.card.is-teacher {
    border: 2px dashed var(--graphite);
    background: var(--paper-shade);
}
/* Карточка для категории «С детьми дома» — наклейка-уголок */
.card.is-home {
    position: relative;
}
.card.is-home::after {
    content: 'просто';
    position: absolute;
    top: 12px;
    right: -28px;
    background: var(--ochre);
    color: var(--graphite);
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-weight: 700;
    font-size: 0.7rem;
    text-transform: uppercase;
    padding: 4px 32px;
    transform: rotate(35deg);
    letter-spacing: 0.5px;
    z-index: 2;
}

.card-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}
.card-body {
    flex: 1;
    padding: 20px 22px 22px;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.card-title {
    margin: 0 0 8px;
    font-size: 1.15rem;
    line-height: 1.3;
}
.card-title a { color: var(--graphite); }
.card-title a:hover { color: var(--terracotta); text-decoration: none; }
.card-meta {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin: 0 0 10px;
    font-family: 'Helvetica Neue', Arial, sans-serif;
}
.card-meta a { color: var(--text-muted); }
.card-meta a:hover { color: var(--terracotta); }
.card-excerpt {
    flex: 1;
    font-size: 0.95rem;
    color: var(--graphite-soft);
}
.card-excerpt p {
    margin: 0 0 0.5em;
    background: none;
}
.card-read-more {
    margin-top: 14px;
    align-self: flex-start;
}

/* ---------- Записи и страницы ---------- */
.entry {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 32px;
    box-shadow: var(--shadow);
    margin-bottom: 28px;
    min-width: 0;
}
.entry-thumb {
    display: block;
    width: 100%;
    border-radius: 14px;
    margin-bottom: 22px;
}
.entry-title {
    margin-top: 0;
    font-size: 2rem;
}
.entry-meta {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 22px;
    font-family: 'Helvetica Neue', Arial, sans-serif;
}
.entry-content p { margin: 0 0 1.1em; }
.entry-content img { border-radius: 12px; display: block; margin: 1em 0; }
.entry-content h2, .entry-content h3 { margin-top: 1.6em; }
.entry-content blockquote {
    border-left: 4px solid var(--terracotta);
    background: var(--paper-shade);
    padding: 14px 22px;
    margin: 1.4em 0;
    font-style: italic;
    border-radius: 0 12px 12px 0;
}
.entry-content ul, .entry-content ol { padding-left: 22px; }
.entry-content pre, .entry-content code {
    background: var(--paper-shade);
    border-radius: 8px;
    padding: 2px 6px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.92em;
}
.entry-content pre { padding: 14px 18px; overflow-x: auto; }

/* Таблицы внутри записей */
.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.2em 0;
    border: 1px solid var(--line);
}
.entry-content th,
.entry-content td {
    border: 1px solid var(--line);
    padding: 10px 14px;
    text-align: left;
}
.entry-content th {
    background: var(--paper-shade);
    font-family: 'Helvetica Neue', Arial, sans-serif;
}

/* ---------- Сайдбар и виджеты ---------- */
.sidebar {
    min-width: 0;
}
.widget {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 22px 24px;
    margin-bottom: 22px;
    box-shadow: var(--shadow);
    color: var(--text);
    min-width: 0;
}
.widget-title {
    margin: 0 0 14px;
    font-size: 1.1rem;
    color: var(--graphite);
    border-bottom: 2px solid var(--terracotta);
    padding-bottom: 8px;
    display: inline-block;
}
.widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.widget li {
    padding: 8px 0;
    border-bottom: 1px dotted var(--line);
    color: var(--text);
}
.widget li:last-child { border-bottom: none; }
.widget a {
    color: var(--graphite);
}
.widget a:hover { color: var(--terracotta); }
.widget .post-date,
.widget time {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: 'Helvetica Neue', Arial, sans-serif;
    margin-top: 2px;
}

/* ---------- Пагинация ---------- */
.pagination {
    margin: 32px 0 12px;
    text-align: center;
}
.pagination .page-numbers {
    display: inline-block;
    padding: 9px 15px;
    margin: 0 3px 6px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 22px;
    color: var(--graphite);
    text-decoration: none;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.92rem;
    transition: background 0.18s, color 0.18s;
}
.pagination .page-numbers:hover {
    background: var(--terracotta);
    color: #fff;
    border-color: var(--terracotta);
}
.pagination .page-numbers.current {
    background: var(--graphite);
    color: #fff;
    border-color: var(--graphite);
}
.pagination .dots:hover {
    background: #fff;
    color: var(--graphite);
    border-color: var(--line);
}

/* ---------- Поиск ---------- */
.search-form {
    display: flex;
    gap: 8px;
    align-items: stretch;
    margin: 14px 0;
}
.search-form input[type="search"] {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    font-family: inherit;
    font-size: 0.95rem;
    background: #fff;
    color: var(--text);
    min-width: 0;
}
.search-form input[type="search"]:focus {
    outline: none;
    border-color: var(--terracotta);
}
.search-form button {
    padding: 10px 20px;
    background: var(--terracotta);
    color: #fff;
    border: none;
    border-radius: 22px;
    cursor: pointer;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-weight: 600;
    font-size: 0.92rem;
}
.search-form button:hover { background: var(--terracotta-dark); }

/* ---------- Комментарии ---------- */
.comments-area {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 28px;
    margin-top: 28px;
    box-shadow: var(--shadow);
}
.comments-title {
    margin-top: 0;
    font-size: 1.35rem;
}
.comment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
}
.comment-list li { margin: 0 0 18px; }
.comment-list .children {
    list-style: none;
    padding-left: 28px;
    margin-top: 14px;
}
.comment-body {
    background: var(--paper-shade);
    border-radius: 12px;
    padding: 16px 18px;
}
.comment-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.comment-meta .author { font-weight: 700; color: var(--graphite); }
.comment-reply-link {
    font-size: 0.85rem;
    color: var(--terracotta);
}
.comment-form p { margin-bottom: 12px; }
.comment-form label {
    display: block;
    margin-bottom: 4px;
    font-size: 0.9rem;
    color: var(--graphite);
    font-family: 'Helvetica Neue', Arial, sans-serif;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text);
}
.comment-form textarea { min-height: 120px; resize: vertical; }
.comment-form input[type="submit"] {
    background: var(--terracotta);
    color: #fff;
    border: none;
    padding: 11px 26px;
    border-radius: 26px;
    cursor: pointer;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
}
.comment-form input[type="submit"]:hover { background: var(--terracotta-dark); }

/* ---------- Контакты-статика ---------- */
.static-contacts {
    list-style: none;
    padding: 0;
    margin: 18px 0;
}
.static-contacts li {
    padding: 8px 0;
    font-family: 'Helvetica Neue', Arial, sans-serif;
}
.static-contacts a { color: var(--graphite); font-weight: 600; }
.static-contacts a:hover { color: var(--terracotta); }

/* ---------- 404 ---------- */
.error-404 {
    text-align: center;
    padding: 40px 24px;
    background: #fff;
    border-radius: 18px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}
.error-404 .big-number {
    font-size: 6rem;
    line-height: 1;
    color: var(--terracotta);
    font-family: 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    font-weight: 800;
}

/* ---------- Подвал ---------- */
.site-footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 48px 0 20px;
    margin-top: 40px;
}
.footer-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 36px;
    margin-bottom: 32px;
}
.footer-col { min-width: 0; }

.site-footer .widget {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    margin: 0;
    color: var(--footer-text);
}
.site-footer .widget-title {
    color: var(--ochre-soft);
    border-bottom-color: var(--terracotta);
    margin-bottom: 14px;
}
.site-footer .widget li {
    border-bottom: 1px dotted rgba(232, 228, 216, 0.18);
    color: var(--footer-text);
}
.site-footer .widget a {
    color: var(--footer-link);
}
.site-footer .widget a:hover { color: #fff; }
.site-footer .widget .post-date,
.site-footer .widget time {
    color: rgba(232, 228, 216, 0.7);
}
.site-footer .widget p { color: var(--footer-text); margin: 0 0 0.8em; }

.copyright {
    text-align: center;
    padding-top: 22px;
    border-top: 1px solid rgba(232, 228, 216, 0.12);
    font-size: 0.85rem;
    color: rgba(232, 228, 216, 0.7);
    font-family: 'Helvetica Neue', Arial, sans-serif;
}

/* ---------- Cookie-баннер ---------- */
/* A11: правило с [hidden] обязательно ДО основного блока стилей */
.cookie-banner[hidden] { display: none !important; }

.cookie-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 1000;
    background: var(--graphite);
    color: var(--paper);
    border-radius: 16px;
    padding: 18px 22px;
    box-shadow: var(--shadow-strong);
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    max-width: 1180px;
    margin-inline: auto;
}
.cookie-banner p {
    flex: 1;
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.45;
    min-width: 0;
}
.cookie-banner button {
    background: var(--terracotta);
    color: #fff;
    border: none;
    padding: 10px 22px;
    border-radius: 24px;
    cursor: pointer;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-weight: 600;
    font-size: 0.92rem;
    flex: 0 0 auto;
}
.cookie-banner button:hover {
    background: var(--terracotta-dark);
    box-shadow: inset 0 -2px 6px rgba(0, 0, 0, 0.18);
}

/* ---------- Адаптив ---------- */
@media (max-width: 960px) {
    .layout.with-sidebar {
        grid-template-columns: minmax(0, 1fr);
        gap: 28px;
    }
    .footer-cols {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }
    h1 { font-size: 1.8rem; }
    .entry-title { font-size: 1.6rem; }
}

@media (max-width: 600px) {
    body { font-size: 16px; }
    .site-header .shell {
        gap: 12px;
    }
    .nav-toggle {
        display: inline-block;
        margin-left: auto;
    }
    .primary-nav {
        display: none;
        flex: 1 0 100%;
    }
    .primary-nav.is-open {
        display: block;
    }
    .primary-nav ul {
        flex-direction: column;
        gap: 4px;
        padding: 8px 0;
    }
    .primary-nav a {
        display: block;
        padding: 10px 12px;
    }
    .footer-cols {
        grid-template-columns: minmax(0, 1fr);
        gap: 28px;
    }
    .theme-block { padding: 24px 20px; }
    .entry { padding: 22px 18px; }
    .content-narrow { width: 100%; }
    .cookie-banner {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    .cookie-banner button { width: 100%; }
    .timeline-step { flex: 0 0 82%; }
    h1 { font-size: 1.55rem; }
    .entry-title { font-size: 1.4rem; }
}
