/*
Theme Name: dds_goodyogaday.ru
Author: Мария Лебедева
Description: Информационный портал повышения квалификации и методической поддержки преподавателей фитнеса, йоги и wellness.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: yogaday
*/

/* ============ Базовые переменные ============ */
:root {
    --sand:    #f7f4ee;
    --paper:   #ffffff;
    --cream:   #eee6d8;
    --sage:    #6b8e6f;
    --sage-d:  #4a6650;
    --clay:    #c98a6b;
    --clay-d:  #b06f50;
    --ink:     #2d3a30;
    --ink-soft:#56615a;
    --line:    #e2dccf;
    --footer-bg: #2a352c;
    --footer-tx: #d7ddd2;
    --maxw: 1180px;
    --radius: 16px;
    --shadow: 0 10px 30px rgba(45,58,48,.08);
}

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

html { scroll-behavior: smooth; }

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

h1, h2, h3, h4 {
    font-family: Georgia, "Times New Roman", serif;
    color: var(--ink);
    line-height: 1.25;
    font-weight: 600;
    margin: 0 0 .6em;
}

h1 { font-size: 2.1rem; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.28rem; }

p { margin: 0 0 1.1em; }

a { color: var(--sage-d); text-decoration: none; }
a:hover { color: var(--clay-d); text-decoration: underline; }

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

/* ============ Контейнер ширины (единый источник) ============ */
.shell {
    width: min(92%, var(--maxw));
    margin-inline: auto;
}

/* ============ Шапка ============ */
.site-header {
    background: var(--paper);
    border-bottom: 1px solid var(--line);
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 18px 0;
    flex-wrap: wrap;
}
.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    flex: 1 1 360px;
}
.brand-logo, .brand-mark { flex: 0 0 auto; display: block; }
.brand-mark svg { display: block; }
.brand-text { min-width: 0; }
.brand-title {
    font-family: Georgia, serif;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--ink);
    display: block;
    line-height: 1.3;
}
.brand-title a { color: inherit; }
.brand-title a:hover { color: var(--sage-d); text-decoration: none; }
.brand-desc {
    font-size: .82rem;
    color: var(--ink-soft);
    margin-top: 2px;
    display: block;
}

/* Навигация (не липкая) */
.main-nav {
    background: var(--sage-d);
}
.main-nav .shell {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}
.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
}
.main-nav li { min-width: 0; }
.main-nav a {
    display: block;
    color: #f1ede4;
    padding: 13px 18px;
    font-size: .98rem;
}
.main-nav a:hover,
.main-nav .current-menu-item > a {
    background: rgba(255,255,255,.12);
    color: #fff;
    text-decoration: none;
}
.nav-toggle {
    display: none;
    background: none;
    border: 1px solid rgba(255,255,255,.4);
    color: #fff;
    border-radius: 8px;
    padding: 9px 13px;
    margin: 9px 0;
    cursor: pointer;
    font-size: 1rem;
}

/* ============ Раскладка страниц ============ */
.site-main { padding: 38px 0 56px; }

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

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

/* ============ Сайдбар ============ */
.sidebar {
    min-width: 0;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px;
}
.sidebar .widget { margin-bottom: 26px; }
.sidebar .widget:last-child { margin-bottom: 0; }
.widget-title {
    font-family: Georgia, serif;
    font-size: 1.12rem;
    color: var(--ink);
    margin: 0 0 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--sage);
}
.sidebar, .sidebar a, .sidebar li { color: var(--ink); }
.sidebar a { color: var(--sage-d); }
.sidebar a:hover { color: var(--clay-d); }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li {
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
    font-size: .96rem;
}
.sidebar li:last-child { border-bottom: 0; }
.sidebar .post-date { color: var(--ink-soft); }

/* ============ Хлебные крошки ============ */
.breadcrumbs {
    font-size: .88rem;
    color: var(--ink-soft);
    margin: 0 0 24px;
}
.breadcrumbs a { color: var(--sage-d); }
.breadcrumbs .sep { color: var(--clay); margin: 0 6px; }

