/*
Theme Name: dds_gerardmer-skialpin.com
Author: Алексей Воронов
Description: Информационная тема для блога о детском развитии — спортивные секции, внеклассные курсы и онлайн-школы, советы по воспитанию через активный образ жизни. Спокойная природная гамма, типографика с засечками, без рекламных блоков.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: aktivdeti
*/

/* ==========================================================================
   Переменные и сброс
   ========================================================================== */
:root {
    --bg: #FDFAF6;
    --bg-soft: #F9F6F0;
    --green: #2C5E3A;
    --green-dark: #1F4529;
    --ochre: #D9B48B;
    --ink: #2a2620;
    --muted: #6b6457;
    --line: #e7e0d4;
    --footer-bg: #20392a;
    --footer-ink: #e7e9e2;
    --footer-muted: #aebaa6;
    --radius: 8px;
    --shell: min(92%, 1180px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: "PT Serif", Georgia, "Times New Roman", serif;
    font-size: 18px;
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: "Montserrat", "Segoe UI", Arial, sans-serif;
    color: var(--green);
    line-height: 1.25;
    margin: 0 0 0.5em;
}

p { margin: 0 0 1em; }

a { color: var(--green); transition: color 0.2s ease; }
a:hover { color: var(--green-dark); }

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

.shell { width: var(--shell); margin-inline: auto; }

/* ==========================================================================
   Кнопки
   ========================================================================== */
.btn,
button.btn,
input[type="submit"] {
    display: inline-block;
    background: var(--green);
    color: #fff;
    border: 1px solid var(--green);
    border-radius: var(--radius);
    padding: 0.6em 1.3em;
    font-family: "Montserrat", sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover,
button.btn:hover,
input[type="submit"]:hover {
    background: var(--green-dark);
    color: #fff;
    box-shadow: inset 0 0 0 1px var(--ochre);
}

/* ==========================================================================
   Шапка
   ========================================================================== */
.site-header {
    background: var(--bg-soft);
    border-bottom: 1px solid var(--line);
}
.site-header__inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem 0;
    flex-wrap: wrap;
}
.brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
    flex: 1 1 auto;
}
.brand-logo-link { display: inline-flex; flex: 0 0 auto; }
.brand-logo { display: block; width: 56px; height: 56px; }
.brand-text { min-width: 0; }
.brand-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-family: "Montserrat", sans-serif;
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--green);
    line-height: 1.3;
}
.brand-desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.85rem;
    color: var(--muted);
}

.nav-toggle {
    display: none;
    flex: 0 0 auto;
    width: 44px; height: 40px;
    background: transparent;
    border: 1px solid var(--green);
    border-radius: var(--radius);
    cursor: pointer;
    padding: 9px 10px;
    flex-direction: column;
    justify-content: space-between;
}
.nav-toggle span { display: block; height: 2px; background: var(--green); border-radius: 2px; }

.primary-nav { flex: 0 0 auto; }
.primary-nav__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
}
.primary-nav__list a {
    font-family: "Montserrat", sans-serif;
    font-size: 0.95rem;
    text-decoration: none;
    color: var(--green);
}
.primary-nav__list a:hover { color: var(--green-dark); }
.primary-nav__list .current-menu-item > a { border-bottom: 2px solid var(--ochre); }

/* Под-навигация по возрастам/интересам */
.age-nav {
    background: var(--bg);
    border-bottom: 1px solid var(--line);
}
.age-nav__inner {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.4rem;
    padding: 0.7rem 0;
}
.age-nav__link {
    font-family: "Montserrat", sans-serif;
    font-size: 0.9rem;
    color: var(--muted);
    text-decoration: none;
}
.age-nav__link:hover { color: var(--green); }

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

.layout-single {
    display: block;
    width: 85%;
    margin-inline: auto;
}
.layout-single.layout--narrow { width: 85%; }

.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67fr) minmax(0, 27fr);
    gap: 6%;
    align-items: start;
}
.content-area { min-width: 0; }

.sidebar { min-width: 0; }

/* ==========================================================================
   Хлебные крошки
   ========================================================================== */
