/*
Theme Name: dds_beaverpartner.com
Author: Артём Зинченко
Description: Информационно-аналитическая тема для блога и базы знаний по партнёрскому маркетингу в digital-сфере.
Version: 1.1
Text Domain: bvp
*/

/* ============================ Базовые переменные ============================ */
:root {
    --ink: #20303d;
    --ink-soft: #4a5d6b;
    --paper: #f6f4ee;
    --card: #ffffff;
    --line: #e0dccf;
    --navy: #1d2b3a;
    --navy-deep: #16222e;
    --amber: #e0962f;
    --amber-deep: #c47e1c;
    --teal: #2f6f6b;
    --shell: min(92%, 1180px);
}

/* ============================ Сброс / основа ============================ */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: "Georgia", "PT Serif", serif;
    color: var(--ink);
    background: var(--paper);
    line-height: 1.7;
    font-size: 18px;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
    line-height: 1.25;
    color: var(--navy);
    margin: 0 0 0.6em;
}

h1 { font-size: 2.1rem; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1.1em; }

a { color: var(--amber-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

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

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

/* ============================ Шапка ============================ */
.site-header {
    background: var(--card);
    border-bottom: 3px solid var(--amber);
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 20px 0;
    flex-wrap: wrap;
}
.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    text-decoration: none;
}
.brand-logo { display: block; height: 56px; width: auto; }
.brand-text { min-width: 0; }
.brand-name {
    font-family: "Trebuchet MS", sans-serif;
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--navy);
    line-height: 1.25;
    display: block;
    max-width: 46ch;
}
.brand-desc {
    font-size: 0.82rem;
    color: var(--ink-soft);
    display: block;
    max-width: 60ch;
    margin-top: 2px;
}
.header-nav { margin-left: auto; }
.header-nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 22px;
    margin: 0;
    padding: 0;
}
.header-nav a {
    font-family: "Trebuchet MS", sans-serif;
    color: var(--navy);
    font-weight: 600;
    font-size: 0.98rem;
}
.header-nav a:hover { color: var(--amber-deep); text-decoration: none; }
.menu-toggle {
    display: none;
    margin-left: auto;
    background: var(--navy);
    color: #fff;
    border: 0;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 1rem;
    cursor: pointer;
    font-family: "Trebuchet MS", sans-serif;
}

/* ============================ Хлебные крошки ============================ */
.breadcrumbs {
    width: var(--shell);
    margin: 18px auto 0;
    font-size: 0.86rem;
    color: var(--ink-soft);
    font-family: "Trebuchet MS", sans-serif;
}
.breadcrumbs a { color: var(--teal); }
.breadcrumbs .sep { color: var(--line); margin: 0 4px; }

/* ============================ Основной макет ============================ */
.site-main { padding: 34px 0 48px; }

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

/* ============================ Сайдбар ============================ */
.sidebar { min-width: 0; }
.sidebar .widget {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 22px;
}
.sidebar .widget-title {
    color: var(--navy);
    font-size: 1.1rem;
    border-bottom: 2px solid var(--amber);
    padding-bottom: 8px;
    margin-bottom: 14px;
}
.sidebar .widget,
.sidebar .widget a { color: var(--ink); }
.sidebar .widget a:hover { color: var(--amber-deep); }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { padding: 7px 0; border-bottom: 1px dashed var(--line); }
.sidebar li:last-child { border-bottom: 0; }
.sidebar .post-date { display: block; font-size: 0.78rem; color: var(--ink-soft); }

/* ============================ Карточки записей ============================ */
.cards { display: grid; gap: 26px; }