/* ============ Карточки записей ============ */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 26px;
}
.card {
    display: flex;
    flex-direction: column;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.card-thumb-wrap { display: block; min-width: 0; }
.card-thumb-wrap a { display: block; }
.card-thumb-wrap img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}
.card-thumb-placeholder {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, var(--cream), #c6d2c4);
}
.card-body {
    flex: 1;
    padding: 20px 22px 24px;
    display: flex;
    flex-direction: column;
}
.card-title { font-size: 1.22rem; margin: 0 0 8px; }
.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--sage-d); text-decoration: none; }
.card-meta { font-size: .82rem; color: var(--ink-soft); margin-bottom: 12px; }
.card-excerpt { color: var(--ink-soft); }
.card-excerpt p { margin: 0 0 .5em; background: none; }
.card-more {
    margin-top: auto;
    align-self: flex-start;
    display: inline-block;
    padding: 9px 18px;
    background: var(--sage-d);
    color: #fff;
    border-radius: 999px;
    font-size: .9rem;
}
.card-more:hover { background: var(--clay-d); color: #fff; text-decoration: none; }

/* Список записей (одна колонка, горизонтальные карточки) */
.post-list { display: grid; gap: 22px; }
.post-list .card { flex-direction: row; }
.post-list .card-thumb-wrap {
    flex: 0 0 280px;
    position: relative;
    overflow: hidden;
}
.post-list .card-thumb-wrap a {
    display: block;
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
}
.post-list .card-thumb-wrap img {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    object-fit: cover;
    display: block;
}
.post-list .card-thumb-placeholder {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    aspect-ratio: auto;
}
.post-list .card-body { min-width: 0; }

@media (max-width: 600px) {
    .post-list .card { flex-direction: column; }
    .post-list .card-thumb-wrap {
        flex: none;
        width: 100%;
        position: static;
    }
    .post-list .card-thumb-wrap a { position: static; }
    .post-list .card-thumb-wrap img {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }
    .post-list .card-thumb-placeholder {
        position: static;
        aspect-ratio: 16 / 9;
    }
}

/* ============ Главная ============ */
.front .site-main { padding-top: 0; }

.hero {
    position: relative;
    color: #fff;
    overflow: hidden;
}
.hero-img {
    display: block;
    width: 100%;
    height: 460px;
    object-fit: cover;
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(45,58,48,.72), rgba(74,102,80,.45));
    display: flex;
    align-items: center;
}
.hero-overlay .shell { width: min(92%, var(--maxw)); }
.hero-content { max-width: 640px; }
.hero h1 { color: #fff; font-size: 2.5rem; margin-bottom: .4em; }
.hero p { color: #f1ede4; font-size: 1.1rem; margin-bottom: 1.4em; }
.hero .btn {
    display: inline-block;
    background: var(--clay);
    color: #fff;
    padding: 13px 28px;
    border-radius: 999px;
    font-size: 1rem;
}
.hero .btn:hover { background: var(--clay-d); text-decoration: none; }

.section { padding: 56px 0; }
.section:nth-child(even) { background: var(--cream); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 38px; }
.section-head p { color: var(--ink-soft); }

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

/* Блок: сетка направлений */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
}
.feature {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 28px 24px;
    min-width: 0;
}
.feature .icon {
    width: 54px; height: 54px;
    display: flex; align-items: center; justify-content: center;
    background: var(--cream);
    border-radius: 14px;
    margin-bottom: 16px;
}
.feature h3 { margin-bottom: .4em; }
.feature p { color: var(--ink-soft); margin: 0; font-size: .96rem; }

/* Блок: шаги */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 26px;
    counter-reset: step;
}
.step {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 28px 24px 24px;
    position: relative;
    min-width: 0;
}
.step::before {
    counter-increment: step;
    content: counter(step);
    display: flex; align-items: center; justify-content: center;
    width: 44px; height: 44px;
    background: var(--sage-d);
    color: #fff;
    font-family: Georgia, serif;
    font-size: 1.25rem;
    border-radius: 50%;
    margin-bottom: 14px;
}
.step h3 { margin-bottom: .35em; }
.step p { color: var(--ink-soft); margin: 0; font-size: .96rem; }

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

/* Последние записи на главной */
.latest-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 12px; margin-bottom: 30px; }
.latest-head a { font-size: .95rem; }

/* ============ Записи / контент ============ */
.entry {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 32px;
}
.entry-thumb { width: 100%; border-radius: var(--radius); margin-bottom: 22px; display: block; }
.entry-meta { font-size: .85rem; color: var(--ink-soft); margin-bottom: 18px; }
.entry-content { word-wrap: break-word; }
.entry-content img { border-radius: 12px; }
.entry-content h2, .entry-content h3 { margin-top: 1.4em; }
.entry-content ul, .entry-content ol { padding-left: 1.4em; }

.page-title { margin-bottom: 26px; }

