/*
Theme Name: dds_tellyougov.com
Theme URI: https://tellyougov.com
Author: Анна Соколова
Author URI: https://tellyougov.com
Description: Информационная тема для портала-путеводителя по пошаговым планам лечения артрозов и артритов. Спокойная палитра, понятная навигация по стадиям болезни, акцент на читаемость.
Version: 1.1
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
Text Domain: tyg
*/

/* ================================================================== */
/* Переменные                                                         */
/* ================================================================== */

:root {
    --bg: #F9F6F0;
    --surface: #EFF2F5;
    --accent: #1E6B5E;
    --accent-dark: #145247;
    --terracotta: #C27A5A;
    --text: #1F2A2F;
    --muted: #5B6E7A;
    --white: #FFFFFF;
    --footer-bg: #16322C;
    --footer-text: #D6E2DE;
    --footer-title: #FFFFFF;
    --border: #DBE1E1;
    --radius-btn: 60px;
    --radius-card: 18px;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    --shadow-soft: 0 6px 22px rgba(31, 42, 47, 0.07);
}

/* ================================================================== */
/* Сброс и база                                                       */
/* ================================================================== */

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', Arial, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 18px;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

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

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

a:hover {
    text-decoration: underline;
}

h1, h2, h3, h4 {
    line-height: 1.25;
    color: var(--text);
    margin: 0 0 0.5em;
    font-weight: 700;
}

h1 { font-size: 2.1rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.25rem; }

p {
    margin: 0 0 1em;
}

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

/* ================================================================== */
/* Контейнер и раскладки                                              */
/* ================================================================== */

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

.site-main {
    padding: 32px 0 56px;
}

.layout {
    margin-top: 8px;
}

.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67fr) minmax(0, 27fr);
    gap: 40px;
    align-items: start;
}

.layout-single {
    display: block;
}

.layout-single .content-area {
    width: 85%;
    margin-left: auto;
    margin-right: auto;
}

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

/* ================================================================== */
/* Хлебные крошки                                                     */
/* ================================================================== */

.breadcrumbs {
    font-size: 0.92rem;
    color: var(--muted);
    margin-bottom: 18px;
}

.breadcrumbs a {
    color: var(--accent);
}

.breadcrumbs .sep {
    margin: 0 4px;
    color: var(--muted);
}

.breadcrumbs span:last-child {
    color: var(--text);
}

/* ================================================================== */
/* Кнопки                                                             */
/* ================================================================== */

.btn {
    display: inline-block;
    padding: 13px 30px;
    border-radius: var(--radius-btn);
    border: 2px solid transparent;
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.2;
    cursor: pointer;
    box-shadow: var(--shadow);
    text-decoration: none;
    transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.btn:hover {
    text-decoration: none;
}

.btn-primary {
    background: var(--accent);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--accent-dark);
    color: var(--white);
}

.btn-outline {
    background: transparent;
    border-color: var(--terracotta);
    color: var(--terracotta);
}

.btn-outline:hover {
    background: rgba(194, 122, 90, 0.1);
    color: var(--terracotta);
}

/* ================================================================== */
/* Шапка                                                              */
/* ================================================================== */

.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 0;
    flex-wrap: wrap;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.brand-logo-link {
    display: block;
    flex: 0 0 auto;
}

.brand-logo {
    display: block;
    width: 56px;
    height: 56px;
}

.brand-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 520px;
}

.brand-desc {
    font-size: 0.85rem;
    color: var(--muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 520px;
}

/* ================================================================== */
/* Навигация                                                          */
/* ================================================================== */

.main-nav {
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-list a {
    display: block;
    padding: 9px 16px;
    border-radius: var(--radius-btn);
    color: var(--text);
    font-weight: 500;
}

.nav-list a:hover,
.nav-list .current-menu-item > a {
    background: var(--surface);
    color: var(--accent);
    text-decoration: none;
}

.nav-list .sub-menu {
    list-style: none;
    margin: 4px 0 0;
    padding: 0;
}

.nav-toggle {
    display: none;
    align-items: center;
    gap: 8px;
    background: var(--accent);
    color: var(--white);
    border: none;
    border-radius: var(--radius-btn);
    padding: 10px 18px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--white);
    position: relative;
}

.nav-toggle-bar::before,
.nav-toggle-bar::after {
    content: "";
    position: absolute;
    left: 0;
}

.nav-toggle-bar::before { top: -6px; }
.nav-toggle-bar::after { top: 6px; }

/* ================================================================== */
/* Главная: блоки                                                     */
/* ================================================================== */

.front {
    width: 85%;
    margin-left: auto;
    margin-right: auto;
}

.block {
    margin-bottom: 48px;
}

.block-head {
    margin-bottom: 24px;
}

.block-title {
    font-size: 1.7rem;
}

.block-sub {
    color: var(--muted);
    margin: 0;
}

/* Hero */
.block-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 36px;
    align-items: center;
    background: var(--surface);
    border-radius: var(--radius-card);
    padding: 44px;
}