.card {
    display: flex;
    flex-direction: column;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
}
.card-thumb-wrap { display: block; overflow: hidden; }
.card-thumb-wrap img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
.card-thumb-wrap:hover img { transform: scale(1.04); }
.card-thumb-fallback {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--navy), var(--teal));
    color: #fff;
}
.card-body {
    flex: 1;
    padding: 20px 22px 24px;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.card-title { font-size: 1.3rem; margin-bottom: 8px; }
.card-title a { color: var(--navy); }
.card-title a:hover { color: var(--amber-deep); text-decoration: none; }
.card-meta {
    font-family: "Trebuchet MS", sans-serif;
    font-size: 0.8rem;
    color: var(--ink-soft);
    margin-bottom: 10px;
}
.card-excerpt { color: var(--ink-soft); }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-more {
    margin-top: auto;
    align-self: flex-start;
    font-family: "Trebuchet MS", sans-serif;
    font-weight: 600;
    color: var(--amber-deep);
}

/* ============================ Одиночная запись / страница ============================ */
.entry {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 30px 34px;
}
.entry-title { font-size: 2rem; }
.entry-meta {
    font-family: "Trebuchet MS", sans-serif;
    font-size: 0.85rem;
    color: var(--ink-soft);
    margin-bottom: 18px;
}
.entry-thumb { border-radius: 10px; margin-bottom: 22px; display: block; }
.entry-content { min-width: 0; }
.entry-content img { border-radius: 8px; }
.entry-content h2 { margin-top: 1.4em; }

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

.tags-line {
    margin-top: 24px;
    font-family: "Trebuchet MS", sans-serif;
    font-size: 0.85rem;
}
.tags-line a {
    display: inline-block;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 3px 12px;
    margin: 0 6px 6px 0;
    color: var(--teal);
}

/* ============================ Пагинация ============================ */
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 34px;
}
.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--card);
    color: var(--navy);
    font-family: "Trebuchet MS", sans-serif;
    font-weight: 600;
    text-decoration: none;
}
.pagination a.page-numbers:hover { border-color: var(--amber); color: var(--amber-deep); }
.pagination .page-numbers.current {
    background: var(--navy);
    border-color: var(--navy);
    color: #fff;
}
.pagination .page-numbers.dots { border: 0; background: none; }

/* ============================ Главная ============================ */
.home-block { margin-bottom: 56px; }
.block-head { margin-bottom: 26px; }
.block-head .eyebrow {
    font-family: "Trebuchet MS", sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.78rem;
    color: var(--amber-deep);
    font-weight: 700;
}
.block-head h2 { margin-top: 6px; }

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

/* Блок: сетка рубрик */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
    gap: 22px;
}
.feature {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 26px 24px;
    min-width: 0;
}
.feature .ficon {
    width: 48px;
    height: 48px;
    display: block;
    margin-bottom: 14px;
    color: var(--teal);
}
.feature h3 { color: var(--navy); }
.feature p { margin: 0; color: var(--ink-soft); font-size: 0.96rem; }

