/*
Theme Name: dds_chaisefitnessnj.com
Author: Дмитрий Соколов
Description: Информационная тема для блога о недвижимости и здоровом доме: аналитика рынка, гайды по покупке и продаже, инвестиционные стратегии и материалы о благополучии жильцов.
Version: 1.1
Text Domain: domora
*/

/* ===== Базовые переменные ===== */
:root {
    --bg: #f7f3ec;
    --surface: #ffffff;
    --ink: #25302d;
    --ink-soft: #5a6863;
    --brand: #1f5d54;
    --brand-dark: #163f39;
    --brand-deep: #122e2a;
    --accent: #c47f33;
    --accent-soft: #e7d9c4;
    --line: #e3dccf;
    --radius: 14px;
    --shell: min(92%, 1180px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

h1, h2, h3, h4 {
    font-family: "Trebuchet MS", "Segoe UI", Tahoma, sans-serif;
    line-height: 1.25;
    color: var(--brand-dark);
    margin: 0 0 0.6em;
}

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

p { margin: 0 0 1em; }

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

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

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

.btn {
    display: inline-block;
    background: var(--brand);
    color: #fff;
    padding: 0.7em 1.5em;
    border-radius: 999px;
    font-family: "Trebuchet MS", sans-serif;
    font-weight: 600;
    transition: background 0.2s ease;
}
.btn:hover { background: var(--accent); color: #fff; text-decoration: none; }

/* ===== Шапка ===== */
.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}
.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, .brand-mark { flex: 0 0 auto; display: block; }
.brand-text { min-width: 0; }
.brand-name {
    font-family: "Trebuchet MS", sans-serif;
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--brand-dark);
    display: block;
    line-height: 1.2;
}
.brand-name a { color: inherit; }
.brand-desc {
    font-size: 0.82rem;
    color: var(--ink-soft);
    display: block;
    max-width: 520px;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 22px;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}
.main-nav a {
    font-family: "Trebuchet MS", sans-serif;
    color: var(--ink);
    font-weight: 600;
    font-size: 0.98rem;
}
.main-nav a:hover { color: var(--brand); }

.nav-toggle {
    display: none;
    background: var(--brand);
    color: #fff;
    border: 0;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 1rem;
    cursor: pointer;
}

/* ===== Каркас контента ===== */
.site-main { padding: 38px 0 56px; }

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

/* ===== Хлебные крошки ===== */
.breadcrumbs {
    font-family: "Trebuchet MS", sans-serif;
    font-size: 0.85rem;
    color: var(--ink-soft);
    margin: 0 0 22px;
}
.breadcrumbs a { color: var(--brand); }
.breadcrumbs .sep { margin: 0 6px; color: var(--accent); }

/* ===== Карточки записей ===== */
.cards-stack { display: flex; flex-direction: column; gap: 26px; }

.card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 6px 22px rgba(18, 46, 42, 0.05);
}
.card-grid { display: flex; flex-direction: row; }
.card-thumb-wrap {
    flex: 0 0 280px;
    position: relative;
    overflow: hidden;
    background: var(--accent-soft);
}
.card-thumb-wrap a {
    display: block;
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
}
.card-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.card-body {
    flex: 1;
    min-width: 0;
    padding: 22px 26px;
    display: flex;
    flex-direction: column;
}
.card-title { margin: 0 0 8px; font-size: 1.25rem; }
.card-title a { color: var(--brand-dark); }
.card-meta {
    font-family: "Trebuchet MS", sans-serif;
    font-size: 0.8rem;
    color: var(--ink-soft);
    margin-bottom: 10px;
}
.card-excerpt { color: var(--ink); }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-more { margin-top: auto; padding-top: 12px; }
.card-more a {
    font-family: "Trebuchet MS", sans-serif;
    font-weight: 600;
    color: var(--accent);
}

/* ===== Записи и страницы ===== */
.entry {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 32px 36px;
}
.entry-thumb { margin: 0 0 24px; border-radius: var(--radius); overflow: hidden; }
.entry-thumb img { width: 100%; display: block; }
.entry-title { margin-bottom: 6px; }
.entry-meta {
    font-family: "Trebuchet MS", sans-serif;
    font-size: 0.85rem;
    color: var(--ink-soft);
    margin-bottom: 22px;
}
.entry-content :where(h2, h3) { margin-top: 1.4em; }
.entry-content img { border-radius: 10px; display: block; }

.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.2em 0;
}
.entry-content table,
.entry-content th,
.entry-content td {
    border: 1px solid var(--line);
}
.entry-content th, .entry-content td { padding: 10px 12px; text-align: left; }
.entry-content th { background: var(--accent-soft); }

/* ===== Сайдбар ===== */
.sidebar {
    min-width: 0;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
    color: var(--ink);
}
.sidebar .widget { margin-bottom: 26px; }
.sidebar .widget:last-child { margin-bottom: 0; }
.sidebar .widget-title {
    font-size: 1.05rem;
    color: var(--brand-dark);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--accent);
}
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { padding: 7px 0; border-bottom: 1px dashed var(--line); }
.sidebar li:last-child { border-bottom: 0; }
.sidebar a { color: var(--brand); }
.sidebar a:hover { color: var(--accent); }
.sidebar .post-date { display: block; font-size: 0.78rem; color: var(--ink-soft); }

