/*
Theme Name: dds_newwealthcolab.com
Author: Алексей Гордеев
Description: Информационная тема для проекта о личных финансах и инвестициях с якорной специализацией на недвижимости.
Version: 1.1
Text Domain: nwc
*/

/* ---------- Переменные ---------- */
:root {
    --bg: #f6f4ee;
    --surface: #ffffff;
    --ink: #15302a;
    --brand: #1f5a4c;
    --brand-2: #2f7d68;
    --gold: #c69b54;
    --gold-dark: #a87f3c;
    --text: #26302c;
    --muted: #5f6c66;
    --line: #e3ddd1;
    --foot-bg: #15302a;
    --foot-text: #dbe5e0;
    --foot-muted: #9fb3ab;
    --radius: 14px;
    --shell: min(88%, 1180px);
}

/* ---------- База ---------- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.65;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

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

p { margin: 0 0 1em; }

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

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

.sr-only {
    position: absolute;
    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;
    top: 0;
    background: var(--ink);
    color: #fff;
    padding: 10px 16px;
    z-index: 1000;
}
.skip-link:focus { left: 8px; top: 8px; }

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

/* ---------- Кнопки ---------- */
.btn {
    display: inline-block;
    background: var(--brand);
    color: #fff;
    padding: 11px 22px;
    border-radius: 8px;
    border: 0;
    font-size: 0.98rem;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.18s ease;
}
.btn:hover {
    background: var(--brand-2);
    color: #fff;
    text-decoration: none;
}

/* ---------- Шапка ---------- */
.site-head {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}
.head-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 18px 0;
    flex-wrap: wrap;
}
.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    flex: 1;
}
.brand-logo-link { display: inline-flex; flex: 0 0 auto; }
.brand-logo { max-height: 56px; width: auto; }
.brand-mark { display: block; }
.brand-text { min-width: 0; }
.brand-name {
    font-family: Georgia, serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--ink);
    display: block;
}
.brand-name:hover { text-decoration: none; color: var(--brand); }
.brand-desc {
    margin: 2px 0 0;
    font-size: 0.78rem;
    color: var(--muted);
    line-height: 1.4;
    max-width: 60ch;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---------- Навигация ---------- */
.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--line);
    border-radius: 8px;
    width: 44px; height: 44px;
    cursor: pointer;
    position: relative;
}
.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
    content: "";
    position: absolute;
    left: 11px;
    width: 22px; height: 2px;
    background: var(--ink);
    transition: transform 0.2s ease;
}
.nav-toggle-bar { top: 21px; }
.nav-toggle-bar::before { top: -7px; }
.nav-toggle-bar::after { top: 7px; }

