/*
Theme Name: dds_noviachao.com
Author: Анна Лебедева
Description: Информационная тема для студии продуктовых исследований: анализ рынка и изучение пользовательского поведения.
Version: 1.1
Text Domain: noviachao
*/

/* ============ Переменные ============ */
:root {
    --ink: #16233d;
    --ink-2: #1f3557;
    --paper: #f7f8fb;
    --card: #ffffff;
    --line: #dfe4ee;
    --text: #23303f;
    --muted: #5b6a7d;
    --accent: #d97a2b;
    --accent-2: #2f6f8f;
    --accent-soft: #f3e6d6;
    --radius: 12px;
    --shell: min(92%, 1180px);
    --sans: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ============ База ============ */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--sans);
    color: var(--text);
    background: var(--paper);
    line-height: 1.65;
    font-size: 17px;
    overflow-x: hidden;
}
img { max-width: 100%; height: auto; }
a { color: var(--accent-2); }
a:hover { color: var(--ink); }

h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.25;
    color: var(--ink);
    margin: 0 0 0.6em;
}
h1 { font-size: 2rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1.1em; }

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

/* ============ Шапка ============ */
.site-head {
    background: var(--card);
    border-bottom: 1px solid var(--line);
}
.head-inner {
    display: flex;
    align-items: center;
    gap: 1.4rem;
    padding: 1.1rem 0;
    flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 0.85rem; text-decoration: none; min-width: 0; }
.brand-logo { display: block; width: 46px; height: 46px; flex: 0 0 auto; }
.brand-text { min-width: 0; }
.brand-name {
    display: block;
    font-weight: 700;
    color: var(--ink);
    font-size: 1.02rem;
    line-height: 1.3;
}
.brand-desc {
    display: block;
    font-size: 0.8rem;
    color: var(--muted);
    margin-top: 2px;
    max-width: 46ch;
}
.nav-toggle {
    margin-left: auto;
    display: none;
    background: var(--ink);
    color: #fff;
    border: 0;
    border-radius: 8px;
    padding: 0.5rem 0.8rem;
    font-size: 0.95rem;
    cursor: pointer;
}
.main-nav { margin-left: auto; }
.main-nav ul {
    list-style: none;
    display: flex;
    gap: 0.4rem;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}
.main-nav a {
    display: block;
    text-decoration: none;
    color: var(--ink);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.45rem 0.7rem;
    border-radius: 8px;
}
.main-nav a:hover,
.main-nav .current-menu-item > a { background: var(--accent-soft); color: var(--ink); }

/* ============ Раскладка ============ */
.site-main { padding: 2.2rem 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-with-sidebar { grid-template-columns: 1fr; }
    .layout-single .content-area { width: 100%; }
}

/* ============ Хлебные крошки ============ */
.breadcrumbs {
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 1.4rem;
}
.breadcrumbs a { color: var(--accent-2); text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs .sep { margin: 0 0.4rem; color: var(--line); }

/* ============ Карточки записей ============ */
.card-list { display: grid; gap: 1.5rem; }
.card {
    display: flex;
    flex-direction: column;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    min-width: 0;
}
.card-thumb-wrap {
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: var(--accent-soft);
}
.card-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.3rem 1.4rem 1.5rem;
    min-width: 0;
}
.card-title { font-size: 1.2rem; margin: 0 0 0.5rem; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { color: var(--accent); }
.card-meta { font-size: 0.8rem; color: var(--muted); margin-bottom: 0.7rem; }
.card-excerpt { color: var(--text); font-size: 0.96rem; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-more {
    margin-top: auto;
    padding-top: 0.9rem;
    font-weight: 600;
    font-size: 0.92rem;
    text-decoration: none;
    color: var(--accent);
}
.card-more:hover { color: var(--ink); }

/* Горизонтальные карточки в ленте блога */
.card-list.stream .card { flex-direction: row; }
.card-list.stream .card-thumb-wrap {
    flex: 0 0 300px;
    position: relative;
    aspect-ratio: auto;
}
.card-list.stream .card-thumb-wrap a {
    display: block;
    position: absolute;
    inset: 0;
}
.card-list.stream .card-thumb-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 600px) {
    .card-list.stream .card { flex-direction: column; }
    .card-list.stream .card-thumb-wrap {
        flex: none;
        width: 100%;
        position: static;
        aspect-ratio: 16 / 9;
    }
    .card-list.stream .card-thumb-wrap a { position: static; }
    .card-list.stream .card-thumb-wrap img { width: 100%; height: auto; aspect-ratio: 16 / 9; }
}

/* ============ Одиночная запись / страница ============ */
.entry {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 2rem 2.2rem 2.4rem;
    min-width: 0;
}
.entry-title { font-size: 2rem; }
.entry-meta { font-size: 0.85rem; color: var(--muted); margin-bottom: 1.4rem; }
.entry-thumb { border-radius: var(--radius); overflow: hidden; margin-bottom: 1.5rem; }
.entry-thumb img { width: 100%; display: block; }
.entry-content img { border-radius: 8px; display: block; }
.entry-content h2 { margin-top: 1.6em; }
.entry-content ul, .entry-content ol { padding-left: 1.3rem; }
.entry-content blockquote {
    margin: 1.5em 0;
    padding: 1.1rem 1.4rem;
    background: var(--accent-soft);
    border-left: 4px solid var(--accent);
    border-radius: 8px;
}
.entry-content blockquote p:last-child { margin-bottom: 0; }
.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(--line);
}
.entry-content th, .entry-content td { padding: 0.6rem 0.8rem; text-align: left; }
.entry-content th { background: var(--paper); }

