/*
Theme Name: dds_lifestationclub.com
Theme URI: https://lifestationclub.com
Author: Анна Макарова
Author URI: https://lifestationclub.com
Description: Образовательный блог Life Station — фитнес, спорт и детское развитие. Статьи, онлайн-курсы и вебинары в спокойной природной гамме.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: lsc
*/

/* ============================================================
 * Цветовая палитра и базовые переменные
 * ============================================================ */
:root {
    --ink: #1A2A3A;       /* тёмно-синий */
    --olive: #5E6C5B;     /* оливково-зелёный */
    --beige: #F9F6F0;     /* тёплый бежевый фон */
    --white: #ffffff;     /* карточки */
    --accent: #C85C3E;    /* терракотовый акцент */
    --accent-dark: #a8482e;
    --text: #2c3631;      /* основной текст */
    --muted: #6b7670;     /* приглушённый текст */
    --line: #e6e1d6;      /* линии/границы */
    --footer-bg: #14222f;
    --footer-text: #d7ddd9;
    --footer-muted: #9aa6a0;
    --radius: 8px;
    --shadow: 0 6px 20px rgba(26, 42, 58, 0.08);
    --shadow-hover: 0 12px 28px rgba(26, 42, 58, 0.16);
    --font-head: 'Manrope', 'Segoe UI', Tahoma, sans-serif;
    --font-body: 'Lora', Georgia, 'Times New Roman', serif;
}

/* ============================================================
 * Сброс и базовые правила
 * ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.7;
    color: var(--text);
    background: var(--beige);
    overflow-x: hidden;
}

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

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-head);
    color: var(--ink);
    line-height: 1.25;
    margin: 0 0 0.6em;
    font-weight: 700;
}
h1 { font-size: 2.2rem; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1.1em; }

ul, ol { margin: 0 0 1.1em; padding-left: 1.4em; }

/* Контейнер ширины — единственное место (A12.7) */
.shell { width: min(92%, 1180px); margin-inline: auto; }

/* Таблицы с видимыми границами */
table { border-collapse: collapse; width: 100%; margin: 0 0 1.4em; }
table, th, td { border: 1px solid var(--line); }
th, td { padding: 0.6em 0.8em; text-align: left; }
th { background: #efe9dd; font-family: var(--font-head); }

/* ============================================================
 * Кнопки
 * ============================================================ */
.btn {
    display: inline-block;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 1rem;
    padding: 0.7em 1.4em;
    border-radius: var(--radius);
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    text-decoration: none;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover {
    background: var(--accent-dark);
    color: #fff;
    transform: translateY(2px);
    box-shadow: var(--shadow-hover);
    text-decoration: none;
}
.btn-outline { background: transparent; color: #fff; border-color: var(--olive); }
.btn-outline:hover {
    background: var(--olive);
    color: #fff;
    transform: translateY(2px);
    box-shadow: var(--shadow);
    text-decoration: none;
}
.btn-text {
    padding: 0;
    color: var(--accent);
    font-family: var(--font-head);
    font-weight: 600;
    align-self: flex-start;
    border: none;
}
.btn-text:hover { color: var(--accent-dark); }

/* ============================================================
 * Шапка
 * ============================================================ */
.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--line);
    padding: 1rem 0;
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    min-width: 0;
    text-decoration: none;
}
.brand-logo { display: inline-flex; flex: 0 0 auto; }
.brand-logo img { display: block; width: auto; height: 56px; }
.brand-text { min-width: 0; }
.site-title {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--ink);
    margin: 0;
    line-height: 1.25;
    max-width: 46ch;
}
.site-title a { color: inherit; text-decoration: none; }
.site-desc {
    font-size: 0.82rem;
    color: var(--muted);
    margin: 0.25rem 0 0;
    line-height: 1.4;
    max-width: 60ch;
    display: none;
}

/* Навигация */
.main-nav { margin-left: auto; min-width: 0; }
.nav-toggle {
    display: none;
    background: none;
    border: 0;
    cursor: pointer;
    padding: 0.4rem;
    color: var(--ink);
}
.nav-toggle svg { display: block; }
#primary-menu {
    list-style: none;
    display: flex;
    gap: 1.4rem;
    margin: 0;
    padding: 0;
}
#primary-menu a {
    font-family: var(--font-head);
    font-weight: 600;
    color: var(--ink);
    text-decoration: none;
    padding: 0.3rem 0;
    border-bottom: 2px solid transparent;
}
#primary-menu a:hover,
#primary-menu .current-menu-item > a {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

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

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

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

