/*
Theme Name: dds_siembracolombia2050.com
Author: Дмитрий Соколов
Description: Образовательный блог о запуске онлайн-проектов, финансах и обучении в digital-среде. Тёмно-зелёная информационная тема.
Version: 1.1
Text Domain: sc2050
*/

/* =========================================================
   Переменные и базовые стили
   ========================================================= */
:root {
    --green-900: #0c3325;
    --green-800: #0f4632;
    --green-700: #136046;
    --green-600: #15805a;
    --green-500: #1d9b6e;
    --green-100: #e6f4ee;
    --green-050: #f3f9f6;
    --gold:      #e3a008;
    --gold-soft: #f0c64a;
    --ink:       #15241d;
    --muted:     #5b6b63;
    --line:      #d9e4de;
    --white:     #ffffff;
    --footer-bg: #0c3325;
    --footer-fg: #cfe3d8;
    --radius:    14px;
    --shadow:    0 8px 28px rgba(15, 70, 50, 0.08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

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

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

a { color: var(--green-700); text-decoration: none; }
a:hover { color: var(--green-500); text-decoration: underline; }

h1, h2, h3, h4 {
    line-height: 1.25;
    color: var(--green-900);
    margin: 0 0 0.6em;
    font-weight: 700;
}
h1 { font-size: 2.1rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }

/* Единый контейнер ширины (A12.7) */
.shell {
    width: min(92%, 1180px);
    margin-inline: auto;
}

/* =========================================================
   Шапка
   ========================================================= */
.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--line);
}
.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;
}
.brand-mark, .brand-logo { flex: 0 0 auto; display: block; }
.brand-logo { max-height: 56px; width: auto; }
.brand-text { min-width: 0; }
.brand-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--green-800);
    display: block;
    line-height: 1.3;
}
.brand-desc {
    font-size: 0.82rem;
    color: var(--muted);
    display: block;
    margin-top: 2px;
}

/* Навигация (не липкая) */
.main-nav { position: static; }
.nav-toggle {
    display: none;
    background: var(--green-600);
    color: #fff;
    border: 0;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.95rem;
    cursor: pointer;
}
.main-nav ul {
    list-style: none;
    display: flex;
    gap: 6px;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}
.main-nav a {
    display: block;
    padding: 9px 14px;
    border-radius: 9px;
    color: var(--green-800);
    font-weight: 600;
    font-size: 0.97rem;
}
.main-nav a:hover,
.main-nav .current-menu-item > a {
    background: var(--green-100);
    color: var(--green-700);
    text-decoration: none;
}

/* =========================================================
   Каркас страницы / раскладки
   ========================================================= */
.site-main { padding: 34px 0 48px; }

.layout-with-sidebar {
    display: grid;
    grid-template-columns: 67% 27%;
    gap: 6%;
    align-items: start;
}
.layout-with-sidebar .content-area,
.layout-with-sidebar .sidebar { min-width: 0; }

.layout-single .content-area {
    width: 85%;
    margin-left: auto;
    margin-right: auto;
}

/* =========================================================
   Хлебные крошки
   ========================================================= */
.crumbs {
    font-size: 0.86rem;
    color: var(--muted);
    margin: 0 0 22px;
}
.crumbs a { color: var(--green-600); }
.crumbs .sep { color: #9bb3a8; margin: 0 4px; }

/* =========================================================
   Карточки записей (A8, A10)
   ========================================================= */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px;
}
.card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(15,70,50,0.13); }
.card-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}
.card-thumb-placeholder {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, var(--green-600), var(--green-800));
    display: block;
}
.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px 22px 22px;
}
.card-title { font-size: 1.2rem; margin: 0 0 8px; }
.card-title a { color: var(--green-900); }
.card-meta {
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 10px;
}
.card-excerpt { color: #41524a; font-size: 0.96rem; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-more {
    margin-top: auto;
    padding-top: 14px;
}
.btn {
    display: inline-block;
    background: var(--green-600);
    color: #fff;
    padding: 10px 18px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.92rem;
}
.btn:hover { background: var(--green-700); color: #fff; text-decoration: none; }
.btn-ghost {
    background: transparent;
    color: var(--green-700);
    border: 1.5px solid var(--green-600);
}
.btn-ghost:hover { background: var(--green-100); color: var(--green-700); }

/* =========================================================
   Одиночная запись / страница
   ========================================================= */
.entry {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 30px 34px 36px;
    box-shadow: var(--shadow);
}
.entry-title { font-size: 2rem; }
.entry-meta { color: var(--muted); font-size: 0.85rem; margin-bottom: 18px; }
.entry-thumb {
    display: block;
    width: 100%;
    max-height: 440px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 22px;
}
.entry-content { font-size: 1.03rem; }
.entry-content img { border-radius: 10px; }
.entry-content h2 { margin-top: 1.4em; }
.entry-content blockquote {
    border-left: 4px solid var(--green-500);
    margin: 1.4em 0;
    padding: 4px 0 4px 20px;
    color: #3a4b43;
    background: var(--green-050);
}

/* Таблицы */
.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: 10px 12px; text-align: left; }
.entry-content th { background: var(--green-100); }