.hero-kicker {
    color: var(--terracotta);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.82rem;
    margin: 0 0 10px;
}

.hero-title {
    font-size: 2.2rem;
    margin-bottom: 14px;
}

.hero-lead {
    color: var(--muted);
    font-size: 1.05rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 22px;
}

.hero-card {
    background: var(--white);
    border-radius: var(--radius-card);
    padding: 26px;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hero-card-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--terracotta);
}

.hero-card-step {
    font-size: 1.05rem;
    color: var(--accent);
}

.hero-card-text {
    color: var(--muted);
}

/* Стадийная лестница */
.block-stages {
    background: var(--white);
    border-radius: var(--radius-card);
    padding: 40px;
    box-shadow: var(--shadow);
}

.stage-ladder {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.stage-seg {
    border: none;
    border-radius: 14px;
    padding: 22px 18px;
    color: var(--white);
    text-align: left;
    cursor: pointer;
    font: inherit;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 110px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stage-seg:hover,
.stage-seg:focus-visible {
    transform: translateY(-8px);
    box-shadow: var(--shadow-soft);
    outline: none;
}

.stage-seg.is-active {
    box-shadow: 0 0 0 3px rgba(31, 42, 47, 0.15);
}

.stage-seg--1 { background: linear-gradient(160deg, #A9D3CC, #5E9E94); }
.stage-seg--2 { background: linear-gradient(160deg, #7FBDB3, #3F8B7E); }
.stage-seg--3 { background: linear-gradient(160deg, #4F9C8F, #25786A); }
.stage-seg--4 { background: linear-gradient(160deg, #2E8576, #16403A); }

.stage-num {
    font-size: 0.85rem;
    opacity: 0.92;
    font-weight: 600;
}

.stage-name {
    font-size: 1.2rem;
    font-weight: 700;
}

/* Правило [hidden] до основных стилей панели (см. A11) */
.stage-panel[hidden] {
    display: none !important;
}

.stage-panel {
    background: var(--surface);
    border-radius: var(--radius-card);
    padding: 26px 30px;
}

.stage-panel-title {
    color: var(--accent);
    margin-bottom: 8px;
}

.stage-panel p {
    margin: 0;
    color: var(--text);
}

/* Шаги */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 22px;
}

.step-card {
    background: var(--surface);
    border-radius: var(--radius-card);
    padding: 28px;
    min-width: 0;
}

.step-marker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--white);
    font-weight: 700;
    font-size: 1.15rem;
    margin-bottom: 12px;
}

.step-title {
    margin-bottom: 6px;
}

.step-card p {
    margin: 0;
    color: var(--muted);
}

/* О проекте */
.block-about {
    background: var(--surface);
    border-radius: var(--radius-card);
    padding: 40px;
}

.about-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: 36px;
}

.about-text p {
    color: var(--text);
}

.about-contacts-title {
    color: var(--accent);
}

.contacts-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.contacts-list li {
    margin-bottom: 8px;
}

.contacts-list a {
    color: var(--accent);
    font-weight: 500;
}

/* ================================================================== */
/* Заголовки страниц / архивов                                        */
/* ================================================================== */

.page-head,
.page-header {
    margin-bottom: 26px;
}

.page-sub {
    color: var(--muted);
    margin: 0;
}

.archive-desc {
    color: var(--muted);
}

/* ================================================================== */
/* Карточки записей                                                   */
/* ================================================================== */

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: 28px;
}

.card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border-radius: var(--radius-card);
    overflow: hidden;
    box-shadow: var(--shadow);
    min-width: 0;
}

.card-thumb {
    display: block;
    overflow: hidden;
}

.card-thumb img,
.card-img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 22px 24px 24px;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 8px;
}

.card-cat a {
    color: var(--terracotta);
}

.card-title {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.card-title a {
    color: var(--text);
}

.card-title a:hover {
    color: var(--accent);
}

.card-excerpt {
    color: var(--muted);
    font-size: 0.97rem;
}

.card-excerpt p {
    margin: 0 0 0.5em;
    background: none;
}

.card-more {
    margin-top: auto;
    align-self: flex-start;
    padding: 10px 22px;
    font-size: 0.92rem;
}

.empty-note {
    background: var(--surface);
    border-radius: var(--radius-card);
    padding: 26px;
    color: var(--muted);
}

.empty-state .search-form {
    margin-top: 18px;
}

/* ================================================================== */
/* Сайдбар и виджеты                                                  */
/* ================================================================== */

.sidebar .widget {
    background: var(--surface);
    color: var(--text);
    border-radius: var(--radius-card);
    padding: 24px 26px;
    margin-bottom: 24px;
}

.sidebar .widget-title {
    color: var(--accent);
    font-size: 1.1rem;
    margin-bottom: 14px;
}

.sidebar .widget a {
    color: var(--accent);
}

.sidebar .widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar .widget li {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.sidebar .widget li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.sidebar .widget .post-date {
    display: block;
    font-size: 0.82rem;
    color: var(--muted);
}

/* ================================================================== */
/* Подвал                                                             */
/* ================================================================== */

.site-footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    margin-top: 40px;
}

.footer-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 36px;
    padding: 48px 0 40px;
}

.footer-col {
    min-width: 0;
}

.site-footer .widget {
    margin-bottom: 0;
}

.site-footer .widget-title {
    color: var(--footer-title);
    font-size: 1.1rem;
    margin-bottom: 14px;
}

.site-footer .widget,
.site-footer .widget p {
    color: var(--footer-text);
}

.site-footer .widget a {
    color: #EAD9CF;
}

.site-footer .widget a:hover {
    color: var(--white);
}

.site-footer .widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-footer .widget li {
    margin-bottom: 9px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding: 20px 0;
}

.copyright {
    margin: 0;
    font-size: 0.9rem;
    color: var(--footer-text);
}

/* ================================================================== */
/* Пагинация                                                          */
/* ================================================================== */

.pagination {
    margin-top: 36px;
}

.pagination-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
    justify-content: center;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 14px;
    border-radius: var(--radius-btn);
    background: var(--white);
    color: var(--text);
    box-shadow: var(--shadow);
    text-decoration: none;
}

.pagination a:hover {
    background: var(--surface);
    color: var(--accent);
}

.pagination .current {
    background: var(--accent);
    color: var(--white);
}

/* ================================================================== */
/* Контент записи / страницы                                          */
/* ================================================================== */

.post-single,
.page-article {
    background: var(--white);
    border-radius: var(--radius-card);
    padding: 36px 40px;
    box-shadow: var(--shadow);
}

.post-title,
.page-article .page-title {
    font-size: 2rem;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: 6px;
}

.post-thumb {
    margin: 22px 0;
}

.post-thumb img {
    display: block;
    width: 100%;
    border-radius: var(--radius-card);
}

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

.entry-content img {
    height: auto;
    border-radius: 12px;
}

.entry-content h2,
.entry-content h3 {
    margin-top: 1.4em;
}

.entry-content a {
    color: var(--accent);
    text-decoration: underline;
}

.entry-content blockquote {
    margin: 1.4em 0;
    padding: 14px 22px;
    border-left: 4px solid var(--terracotta);
    background: var(--surface);
    border-radius: 0 12px 12px 0;
}

.post-tags {
    margin-top: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.post-tag {
    background: var(--surface);
    color: var(--muted);
    padding: 5px 14px;
    border-radius: var(--radius-btn);
    font-size: 0.85rem;
}

.page-links {
    margin-top: 18px;
    font-weight: 600;
}

.post-nav {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin-top: 26px;
    flex-wrap: wrap;
}

.post-nav a {
    display: inline-block;
    background: var(--white);
    border-radius: var(--radius-card);
    padding: 14px 20px;
    box-shadow: var(--shadow);
}

/* ================================================================== */
/* Таблицы                                                            */
/* ================================================================== */

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.4em 0;
    border: 1px solid var(--border);
}

th,
td {
    border: 1px solid var(--border);
    padding: 10px 14px;
    text-align: left;
}

th {
    background: var(--surface);
    font-weight: 700;
}

/* ================================================================== */
/* Комментарии                                                        */
/* ================================================================== */

.comments-area {
    background: var(--white);
    border-radius: var(--radius-card);
    padding: 32px 36px;
    box-shadow: var(--shadow);
    margin-top: 28px;
}

.comments-title {
    font-size: 1.4rem;
    margin-bottom: 18px;
}

.comment-list {
    list-style: none;
    margin: 0 0 24px;
    padding: 0;
}

.comment-list .children {
    list-style: none;
    margin: 16px 0 0;
    padding-left: 28px;
}

.comment-body {
    background: var(--surface);
    border-radius: 14px;
    padding: 18px 22px;
    margin-bottom: 16px;
}

.comment-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.comment-avatar {
    border-radius: 50%;
}

.comment-author {
    font-weight: 600;
}

.comment-date {
    display: block;
    font-size: 0.82rem;
    color: var(--muted);
}

.comment-awaiting {
    color: var(--terracotta);
    font-size: 0.9rem;
}

.comment-actions {
    margin-top: 8px;
    font-size: 0.9rem;
}

.comment-form-comment textarea,
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"] {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font: inherit;
    background: var(--white);
}

.comment-form p {
    margin-bottom: 14px;
}

.no-comments {
    color: var(--muted);
}

/* ================================================================== */
/* Форма поиска                                                       */
/* ================================================================== */

.search-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.search-field {
    flex: 1;
    min-width: 0;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-btn);
    font: inherit;
    background: var(--white);
}