.nav-list {
    list-style: none;
    margin: 0; padding: 0;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.nav-list a {
    display: block;
    padding: 9px 14px;
    color: var(--ink);
    border-radius: 7px;
    font-weight: 500;
}
.nav-list a:hover {
    background: var(--bg);
    color: var(--brand);
    text-decoration: none;
}
.nav-list .current-menu-item > a {
    color: var(--brand);
}

/* ---------- Основная область / раскладки ---------- */
.site-main { display: block; }

.page-wrap { padding: 26px 0 60px; }

.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 {
    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
}

/* ---------- Хлебные крошки ---------- */
.crumbs {
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 20px;
}
.crumbs a { color: var(--brand); }
.crumbs .sep { margin: 0 6px; color: #b5beb8; }

/* ---------- Заголовки списков ---------- */
.list-head { margin-bottom: 26px; }
.page-title { font-size: 2rem; }
.archive-desc, .blog-intro { color: var(--muted); }

/* ---------- Сетка карточек ---------- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 26px;
}

.card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card:hover {
    box-shadow: 0 10px 28px rgba(21, 48, 42, 0.1);
    transform: translateY(-2px);
}
.card-thumb { display: block; }
.card-thumb img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}
.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px 22px 22px;
    min-width: 0;
}
.card-meta {
    font-size: 0.78rem;
    color: var(--muted);
    margin-bottom: 8px;
}
.card-meta .sep { margin: 0 6px; }
.card-cat { color: var(--brand); }
.card-title {
    font-size: 1.25rem;
    margin-bottom: 10px;
}
.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--brand); text-decoration: none; }
.card-excerpt {
    color: var(--text);
    font-size: 0.95rem;
    margin-bottom: 14px;
}
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-more {
    margin-top: auto;
    font-weight: 600;
    color: var(--brand);
}

/* ---------- Запись / страница ---------- */
.post-single, .page-article {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 30px 34px;
}
.post-head { margin-bottom: 18px; }
.post-title { font-size: 2.1rem; }
.post-meta { color: var(--muted); font-size: 0.85rem; }
.post-meta .sep { margin: 0 6px; }
.post-thumb { margin: 0 0 22px; }
.post-thumb img {
    width: 100%;
    border-radius: 10px;
    object-fit: cover;
}
.post-content { font-size: 1.03rem; }
.post-content img { border-radius: 8px; margin: 1em 0; }
.post-content h2 { margin-top: 1.4em; }
.post-content blockquote {
    margin: 1.4em 0;
    padding: 6px 20px;
    border-left: 4px solid var(--gold);
    background: var(--bg);
    color: var(--text);
}
.post-tags { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 8px; }
.tag-chip {
    font-size: 0.82rem;
    padding: 4px 12px;
    background: var(--bg);
    border-radius: 20px;
    color: var(--muted);
}

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

/* ---------- Сайдбар ---------- */
.sidebar {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 6px 22px 22px;
    color: var(--text);
}
.sidebar .widget { margin-top: 22px; }
.sidebar .widget-title {
    font-size: 1.1rem;
    color: var(--ink);
    border-bottom: 2px solid var(--gold);
    padding-bottom: 8px;
    margin-bottom: 14px;
}
.sidebar a { color: var(--brand); }
.sidebar a:hover { color: var(--gold-dark); }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { padding: 7px 0; border-bottom: 1px solid var(--line); }
.sidebar li:last-child { border-bottom: 0; }
.sidebar .post-date { display: block; font-size: 0.78rem; color: var(--muted); }

/* ---------- Пагинация ---------- */
.pager {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 36px;
    justify-content: center;
}
.pager .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: 8px;
    background: var(--surface);
    color: var(--ink);
    font-size: 0.95rem;
    text-decoration: none;
}
.pager a.page-numbers:hover {
    border-color: var(--brand);
    color: var(--brand);
    text-decoration: none;
}
.pager .page-numbers.current {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}
.pager .page-numbers.dots {
    border: 0;
    background: none;
}

/* ---------- Поиск ---------- */
.search-form {
    display: flex;
    gap: 8px;
    max-width: 460px;
    margin: 16px 0;
}
.search-field {
    flex: 1;
    min-width: 0;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 0.95rem;
}

/* ---------- Комментарии ---------- */
.comments-area {
    margin-top: 36px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px 30px;
}
.comments-title { font-size: 1.4rem; }
.comment-list { list-style: none; margin: 0 0 24px; padding: 0; }
.comment-list .children { list-style: none; margin: 0 0 0 26px; padding: 0; }
.comment-item { margin: 16px 0; }
.comment-inner {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 16px 18px;
}
.comment-head {
    display: flex;
    gap: 12px;
    align-items: baseline;
    margin-bottom: 8px;
}
.comment-author { font-weight: 600; color: var(--ink); }
.comment-date { font-size: 0.78rem; color: var(--muted); }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    margin-top: 4px;
}
.comment-form { margin-top: 10px; }
.comment-form p { margin-bottom: 14px; }

/* ---------- Главная: блок 1 текст+иллюстрация ---------- */
.fp-intro { background: var(--surface); border-bottom: 1px solid var(--line); }
.intro-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 50px;
    align-items: center;
    padding: 60px 0;
}
.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.78rem;
    color: var(--gold-dark);
    font-weight: 600;
    margin-bottom: 10px;
}
.intro-title { font-size: 2.6rem; }
.intro-text p { color: var(--text); font-size: 1.05rem; }
.intro-media img { width: 100%; height: auto; justify-self: center; }