@media (max-width: 600px) {
    .entry { padding: 1.4rem 1.2rem 1.6rem; }
    .entry-title { font-size: 1.5rem; }
}

/* ============ Сайдбар ============ */
.sidebar { min-width: 0; }
.widget {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.3rem 1.4rem;
    margin-bottom: 1.5rem;
    color: var(--text);
}
.widget-title {
    font-size: 1.05rem;
    margin: 0 0 0.9rem;
    color: var(--ink);
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent-soft);
}
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { margin-bottom: 0.6rem; padding-bottom: 0.6rem; border-bottom: 1px solid var(--line); }
.widget li:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: 0; }
.widget a { color: var(--accent-2); text-decoration: none; }
.widget a:hover { color: var(--ink); text-decoration: underline; }
.widget .post-date, .widget .rss-date { color: var(--muted); font-size: 0.8rem; }

/* ============ Форма поиска ============ */
.search-form { display: flex; gap: 0.5rem; }
.search-form input[type="search"] {
    flex: 1;
    min-width: 0;
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
}
.search-form button {
    background: var(--ink);
    color: #fff;
    border: 0;
    border-radius: 8px;
    padding: 0.6rem 1.1rem;
    cursor: pointer;
    font-size: 0.95rem;
}
.search-form button:hover { background: var(--accent); }

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

/* ============ Главная ============ */
.front { width: 85%; margin-inline: auto; }
.front-section { padding: 2.8rem 0; }
.front-section + .front-section { border-top: 1px solid var(--line); }
.section-head { text-align: center; max-width: 62ch; margin: 0 auto 2rem; }
.section-head p { color: var(--muted); margin: 0; }

/* hero */
.fs-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 2.4rem;
    align-items: center;
}
.fs-hero .hero-copy { min-width: 0; }
.fs-hero h1 { font-size: 2.3rem; margin-bottom: 0.6rem; }
.fs-hero .lead { font-size: 1.1rem; color: var(--muted); }
.fs-hero .hero-art { min-width: 0; }
.fs-hero .hero-art img { width: 100%; border-radius: var(--radius); display: block; }
.hero-cta {
    display: inline-block;
    margin-top: 0.6rem;
    background: var(--accent);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    padding: 0.7rem 1.4rem;
    border-radius: 8px;
}
.hero-cta:hover { background: var(--ink); color: #fff; }
@media (max-width: 960px) { .fs-hero { grid-template-columns: 1fr; } }

/* сетка направлений */
.fs-grid .grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.4rem;
}
.tile {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.5rem 1.5rem 1.6rem;
    min-width: 0;
}
.tile .tile-icon {
    width: 46px; height: 46px;
    display: block;
    margin-bottom: 0.9rem;
}
.tile h3 { margin-bottom: 0.4rem; }
.tile p { margin: 0; color: var(--muted); font-size: 0.95rem; }
@media (max-width: 960px) { .fs-grid .grid-3 { grid-template-columns: 1fr; } }

/* шаги */
.fs-steps .steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.3rem;
    counter-reset: step;
}
.step {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.4rem 1.3rem 1.5rem;
    position: relative;
    min-width: 0;
}
.step .step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px; height: 38px;
    border-radius: 50%;
    background: var(--ink);
    color: #fff;
    font-weight: 700;
    margin-bottom: 0.8rem;
}
.step h3 { font-size: 1.05rem; margin-bottom: 0.35rem; }
.step p { margin: 0; color: var(--muted); font-size: 0.92rem; }
@media (max-width: 960px) { .fs-steps .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .fs-steps .steps { grid-template-columns: 1fr; } }

