/*
Theme Name: dds_ystoneadvisors.com
Author: Георгий Павлов
Description: Информационная тема о развитии бизнеса через данные: цели, финансовые показатели, командные процессы и оценка результата.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: ystone
*/

/* ============================================================
   Переменные и база
   ============================================================ */
:root {
    --ink: #13273f;
    --ink-2: #1f3a58;
    --accent: #1f8a6d;
    --accent-dark: #166a53;
    --amber: #c6913a;
    --bg: #ffffff;
    --bg-soft: #f3f6f9;
    --bg-panel: #eef2f6;
    --line: #dde4ec;
    --text: #2b3745;
    --muted: #5d6b7a;
    --footer-bg: #10233a;
    --footer-text: #cbd6e2;
    --footer-head: #ffffff;
    --radius: 10px;
    --shadow: 0 6px 22px rgba(19, 39, 63, .08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

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

h1 { font-size: 2.05rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1.05em; }

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

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

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

.btn {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    padding: .7rem 1.4rem;
    border-radius: 8px;
    font-weight: 600;
    transition: background .2s ease;
}
.btn:hover { background: var(--accent-dark); text-decoration: none; color: #fff; }

.btn-ghost {
    display: inline-block;
    border: 1px solid rgba(255,255,255,.6);
    color: #fff;
    padding: .7rem 1.4rem;
    border-radius: 8px;
    font-weight: 600;
    transition: background .2s ease;
}
.btn-ghost:hover { background: rgba(255,255,255,.14); text-decoration: none; color: #fff; }

/* ============================================================
   Шапка
   ============================================================ */
.site-header {
    background: var(--bg);
    border-bottom: 1px solid var(--line);
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 1.4rem;
    padding: 1.05rem 0;
    flex-wrap: wrap;
}
.branding {
    display: flex;
    align-items: center;
    gap: .85rem;
    min-width: 0;
}
.branding .brand-logo,
.branding .brand-fallback {
    flex: 0 0 auto;
    display: block;
}
.brand-fallback { width: 46px; height: 46px; }
.brand-text { min-width: 0; }
.brand-title {
    font-family: Georgia, serif;
    font-size: 1.16rem;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.2;
    display: block;
}
.brand-title a { color: inherit; }
.brand-title a:hover { text-decoration: none; color: var(--accent-dark); }
.brand-desc {
    font-size: .82rem;
    color: var(--muted);
    display: block;
    margin-top: .12rem;
}

.nav-toggle {
    margin-left: auto;
    display: none;
    background: none;
    border: 1px solid var(--line);
    border-radius: 7px;
    padding: .5rem .6rem;
    cursor: pointer;
    color: var(--ink);
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--ink);
    position: relative;
}
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }

.main-nav { margin-left: auto; }
.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1.5rem;
}
.main-nav a {
    color: var(--ink-2);
    font-weight: 600;
    font-size: .97rem;
    padding: .35rem 0;
    border-bottom: 2px solid transparent;
}
.main-nav a:hover { color: var(--accent-dark); text-decoration: none; border-bottom-color: var(--accent); }
.main-nav .current-menu-item > a { color: var(--accent-dark); border-bottom-color: var(--accent); }

/* ============================================================
   Хлебные крошки
   ============================================================ */
.breadcrumbs {
    font-size: .86rem;
    color: var(--muted);
    padding: 1rem 0 0;
}
.breadcrumbs a { color: var(--accent-dark); }
.breadcrumbs .sep { margin: 0 .35rem; color: #9aa7b4; }

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

.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67fr) minmax(0, 27fr);
    gap: 2.4rem;
    align-items: start;
}
.layout-single .content-area { width: 85%; margin-inline: auto; }
@media (max-width: 960px) {
    .layout-single .content-area { width: 100%; }
}

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

/* ============================================================
   Sidebar / виджеты
   ============================================================ */
.sidebar {
    min-width: 0;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.3rem 1.3rem .4rem;
}
.sidebar .widget { margin-bottom: 1.5rem; }
.sidebar .widget-title,
.sidebar h2 {
    font-size: 1.05rem;
    color: var(--ink);
    margin-bottom: .7rem;
    padding-bottom: .5rem;
    border-bottom: 2px solid var(--accent);
    display: inline-block;
}
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { padding: .4rem 0; border-bottom: 1px solid var(--line); }
.sidebar li:last-child { border-bottom: none; }
.sidebar a { color: var(--ink-2); }
.sidebar a:hover { color: var(--accent-dark); }
.sidebar .post-date { display: block; font-size: .78rem; color: var(--muted); margin-top: .15rem; }