/* ---------- Главная: блок 2 рубрики ---------- */
.fp-topics { padding: 64px 0; }
.section-title { font-size: 2rem; text-align: center; }
.section-lead { text-align: center; color: var(--muted); max-width: 60ch; margin: 0 auto 32px; }
.topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    margin-top: 10px;
}
.topic-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px 24px;
    min-width: 0;
}
.topic-icon { color: var(--brand); display: inline-flex; margin-bottom: 12px; }
.topic-card h3 { font-size: 1.2rem; }
.topic-card p { color: var(--muted); font-size: 0.95rem; margin: 0; }

/* ---------- Главная: последние записи ---------- */
.fp-latest { padding: 64px 0; background: #eef3f0; }
.fp-latest .section-title { margin-bottom: 32px; }

/* ---------- Главная: блок 3 шаги ---------- */
.fp-steps { padding: 64px 0; }
.steps {
    list-style: none;
    counter-reset: none;
    margin: 32px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 26px;
}
.step {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px 24px;
    min-width: 0;
}
.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px; height: 44px;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    font-family: Georgia, serif;
    font-size: 1.3rem;
    margin-bottom: 14px;
}
.step h3 { font-size: 1.15rem; }
.step p { color: var(--muted); font-size: 0.95rem; margin: 0; }

/* ---------- Главная: блок 4 FAQ ---------- */
.fp-faq { padding: 64px 0 72px; background: var(--ink); }
.fp-faq .section-title { color: #fff; }
.faq-shell { max-width: 800px; }
.faq-item {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 10px;
    margin-top: 14px;
    padding: 4px 20px;
    color: var(--foot-text);
}
.faq-item summary {
    cursor: pointer;
    font-weight: 600;
    padding: 14px 0;
    color: #fff;
    list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; float: right; color: var(--gold); font-size: 1.3rem; line-height: 1; }
.faq-item[open] summary::after { content: "−"; }
.faq-item p { padding-bottom: 14px; margin: 0; color: var(--foot-text); }

/* ---------- Подвал ---------- */
.site-foot {
    background: var(--foot-bg);
    color: var(--foot-text);
    padding: 50px 0 26px;
}
.foot-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 36px;
}
.site-foot .widget-title {
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 14px;
}
.site-foot,
.site-foot p,
.site-foot li { color: var(--foot-text); }
.site-foot a { color: #fff; }
.site-foot a:hover { color: var(--gold); text-decoration: none; }
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot li { padding: 6px 0; }
.site-foot .post-date { color: var(--foot-muted); font-size: 0.78rem; display: block; }
.foot-bottom {
    margin-top: 36px;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}
.copyright, .foot-contact { margin: 0; font-size: 0.88rem; color: var(--foot-muted); }
.foot-contact a { color: var(--gold); }

/* ---------- Cookie-баннер (A11: правило [hidden] ДО основного блока) ---------- */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    background: var(--ink);
    color: var(--foot-text);
    z-index: 900;
    padding: 16px 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.18);
}
.cookie-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}
.cookie-text { margin: 0; font-size: 0.9rem; color: var(--foot-text); flex: 1; min-width: 240px; }
.cookie-btn { background: var(--gold); color: var(--ink); flex: 0 0 auto; }
.cookie-btn:hover { background: #d8b06a; color: var(--ink); }

/* ---------- Прочее ---------- */
.no-results { color: var(--muted); }
.error-404 { text-align: center; padding: 40px 0; }
.error-404 .search-form { margin: 24px auto; }
.page-links { margin: 1.4em 0; }

/* ---------- Адаптив ---------- */
@media (max-width: 960px) {
    .layout-with-sidebar { grid-template-columns: 1fr; }
    .sidebar { margin-top: 10px; }
    .intro-grid { grid-template-columns: 1fr; gap: 32px; padding: 44px 0; }
    .intro-title { font-size: 2.1rem; }
    .foot-cols { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
    .nav-toggle { display: block; }
    .primary-nav {
        flex-basis: 100%;
        display: none;
    }
    .primary-nav.is-open { display: block; }
    .nav-list { flex-direction: column; gap: 2px; }
    .nav-list a { padding: 12px 10px; border-bottom: 1px solid var(--line); }
    .head-inner { gap: 14px; }
    .foot-cols { grid-template-columns: 1fr; gap: 28px; }
    .foot-bottom { flex-direction: column; }
    .post-single, .page-article { padding: 22px 18px; }
    .intro-title { font-size: 1.8rem; }
    .section-title { font-size: 1.6rem; }
}