/* Блок: шаги */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
    gap: 22px;
    counter-reset: step;
}
.step {
    background: var(--navy);
    color: #eaf0f3;
    border-radius: 12px;
    padding: 26px 24px;
    min-width: 0;
}
.step .step-num {
    font-family: "Trebuchet MS", sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--amber);
    display: block;
    margin-bottom: 8px;
}
.step h3 { color: #fff; font-size: 1.12rem; }
.step p { margin: 0; color: #c4d0d8; font-size: 0.94rem; }

/* Блок: FAQ */
.faq { max-width: 860px; }
.faq details {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 4px 22px;
    margin-bottom: 14px;
}
.faq summary {
    cursor: pointer;
    font-family: "Trebuchet MS", sans-serif;
    font-weight: 600;
    color: var(--navy);
    padding: 16px 0;
    list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: '+';
    float: right;
    color: var(--amber-deep);
    font-size: 1.4rem;
    line-height: 1;
}
.faq details[open] summary::after { content: '–'; }
.faq details p { color: var(--ink-soft); margin: 0 0 16px; }

/* Лента последних записей на главной */
.latest-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: 26px;
}

/* ============================ Подвал ============================ */
.site-footer {
    background: var(--navy-deep);
    color: #c4d0d8;
    margin-top: 30px;
}
.footer-cols {
    width: var(--shell);
    margin-inline: auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
    gap: 34px;
    padding: 44px 0 30px;
}
.site-footer .widget { min-width: 0; }
.site-footer .widget-title {
    color: #fff;
    font-size: 1.05rem;
    margin-bottom: 14px;
}
.site-footer .widget,
.site-footer .widget p { color: #c4d0d8; }
.site-footer .widget a { color: #f0d6a8; }
.site-footer .widget a:hover { color: #fff; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { padding: 6px 0; }
.site-footer .post-date { display: block; font-size: 0.78rem; color: #8ea0ad; }
.footer-bottom {
    border-top: 1px solid #2a3a48;
    text-align: center;
    padding: 18px 0;
    font-size: 0.82rem;
    color: #8ea0ad;
    font-family: "Trebuchet MS", sans-serif;
}

/* ============================ Поиск ============================ */
.search-form {
    display: flex;
    gap: 8px;
    max-width: 460px;
}
.search-form .search-field {
    flex: 1;
    min-width: 0;
    padding: 11px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 1rem;
}
.search-form .search-submit {
    background: var(--navy);
    color: #fff;
    border: 0;
    border-radius: 8px;
    padding: 11px 20px;
    cursor: pointer;
    font-family: "Trebuchet MS", sans-serif;
}
.search-form .search-submit:hover { background: var(--amber-deep); }

/* ============================ Комментарии ============================ */
.comments-area { margin-top: 34px; }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list .children { list-style: none; margin: 0 0 0 28px; padding: 0; }
.comment-inner {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 16px;
}
.comment-meta {
    display: flex;
    gap: 14px;
    align-items: baseline;
    margin-bottom: 8px;
}
.comment-author { font-family: "Trebuchet MS", sans-serif; font-weight: 700; color: var(--navy); }
.comment-date { font-size: 0.78rem; color: var(--ink-soft); }
.comment-respond {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 22px 24px;
    margin-top: 24px;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 1rem;
    margin-bottom: 12px;
    font-family: inherit;
}
.comment-form .submit {
    background: var(--navy);
    color: #fff;
    border: 0;
    border-radius: 8px;
    padding: 11px 24px;
    cursor: pointer;
    font-family: "Trebuchet MS", sans-serif;
}
.comment-form .submit:hover { background: var(--amber-deep); }

/* ============================ 404 ============================ */
.error-404 {
    text-align: center;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 50px 30px;
}
.error-404 .big { font-size: 4rem; color: var(--amber); margin: 0; font-family: "Trebuchet MS", sans-serif; }
.error-404 .search-form { margin: 24px auto; }

.btn {
    display: inline-block;
    background: var(--amber);
    color: var(--navy-deep);
    font-family: "Trebuchet MS", sans-serif;
    font-weight: 700;
    padding: 12px 26px;
    border-radius: 8px;
    text-decoration: none;
}
.btn:hover { background: var(--amber-deep); color: #fff; text-decoration: none; }

/* CTA-секция */
.cta {
    background: linear-gradient(135deg, var(--teal), var(--navy));
    color: #fff;
    border-radius: 16px;
    padding: 46px 40px;
    text-align: center;
}
.cta h2 { color: #fff; }
.cta p { color: #d7e2e6; max-width: 60ch; margin: 0 auto 22px; }

/* ============================ Cookie-баннер ============================ */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    background: var(--navy-deep);
    color: #e7eef2;
    padding: 16px 20px;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
    font-size: 0.9rem;
    box-shadow: 0 -4px 18px rgba(0,0,0,0.25);
}
.cookie-banner p { margin: 0; max-width: 70ch; }
.cookie-banner a { color: #f0d6a8; }
.cookie-banner button {
    background: var(--amber);
    color: var(--navy-deep);
    border: 0;
    border-radius: 8px;
    padding: 10px 24px;
    font-weight: 700;
    cursor: pointer;
    font-family: "Trebuchet MS", sans-serif;
    white-space: nowrap;
}
.cookie-banner button:hover { background: #fff; }

/* ============================ Адаптив ============================ */
@media (max-width: 960px) {
    .layout-with-sidebar { grid-template-columns: 1fr; gap: 34px; }
    .split { grid-template-columns: 1fr; gap: 26px; }
    .split.reverse .split-media { order: 0; }
    h1 { font-size: 1.8rem; }
    .entry { padding: 24px; }
}

@media (max-width: 600px) {
    body { font-size: 17px; }
    .header-nav {
        margin-left: 0;
        flex-basis: 100%;
        display: none;
    }
    .header-nav.is-open { display: block; }
    .header-nav ul { flex-direction: column; gap: 4px; }
    .menu-toggle { display: inline-block; }
    .layout-single { width: 92%; }
    .breadcrumbs { width: 92%; }
    .cta { padding: 32px 22px; }
}
