/*
Theme Name: dds_crowncapitalvc.com
Author: Дмитрий Громов
Description: Информационно-аналитическая тема для ресурса о стратегиях Smart Money на стыке венчурного капитала и ликвидных рынков.
Version: 1.1
Text Domain: ccvc
*/

/* ====================== Базовые токены ====================== */
:root {
    --bg: #fbfaf7;
    --ink: #1f2733;
    --ink-soft: #54607a;
    --navy: #14213d;
    --navy-soft: #1b2a4a;
    --gold: #c8a24a;
    --gold-dark: #a8842f;
    --gold-light: #e6c878;
    --line: #e4e0d4;
    --card-bg: #ffffff;
    --sidebar-bg: #f4efe2;
    --radius: 14px;
    --shadow: 0 10px 30px rgba(20, 33, 61, 0.08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 17px;
    line-height: 1.65;
    overflow-x: hidden;
}

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

p { margin: 0 0 1em; }

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

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

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

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

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--navy);
    color: #fff;
    padding: 10px 16px;
    z-index: 1000;
}
.skip-link:focus { left: 8px; top: 8px; }

/* ====================== Кнопки ====================== */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    border: 2px solid transparent;
    cursor: pointer;
    transition: background .2s, color .2s, border-color .2s;
}
.btn-primary {
    background: var(--gold);
    color: var(--navy);
    border-color: var(--gold);
}
.btn-primary:hover { background: var(--gold-dark); border-color: var(--gold-dark); color: #fff; text-decoration: none; }
.btn-ghost {
    background: transparent;
    color: var(--navy);
    border-color: var(--navy);
}
.btn-ghost:hover { background: var(--navy); color: #fff; text-decoration: none; }

/* ====================== Шапка ====================== */
.site-header {
    background: #fff;
    border-bottom: 1px solid var(--line);
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 16px 0;
    flex-wrap: wrap;
}
.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    flex: 1;
}
.brand-link { display: inline-flex; flex: 0 0 auto; }
.brand-logo, .brand-mark { display: block; width: 48px; height: 48px; }
.brand-text { min-width: 0; }
.brand-name {
    display: block;
    font-family: Georgia, serif;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--navy);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.brand-name a { color: var(--navy); }
.brand-desc {
    display: block;
    font-size: 0.82rem;
    color: var(--ink-soft);
    margin-top: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.primary-nav .menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 22px;
    flex-wrap: wrap;
}
.primary-nav .menu a {
    color: var(--navy);
    font-weight: 600;
    padding: 6px 0;
    border-bottom: 2px solid transparent;
}
.primary-nav .menu a:hover,
.primary-nav .menu .current-menu-item > a {
    color: var(--gold-dark);
    border-bottom-color: var(--gold);
    text-decoration: none;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: 0;
    padding: 8px;
    cursor: pointer;
    margin-left: auto;
}
.nav-toggle-bar {
    width: 26px;
    height: 3px;
    background: var(--navy);
    border-radius: 2px;
    transition: transform .2s, opacity .2s;
}
.nav-toggle.is-active .nav-toggle-bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.is-active .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle.is-active .nav-toggle-bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ====================== Хлебные крошки ====================== */
.crumbs {
    font-size: 0.88rem;
    color: var(--ink-soft);
    padding: 18px 0 6px;
}
.crumbs a { color: var(--gold-dark); }
.crumbs .sep { margin: 0 6px; color: var(--ink-soft); }

/* ====================== Раскладки страниц ====================== */
.page-wrap { padding-bottom: 60px; }

.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67fr) minmax(0, 27fr);
    column-gap: 6%;
    align-items: start;
    padding-top: 16px;
}
.layout-single { padding-top: 16px; }
.layout-single .content-area {
    width: 85%;
    margin-inline: auto;
}
.content-area { min-width: 0; }

.page-head { margin-bottom: 26px; }
.page-title { font-size: 2rem; }
.archive-desc { color: var(--ink-soft); }
.empty-note { color: var(--ink-soft); }