/* ============================================================
   Карточки записей
   ============================================================ */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.6rem;
}
.card {
    display: flex;
    flex-direction: column;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.card-thumb-wrap { display: block; overflow: hidden; }
.card-thumb-wrap img {
    width: 100%;
    height: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    transition: transform .3s ease;
}
.card:hover .card-thumb-wrap img { transform: scale(1.04); }
.card-thumb-placeholder {
    display: block;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, var(--ink) 0%, var(--ink-2) 60%, var(--accent-dark) 130%);
}
.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.15rem 1.25rem 1.3rem;
    min-width: 0;
}
.card-title { font-size: 1.16rem; margin: 0 0 .5rem; }
.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--accent-dark); text-decoration: none; }
.card-meta { font-size: .8rem; color: var(--muted); margin-bottom: .6rem; }
.card-excerpt { color: var(--text); font-size: .96rem; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-more {
    margin-top: auto;
    padding-top: .8rem;
    font-weight: 600;
    color: var(--accent-dark);
    align-self: flex-start;
}

/* Горизонтальные карточки (лента блога с сайдбаром) */
.post-list .card { flex-direction: row; margin-bottom: 1.6rem; }
.post-list .card-thumb-wrap {
    flex: 0 0 280px;
    position: relative;
    overflow: hidden;
}
.post-list .card-thumb-wrap a {
    display: block;
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
}
.post-list .card-thumb-wrap img,
.post-list .card-thumb-wrap .card-thumb-placeholder {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    object-fit: cover;
    display: block;
}
@media (max-width: 600px) {
    .post-list .card { flex-direction: column; }
    .post-list .card-thumb-wrap {
        flex: none;
        width: 100%;
        position: static;
    }
    .post-list .card-thumb-wrap a { position: static; }
    .post-list .card-thumb-wrap img,
    .post-list .card-thumb-wrap .card-thumb-placeholder {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }
}

/* ============================================================
   Одиночная запись / страница
   ============================================================ */
.entry-header { margin-bottom: 1rem; }
.entry-title { margin-bottom: .4rem; }
.entry-meta { font-size: .85rem; color: var(--muted); }
.entry-thumb { margin: 1rem 0 1.4rem; border-radius: var(--radius); overflow: hidden; }
.entry-thumb img { width: 100%; display: block; }
.entry-content { font-size: 1.02rem; }
.entry-content img { border-radius: 8px; margin: 1rem 0; display: block; }
.entry-content h2 { margin-top: 1.6rem; }
.entry-content ul, .entry-content ol { padding-left: 1.3rem; }
.entry-content blockquote {
    margin: 1.4rem 0;
    padding: 1rem 1.4rem;
    background: var(--bg-soft);
    border-left: 4px solid var(--accent);
    border-radius: 0 8px 8px 0;
    color: var(--ink-2);
}
.entry-content table {
    border-collapse: collapse;
    width: 100%;
    margin: 1.2rem 0;
}
.entry-content table, .entry-content th, .entry-content td {
    border: 1px solid var(--line);
}
.entry-content th, .entry-content td { padding: .6rem .8rem; text-align: left; }
.entry-content th { background: var(--bg-panel); }

/* ============================================================
   Пагинация
   ============================================================ */
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    margin: 2.2rem 0 .5rem;
}
.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 .7rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink-2);
    font-weight: 600;
    background: var(--bg);
}
.pagination a.page-numbers:hover { border-color: var(--accent); color: var(--accent-dark); text-decoration: none; }
.pagination .page-numbers.current {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.pagination .page-numbers.dots { border: none; background: none; }

/* ============================================================
   Комментарии
   ============================================================ */
.comments-area { margin-top: 2.4rem; }
.comments-area .comment-list { list-style: none; padding: 0; margin: 0; }
.comments-area .comment-list ol { list-style: none; }
.comments-area li.comment { margin-bottom: 1.2rem; }
.comment-body {
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1rem 1.2rem;
}
.comment-author { font-weight: 600; color: var(--ink); }
.comment-meta { font-size: .8rem; color: var(--muted); margin-bottom: .5rem; }
.comment-respond {
    margin-top: 1.6rem;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.2rem 1.4rem;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: .6rem .8rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-family: inherit;
    font-size: .95rem;
    margin-bottom: .3rem;
}
.comment-form label { font-size: .88rem; color: var(--muted); }
.comment-form .submit {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: .7rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

/* ============================================================
   Форма поиска
   ============================================================ */
.search-form {
    display: flex;
    gap: .5rem;
    max-width: 460px;
}
.search-form .search-field {
    flex: 1;
    min-width: 0;
    padding: .65rem .85rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-family: inherit;
    font-size: .95rem;
}
.search-form .search-submit {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: .65rem 1.2rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}
.sidebar .search-form { max-width: none; }

/* ============================================================
   Главная — секции
   ============================================================ */
.front-page .site-main { padding-top: 0; }
.front-section { padding: 3rem 0; }
.front-section:nth-child(even) { background: var(--bg-soft); }
.section-head { max-width: 720px; margin-bottom: 1.7rem; }
.section-head .eyebrow {
    display: inline-block;
    font-family: "Segoe UI", sans-serif;
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: .74rem;
    font-weight: 700;
    color: var(--accent-dark);
    margin-bottom: .4rem;
}

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

/* Блок 2: сетка карточек-направлений */
.fs-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}
.feature-card {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.6rem 1.5rem;
    min-width: 0;
    box-shadow: var(--shadow);
}
.front-section:nth-child(even) .feature-card { background: #fff; }
.feature-icon {
    width: 48px; height: 48px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(31, 138, 109, .12);
    border-radius: 12px;
    margin-bottom: 1rem;
    color: var(--accent-dark);
}
.feature-card h3 { margin-bottom: .5rem; }
.feature-card p { margin: 0; color: var(--text); font-size: .96rem; }

/* Блок 3: шаги */
.fs-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1.6rem;
    counter-reset: step;
}
.step-card {
    min-width: 0;
    padding: 1.4rem 1.4rem 1.5rem;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    position: relative;
}
.front-section:nth-child(even) .step-card { background: #fff; }
.step-num {
    display: inline-flex;
    align-items: center; justify-content: center;
    width: 40px; height: 40px;
    background: var(--ink);
    color: #fff;
    border-radius: 50%;
    font-family: Georgia, serif;
    font-weight: 700;
    margin-bottom: .9rem;
}
.step-card h3 { margin-bottom: .4rem; font-size: 1.12rem; }
.step-card p { margin: 0; font-size: .94rem; }

/* Блок 4: CTA */
.fs-cta {
    background: linear-gradient(135deg, var(--ink) 0%, var(--ink-2) 100%);
    color: #eef3f8;
    border-radius: 14px;
    padding: 2.8rem 2.6rem;
    text-align: center;
}
.fs-cta h2 { color: #fff; margin-bottom: .6rem; }
.fs-cta p { color: #d3deea; max-width: 620px; margin: 0 auto 1.4rem; }
.fs-cta .cta-actions { display: flex; gap: .9rem; justify-content: center; flex-wrap: wrap; }

/* Блок: последние записи на главной */
.fs-latest .cards-grid { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }

@media (max-width: 960px) {
    .layout-with-sidebar { grid-template-columns: 1fr; gap: 2rem; }
    .fs-split { grid-template-columns: 1fr; gap: 1.6rem; }
    .fs-split.reverse .fs-split-media { order: 0; }
}

@media (max-width: 600px) {
    body { font-size: 16px; }
    h1 { font-size: 1.7rem; }
    h2 { font-size: 1.4rem; }
    .front-section { padding: 2.2rem 0; }
    .fs-cta { padding: 2rem 1.5rem; }
    .main-nav {
        display: none;
        width: 100%;
        margin: .8rem 0 0;
    }
    .main-nav.is-open { display: block; }
    .main-nav ul { flex-direction: column; gap: 0; }
    .main-nav li { border-bottom: 1px solid var(--line); }
    .main-nav a { display: block; padding: .7rem 0; }
    .nav-toggle { display: block; }
    .header-inner { flex-wrap: wrap; }
}

/* ============================================================
   Подвал
   ============================================================ */
.site-footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 2.6rem 0 1.4rem;
    margin-top: 2rem;
}
.footer-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
}
.footer-cols .widget { min-width: 0; }
.footer-cols .widget-title,
.footer-cols h2 {
    color: var(--footer-head);
    font-size: 1.08rem;
    margin-bottom: .8rem;
    padding-bottom: .5rem;
    border-bottom: 1px solid rgba(255,255,255,.18);
}
.footer-cols, .footer-cols p, .footer-cols li { color: var(--footer-text); }
.footer-cols a { color: #e6edf5; }
.footer-cols a:hover { color: #fff; }
.footer-cols ul { list-style: none; margin: 0; padding: 0; }
.footer-cols li { padding: .35rem 0; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.14);
    margin-top: 1.8rem;
    padding-top: 1.2rem;
    font-size: .85rem;
    color: #9fb0c2;
}
@media (max-width: 960px) {
    .footer-cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
    .footer-cols { grid-template-columns: 1fr; gap: 1.6rem; }
}

/* ============================================================
   Cookie-баннер
   ============================================================ */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 999;
    background: var(--ink);
    color: #eaf0f6;
    padding: 1rem 0;
    box-shadow: 0 -4px 20px rgba(0,0,0,.2);
}
.cookie-inner {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    flex-wrap: wrap;
}
.cookie-inner p { margin: 0; font-size: .9rem; flex: 1; min-width: 220px; }
.cookie-inner a { color: #9fe0cc; }
.cookie-accept {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: .6rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
.cookie-accept:hover { background: var(--accent-dark); }

/* ============================================================
   404
   ============================================================ */
.error-404 { text-align: center; padding: 2rem 0 3rem; }
.error-404 .big { font-size: 4.5rem; color: var(--accent); font-family: Georgia, serif; margin: 0; }
.error-404 .search-form { margin: 1.4rem auto; }

/* Прочее */
.page-title { margin-bottom: 1.2rem; }
.contact-list { list-style: none; padding: 0; }
.contact-list li { margin-bottom: .5rem; }
