/*
Theme Name: dds_bajastalingrad.ru
Author: Дмитрий Колесников
Description: Тема для мультитематического журнала об активном образе жизни, мужских увлечениях и технологиях выживания.
Version: 1.1
Text Domain: bajast
*/

:root {
    --bg: #14130f;
    --bg-2: #1c1a15;
    --surface: #211e18;
    --surface-2: #2a261e;
    --line: #38332a;
    --ink: #ece7dc;
    --ink-soft: #b7ad9b;
    --ink-mut: #8c8473;
    --accent: #d6552a;
    --accent-2: #c9982b;
    --accent-deep: #a13c17;
    --maxw: 1180px;
    --radius: 6px;
}

* { 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: "Oswald", "Segoe UI", Arial, sans-serif;
    line-height: 1.18;
    letter-spacing: 0.01em;
    color: var(--ink);
    margin: 0 0 0.6em;
    text-transform: uppercase;
}

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

p { margin: 0 0 1.1em; }

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

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

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

.btn {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    padding: 0.7em 1.5em;
    border-radius: var(--radius);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.92rem;
    border: 1px solid var(--accent-deep);
    transition: background .15s ease, transform .15s ease;
}
.btn:hover { background: var(--accent-deep); color: #fff; transform: translateY(-1px); }

.btn-ghost {
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--line);
}
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }

/* ---------- Header ---------- */
.site-header {
    background: var(--bg-2);
    border-bottom: 2px solid var(--accent-deep);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 0;
    flex-wrap: wrap;
}
.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    max-width: 720px;
}
.brand-logo, .brand .logo-svg { flex: 0 0 auto; display: block; }
.brand-text { min-width: 0; }
.brand-name {
    font-family: "Oswald", "Segoe UI", Arial, sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--ink);
    line-height: 1.2;
    display: block;
}
.brand-name a { color: var(--ink); }
.brand-name a:hover { color: var(--accent); }
.brand-desc {
    font-size: 0.82rem;
    color: var(--ink-mut);
    line-height: 1.4;
    margin-top: 4px;
    display: block;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 6px;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}
.main-nav a {
    display: block;
    padding: 0.5em 0.9em;
    color: var(--ink-soft);
    text-transform: uppercase;
    font-size: 0.86rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    border-radius: var(--radius);
}
.main-nav a:hover,
.main-nav .current-menu-item > a {
    color: var(--ink);
    background: var(--surface-2);
}

.nav-toggle {
    display: none;
    background: var(--surface-2);
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0.5em 0.8em;
    font-size: 0.9rem;
    cursor: pointer;
}

/* ---------- Breadcrumbs ---------- */
.breadcrumbs {
    font-size: 0.84rem;
    color: var(--ink-mut);
    padding: 14px 0;
}
.breadcrumbs a { color: var(--ink-soft); }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs .sep { color: var(--accent); margin: 0 4px; }

/* ---------- Layout ---------- */
.site-main { padding: 30px 0 50px; }

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

/* ---------- Sidebar / widgets ---------- */
.sidebar { min-width: 0; }
.widget {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px 20px;
    margin-bottom: 24px;
    color: var(--ink-soft);
}
.widget-title {
    font-size: 1.05rem;
    color: var(--ink);
    border-left: 3px solid var(--accent);
    padding-left: 10px;
    margin-bottom: 14px;
}
.widget a { color: var(--ink-soft); }
.widget a:hover { color: var(--accent); }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li {
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
    font-size: 0.92rem;
    line-height: 1.4;
}
.widget li:last-child { border-bottom: none; }
.widget .post-date { display: block; color: var(--ink-mut); font-size: 0.78rem; margin-top: 2px; }

/* ---------- Cards ---------- */
.post-list { display: grid; gap: 26px; }
.card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color .15s ease, transform .15s ease;
}
.card:hover { border-color: var(--accent-deep); transform: translateY(-2px); }
.card-thumb-wrap {
    flex: 0 0 auto;
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
}
.card-thumb-wrap a { display: block; height: 100%; }
.card-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.card-ph {
    width: 100%;
    height: 100%;
    display: block;
    background: linear-gradient(135deg, var(--surface-2), var(--bg-2));
}
.card-body { flex: 1; display: flex; flex-direction: column; padding: 18px 20px; }
.card-title { font-size: 1.2rem; margin-bottom: 8px; }
.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--accent); }
.card-meta { font-size: 0.78rem; color: var(--ink-mut); margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.03em; }
.card-excerpt { color: var(--ink-soft); font-size: 0.95rem; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-more { margin-top: auto; padding-top: 12px; }
.card-more a {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    color: var(--accent-2);
}
.card-more a:hover { color: var(--accent); }

/* ---------- Single / Page content ---------- */
.entry-header { margin-bottom: 22px; }
.entry-title { font-size: 2rem; }
.entry-meta { color: var(--ink-mut); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.03em; }
.entry-thumb { margin: 0 0 24px; border-radius: var(--radius); overflow: hidden; }
.entry-thumb img { width: 100%; display: block; }
.entry-content { font-size: 1.02rem; }
.entry-content h2, .entry-content h3 { margin-top: 1.4em; }
.entry-content img { border-radius: var(--radius); display: block; }
.entry-content a { color: var(--accent-2); text-decoration: underline; }
.entry-content blockquote {
    border-left: 4px solid var(--accent);
    margin: 1.4em 0;
    padding: 0.4em 1.2em;
    background: var(--surface);
    color: var(--ink-soft);
}

table { border-collapse: collapse; width: 100%; margin: 1.4em 0; }
table, th, td { border: 1px solid var(--line); }
th, td { padding: 10px 12px; text-align: left; }
th { background: var(--surface-2); color: var(--ink); }

/* ---------- Front page ---------- */
.section { padding: 54px 0; border-bottom: 1px solid var(--line); }
.section:nth-child(even) { background: var(--bg-2); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 36px; }
.section-head h2 { font-size: 1.9rem; }
.section-head h2::after {
    content: "";
    display: block;
    width: 60px;
    height: 3px;
    background: var(--accent);
    margin: 14px auto 0;
}
.section-lead { color: var(--ink-soft); }

/* split block */
.split { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 40px; align-items: center; }
.split.reverse .split-media { order: 2; }
.split-media img, .split-media svg { width: 100%; border-radius: var(--radius); display: block; }
.split-body h2 { text-align: left; }
.split-body h2::after { margin: 14px 0 0; }

/* feature grid */
.feature-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 22px; }
.feature {
    background: var(--surface);
    border: 1px solid var(--line);
    border-top: 3px solid var(--accent);
    border-radius: var(--radius);
    padding: 24px 20px;
}
.feature .ico { color: var(--accent); margin-bottom: 12px; display: block; }
.feature h3 { font-size: 1.1rem; }
.feature p { margin: 0; color: var(--ink-soft); font-size: 0.93rem; }

