/*
Theme Name: dds_jeanmichelferrand.com
Author: Жан-Мишель Ферран
Description: Мультитематический экспертный ресурс о сохранении и приумножении частного капитала через премиальные активы — от элитной недвижимости до альтернативных инвестиций.
Version: 1.1
Text Domain: jmferrand
*/

/* ============================================================
   Токены
   ============================================================ */
:root {
    --ink: #14171f;
    --dark: #171b25;
    --dark-2: #1e232f;
    --bg: #f6f3ec;
    --surface: #ffffff;
    --gold: #a9854d;
    --gold-soft: #c7a972;
    --text: #2a2d36;
    --muted: #6c7079;
    --line: #e4ddcf;
    --line-dark: #2c3140;
    --shell: min(92%, 1180px);
    --radius: 4px;
    --serif: Georgia, "Times New Roman", "PT Serif", serif;
    --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ============================================================
   База
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.7;
    color: var(--text);
    background: var(--bg);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-family: var(--serif);
    color: var(--ink);
    line-height: 1.22;
    font-weight: 600;
    margin: 0 0 0.5em;
}
h1 { font-size: 2.3rem; }
h2 { font-size: 1.9rem; }
h3 { font-size: 1.35rem; }

p { margin: 0 0 1.1em; }

a { color: var(--gold); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--ink); }

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

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

/* ============================================================
   Шапка
   ============================================================ */
.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.2rem 0;
}
.brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    min-width: 0;
}
.brand-logo, .brand svg.brand-mark {
    display: block;
    width: 52px;
    height: 52px;
    flex: 0 0 auto;
}
.brand-text { min-width: 0; }
.brand-name {
    font-family: var(--serif);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--ink);
    line-height: 1.2;
    display: block;
}
.brand-name a { color: inherit; }
.brand-desc {
    font-size: 0.82rem;
    color: var(--muted);
    line-height: 1.4;
    margin-top: 2px;
    display: block;
    max-width: 46ch;
}

/* Навигация */
.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 1.6rem;
}
.main-nav a {
    color: var(--ink);
    font-size: 0.95rem;
    letter-spacing: .01em;
    padding: 0.3rem 0;
    border-bottom: 2px solid transparent;
}
.main-nav a:hover,
.main-nav .current-menu-item > a {
    color: var(--gold);
    border-bottom-color: var(--gold);
}
.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0.5rem 0.7rem;
    cursor: pointer;
    color: var(--ink);
    font-size: 1rem;
}

/* ============================================================
   Раскладки контента
   ============================================================ */
.site-main { padding: 2.6rem 0 3.2rem; }

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

/* Узкая колонка контента на одиночных страницах без сайдбара */
.content-narrow {
    width: 85%;
    margin-left: auto;
    margin-right: auto;
}
@media (max-width: 960px) {
    .content-narrow { width: 100%; }
}

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

/* ============================================================
   Сайдбар
   ============================================================ */
.sidebar { min-width: 0; }
.sidebar .widget {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.3rem 1.4rem;
    margin-bottom: 1.6rem;
    color: var(--text);
}
.sidebar .widget-title {
    font-size: 1.1rem;
    margin: 0 0 0.9rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
}
.sidebar .widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.sidebar .widget li {
    padding: 0.55rem 0;
    border-bottom: 1px dotted var(--line);
}
.sidebar .widget li:last-child { border-bottom: 0; }
.sidebar .widget a { color: var(--text); }
.sidebar .widget a:hover { color: var(--gold); }
.sidebar .widget .post-date,
.sidebar .widget .rss-date { color: var(--muted); font-size: 0.82rem; }

/* ============================================================
   Карточки записей (A8, A10)
   ============================================================ */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.8rem;
}
.card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(20, 23, 31, .09);
}
.card-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}
.card-thumb-placeholder {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-2) 100%);
}
.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.3rem 1.4rem 1.5rem;
}
.card-meta {
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 0.5rem;
}
.card-title {
    font-size: 1.25rem;
    margin: 0 0 0.6rem;
}
.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--gold); }
.card-excerpt { color: var(--text); margin-bottom: 1rem; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-more {
    margin-top: auto;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gold);
    letter-spacing: .02em;
}
.card-more:hover { color: var(--ink); }

/* ============================================================
   Записи и страницы
   ============================================================ */
