/*
Theme Name: dds_jonnymckenna.com
Author: Джонни МакКенна
Description: Экспертная платформа для частных инвесторов в недвижимость — аналитика, практические инструменты и сообщество.
Version: 1.1
Text Domain: jonnymckenna
*/

:root {
    --c-bg: #f5f6f4;
    --c-surface: #ffffff;
    --c-ink: #1c2430;
    --c-ink-soft: #4a5562;
    --c-navy: #16304b;
    --c-navy-deep: #0f2236;
    --c-accent: #c8902e;
    --c-accent-soft: #e7c478;
    --c-line: #e2e4e0;
    --c-line-dark: #2a4258;
    --shell: min(92%, 1180px);
    --radius: 10px;
    --shadow: 0 6px 22px rgba(22, 48, 75, 0.08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

h1, h2, h3, h4, .brand-name, .site-nav, .widget-title, .btn, .breadcrumbs, .pagination {
    font-family: "Helvetica Neue", "Segoe UI", Arial, sans-serif;
}

h1, h2, h3, h4 { color: var(--c-navy); line-height: 1.25; }
h1 { font-size: 2rem; margin: 0 0 0.6em; }
h2 { font-size: 1.55rem; margin: 0 0 0.7em; }
h3 { font-size: 1.2rem; margin: 0 0 0.5em; }

p { margin: 0 0 1em; }

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

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

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

.btn {
    display: inline-block;
    background: var(--c-accent);
    color: #fff;
    padding: 0.7em 1.6em;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    transition: background 0.2s;
}
.btn:hover { background: var(--c-navy); color: #fff; text-decoration: none; }

/* ---------- Шапка ---------- */
.site-header {
    background: var(--c-surface);
    border-bottom: 1px solid var(--c-line);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.1rem 0;
    flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 0.9rem; min-width: 0; }
.brand-logo { display: block; max-height: 56px; width: auto; }
.brand-text { min-width: 0; }
.brand-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--c-navy);
    display: block;
    line-height: 1.3;
}
.brand-desc {
    font-size: 0.8rem;
    color: var(--c-ink-soft);
    display: block;
    margin-top: 0.15rem;
}

.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--c-line);
    border-radius: 8px;
    padding: 0.5rem 0.7rem;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--c-navy);
}

.site-nav ul {
    list-style: none;
    display: flex;
    gap: 1.6rem;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}
.site-nav a {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--c-ink);
    padding: 0.3rem 0;
    border-bottom: 2px solid transparent;
}
.site-nav a:hover {
    color: var(--c-navy);
    border-bottom-color: var(--c-accent);
    text-decoration: none;
}

/* ---------- Хлебные крошки ---------- */
.breadcrumbs {
    font-size: 0.85rem;
    color: var(--c-ink-soft);
    padding: 1rem 0 0;
}
.breadcrumbs a { color: var(--c-ink-soft); }
.breadcrumbs a:hover { color: var(--c-accent); }
.breadcrumbs .sep { margin: 0 0.4em; color: var(--c-line); }

/* ---------- Раскладки ---------- */
.site-main { padding: 2.2rem 0 3rem; }

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

.sidebar { min-width: 0; }

/* ---------- Сайдбар-виджеты ---------- */
.sidebar .widget {
    background: var(--c-surface);
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
    padding: 1.3rem;
    margin-bottom: 1.5rem;
}
.sidebar .widget-title {
    color: var(--c-navy);
    font-size: 1.05rem;
    margin-bottom: 0.9rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--c-accent);
}
.sidebar .widget ul { list-style: none; margin: 0; padding: 0; }
.sidebar .widget li { padding: 0.45rem 0; border-bottom: 1px solid var(--c-line); }
.sidebar .widget li:last-child { border-bottom: none; }
.sidebar .widget a { color: var(--c-ink); font-family: "Helvetica Neue", Arial, sans-serif; font-size: 0.92rem; }
.sidebar .widget a:hover { color: var(--c-accent); }
.sidebar .widget .post-date { display: block; font-size: 0.78rem; color: var(--c-ink-soft); }

/* ---------- Карточка записи ---------- */
.card-list { display: grid; gap: 1.6rem; }

.card {
    display: flex;
    flex-direction: column;
    background: var(--c-surface);
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.card-thumb-wrap { display: block; overflow: hidden; }
.card-thumb-wrap img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    transition: transform 0.3s;
}
.card-thumb-wrap:hover img { transform: scale(1.04); }
.card-body { flex: 1; padding: 1.3rem 1.5rem 1.6rem; display: flex; flex-direction: column; }
.card-title { font-size: 1.25rem; margin-bottom: 0.5rem; }
.card-title a { color: var(--c-navy); }
.card-title a:hover { color: var(--c-accent); text-decoration: none; }
.card-meta { font-size: 0.8rem; color: var(--c-ink-soft); margin-bottom: 0.7rem; font-family: "Helvetica Neue", Arial, sans-serif; }
.card-excerpt { color: var(--c-ink-soft); font-size: 0.97rem; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-more { margin-top: auto; padding-top: 0.8rem; }
.card-more a {
    font-family: "Helvetica Neue", Arial, sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--c-accent);
}