.content-area { min-width: 0; }

/* ============================================================
 * Хлебные крошки
 * ============================================================ */
.breadcrumbs {
    font-family: var(--font-head);
    font-size: 0.9rem;
    color: var(--muted);
    margin: 0 0 1.5rem;
}
.breadcrumbs a { color: var(--olive); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent); text-decoration: underline; }
.breadcrumbs .sep { color: var(--line); margin: 0 0.15rem; }

/* ============================================================
 * Карточки записей
 * ============================================================ */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.6rem;
}

.card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--white);
    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: var(--shadow-hover); }

.card-thumb { display: block; }
.card-thumb img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}
.card-thumb--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #2a3d4f, var(--olive));
}
.card-thumb--placeholder svg { width: 60px; height: 60px; }

.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.2rem 1.3rem 1.4rem;
    min-width: 0;
}
.card-meta {
    font-family: var(--font-head);
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.card-meta a { color: var(--olive); text-decoration: none; }
.card-title { font-size: 1.2rem; margin: 0 0 0.6rem; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { color: var(--accent); }
.card-excerpt { color: var(--text); margin-bottom: 1rem; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-excerpt p:last-child { margin-bottom: 0; }

/* ============================================================
 * Сайдбар и виджеты (светлый фон → тёмный текст)
 * ============================================================ */
.sidebar { min-width: 0; }
.sidebar .widget {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.3rem 1.4rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
    color: var(--text);
}
.sidebar .widget-title {
    font-size: 1.1rem;
    color: var(--ink);
    margin: 0 0 0.9rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent);
}
.sidebar .widget a { color: var(--ink); text-decoration: none; }
.sidebar .widget a:hover { color: var(--accent); }
.sidebar .widget ul { list-style: none; padding: 0; margin: 0; }
.sidebar .widget li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--line);
    line-height: 1.4;
}
.sidebar .widget li:last-child { border-bottom: 0; }
.sidebar .widget .post-date,
.sidebar .widget .rss-date { display: block; font-size: 0.8rem; color: var(--muted); }

/* ============================================================
 * Контент записей/страниц
 * ============================================================ */
.entry-header { margin-bottom: 1.5rem; }
.entry-title { font-size: 2.1rem; }
.entry-meta {
    font-family: var(--font-head);
    font-size: 0.9rem;
    color: var(--muted);
    margin-top: 0.4rem;
}
.entry-thumb { margin: 0 0 1.6rem; border-radius: var(--radius); overflow: hidden; }
.entry-thumb img { display: block; width: 100%; }
.entry-content { font-size: 1.05rem; }
.entry-content img { border-radius: var(--radius); }
.entry-content h2, .entry-content h3 { margin-top: 1.6em; }
.entry-content blockquote {
    margin: 1.4em 0;
    padding: 0.6em 1.2em;
    border-left: 4px solid var(--accent);
    background: #fff;
    border-radius: 0 var(--radius) var(--radius) 0;
    font-style: italic;
    color: var(--ink);
}

/* ============================================================
 * Пагинация
 * ============================================================ */