.entry-header { margin-bottom: 1.4rem; }
.entry-title { font-size: 2.1rem; }
.entry-meta { color: var(--muted); font-size: 0.9rem; margin-top: 0.4rem; }
.entry-thumb {
    display: block;
    width: 100%;
    max-height: 460px;
    object-fit: cover;
    border-radius: var(--radius);
    margin: 1.4rem 0;
}
.entry-content { font-size: 1.05rem; }
.entry-content h2 { margin-top: 1.8rem; }
.entry-content h3 { margin-top: 1.4rem; }
.entry-content img { border-radius: var(--radius); }
.entry-content blockquote {
    margin: 1.6rem 0;
    padding: 0.6rem 1.4rem;
    border-left: 3px solid var(--gold);
    color: var(--ink);
    font-style: italic;
}
.entry-content ul, .entry-content ol { padding-left: 1.4rem; }
.entry-content li { margin-bottom: 0.4rem; }

/* Таблицы */
.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.4rem 0;
}
.entry-content table,
.entry-content th,
.entry-content td {
    border: 1px solid var(--line);
}
.entry-content th, .entry-content td { padding: 0.6rem 0.8rem; text-align: left; }
.entry-content th { background: #efe9dd; }

.tags-line { margin-top: 1.6rem; font-size: 0.9rem; color: var(--muted); }
.tags-line a { margin-right: 0.4rem; }

/* ============================================================
   Главная
   ============================================================ */
.home-section { padding: 3.2rem 0; }
.home-section + .home-section { border-top: 1px solid var(--line); }
.section-kicker {
    text-transform: uppercase;
    letter-spacing: .18em;
    font-size: 0.74rem;
    color: var(--gold);
    font-weight: 700;
    margin-bottom: 0.6rem;
}
.section-title { font-size: 2rem; margin-bottom: 1.4rem; }

/* Блок: текст + иллюстрация */
.split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 3rem;
    align-items: center;
}
.split.reverse .split-media { order: -1; }
.split-media img {
    display: block;
    width: 100%;
    border-radius: var(--radius);
}
.split-text p:last-child { margin-bottom: 0; }
.lead { font-size: 1.15rem; }

/* Блок: сетка направлений */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.6rem;
}
.feature {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.6rem 1.5rem;
}
.feature-icon { width: 40px; height: 40px; color: var(--gold); margin-bottom: 0.9rem; }
.feature h3 { font-size: 1.2rem; margin-bottom: 0.4rem; }
.feature p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* Блок: шаги */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.8rem;
    counter-reset: step;
}
.step { position: relative; padding-top: 0.4rem; }
.step::before {
    counter-increment: step;
    content: "0" counter(step);
    display: block;
    font-family: var(--serif);
    font-size: 2rem;
    color: var(--gold-soft);
    margin-bottom: 0.4rem;
}
.step h3 { font-size: 1.15rem; margin-bottom: 0.3rem; }
.step p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* Блок: акцентная цитата (тёмный фон) */
.quote-band {
    background: var(--dark);
    color: #efe9dd;
    border-top: 0;
}
.quote-band .shell { text-align: center; }
.quote-band blockquote {
    margin: 0;
    font-family: var(--serif);
    font-size: 1.7rem;
    line-height: 1.4;
    color: #f4efe4;
    max-width: 30ch;
    margin-inline: auto;
}
.quote-band .quote-author {
    margin-top: 1.4rem;
    color: var(--gold-soft);
    letter-spacing: .04em;
    font-size: 0.95rem;
}

/* Блок: FAQ */
.faq { max-width: 820px; }
.faq details {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    margin-bottom: 0.9rem;
    padding: 0 1.3rem;
}
.faq summary {
    cursor: pointer;
    padding: 1.1rem 0;
    font-family: var(--serif);
    font-size: 1.12rem;
    color: var(--ink);
    list-style: none;
    position: relative;
    padding-right: 1.6rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: "+";
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gold);
    font-size: 1.4rem;
}
.faq details[open] summary::after { content: "–"; }
.faq details > p { padding-bottom: 1.1rem; margin: 0; color: var(--muted); }

.section-cta { margin-top: 1.6rem; }

/* Кнопка */
.btn {
    display: inline-block;
    background: var(--ink);
    color: #f4efe4;
    padding: 0.75rem 1.6rem;
    border-radius: var(--radius);
    font-size: 0.95rem;
    letter-spacing: .02em;
    border: 1px solid var(--ink);
}
.btn:hover { background: var(--gold); border-color: var(--gold); color: #fff; }
.btn-ghost {
    background: transparent;
    color: var(--ink);
    border-color: var(--ink);
}
.btn-ghost:hover { background: var(--ink); color: #f4efe4; }

/* ============================================================
   Пагинация (D5 — type=plain -> .page-numbers)
   ============================================================ */
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 2.4rem;
}
.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 0.7rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--ink);
    font-size: 0.95rem;
}
.pagination a.page-numbers:hover {
    border-color: var(--gold);
    color: var(--gold);
}
.pagination .page-numbers.current {
    background: var(--ink);
    border-color: var(--ink);
    color: #f4efe4;
}
.pagination .page-numbers.dots {
    border: 0;
    background: transparent;
}