/* =========================================================
   Сайдбар + виджеты
   ========================================================= */
.sidebar .widget,
.footer-widgets .widget {
    margin-bottom: 26px;
}
.sidebar .widget {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px 22px;
    box-shadow: var(--shadow);
}
.sidebar .widget-title {
    font-size: 1.05rem;
    margin: 0 0 14px;
    color: var(--green-800);
    padding-bottom: 10px;
    border-bottom: 2px solid var(--green-100);
}
.sidebar .widget,
.sidebar .widget a,
.sidebar .widget li { color: var(--ink); }
.sidebar .widget a { color: var(--green-700); }
.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; }
.widget_recent_entries .post-date { display: block; font-size: 0.78rem; color: var(--muted); }

/* =========================================================
   Главная страница
   ========================================================= */
.front-section { margin-bottom: 56px; }
.section-head { text-align: center; margin-bottom: 30px; }
.section-head h2 { font-size: 1.9rem; }
.section-head p { color: var(--muted); max-width: 680px; margin: 0 auto; }

/* Слайдер (hero) */
.hero-slider {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background: var(--green-900);
}
.slides { position: relative; }
.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.7s ease;
}
.slide.is-active { position: relative; opacity: 1; }
.slide:not(.is-active) {
    position: absolute;
    pointer-events: none;
}
.slide img {
    display: block;
    width: 100%;
    aspect-ratio: 21 / 9;
    object-fit: cover;
}
.slide-caption {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 26px 30px;
    background: linear-gradient(to top, rgba(8,40,28,0.88), rgba(8,40,28,0));
    color: #fff;
}
.slide-caption h3 { color: #fff; margin: 0 0 6px; font-size: 1.5rem; }
.slide-caption p { color: #d7ebe1; margin: 0; }
.slider-dots {
    position: absolute;
    bottom: 14px; right: 18px;
    display: flex; gap: 8px;
    z-index: 2;
}
.slider-dot {
    width: 11px; height: 11px;
    border-radius: 50%;
    border: 0;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
}
.slider-dot.is-active { background: var(--gold-soft); }

/* Тематические колонки */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}
.feature {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px 24px;
    box-shadow: var(--shadow);
}
.feature .ficon {
    width: 52px; height: 52px;
    display: flex; align-items: center; justify-content: center;
    background: var(--green-100);
    border-radius: 12px;
    margin-bottom: 14px;
}
.feature h3 { font-size: 1.15rem; }
.feature p { color: #46564e; font-size: 0.95rem; margin: 0; }

/* Полоса с иллюстрацией */
.split {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 36px;
    align-items: center;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 34px;
    box-shadow: var(--shadow);
}
.split img { border-radius: 14px; width: 100%; display: block; }
.split-text h2 { margin-top: 0; }
.split-text p { color: #46564e; }

/* Шаги */
.steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}
.step {
    background: var(--green-800);
    color: #eaf4ee;
    border-radius: var(--radius);
    padding: 22px 20px;
}
.step .num {
    display: inline-flex;
    width: 38px; height: 38px;
    align-items: center; justify-content: center;
    background: var(--gold);
    color: #2a2000;
    border-radius: 50%;
    font-weight: 800;
    margin-bottom: 12px;
}
.step h3 { color: #fff; font-size: 1.05rem; }
.step p { color: #c5ddcf; font-size: 0.9rem; margin: 0; }

.front-posts .cards-grid { margin-top: 4px; }
.front-cta { text-align: center; margin-top: 28px; }

/* =========================================================
   Пагинация (D5 — type=plain → .page-numbers)
   ========================================================= */
.pager {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: 36px 0 10px;
}
.pager .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: 10px;
    background: var(--white);
    color: var(--green-800);
    font-weight: 600;
}
.pager a.page-numbers:hover {
    background: var(--green-100);
    text-decoration: none;
}
.pager .page-numbers.current {
    background: var(--green-600);
    color: #fff;
    border-color: var(--green-600);
}
.pager .page-numbers.dots {
    border: 0;
    background: transparent;
}

/* =========================================================
   Поиск
   ========================================================= */
.search-form {
    display: flex;
    gap: 8px;
}
.search-form .search-field {
    flex: 1;
    min-width: 0;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    font-size: 0.95rem;
}
.search-form .search-submit {
    background: var(--green-600);
    color: #fff;
    border: 0;
    padding: 10px 18px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
}
.search-form .search-submit:hover { background: var(--green-700); }

/* =========================================================
   404
   ========================================================= */
.notfound {
    text-align: center;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 50px 30px;
    box-shadow: var(--shadow);
}
.notfound .code { font-size: 4.5rem; color: var(--green-500); font-weight: 800; line-height: 1; }
.notfound .search-form { max-width: 460px; margin: 22px auto 18px; }

/* =========================================================
   Комментарии
   ========================================================= */
.comments-area {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px 30px;
    margin-top: 28px;
    box-shadow: var(--shadow);
}
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list ul.children { list-style: none; margin: 0 0 0 26px; padding: 0; }
.comment-item { margin-bottom: 18px; }
.comment-inner {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 16px 18px;
    background: var(--green-050);
}
.comment-head { display: flex; gap: 12px; align-items: baseline; margin-bottom: 6px; }
.comment-author { font-weight: 700; color: var(--green-800); }
.comment-date { font-size: 0.78rem; color: var(--muted); }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.95rem;
    margin-top: 4px;
}
.comment-form .submit {
    background: var(--green-600);
    color: #fff;
    border: 0;
    padding: 11px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
}

/* =========================================================
   Подвал
   ========================================================= */
.site-footer {
    background: var(--footer-bg);
    color: var(--footer-fg);
    padding: 46px 0 0;
    margin-top: 40px;
}
.footer-widgets {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 36px;
}
.footer-widgets .widget-title {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 14px;
}
.footer-widgets,
.footer-widgets .widget,
.footer-widgets p,
.footer-widgets li { color: var(--footer-fg); }
.footer-widgets a { color: #ffffff; }
.footer-widgets a:hover { color: var(--gold-soft); }
.footer-widgets ul { list-style: none; margin: 0; padding: 0; }
.footer-widgets li { padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.08); }
.footer-widgets li:last-child { border-bottom: 0; }
.site-copyright {
    border-top: 1px solid rgba(255,255,255,0.12);
    margin-top: 40px;
    padding: 20px 0;
    text-align: center;
    font-size: 0.85rem;
    color: #a9c6b8;
}

/* =========================================================
   Cookie-баннер (A11, D6) — правило [hidden] ДО основных стилей
   ========================================================= */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 16px; right: 16px; bottom: 16px;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    background: var(--green-900);
    color: #eaf4ee;
    border-radius: 14px;
    padding: 16px 20px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}
.cookie-banner p { margin: 0; font-size: 0.9rem; }
.cookie-banner a { color: var(--gold-soft); }
.cookie-accept {
    background: var(--gold);
    color: #2a2000;
    border: 0;
    padding: 10px 22px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}
.cookie-accept:hover { background: var(--gold-soft); }

/* =========================================================
   Контакты-блок (статичный, без форм — D7)
   ========================================================= */
.contact-static a { font-weight: 600; }

/* =========================================================
   Адаптив
   ========================================================= */
@media (max-width: 960px) {
    .layout-with-sidebar { grid-template-columns: 1fr; gap: 30px; }
    .layout-single .content-area,
    .layout-with-sidebar .content-area { width: 100%; }
    .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .split { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    body { font-size: 16px; }
    h1 { font-size: 1.7rem; }
    .nav-toggle { display: inline-block; }
    .main-nav ul {
        display: none;
        flex-direction: column;
        width: 100%;
        margin-top: 12px;
    }
    .main-nav.is-open ul { display: flex; }
    .header-inner { align-items: flex-start; }
    .cards-grid { grid-template-columns: 1fr; }
    .feature-grid { grid-template-columns: 1fr; }
    .steps { grid-template-columns: 1fr; }
    .footer-widgets { grid-template-columns: 1fr; gap: 26px; }
    .entry { padding: 22px 18px 26px; }
    .slide-caption { padding: 16px 18px; }
    .slide-caption h3 { font-size: 1.15rem; }
}