/* ---------- Контент записи / страницы ---------- */
.entry {
    background: var(--c-surface);
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
    padding: 2rem 2.2rem 2.4rem;
    box-shadow: var(--shadow);
}
.entry-thumb { margin: -2rem -2.2rem 1.8rem; }
.entry-thumb img { display: block; width: 100%; height: auto; object-fit: cover; max-height: 420px; }
.entry-title { margin-bottom: 0.4rem; }
.entry-meta { font-size: 0.85rem; color: var(--c-ink-soft); margin-bottom: 1.4rem; font-family: "Helvetica Neue", Arial, sans-serif; }
.entry-content { font-size: 1.05rem; }
.entry-content img { border-radius: 8px; }
.entry-content h2 { margin-top: 1.6em; }
.entry-content blockquote {
    margin: 1.5em 0;
    padding: 0.8em 1.4em;
    border-left: 4px solid var(--c-accent);
    background: var(--c-bg);
    font-style: italic;
}

.entry-content table { width: 100%; border-collapse: collapse; margin: 1.4em 0; }
.entry-content table, .entry-content th, .entry-content td { border: 1px solid var(--c-line); }
.entry-content th, .entry-content td { padding: 0.6em 0.9em; text-align: left; }
.entry-content th { background: var(--c-navy); color: #fff; }

/* ---------- Главная ---------- */
.hero {
    background: linear-gradient(135deg, var(--c-navy-deep), var(--c-navy));
    color: #fff;
    padding: 3.6rem 0;
}
.hero-inner { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 2.5rem; align-items: center; }
.hero h1 { color: #fff; font-size: 2.3rem; }
.hero p { color: rgba(255,255,255,0.85); font-size: 1.08rem; }
.hero-illustration svg { width: 100%; height: auto; display: block; }

.section { padding: 3rem 0; }
.section:nth-child(even) { background: var(--c-surface); }
.section-head { max-width: 760px; margin-bottom: 2rem; }
.section-head .eyebrow {
    display: inline-block;
    font-family: "Helvetica Neue", Arial, sans-serif;
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--c-accent);
    margin-bottom: 0.5rem;
}

/* Блок: текст + иллюстрация */
.media-block { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2.5rem; align-items: center; }
.media-block.reverse .media-text { order: 2; }
.media-block .media-figure img,
.media-block .media-figure svg { width: 100%; height: auto; display: block; border-radius: var(--radius); }

/* Блок: сетка преимуществ */
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.6rem; }
.feature {
    background: var(--c-bg);
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
    padding: 1.6rem 1.5rem;
}
.feature .feature-ico { width: 46px; height: 46px; margin-bottom: 0.9rem; display: block; }
.feature h3 { font-size: 1.1rem; }
.feature p { font-size: 0.95rem; color: var(--c-ink-soft); margin: 0; }

/* Блок: шаги */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.4rem; counter-reset: step; }
.step { position: relative; padding: 1.4rem 1.3rem; background: var(--c-bg); border-radius: var(--radius); border: 1px solid var(--c-line); }
.step .step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--c-navy);
    color: var(--c-accent-soft);
    font-family: "Helvetica Neue", Arial, sans-serif;
    font-weight: 700;
    margin-bottom: 0.8rem;
}
.step h3 { font-size: 1.05rem; }
.step p { font-size: 0.92rem; color: var(--c-ink-soft); margin: 0; }

/* Блок: статистика */
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.4rem; text-align: center; }
.fact { padding: 1.2rem; }
.fact .fact-num { font-size: 2.2rem; font-weight: 700; color: var(--c-accent); font-family: "Helvetica Neue", Arial, sans-serif; }
.fact .fact-label { font-size: 0.92rem; color: var(--c-ink-soft); }