/* stats */
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 22px; text-align: center; }
.stat {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 28px 16px;
}
.stat-num {
    font-family: "Oswald", "Segoe UI", Arial, sans-serif;
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
}
.stat-label { color: var(--ink-soft); font-size: 0.9rem; margin-top: 8px; }

/* cta */
.cta-block {
    background: linear-gradient(120deg, var(--accent-deep), #2a1c12);
    border: 1px solid var(--accent-deep);
    border-radius: var(--radius);
    padding: 44px 36px;
    text-align: center;
}
.cta-block h2 { color: #fff; }
.cta-block p { color: #f3e7df; max-width: 640px; margin: 0 auto 22px; }

.home-latest { padding: 54px 0; }
.home-latest .post-list { grid-template-columns: repeat(3, minmax(0,1fr)); }
.latest-foot { text-align: center; margin-top: 34px; }

/* ---------- Pagination ---------- */
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 40px;
}
.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    padding: 0.55em 0.8em;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--ink-soft);
    font-weight: 600;
}
.pagination a.page-numbers:hover { border-color: var(--accent); color: var(--ink); }
.pagination .page-numbers.current {
    background: var(--accent);
    border-color: var(--accent-deep);
    color: #fff;
}
.pagination .page-numbers.dots { border-color: transparent; background: none; }

/* ---------- Search form ---------- */
.search-form { display: flex; gap: 8px; }
.search-form input[type="search"] {
    flex: 1;
    min-width: 0;
    padding: 0.6em 0.9em;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--ink);
}
.search-form button {
    background: var(--accent);
    border: 1px solid var(--accent-deep);
    border-radius: var(--radius);
    color: #fff;
    padding: 0.6em 1.1em;
    cursor: pointer;
    font-weight: 700;
}

/* ---------- Comments ---------- */
.comments-area { margin-top: 44px; }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list li { margin-bottom: 20px; }
.comment-body {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px 18px;
}
.comment-meta { font-size: 0.82rem; color: var(--ink-mut); margin-bottom: 8px; }
.comment-author { color: var(--ink); font-weight: 700; }
.comment-respond {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px;
    margin-top: 24px;
}
.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;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--ink);
    margin-bottom: 12px;
}

/* ---------- 404 ---------- */
.error-404 { text-align: center; padding: 40px 0; }
.error-404 .code { font-size: 5rem; color: var(--accent); font-family: "Oswald", Arial, sans-serif; line-height: 1; }
.error-404 .search-form { max-width: 460px; margin: 24px auto; }

/* ---------- Footer ---------- */
.site-footer { background: #100f0c; border-top: 2px solid var(--accent-deep); padding: 48px 0 24px; }
.footer-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 36px;
}
.footer-cols .widget {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    color: #b9b0a0;
}
.footer-cols .widget-title { color: #fff; border-left-color: var(--accent); }
.footer-cols .widget a { color: #cfc6b6; }
.footer-cols .widget a:hover { color: var(--accent); }
.footer-cols .widget li { border-bottom-color: #2a2620; }
.footer-cols .widget .post-date { color: #8c8473; }
.site-copyright {
    text-align: center;
    color: #7d7669;
    font-size: 0.85rem;
    margin-top: 36px;
    padding-top: 20px;
    border-top: 1px solid #26231d;
}

/* ---------- Cookie banner ---------- */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 9999;
    background: var(--bg-2);
    border-top: 2px solid var(--accent);
    padding: 16px 0;
}
.cookie-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: space-between;
}
.cookie-inner p { margin: 0; color: var(--ink-soft); font-size: 0.9rem; flex: 1; min-width: 240px; }
.cookie-inner .btn { flex: 0 0 auto; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    .layout-with-sidebar { grid-template-columns: 1fr; }
    .feature-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .stats-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .home-latest .post-list { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .footer-cols { grid-template-columns: 1fr 1fr; }
    .split { grid-template-columns: 1fr; }
    .split.reverse .split-media { order: 0; }
}

@media (max-width: 600px) {
    body { font-size: 16px; }
    h1, .entry-title { font-size: 1.6rem; }
    .nav-toggle { display: block; }
    .main-nav { width: 100%; }
    .main-nav ul { display: none; flex-direction: column; gap: 2px; padding-top: 10px; }
    .main-nav.open ul { display: flex; }
    .feature-grid, .stats-grid,
    .home-latest .post-list { grid-template-columns: 1fr; }
    .footer-cols { grid-template-columns: 1fr; }
    .layout-single .content-area { width: 100%; }
    .card-thumb-wrap { position: static; }
    .card-thumb-wrap a { position: static; }
}