.pagination { margin-top: 2.2rem; }
.pagination ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding: 0;
    margin: 0;
}
.pagination .page-numbers {
    display: inline-block;
    font-family: var(--font-head);
    font-weight: 600;
    padding: 0.5em 0.85em;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--white);
    color: var(--ink);
    text-decoration: none;
}
.pagination .page-numbers:hover { border-color: var(--accent); color: var(--accent); }
.pagination .page-numbers.current {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

/* ============================================================
 * Главная страница
 * ============================================================ */
.front-section { padding: 3rem 0; }
.front-section.alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.front-narrow { width: 85%; margin-inline: auto; }
@media (max-width: 600px) { .front-narrow { width: 100%; } }

.section-head { text-align: center; margin-bottom: 2.2rem; }
.section-head h2 { font-size: 2rem; }
.section-head p { color: var(--muted); max-width: 60ch; margin-inline: auto; }

/* Hero */
.hero {
    position: relative;
    background: var(--ink);
    color: #fff;
    overflow: hidden;
}
.hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 2.5rem;
    align-items: center;
    padding: 3.5rem 0;
}
.hero-text { min-width: 0; }
.hero-text h1 { color: #fff; font-size: 2.6rem; margin-bottom: 0.8rem; }
.hero-text p { color: #e7ece9; font-size: 1.12rem; max-width: 52ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 1.6rem; }
.hero-media { min-width: 0; }
.hero-media svg { display: block; width: 100%; height: auto; border-radius: 14px; box-shadow: var(--shadow-hover); }
@media (max-width: 960px) {
    .hero-inner { grid-template-columns: minmax(0, 1fr); }
    .hero-text h1 { font-size: 2.1rem; }
}

/* Карточки знаний */
.knowledge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.6rem;
}
.knowledge-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.6rem;
    box-shadow: var(--shadow);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.knowledge-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.knowledge-icon {
    width: 52px; height: 52px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 12px;
    background: rgba(200, 92, 62, 0.12);
    margin-bottom: 1rem;
}
.knowledge-icon svg { width: 28px; height: 28px; }
.knowledge-card h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }
.knowledge-card p { color: var(--muted); flex: 1; }
.knowledge-card .btn-text { margin-top: 0.8rem; }

/* Каталог-библиотека (категории текстом) */
.catalog-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    justify-content: center;
}
.catalog-chips a {
    font-family: var(--font-head);
    font-weight: 600;
    padding: 0.55em 1.2em;
    border-radius: 999px;
    background: var(--white);
    border: 1px solid var(--olive);
    color: var(--ink);
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}
.catalog-chips a:hover { background: var(--olive); color: #fff; }

/* Шаги «как это работает» */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.6rem;
}
.step { min-width: 0; text-align: center; padding: 0 0.5rem; }
.step-num {
    width: 56px; height: 56px;
    margin: 0 auto 1rem;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: var(--ink);
    color: #fff;
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 1.3rem;
}
.step h3 { font-size: 1.15rem; }
.step p { color: var(--muted); }

/* Слайдер цитат */
.quote-slider { position: relative; max-width: 720px; margin: 0 auto; text-align: center; min-height: 9rem; }
.quote-slide {
    display: none;
    font-family: var(--font-body);
    font-size: 1.3rem;
    font-style: italic;
    color: var(--ink);
}
.quote-slide.is-active { display: block; animation: lsc-fade 0.6s ease; }
.quote-slide cite { display: block; margin-top: 1rem; font-style: normal; font-size: 0.95rem; color: var(--olive); font-family: var(--font-head); }
@keyframes lsc-fade { from { opacity: 0; } to { opacity: 1; } }