.breadcrumbs {
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 1.4rem;
}
.breadcrumbs a { text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs .sep { color: var(--ochre); margin: 0 0.35em; }

/* ==========================================================================
   Карточки записей
   ========================================================================== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.6rem;
}
.cards-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.6rem;
}

.card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
}
.card-thumb { display: block; }
.card-thumb img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    filter: grayscale(100%);
    transition: filter 0.2s ease;
}
.card:hover .card-thumb img { filter: grayscale(60%); }

.card-thumb--ph {
    display: block;
    aspect-ratio: 16 / 10;
    background: var(--bg-soft);
}
.card-thumb--ph svg { display: block; width: 100%; height: 100%; }

.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.1rem 1.2rem 1.3rem;
}
.card-tag {
    align-self: flex-start;
    display: inline-block;
    background: rgba(44, 94, 58, 0.12);
    color: var(--green);
    font-family: "Montserrat", sans-serif;
    font-size: 0.72rem;
    letter-spacing: 0.02em;
    padding: 0.25em 0.7em;
    border-radius: 999px;
    margin-bottom: 0.55rem;
}
.card-title {
    font-size: 1.12rem;
    margin: 0 0 0.4rem;
}
.card-title a { text-decoration: none; color: var(--green); }
.card-title a:hover { color: var(--green-dark); }
.card-meta {
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 0.6rem;
}
.card-excerpt { font-size: 0.92rem; color: var(--ink); }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-more { margin-top: auto; align-self: flex-start; }

/* ==========================================================================
   Тематические секции на главной
   ========================================================================== */
.section { margin-bottom: 3rem; }
.section__lead {
    border-left: 4px solid var(--ochre);
    padding-left: 1.2rem;
}
.section__title { font-size: 1.7rem; margin-bottom: 0.6rem; }
.section--soft {
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 2rem 1.8rem;
}
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.4rem;
    margin-top: 1.4rem;
}
.feature {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 1.3rem 1.3rem 1.4rem;
    min-width: 0;
}
.feature h3 { font-size: 1.12rem; }
.feature p { margin: 0; font-size: 0.95rem; color: var(--ink); }

.steps {
    counter-reset: step;
    list-style: none;
    margin: 1.4rem 0 0;
    padding: 0;
    display: grid;
    gap: 1rem;
}
.steps li {
    position: relative;
    padding-left: 3rem;
    min-width: 0;
}
.steps li::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    left: 0; top: 0;
    width: 2.1rem; height: 2.1rem;
    display: flex; align-items: center; justify-content: center;
    background: var(--green);
    color: #fff;
    border-radius: 50%;
    font-family: "Montserrat", sans-serif;
    font-size: 0.95rem;
}

.review-card {
    background: #fff;
    border: 1px solid var(--line);
    border-left: 4px solid var(--green);
    border-radius: 12px;
    padding: 1.5rem 1.6rem;
    margin-top: 1.4rem;
}
.review-card h3 { margin-top: 0; }

.contact-box {
    margin-top: 1.2rem;
    font-size: 1.05rem;
}
.contact-box a { font-weight: 700; }

/* ==========================================================================
   Контент записи / страницы
   ========================================================================== */
.entry {
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 1.8rem 2rem 2rem;
}
.entry-header { margin-bottom: 1.2rem; }
.entry-tag {
    display: inline-block;
    background: rgba(44, 94, 58, 0.12);
    color: var(--green);
    font-family: "Montserrat", sans-serif;
    font-size: 0.78rem;
    padding: 0.3em 0.8em;
    border-radius: 999px;
    margin-bottom: 0.7rem;
}
.entry-title { font-size: 1.9rem; }
.entry-meta { font-size: 0.85rem; color: var(--muted); }
.entry-thumb { margin: 1.2rem 0; }
.entry-thumb img { display: block; width: 100%; border-radius: 10px; filter: grayscale(100%); }

.entry-content { font-size: 1.06rem; }
.entry-content p { margin: 0 0 1.1em; }
.entry-content h2 { font-size: 1.5rem; margin-top: 1.6em; }
.entry-content h3 { font-size: 1.25rem; margin-top: 1.4em; }
.entry-content img { border-radius: 8px; filter: grayscale(100%); }
.entry-content blockquote {
    margin: 1.4em 0;
    padding: 0.6em 1.2em;
    border-left: 4px solid var(--ochre);
    background: rgba(217, 180, 139, 0.12);
    color: var(--ink);
    font-style: italic;
}
.entry-content ul, .entry-content ol { padding-left: 1.4em; }
.entry-content li { margin-bottom: 0.4em; }
.entry-content a { text-decoration: underline; }

.entry-content table {
    width: 100%;
    border-collapse: collapse;
    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: 0.6em 0.8em; text-align: left; }
.entry-content th { background: rgba(44, 94, 58, 0.08); }

/* Блок «Ещё идеи по возрасту» */
.more-ideas {
    margin-top: 2rem;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 1.5rem 1.8rem;
}
.more-ideas h2 { font-size: 1.35rem; margin-bottom: 0.8rem; }
.more-ideas ul { list-style: none; margin: 0; padding: 0; }
.more-ideas li { padding: 0.5em 0; border-bottom: 1px dashed var(--line); }
.more-ideas li:last-child { border-bottom: none; }
.more-ideas a { text-decoration: none; font-family: "Montserrat", sans-serif; font-size: 1rem; }
.more-ideas a:hover { text-decoration: underline; }

/* ==========================================================================
   Сайдбар / виджеты
   ========================================================================== */
.sidebar .widget,
.footer-col .widget { margin-bottom: 1.8rem; }

.sidebar .widget {
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 1.2rem 1.3rem;
    color: var(--ink);
}
.sidebar .widget-title {
    font-size: 1.05rem;
    color: var(--green);
    margin-bottom: 0.8rem;
}
.sidebar .widget a { color: var(--green); text-decoration: none; }
.sidebar .widget a:hover { color: var(--green-dark); text-decoration: underline; }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { padding: 0.4em 0; border-bottom: 1px solid var(--line); font-size: 0.95rem; }
.sidebar li:last-child { border-bottom: none; }
.sidebar .post-date { display: block; font-size: 0.78rem; color: var(--muted); }