/* ====================== Сетка карточек ====================== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 28px;
}
.card {
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    min-width: 0;
}
.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.8rem;
    color: var(--gold-dark);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 8px;
}
.card-title { font-size: 1.2rem; margin-bottom: 10px; }
.card-title a { color: var(--navy); }
.card-title a:hover { color: var(--gold-dark); }
.card-excerpt { color: var(--ink); font-size: 0.96rem; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-more {
    margin-top: auto;
    padding-top: 12px;
    font-weight: 600;
    color: var(--gold-dark);
}

/* ====================== Главная ====================== */
.front .block { padding: 64px 0; }
.block-intro { background: #fff; border-bottom: 1px solid var(--line); }
.block-pillars { background: var(--bg); }
.block-latest { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.block-steps { background: var(--bg); }
.block-quote { background: var(--navy); }

.block-title {
    font-size: 1.9rem;
    text-align: center;
    margin-bottom: 36px;
}

.intro-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 48px;
    align-items: center;
}
.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.8rem;
    color: var(--gold-dark);
    font-weight: 700;
    margin-bottom: 12px;
}
.intro-title { font-size: 2.4rem; }
.intro-lead { font-size: 1.1rem; color: var(--ink-soft); }
.intro-media img { display: block; width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); }

.pillars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 28px;
}
.pillar {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 30px 26px;
    min-width: 0;
}
.pillar-icon img { display: block; width: 56px; height: 56px; margin-bottom: 16px; }
.pillar h3 { font-size: 1.25rem; }
.pillar p { color: var(--ink-soft); margin: 0; }

.latest-more { text-align: center; margin-top: 36px; margin-bottom: 0; }

.steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 28px;
}
.step {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px 24px;
    min-width: 0;
}
.step-num {
    flex: 0 0 auto;
    width: 46px; height: 46px;
    border-radius: 50%;
    background: var(--navy);
    color: var(--gold-light);
    font-family: Georgia, serif;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.step h3 { font-size: 1.15rem; margin-bottom: 6px; }
.step p { color: var(--ink-soft); margin: 0; }

.quote-inner { text-align: center; }
.lead-quote {
    margin: 0 auto 28px;
    max-width: 820px;
    font-family: Georgia, serif;
    font-size: 1.55rem;
    line-height: 1.5;
    color: #fff;
}
.block-quote .btn-primary { background: var(--gold); color: var(--navy); border-color: var(--gold); }

/* ====================== Запись / страница ====================== */
.single-post { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); }
.single-title { font-size: 2.1rem; }
.single-meta { color: var(--ink-soft); font-size: 0.9rem; margin-bottom: 18px; }
.single-thumb { margin: 0 0 22px; }
.single-thumb img { display: block; width: 100%; border-radius: 10px; }
.single-content { font-size: 1.05rem; }
.single-content img { border-radius: 10px; height: auto; }
.single-content h2, .single-content h3 { margin-top: 1.4em; }
.single-cats, .single-tags { margin-top: 20px; font-size: 0.9rem; color: var(--ink-soft); }

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

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

/* ====================== Сайдбар (светлый фон → тёмный текст) ====================== */
.sidebar { min-width: 0; }
.sidebar .widget {
    background: var(--sidebar-bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px 24px;
    margin-bottom: 24px;
    color: var(--ink);
}
.sidebar .widget-title {
    font-size: 1.1rem;
    color: var(--navy);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--gold);
}
.sidebar .widget a { color: var(--gold-dark); }
.sidebar .widget a:hover { color: var(--navy); }
.sidebar .widget ul { list-style: none; margin: 0; padding: 0; }
.sidebar .widget li { padding: 8px 0; border-bottom: 1px solid var(--line); color: var(--ink); }
.sidebar .widget li:last-child { border-bottom: 0; }
.sidebar .widget .post-date { display: block; font-size: 0.8rem; color: var(--ink-soft); }