.search-submit {
    white-space: nowrap;
}

.sidebar .search-field {
    background: var(--white);
}

/* ================================================================== */
/* 404                                                                */
/* ================================================================== */

.error-404 {
    background: var(--white);
    border-radius: var(--radius-card);
    padding: 48px 40px;
    box-shadow: var(--shadow);
    text-align: center;
}

.error-code {
    font-size: 4.5rem;
    font-weight: 800;
    color: var(--accent);
    margin: 0;
    line-height: 1;
}

.error-text {
    color: var(--muted);
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.error-404 .search-form {
    max-width: 460px;
    margin: 22px auto;
    justify-content: center;
}

.error-home {
    margin-top: 10px;
}

/* ================================================================== */
/* Cookie-баннер                                                      */
/* ================================================================== */

/* Правило [hidden] до основных стилей баннера (см. A11) */
.cookie-banner[hidden] {
    display: none !important;
}

.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    background: var(--footer-bg);
    color: var(--footer-text);
    box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.16);
}

.cookie-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 0;
    flex-wrap: wrap;
}

.cookie-text {
    margin: 0;
    font-size: 0.92rem;
    flex: 1;
    min-width: 220px;
}

.cookie-accept {
    white-space: nowrap;
}

/* ================================================================== */
/* Утилиты                                                            */
/* ================================================================== */

.screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    left: -9999px;
}

.skip-link:focus {
    left: 12px;
    top: 12px;
    z-index: 1000;
    background: var(--white);
    padding: 10px 16px;
    border-radius: 8px;
    width: auto;
    height: auto;
    clip: auto;
}

/* ================================================================== */
/* Адаптив: ~960px                                                    */
/* ================================================================== */

@media (max-width: 960px) {
    .layout-with-sidebar {
        grid-template-columns: minmax(0, 1fr);
        gap: 28px;
    }

    .layout-single .content-area,
    .front {
        width: 100%;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .main-nav {
        position: relative;
    }

    .nav-list {
        display: none;
        position: absolute;
        top: calc(100% + 10px);
        right: 0;
        flex-direction: column;
        gap: 4px;
        background: var(--white);
        border: 1px solid var(--border);
        border-radius: 14px;
        padding: 10px;
        min-width: 220px;
        box-shadow: var(--shadow-soft);
        z-index: 50;
    }

    .nav-list.is-open {
        display: flex;
    }

    .block-hero,
    .about-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .block-hero,
    .block-stages,
    .block-about {
        padding: 30px;
    }
}

/* ================================================================== */
/* Адаптив: ~600px                                                    */
/* ================================================================== */

@media (max-width: 600px) {
    body {
        font-size: 17px;
    }

    h1 { font-size: 1.7rem; }
    .hero-title { font-size: 1.6rem; }
    .block-title { font-size: 1.4rem; }

    .stage-ladder {
        grid-template-columns: minmax(0, 1fr);
    }

    .stage-seg {
        min-height: auto;
    }

    .footer-cols {
        grid-template-columns: minmax(0, 1fr);
        gap: 28px;
    }

    .post-single,
    .page-article,
    .comments-area {
        padding: 24px 22px;
    }

    .block-hero,
    .block-stages,
    .block-about {
        padding: 24px;
    }

    .header-inner {
        gap: 14px;
    }

    .cookie-inner {
        padding: 14px 0;
    }
}