/* ==========================================================================
   Подвал
   ========================================================================== */
.site-footer {
    background: var(--footer-bg);
    color: var(--footer-ink);
    margin-top: 2rem;
}
.site-footer__cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
    padding: 2.6rem 0 2rem;
}
.footer-col { min-width: 0; color: var(--footer-ink); }
.footer-col .widget-title {
    font-size: 1.05rem;
    color: #fff;
    margin-bottom: 0.9rem;
}
.footer-col .widget { color: var(--footer-ink); }
.footer-col p { color: var(--footer-ink); font-size: 0.92rem; }
.footer-col a { color: var(--ochre); text-decoration: none; }
.footer-col a:hover { color: #fff; text-decoration: underline; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { padding: 0.35em 0; font-size: 0.92rem; }
.footer-col .post-date,
.footer-col .rss-date { color: var(--footer-muted); font-size: 0.8rem; }

.site-footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding: 1.1rem 0;
}
.copyright {
    margin: 0;
    font-size: 0.82rem;
    color: var(--footer-muted);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ==========================================================================
   Пагинация
   ========================================================================== */
.pagination { margin: 2rem 0 0; }
.pagination__list {
    list-style: none;
    margin: 0; padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: center;
}
.pagination .page-numbers {
    display: inline-block;
    min-width: 2.4em;
    text-align: center;
    padding: 0.45em 0.75em;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--green);
    font-family: "Montserrat", sans-serif;
    font-size: 0.9rem;
    background: #fff;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.pagination a.page-numbers:hover { background: var(--bg-soft); }
.pagination .page-numbers.current {
    background: var(--green);
    color: #fff;
    border-color: var(--green);
}

/* ==========================================================================
   Форма поиска
   ========================================================================== */
.search-form {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
}
.search-form .search-field {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0.55em 0.8em;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.95rem;
    background: #fff;
    color: var(--ink);
}
.search-form .search-submit { flex: 0 0 auto; }

/* ==========================================================================
   Комментарии
   ========================================================================== */
.comments-area { margin-top: 2.4rem; }
.comments-title, .comment-reply-title { font-size: 1.3rem; }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list .children { list-style: none; margin: 0 0 0 1.6rem; padding: 0; }
.comment-item { margin-bottom: 1.2rem; }
.comment-body {
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 1rem 1.2rem;
}
.comment-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}
.comment-author { font-family: "Montserrat", sans-serif; font-weight: 600; color: var(--green); }
.comment-date { font-size: 0.8rem; color: var(--muted); }
.comment-await { font-size: 0.85rem; color: var(--ochre); }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.55em 0.8em;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.95rem;
    background: #fff;
    color: var(--ink);
    margin-top: 0.3em;
}
.comment-form label { font-family: "Montserrat", sans-serif; font-size: 0.9rem; }
.comment-form p { margin-bottom: 1em; }

/* ==========================================================================
   404
   ========================================================================== */
.error-404 { text-align: center; }
.error-404 .error-code { font-size: 4rem; color: var(--ochre); margin-bottom: 0.2rem; }
.error-404 .search-form { max-width: 480px; margin: 1.4rem auto; }

/* ==========================================================================
   Cookie-баннер
   ========================================================================== */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 999;
    background: var(--green-dark);
    color: #fff;
    border-top: 2px solid var(--ochre);
}
.cookie-banner__inner {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding: 0.9rem 0;
    flex-wrap: wrap;
}
.cookie-banner__text { margin: 0; flex: 1 1 280px; min-width: 0; font-size: 0.9rem; }
.cookie-banner__accept { flex: 0 0 auto; background: var(--ochre); border-color: var(--ochre); color: var(--green-dark); font-weight: 600; }
.cookie-banner__accept:hover { background: #c9a274; border-color: #c9a274; color: var(--green-dark); box-shadow: inset 0 0 0 1px #fff; }

/* ==========================================================================
   Адаптив
   ========================================================================== */
@media (max-width: 960px) {
    .layout-with-sidebar { grid-template-columns: minmax(0, 1fr); gap: 2.4rem; }
    .cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
    body { font-size: 17px; }
    .nav-toggle { display: flex; }
    .primary-nav {
        flex-basis: 100%;
        display: none;
    }
    .primary-nav.is-open { display: block; }
    .primary-nav__list { flex-direction: column; gap: 0.4rem; }
    .layout-single, .layout-single.layout--narrow { width: 100%; }
    .cards-grid, .cards-list { grid-template-columns: minmax(0, 1fr); }
    .feature-grid { grid-template-columns: minmax(0, 1fr); }
    .site-footer__cols { grid-template-columns: minmax(0, 1fr); gap: 1.6rem; }
    .entry { padding: 1.3rem 1.2rem 1.5rem; }
    .section--soft { padding: 1.4rem 1.2rem; }
}