/* Блок: цитата */
.pullquote { background: linear-gradient(135deg, var(--c-navy-deep), var(--c-navy)); color: #fff; border-radius: var(--radius); padding: 2.6rem 2.4rem; }
.pullquote blockquote { margin: 0; font-size: 1.45rem; line-height: 1.4; font-style: italic; }
.pullquote cite { display: block; margin-top: 1rem; font-size: 0.9rem; color: var(--c-accent-soft); font-style: normal; font-family: "Helvetica Neue", Arial, sans-serif; }

/* Блок: галерея */
.gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.gallery-grid figure { margin: 0; border-radius: var(--radius); overflow: hidden; }
.gallery-grid img { display: block; width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

/* Блок: CTA */
.cta-block { text-align: center; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius); padding: 2.8rem 2rem; box-shadow: var(--shadow); }
.cta-block h2 { margin-bottom: 0.6rem; }
.cta-block p { max-width: 620px; margin: 0 auto 1.4rem; color: var(--c-ink-soft); }

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

/* ---------- Пагинация ---------- */
.pagination { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; margin-top: 2.4rem; }
.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 0.8rem;
    border: 1px solid var(--c-line);
    border-radius: 8px;
    background: var(--c-surface);
    color: var(--c-ink);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
}
.pagination a.page-numbers:hover { border-color: var(--c-accent); color: var(--c-accent); }
.pagination .page-numbers.current { background: var(--c-navy); border-color: var(--c-navy); color: #fff; }
.pagination .page-numbers.dots { border: none; background: none; }

/* ---------- Поиск ---------- */
.search-form { display: flex; gap: 0.5rem; }
.search-form .search-field {
    flex: 1;
    min-width: 0;
    padding: 0.6em 0.9em;
    border: 1px solid var(--c-line);
    border-radius: 8px;
    font-size: 0.95rem;
}
.search-form .search-submit {
    background: var(--c-navy);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0 1.2em;
    cursor: pointer;
    font-weight: 600;
}
.search-form .search-submit:hover { background: var(--c-accent); }

/* ---------- Комментарии ---------- */
.comments-area { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius); padding: 1.8rem 2rem; margin-top: 2rem; box-shadow: var(--shadow); }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list .children { list-style: none; margin: 0 0 0 1.6rem; padding: 0; }
.comment-item { padding: 1.1rem 0; border-bottom: 1px solid var(--c-line); }
.comment-meta { display: flex; gap: 1rem; align-items: baseline; margin-bottom: 0.4rem; }
.comment-author { font-weight: 700; color: var(--c-navy); }
.comment-date { font-size: 0.8rem; color: var(--c-ink-soft); }
.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(--c-line);
    border-radius: 8px;
    font-family: inherit;
    margin-bottom: 0.8rem;
}
.comment-form .submit { background: var(--c-navy); color: #fff; border: none; border-radius: 8px; padding: 0.6em 1.6em; cursor: pointer; font-weight: 600; }
.comment-form .submit:hover { background: var(--c-accent); }

/* ---------- 404 ---------- */
.error-404 { text-align: center; padding: 3rem 0; }
.error-404 .big { font-size: 5rem; font-weight: 800; color: var(--c-accent); font-family: "Helvetica Neue", Arial, sans-serif; line-height: 1; }
.error-404 .search-form { max-width: 460px; margin: 1.6rem auto; }

/* ---------- Подвал ---------- */
.site-footer { background: var(--c-navy-deep); color: rgba(255,255,255,0.78); padding: 3rem 0 1.5rem; }
.footer-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem; }
.site-footer .widget { margin-bottom: 1rem; }
.site-footer .widget-title { color: #fff; font-size: 1.05rem; margin-bottom: 0.9rem; }
.site-footer p { color: rgba(255,255,255,0.72); font-size: 0.92rem; }
.site-footer a { color: var(--c-accent-soft); }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer .widget li { padding: 0.35rem 0; border-bottom: 1px solid var(--c-line-dark); }
.site-footer .widget li:last-child { border-bottom: none; }
.footer-bottom { border-top: 1px solid var(--c-line-dark); margin-top: 2rem; padding-top: 1.4rem; font-size: 0.85rem; color: rgba(255,255,255,0.6); }

/* ---------- Cookie-баннер ---------- */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 999;
    background: var(--c-navy-deep);
    color: #fff;
    padding: 1rem 0;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
}
.cookie-inner { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; justify-content: space-between; }
.cookie-banner p { margin: 0; font-size: 0.9rem; color: rgba(255,255,255,0.85); flex: 1; min-width: 240px; }
.cookie-banner .btn { white-space: nowrap; }

/* ---------- Адаптив ---------- */
@media (max-width: 960px) {
    .layout-with-sidebar { grid-template-columns: 1fr; }
    .layout-single .content-area { width: 100%; }
    .hero-inner { grid-template-columns: 1fr; }
    .feature-grid, .steps, .facts, .gallery-grid, .latest-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-cols { grid-template-columns: 1fr; gap: 1.5rem; }
}

@media (max-width: 600px) {
    body { font-size: 16px; }
    .nav-toggle { display: block; }
    .site-nav { display: none; width: 100%; }
    .site-nav.is-open { display: block; }
    .site-nav ul { flex-direction: column; gap: 0.4rem; }
    .header-inner { flex-wrap: nowrap; }
    .media-block { grid-template-columns: 1fr; }
    .media-block.reverse .media-text { order: 0; }
    .feature-grid, .steps, .facts, .latest-grid { grid-template-columns: 1fr; }
    .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    h1 { font-size: 1.6rem; }
    .hero h1 { font-size: 1.8rem; }
    .entry { padding: 1.4rem 1.3rem 1.8rem; }
    .entry-thumb { margin: -1.4rem -1.3rem 1.4rem; }
}