/* факты */
.fs-facts { background: var(--ink); color: #eaf0f8; border-radius: var(--radius); padding: 2.6rem 2.2rem; }
.fs-facts + .front-section, .front-section + .fs-facts { border-top: 0; }
.fs-facts h2 { color: #fff; }
.fs-facts .facts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.6rem;
    margin-top: 1.4rem;
}
.fact { text-align: center; min-width: 0; }
.fact .fact-num { font-size: 2.2rem; font-weight: 800; color: var(--accent); display: block; }
.fact .fact-label { font-size: 0.9rem; color: #c4d0e0; }
@media (max-width: 960px) { .fs-facts .facts { grid-template-columns: repeat(2, 1fr); } }

/* последние записи */
.fs-latest .grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}
@media (max-width: 960px) { .fs-latest .grid-3 { grid-template-columns: 1fr; } }

/* CTA */
.fs-cta {
    background: var(--accent-soft);
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    padding: 2.4rem 2.2rem;
    text-align: center;
}
.fs-cta h2 { margin-bottom: 0.5rem; }
.fs-cta p { color: var(--muted); max-width: 60ch; margin: 0 auto 1.2rem; }
@media (max-width: 600px) {
    .fs-cta { padding: 1.8rem 1.4rem; }
    .fs-facts { padding: 1.8rem 1.4rem; }
}

/* текст+иллюстрация */
.fs-split {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2.4rem;
    align-items: center;
}
.fs-split.reverse .split-art { order: -1; }
.fs-split .split-art img { width: 100%; border-radius: var(--radius); display: block; }
.fs-split .split-copy { min-width: 0; }
.fs-split .split-copy p:last-child { margin-bottom: 0; }
@media (max-width: 960px) {
    .fs-split { grid-template-columns: 1fr; }
    .fs-split.reverse .split-art { order: 0; }
}

/* ============ 404 ============ */
.error-box { text-align: center; padding: 3rem 1rem; }
.error-box .code { font-size: 4rem; font-weight: 800; color: var(--accent); line-height: 1; }
.error-box .search-form { max-width: 420px; margin: 1.6rem auto 0; }

/* ============ Подвал ============ */
.site-foot { background: var(--ink); color: #cdd8e8; margin-top: 2rem; }
.foot-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
    padding: 2.6rem 0 2rem;
}
.foot-col { min-width: 0; }
.foot-col .widget {
    background: transparent;
    border: 0;
    padding: 0;
    margin: 0;
    color: #cdd8e8;
}
.foot-col .widget-title { color: #fff; border-bottom-color: rgba(255,255,255,0.18); }
.foot-col .widget a { color: #e7c9a6; }
.foot-col .widget a:hover { color: #fff; }
.foot-col .widget li { border-bottom-color: rgba(255,255,255,0.1); }
.foot-col .widget .post-date, .foot-col .widget .rss-date { color: #9db0c8; }
.foot-bottom {
    border-top: 1px solid rgba(255,255,255,0.14);
    padding: 1.2rem 0;
    font-size: 0.85rem;
    color: #9db0c8;
    text-align: center;
}
@media (max-width: 960px) { .foot-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-2);
    color: #eef2f8;
    padding: 1rem 0;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.25);
}
.cookie-banner .cookie-inner {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    flex-wrap: wrap;
    justify-content: space-between;
}
.cookie-banner p { margin: 0; font-size: 0.9rem; min-width: 0; }
.cookie-banner a { color: #e7c9a6; }
.cookie-accept {
    background: var(--accent);
    color: #fff;
    border: 0;
    border-radius: 8px;
    padding: 0.6rem 1.3rem;
    font-weight: 600;
    cursor: pointer;
    flex: 0 0 auto;
}
.cookie-accept:hover { background: #fff; color: var(--ink); }

/* ============ Комментарии ============ */
.comments { margin-top: 2rem; }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list li { margin-bottom: 1.2rem; }
.comment-body {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1rem 1.2rem;
}
.comment-meta { font-size: 0.82rem; color: var(--muted); margin-bottom: 0.4rem; }
.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: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    margin-top: 0.3rem;
}
.comment-form p { margin-bottom: 0.9rem; }
.comment-form .submit {
    background: var(--ink);
    color: #fff;
    border: 0;
    border-radius: 8px;
    padding: 0.65rem 1.4rem;
    font-weight: 600;
    cursor: pointer;
}
.comment-form .submit:hover { background: var(--accent); }

/* ============ Мобильное меню ============ */
@media (max-width: 960px) {
    .nav-toggle { display: block; }
    .main-nav {
        flex-basis: 100%;
        margin-left: 0;
    }
    .main-nav[hidden] { display: none !important; }
    .main-nav ul { flex-direction: column; gap: 0.2rem; }
    .main-nav a { padding: 0.6rem 0.5rem; border-bottom: 1px solid var(--line); border-radius: 0; }
}