/* ============================================================
   Хлебные крошки
   ============================================================ */
.breadcrumbs {
    font-size: 0.85rem;
    color: var(--muted);
    padding: 1rem 0 0;
}
.breadcrumbs a { color: var(--gold); }
.breadcrumbs a:hover { color: var(--ink); }
.breadcrumbs .sep { margin: 0 0.4rem; color: var(--line-dark); opacity: .6; }

/* ============================================================
   Комментарии
   ============================================================ */
.comments-area { margin-top: 2.6rem; padding-top: 1.6rem; border-top: 1px solid var(--line); }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list .children { list-style: none; margin-left: 1.4rem; padding-left: 1rem; border-left: 2px solid var(--line); }
.comment-body { padding: 1rem 0; border-bottom: 1px dotted var(--line); }
.comment-author { font-weight: 600; color: var(--ink); }
.comment-metadata { font-size: 0.8rem; color: var(--muted); }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1rem;
    background: var(--surface);
}
.comment-form textarea { min-height: 120px; }
.comment-form .submit,
.search-form button {
    background: var(--ink);
    color: #f4efe4;
    border: 0;
    padding: 0.7rem 1.5rem;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.95rem;
}
.comment-form .submit:hover,
.search-form button:hover { background: var(--gold); }

/* ============================================================
   Форма поиска
   ============================================================ */
.search-form {
    display: flex;
    gap: 0.6rem;
}
.search-form label { flex: 1; min-width: 0; }
.search-form .search-field {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-size: 1rem;
    background: var(--surface);
}

/* ============================================================
   404
   ============================================================ */
.error-404 { text-align: center; padding: 2.4rem 0; }
.error-404 .code { font-family: var(--serif); font-size: 5rem; color: var(--gold-soft); line-height: 1; }
.error-404 .search-form { max-width: 420px; margin: 1.8rem auto 0; }

/* ============================================================
   Подвал
   ============================================================ */
.site-footer {
    background: var(--dark);
    color: #c9ccd4;
    padding: 3rem 0 1.6rem;
    margin-top: 2rem;
}
.footer-cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2.4rem;
}
.site-footer .widget-title {
    font-family: var(--serif);
    color: #f4efe4;
    font-size: 1.15rem;
    margin: 0 0 1rem;
}
.site-footer .widget p { color: #b9bcc5; }
.site-footer .widget ul { list-style: none; margin: 0; padding: 0; }
.site-footer .widget li { padding: 0.35rem 0; }
.site-footer .widget a { color: #d6d9e0; }
.site-footer .widget a:hover { color: var(--gold-soft); }
.site-footer .widget .post-date { color: #8d909a; font-size: 0.82rem; }
.footer-bottom {
    margin-top: 2.4rem;
    padding-top: 1.4rem;
    border-top: 1px solid var(--line-dark);
    font-size: 0.84rem;
    color: #8d909a;
    text-align: center;
}

/* ============================================================
   Cookie-баннер (D6, A11)
   ============================================================ */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 999;
    background: var(--ink);
    color: #e9e5db;
    padding: 1rem 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, .25);
}
.cookie-banner .shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.4rem;
    flex-wrap: wrap;
}
.cookie-banner p { margin: 0; font-size: 0.9rem; max-width: 70ch; }
.cookie-banner a { color: var(--gold-soft); }
.cookie-accept {
    background: var(--gold);
    color: #fff;
    border: 0;
    padding: 0.6rem 1.5rem;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.92rem;
    white-space: nowrap;
}
.cookie-accept:hover { background: var(--gold-soft); }

/* ============================================================
   Адаптив
   ============================================================ */
@media (max-width: 960px) {
    .layout-with-sidebar { grid-template-columns: 1fr; gap: 2.4rem; }
    .split { grid-template-columns: 1fr; gap: 1.8rem; }
    .split.reverse .split-media { order: 0; }
    h1, .entry-title { font-size: 1.8rem; }
    h2, .section-title { font-size: 1.6rem; }
    .quote-band blockquote { font-size: 1.4rem; }
}

@media (max-width: 600px) {
    body { font-size: 16px; }
    .header-inner { flex-wrap: wrap; }
    .brand-desc { display: none; }
    .nav-toggle { display: inline-block; }
    .main-nav {
        flex-basis: 100%;
        display: none;
    }
    .main-nav.is-open { display: block; }
    .main-nav ul { flex-direction: column; gap: 0.2rem; }
    .main-nav li { border-bottom: 1px solid var(--line); }
    .home-section { padding: 2.4rem 0; }
    .cookie-banner .shell { flex-direction: column; align-items: flex-start; }
}