/* ====================== Подвал (тёмный фон → светлый текст) ====================== */
.site-footer { background: var(--navy); color: #d7deea; margin-top: 0; }
.footer-cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 36px;
    padding: 56px 0 36px;
}
.footer-col { min-width: 0; }
.site-footer .widget { margin-bottom: 0; color: #d7deea; }
.site-footer .widget-title {
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 14px;
}
.site-footer .widget p { color: #c3ccde; }
.site-footer .widget a { color: var(--gold-light); }
.site-footer .widget a:hover { color: #fff; }
.site-footer .widget ul { list-style: none; margin: 0; padding: 0; }
.site-footer .widget li { padding: 6px 0; }
.site-footer .widget li a { color: var(--gold-light); }
.site-footer .post-date { display: block; font-size: 0.8rem; color: #9fb0d0; }

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding: 18px 0 28px;
}
.copyright { margin: 0; font-size: 0.88rem; color: #9fb0d0; }

/* ====================== Поиск ====================== */
.search-form { margin: 16px 0; }
.search-label { display: block; font-weight: 600; margin-bottom: 8px; color: var(--navy); }
.search-row { display: flex; gap: 8px; flex-wrap: wrap; }
.search-field {
    flex: 1;
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 1rem;
}
.search-submit {
    padding: 12px 22px;
    border: 0;
    border-radius: 8px;
    background: var(--navy);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}
.search-submit:hover { background: var(--navy-soft); }

/* ====================== Пагинация (type => plain ↔ .page-numbers) ====================== */
.pager {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 40px;
    justify-content: center;
}
.pager .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--navy);
    font-weight: 600;
    text-decoration: none;
}
.pager a.page-numbers:hover { border-color: var(--gold); color: var(--gold-dark); }
.pager .page-numbers.current {
    background: var(--navy);
    color: #fff;
    border-color: var(--navy);
}
.pager .page-numbers.dots {
    border-color: transparent;
    background: transparent;
}

/* ====================== Комментарии ====================== */
.comments-area { margin-top: 40px; }
.comments-title, .comment-reply-title { font-size: 1.4rem; }
.comment-list { list-style: none; margin: 0 0 30px; padding: 0; }
.comment-list ol.children { list-style: none; padding-left: 24px; }
.comment-item { margin-bottom: 18px; }
.comment-inner {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 18px 20px;
}
.comment-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.comment-author { font-weight: 700; color: var(--navy); }
.comment-date { font-size: 0.82rem; color: var(--ink-soft); }
.comment-pending { color: var(--gold-dark); font-style: italic; }
.comment-respond { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.comment-form label { display: block; font-weight: 600; margin-bottom: 6px; color: var(--navy); }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 1rem;
    margin-bottom: 14px;
}

/* ====================== 404 ====================== */
.error-404 { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 40px; text-align: center; }
.error-404 .search-form { max-width: 480px; margin-inline: auto; }

/* ====================== Cookie-баннер ====================== */
.cookie-banner[hidden] { display: none !important; }

.cookie-banner {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 900;
    background: var(--navy);
    color: #e7ecf5;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.18);
}
.cookie-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 16px 0;
    flex-wrap: wrap;
}
.cookie-text { margin: 0; flex: 1; min-width: 220px; font-size: 0.92rem; }
.cookie-accept {
    flex: 0 0 auto;
    padding: 11px 26px;
    border: 0;
    border-radius: 8px;
    background: var(--gold);
    color: var(--navy);
    font-weight: 700;
    cursor: pointer;
}
.cookie-accept:hover { background: var(--gold-light); }

/* ====================== Адаптив ====================== */
@media (max-width: 960px) {
    .layout-with-sidebar { grid-template-columns: 1fr; row-gap: 40px; }
    .intro-grid { grid-template-columns: 1fr; gap: 32px; }
    .intro-title { font-size: 2rem; }
}

@media (max-width: 600px) {
    body { font-size: 16px; }
    .nav-toggle { display: flex; }
    .primary-nav {
        flex-basis: 100%;
        display: none;
    }
    .primary-nav.is-open { display: block; }
    .primary-nav .menu { flex-direction: column; gap: 0; }
    .primary-nav .menu li { border-bottom: 1px solid var(--line); }
    .primary-nav .menu a { display: block; padding: 12px 0; }

    .layout-single .content-area { width: 100%; }
    .front .block { padding: 44px 0; }
    .intro-title { font-size: 1.7rem; }
    .block-title { font-size: 1.5rem; }
    .lead-quote { font-size: 1.25rem; }
    .single-post { padding: 22px; }
}