/* Таблицы */
.entry-content table { border-collapse: collapse; width: 100%; margin: 1.4em 0; }
.entry-content table, .entry-content th, .entry-content td { border: 1px solid var(--line); }
.entry-content th, .entry-content td { padding: 10px 14px; text-align: left; }
.entry-content th { background: var(--cream); }

/* ============ Комментарии ============ */
.comments-area { margin-top: 36px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list li { border-bottom: 1px solid var(--line); padding: 16px 0; }
.comment-list .children { list-style: none; padding-left: 26px; }
.comment-author { font-weight: 600; }
.comment-meta { font-size: .82rem; color: var(--ink-soft); margin-bottom: 6px; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid var(--line);
    border-radius: 10px;
    font: inherit;
    background: var(--sand);
    margin-bottom: 12px;
}
.comment-form label { display: block; font-size: .9rem; margin-bottom: 4px; }
.comment-form .submit,
.search-form button,
.btn-submit {
    background: var(--sage-d);
    color: #fff;
    border: 0;
    padding: 12px 26px;
    border-radius: 999px;
    cursor: pointer;
    font: inherit;
}
.comment-form .submit:hover, .search-form button:hover { background: var(--clay-d); }

/* ============ Форма поиска ============ */
.search-form {
    display: flex;
    gap: 8px;
    min-width: 0;
}
.search-form input[type="search"] {
    flex: 1;
    min-width: 0;
    padding: 11px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font: inherit;
    background: var(--paper);
}
.search-form button { white-space: nowrap; }

/* ============ Пагинация ============ */
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 40px;
}
.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--paper);
    color: var(--ink);
    font-size: .96rem;
}
.pagination a.page-numbers:hover {
    background: var(--cream);
    text-decoration: none;
    color: var(--sage-d);
}
.pagination .page-numbers.current {
    background: var(--sage-d);
    border-color: var(--sage-d);
    color: #fff;
}
.pagination .page-numbers.dots {
    border: 0;
    background: none;
}

/* ============ 404 ============ */
.error-404 { text-align: center; padding: 30px 0 10px; }
.error-404 .code { font-family: Georgia, serif; font-size: 5rem; color: var(--sage); line-height: 1; margin-bottom: 10px; }
.error-404 .search-form { max-width: 460px; margin: 26px auto 0; }
.btn-home {
    display: inline-block;
    margin-top: 18px;
    background: var(--sage-d);
    color: #fff;
    padding: 12px 26px;
    border-radius: 999px;
}
.btn-home:hover { background: var(--clay-d); color: #fff; text-decoration: none; }

/* ============ Подвал ============ */
.site-footer {
    background: var(--footer-bg);
    color: var(--footer-tx);
    padding: 48px 0 0;
}
.footer-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 36px;
}
@media (max-width: 760px) { .footer-cols { grid-template-columns: 1fr; gap: 28px; } }

.site-footer .widget-title { color: #fff; border-bottom-color: var(--sage); }
.site-footer, .site-footer p, .site-footer li, .site-footer .widget { color: var(--footer-tx); }
.site-footer a { color: #e9c9b6; }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { padding: 6px 0; }
.site-footer .post-date { color: #9fae9c; }

.footer-bottom {
    margin-top: 40px;
    border-top: 1px solid rgba(255,255,255,.12);
    padding: 20px 0;
    text-align: center;
    font-size: .85rem;
    color: #9fae9c;
}

/* ============ Cookie-баннер ============ */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 999;
    background: var(--ink);
    color: #f1ede4;
    padding: 16px 0;
}
.cookie-banner .shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}
.cookie-banner p { margin: 0; font-size: .9rem; min-width: 0; flex: 1 1 320px; }
.cookie-banner a { color: #e9c9b6; }
.cookie-accept {
    background: var(--clay);
    color: #fff;
    border: 0;
    padding: 11px 26px;
    border-radius: 999px;
    cursor: pointer;
    font: inherit;
    white-space: nowrap;
}
.cookie-accept:hover { background: var(--clay-d); }

/* ============ Адаптив навигации ============ */
@media (max-width: 760px) {
    .nav-toggle { display: block; }
    .main-nav ul {
        flex-direction: column;
        width: 100%;
        display: none;
    }
    .main-nav ul[hidden] { display: none !important; }
    .main-nav.open ul { display: flex; }
    .main-nav a { padding: 12px 4px; border-bottom: 1px solid rgba(255,255,255,.1); }
    .hero h1 { font-size: 1.9rem; }
    .hero-img { height: 380px; }
}