/* Контактный CTA (статичный, без форм) */
.contact-cta { text-align: center; }
.contact-cta .email-link {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--accent);
}
.social-links { display: flex; justify-content: center; gap: 1rem; margin-top: 1.2rem; list-style: none; padding: 0; }
.social-links a {
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: var(--white);
    border: 1px solid var(--olive);
    color: var(--olive);
}
.social-links a:hover { background: var(--olive); color: #fff; }
.social-links svg { width: 20px; height: 20px; }

/* ============================================================
 * 404
 * ============================================================ */
.error-404 { text-align: center; padding: 2rem 0; }
.error-404 .code { font-family: var(--font-head); font-size: 5rem; font-weight: 800; color: var(--olive); line-height: 1; }
.error-404 .search-form { max-width: 460px; margin: 1.6rem auto; }

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

/* ============================================================
 * Комментарии
 * ============================================================ */
.comments-area { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.comment-list { list-style: none; padding: 0; margin: 0; }
.comment-list ul.children { list-style: none; padding-left: 1.5rem; }
.comment-body { padding: 1rem 0; border-bottom: 1px solid var(--line); }
.comment-author { font-family: var(--font-head); font-weight: 600; }
.comment-meta { font-size: 0.85rem; color: var(--muted); }
.comment-respond { margin-top: 1.5rem; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.6em 0.8em;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font: inherit;
    background: #fff;
    margin-bottom: 0.8rem;
}
.comment-form .submit {
    background: var(--accent);
    color: #fff;
    border: 0;
    font-family: var(--font-head);
    font-weight: 600;
    padding: 0.6em 1.4em;
    border-radius: var(--radius);
    cursor: pointer;
}

/* ============================================================
 * Cookie-баннер — правило [hidden] ДО основных стилей (A11)
 * ============================================================ */
.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: 1rem 0;
    box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.2);
}
.cookie-inner {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    flex-wrap: wrap;
    justify-content: space-between;
}
.cookie-inner p { margin: 0; font-size: 0.95rem; min-width: 0; flex: 1; }
.cookie-inner a { color: #f0b9a8; }
.cookie-accept {
    background: var(--accent);
    color: #fff;
    border: 0;
    font-family: var(--font-head);
    font-weight: 600;
    padding: 0.6em 1.5em;
    border-radius: var(--radius);
    cursor: pointer;
    flex: 0 0 auto;
}
.cookie-accept:hover { background: var(--accent-dark); }

/* ============================================================
 * Подвал (тёмный фон → светлый текст)
 * ============================================================ */
.site-footer { background: var(--footer-bg); color: var(--footer-text); padding: 3rem 0 1.5rem; }

.footer-brand {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 2rem;
    align-items: center;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    margin-bottom: 2rem;
}
.footer-brand .brand-logo svg rect { fill: #20323f; }
.footer-about { min-width: 0; }
.footer-about p { color: var(--footer-text); margin: 0.6rem 0 0; max-width: 60ch; }
.footer-contact { min-width: 0; text-align: right; }
.footer-contact .email-link { color: #f0b9a8; font-family: var(--font-head); font-weight: 700; font-size: 1.1rem; }
.footer-contact .social-links { justify-content: flex-end; margin-top: 1rem; }
.footer-contact .social-links a { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.2); color: var(--footer-text); }
.footer-contact .social-links a:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
}
.footer-widgets .widget { color: var(--footer-text); margin-bottom: 0; }
.footer-widgets .widget-title {
    color: #fff;
    font-size: 1.1rem;
    margin: 0 0 1rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid var(--accent);
}
.footer-widgets .widget,
.footer-widgets .widget p { color: var(--footer-text); }
.footer-widgets .widget a { color: var(--footer-text); text-decoration: none; }
.footer-widgets .widget a:hover { color: #fff; text-decoration: underline; }
.footer-widgets .widget ul { list-style: none; padding: 0; margin: 0; }
.footer-widgets .widget li { padding: 0.35rem 0; line-height: 1.4; }
.footer-widgets .widget .post-date { display: block; font-size: 0.8rem; color: var(--footer-muted); }

.site-copyright {
    text-align: center;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    font-family: var(--font-head);
    font-size: 0.88rem;
    color: var(--footer-muted);
}

/* ============================================================
 * Адаптив
 * ============================================================ */
@media (max-width: 960px) {
    .nav-toggle { display: inline-flex; }
    .main-nav { position: relative; }
    #primary-menu {
        position: absolute;
        top: calc(100% + 0.8rem);
        right: 0;
        flex-direction: column;
        gap: 0;
        background: #fff;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        box-shadow: var(--shadow-hover);
        min-width: 220px;
        padding: 0.4rem 0;
        display: none;
    }
    #primary-menu.is-open { display: flex; }
    #primary-menu li { padding: 0 1.1rem; }
    #primary-menu a { display: block; padding: 0.65rem 0; border-bottom: 0; }
}

@media (min-width: 700px) { .site-desc { display: block; } }

@media (max-width: 700px) {
    .footer-brand { grid-template-columns: minmax(0, 1fr); }
    .footer-contact { text-align: left; }
    .footer-contact .social-links { justify-content: flex-start; }
    .footer-widgets { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 600px) {
    body { font-size: 17px; }
    h1 { font-size: 1.8rem; }
    .hero-text h1 { font-size: 1.8rem; }
    .btn { width: 100%; text-align: center; }
    .btn-text { width: auto; text-align: left; }
    .hero-actions .btn { width: 100%; }
    .search-form button { width: auto; }
    .cookie-accept { width: 100%; }
    .pagination .page-numbers { padding: 0.5em 0.7em; }
}