/* ===== Пагинация ===== */
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: 36px 0 0;
}
.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    color: var(--ink);
    font-family: "Trebuchet MS", sans-serif;
    text-decoration: none;
}
.pagination a.page-numbers:hover { border-color: var(--brand); color: var(--brand); }
.pagination .page-numbers.current {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}
.pagination .page-numbers.dots { border: 0; background: none; }

/* ===== Главная ===== */
.home-content { width: 85%; margin-inline: auto; }
.home-section { margin: 0 0 56px; }

/* Блок: текст + иллюстрация */
.split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 44px;
    align-items: center;
}
.split.reverse .split-media { order: -1; }
.split-media img { width: 100%; border-radius: var(--radius); display: block; }
.split-text h2 { font-size: 1.9rem; }
.eyebrow {
    font-family: "Trebuchet MS", sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.78rem;
    color: var(--accent);
    font-weight: 700;
    display: block;
    margin-bottom: 10px;
}

/* Блок: сетка рубрик */
.section-head { text-align: center; max-width: 720px; margin: 0 auto 32px; }
.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}
.feature {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px;
}
.feature-icon {
    width: 46px;
    height: 46px;
    display: block;
    margin-bottom: 14px;
    color: var(--brand);
}
.feature h3 { font-size: 1.15rem; margin-bottom: 6px; }
.feature p { margin: 0; color: var(--ink-soft); }

/* Блок: последние записи на главной */
.latest-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

/* Блок: шаги */
.steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    counter-reset: step;
}
.step {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px 22px;
    position: relative;
}
.step-num {
    font-family: "Trebuchet MS", sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--accent);
    display: block;
    margin-bottom: 10px;
}
.step h3 { font-size: 1.05rem; }
.step p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }

/* Блок: FAQ */
.faq { max-width: 820px; margin-inline: auto; }
.faq details {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 4px 22px;
    margin-bottom: 14px;
}
.faq summary {
    cursor: pointer;
    font-family: "Trebuchet MS", sans-serif;
    font-weight: 600;
    color: var(--brand-dark);
    padding: 16px 0;
    list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--accent); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 16px; color: var(--ink-soft); }

/* ===== Подвал ===== */
.site-footer {
    background: var(--brand-deep);
    color: #d7e3df;
    padding: 48px 0 22px;
    margin-top: 40px;
}
.footer-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 36px;
}
.footer-col { min-width: 0; }
.footer-col .widget-title {
    color: #fff;
    font-size: 1.05rem;
    margin-bottom: 14px;
}
.footer-col, .footer-col p { color: #c4d3ce; }
.footer-col a { color: #f0d9b8; }
.footer-col a:hover { color: #fff; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { padding: 5px 0; }
.footer-contacts a { word-break: break-word; }
.site-copyright {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    margin-top: 36px;
    padding-top: 18px;
    text-align: center;
    font-size: 0.85rem;
    color: #9fb3ad;
}

/* ===== Поиск ===== */
.search-form {
    display: flex;
    gap: 8px;
}
.search-form .search-field {
    flex: 1;
    min-width: 0;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    font: inherit;
}
.search-form .search-submit {
    border: 0;
    background: var(--brand);
    color: #fff;
    padding: 10px 18px;
    border-radius: 10px;
    cursor: pointer;
    font-family: "Trebuchet MS", sans-serif;
}

/* ===== Комментарии ===== */
.comments-area { margin-top: 36px; }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list li { margin-bottom: 18px; }
.comment-body {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 18px 20px;
}
.comment-meta { font-size: 0.82rem; color: var(--ink-soft); margin-bottom: 8px; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font: inherit;
    margin-bottom: 12px;
}

/* ===== 404 ===== */
.error-404 { text-align: center; padding: 30px 0; }
.error-404 .code { font-size: 4rem; color: var(--accent); font-family: "Trebuchet MS", sans-serif; }
.error-404 .search-form { max-width: 460px; margin: 24px auto 0; }

/* ===== Cookie-баннер ===== */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 1000;
    background: var(--brand-deep);
    color: #e5ede9;
    padding: 16px 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
}
.cookie-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}
.cookie-banner p { margin: 0; font-size: 0.9rem; max-width: 760px; }
.cookie-banner a { color: #f0d9b8; }
.cookie-accept {
    border: 0;
    background: var(--accent);
    color: #fff;
    padding: 10px 22px;
    border-radius: 999px;
    cursor: pointer;
    font-family: "Trebuchet MS", sans-serif;
    font-weight: 600;
    white-space: nowrap;
}

/* ===== Адаптив ===== */
@media (max-width: 960px) {
    .layout-with-sidebar { grid-template-columns: 1fr; gap: 36px; }
    .layout-single .content-area,
    .home-content { width: 100%; }
    .feature-grid, .latest-grid, .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .split { grid-template-columns: 1fr; gap: 26px; }
    .split.reverse .split-media { order: 0; }
}

@media (max-width: 600px) {
    body { font-size: 16px; }
    h1 { font-size: 1.7rem; }
    .main-nav { display: none; width: 100%; }
    .main-nav.is-open { display: block; }
    .main-nav ul { flex-direction: column; gap: 4px; }
    .nav-toggle { display: inline-block; }
    .feature-grid, .latest-grid, .steps, .footer-cols { grid-template-columns: 1fr; }
    .entry { padding: 22px; }

    .card-grid { flex-direction: column; }
    .card-thumb-wrap {
        flex: none;
        width: 100%;
        position: static;
    }
    .card-thumb-wrap a { position: static; }
    .card-thumb-wrap img {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }
}
