/*
Theme Name: dds_pavloffstudio.com
Author: Павел Павлов
Description: Информационная тема для платформы разработки и доставки цифровых образовательных решений. Строгий технологичный минимализм.
Version: 1.1
Text Domain: pavloff
*/

/* ============================================================
   Базовые переменные
   ============================================================ */
:root {
    --c-navy:     #0B1C2F;
    --c-white:    #FFFFFF;
    --c-ash:      #F4F6F9;
    --c-accent:   #E06A3C;
    --c-accent-d: #c8552a;
    --c-graphite: #5A6874;
    --c-line:     #DCE2E8;
    --c-text:     #16242F;
    --radius:     6px;
    --shell:      1180px;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ============================================================
   Сброс и база
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.65;
    color: var(--c-text);
    background: var(--c-white);
    overflow-x: hidden;
}

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

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

h1, h2, h3, h4 {
    line-height: 1.25;
    color: var(--c-navy);
    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%, var(--shell));
    margin-inline: auto;
}

/* ============================================================
   Кнопки
   ============================================================ */
.btn {
    display: inline-block;
    padding: 0.7em 1.5em;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.98rem;
    line-height: 1.2;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.btn-primary {
    background: var(--c-accent);
    color: #fff;
    border-color: var(--c-accent);
}
.btn-primary:hover {
    background: var(--c-accent-d);
    border-color: var(--c-accent-d);
    color: #fff;
    text-decoration: none;
}
.btn-secondary {
    background: transparent;
    color: var(--c-accent);
    border: 1px solid var(--c-accent);
}
.btn-secondary:hover {
    background: rgba(224, 106, 60, 0.08);
    color: var(--c-accent-d);
    text-decoration: none;
}

/* ============================================================
   Шапка
   ============================================================ */
.site-header {
    background: var(--c-navy);
    color: #fff;
    padding: 18px 0;
    border-bottom: 3px solid var(--c-accent);
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 28px;
    flex-wrap: wrap;
}
.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand-logo,
.brand-mark { flex: 0 0 auto; display: block; }
.brand-mark { width: 46px; height: 46px; }
.brand-text { min-width: 0; }
.brand-title {
    display: block;
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
}
.brand-desc {
    display: block;
    font-size: 0.82rem;
    color: #aeb9c4;
    line-height: 1.4;
    margin-top: 2px;
}

/* Навигация */
.main-nav { margin-left: auto; }
.nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: var(--radius);
    color: #fff;
    padding: 8px 12px;
    font-size: 0.95rem;
    cursor: pointer;
}
.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.main-nav a {
    display: block;
    color: #e8edf2;
    padding: 8px 14px;
    border-radius: var(--radius);
    font-weight: 500;
    transition: background-color 0.25s ease, color 0.25s ease;
}
.main-nav a:hover,
.main-nav .current-menu-item > a {
    background: rgba(255,255,255,0.08);
    color: #fff;
    text-decoration: none;
}

/* ============================================================
   Раскладки контента
   ============================================================ */
.site-main { padding: 40px 0 60px; }
.home .site-main { padding: 0; }

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

/* ============================================================
   Хлебные крошки
   ============================================================ */
.breadcrumbs {
    font-size: 0.85rem;
    color: var(--c-graphite);
    margin-bottom: 22px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--c-line);
}
.breadcrumbs a { color: var(--c-graphite); }
.breadcrumbs a:hover { color: var(--c-accent); text-decoration: none; }
.breadcrumbs .sep { margin: 0 6px; color: var(--c-line); }
.breadcrumbs span:last-child { color: var(--c-navy); }

/* ============================================================
   Карточки записей (A8, A10)
   ============================================================ */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 28px;
}

.card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
    overflow: hidden;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.card:hover {
    box-shadow: 0 10px 28px rgba(11, 28, 47, 0.10);
    transform: translateY(-3px);
}
.card-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}
.card-thumb-placeholder {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--c-ash);
}
.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px 22px 24px;
    min-width: 0;
}
.card-title { font-size: 1.18rem; margin: 0 0 0.5em; }
.card-title a { color: var(--c-navy); }
.card-title a:hover { color: var(--c-accent); text-decoration: none; }
.card-meta {
    font-size: 0.8rem;
    color: var(--c-graphite);
    margin-bottom: 10px;
}
.card-excerpt {
    color: var(--c-text);
    margin-bottom: 16px;
}
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-footer { margin-top: auto; }

/* Горизонтальная карточка (лента блога) */
.card-row {
    flex-direction: row;
}
.card-row .card-thumb-wrap {
    flex: 0 0 280px;
    position: relative;
    overflow: hidden;
}
.card-row .card-thumb-wrap a {
    display: block;
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
}
.card-row .card-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.card-row .card-thumb-placeholder {
    aspect-ratio: auto;
    height: 100%;
}

/* ============================================================
   Лента записей (вертикальный список карточек-строк)
   ============================================================ */
.post-feed {
    display: flex;
    flex-direction: column;
    gap: 26px;
}

/* ============================================================
   Одиночная запись / страница
   ============================================================ */
.entry-header { margin-bottom: 20px; }
.entry-title { margin-bottom: 0.3em; }
.entry-meta {
    font-size: 0.85rem;
    color: var(--c-graphite);
}
.entry-thumb {
    display: block;
    width: 100%;
    border-radius: var(--radius);
    margin-bottom: 24px;
}
.entry-content { word-wrap: break-word; }
.entry-content img { display: block; border-radius: var(--radius); margin: 1.2em 0; }
.entry-content h2 { margin-top: 1.4em; }
.entry-content h3 { margin-top: 1.2em; }
.entry-content ul, .entry-content ol { padding-left: 1.4em; }
.entry-content blockquote {
    margin: 1.4em 0;
    padding: 0.6em 1.2em;
    border-left: 3px solid var(--c-accent);
    background: var(--c-ash);
    color: var(--c-graphite);
}

/* Таблицы */
.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(--c-line);
}
.entry-content th,
.entry-content td {
    padding: 10px 12px;
    text-align: left;
}
.entry-content th { background: var(--c-ash); color: var(--c-navy); }

/* ============================================================
   Сайдбар
   ============================================================ */
.sidebar { min-width: 0; }
.sidebar .widget {
    background: var(--c-ash);
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
    padding: 20px 22px;
    margin-bottom: 24px;
    color: var(--c-text);
}
.sidebar .widget-title {
    font-size: 1.05rem;
    color: var(--c-navy);
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--c-accent);
}
.sidebar .widget a { color: var(--c-navy); }
.sidebar .widget a:hover { color: var(--c-accent); }
.sidebar .widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.sidebar .widget li {
    padding: 8px 0;
    border-bottom: 1px solid var(--c-line);
    font-size: 0.95rem;
}
.sidebar .widget li:last-child { border-bottom: none; }
.sidebar .widget .post-date,
.sidebar .widget .rss-date {
    display: block;
    font-size: 0.78rem;
    color: var(--c-graphite);
    margin-top: 2px;
}

/* ============================================================
   Пагинация
   ============================================================ */
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 40px;
    justify-content: center;
}
.pagination .page-numbers {
    display: inline-block;
    padding: 9px 15px;
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
    color: var(--c-navy);
    font-size: 0.95rem;
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.pagination .page-numbers:hover {
    border-color: var(--c-accent);
    color: var(--c-accent);
    text-decoration: none;
}
.pagination .page-numbers.current {
    background: var(--c-accent);
    border-color: var(--c-accent);
    color: #fff;
}
.pagination .page-numbers.dots { border-color: transparent; }

/* ============================================================
   Главная
   ============================================================ */
.front-section { padding: 56px 0; }
.front-section.is-ash { background: var(--c-ash); }
.front-inner { width: 85%; margin-inline: auto; }
.section-head { margin-bottom: 32px; }
.section-head .eyebrow {
    display: inline-block;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--c-accent);
    font-weight: 700;
    margin-bottom: 8px;
}
.section-head h2 { font-size: 1.85rem; margin: 0 0 0.3em; }
.section-head .lead { color: var(--c-graphite); font-size: 1.05rem; max-width: 720px; }

.hero {
    background: var(--c-navy);
    color: #fff;
    padding: 76px 0;
}
.hero .front-inner { max-width: 820px; }
.hero h1 { color: #fff; font-size: 2.4rem; margin-bottom: 0.4em; }
.hero p { color: #c4cdd6; font-size: 1.15rem; margin-bottom: 1.6em; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 26px;
}
.feature {
    background: #fff;
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
    padding: 26px 24px;
    min-width: 0;
}
.front-section.is-ash .feature { background: #fff; }
.feature .ico {
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(224,106,60,0.12);
    border-radius: var(--radius);
    margin-bottom: 16px;
    color: var(--c-accent);
}
.feature h3 { font-size: 1.15rem; margin-bottom: 0.4em; }
.feature p { color: var(--c-graphite); margin: 0; font-size: 0.96rem; }

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    counter-reset: step;
}
.step {
    position: relative;
    padding: 24px 22px;
    background: #fff;
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
    min-width: 0;
}
.front-section.is-ash .step { background: #fff; }
.step .num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px; height: 38px;
    background: var(--c-navy);
    color: #fff;
    border-radius: var(--radius);
    font-weight: 700;
    margin-bottom: 14px;
}
.step h3 { font-size: 1.08rem; margin-bottom: 0.35em; }
.step p { color: var(--c-graphite); margin: 0; font-size: 0.95rem; }

.front-posts { padding: 56px 0; }
.front-posts .more-link-wrap { text-align: center; margin-top: 34px; }

/* ============================================================
   Комментарии
   ============================================================ */
.comments-area { margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--c-line); }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list ul.children { list-style: none; margin: 0 0 0 28px; padding: 0; }
.comment-body {
    padding: 18px 0;
    border-bottom: 1px solid var(--c-line);
}
.comment-meta { font-size: 0.85rem; color: var(--c-graphite); margin-bottom: 6px; }
.comment-author { font-weight: 600; color: var(--c-navy); }
.comment-reply-link {
    font-size: 0.85rem;
    font-weight: 600;
}
.comment-form { margin-top: 24px; }
.comment-form p { margin-bottom: 14px; }
.comment-form label { display: block; font-size: 0.9rem; font-weight: 600; margin-bottom: 4px; }
.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(--c-line);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.95rem;
}
.comment-form .submit,
.comment-form input[type="submit"] {
    background: var(--c-accent);
    color: #fff;
    border: none;
    padding: 11px 24px;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.25s ease;
}
.comment-form input[type="submit"]:hover { background: var(--c-accent-d); }

/* ============================================================
   Форма поиска
   ============================================================ */
.search-form {
    display: flex;
    gap: 8px;
    max-width: 480px;
}
.search-form .search-field {
    flex: 1;
    min-width: 0;
    padding: 10px 14px;
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
    font-size: 0.95rem;
}
.search-form .search-submit {
    background: var(--c-accent);
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.25s ease;
}
.search-form .search-submit:hover { background: var(--c-accent-d); }

/* ============================================================
   404
   ============================================================ */
.error-404 { text-align: center; padding: 30px 0; }
.error-404 .code { font-size: 4.5rem; font-weight: 800; color: var(--c-accent); line-height: 1; }
.error-404 .search-form { margin: 24px auto; }

/* ============================================================
   Подвал
   ============================================================ */
.site-footer {
    background: var(--c-navy);
    color: #c4cdd6;
    padding: 50px 0 26px;
    margin-top: 40px;
}
.footer-cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 34px;
}
.footer-cols .footer-col { min-width: 0; }
.site-footer .widget { margin-bottom: 0; }
.site-footer .widget-title {
    color: #fff;
    font-size: 1.05rem;
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--c-accent);
}
.site-footer .widget,
.site-footer .widget p,
.site-footer .widget li,
.site-footer .textwidget { color: #c4cdd6; }
.site-footer .widget a { color: #e8edf2; }
.site-footer .widget a:hover { color: var(--c-accent); text-decoration: none; }
.site-footer .widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.site-footer .widget li {
    padding: 7px 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    font-size: 0.95rem;
}
.site-footer .widget li:last-child { border-bottom: none; }
.site-footer .widget .post-date { display: block; font-size: 0.78rem; color: #8c99a5; margin-top: 2px; }
.footer-bottom {
    margin-top: 36px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.10);
    font-size: 0.85rem;
    color: #8c99a5;
    text-align: center;
}

/* ============================================================
   Cookie-баннер (A11 — правило hidden до основного блока)
   ============================================================ */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 999;
    background: var(--c-navy);
    color: #e8edf2;
    border-top: 2px solid var(--c-accent);
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 16px 5%;
    flex-wrap: wrap;
}
.cookie-banner p { margin: 0; flex: 1; min-width: 220px; font-size: 0.9rem; }
.cookie-banner a { color: var(--c-accent); }
.cookie-banner .btn { flex: 0 0 auto; }

/* ============================================================
   Адаптив
   ============================================================ */
@media (max-width: 960px) {
    .layout-with-sidebar {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .hero h1 { font-size: 2rem; }
}

@media (max-width: 600px) {
    body { font-size: 16px; }
    h1 { font-size: 1.7rem; }

    .nav-toggle { display: block; margin-left: auto; }
    .main-nav { margin-left: 0; width: 100%; }
    .main-nav ul {
        display: none;
        flex-direction: column;
        gap: 2px;
        margin-top: 14px;
    }
    .main-nav.is-open ul { display: flex; }
    .main-nav a { padding: 10px 14px; }

    .layout-single .content-area,
    .front-inner,
    .hero .front-inner { width: 100%; }

    /* Горизонтальная карточка → вертикальная (A10) */
    .card-row { flex-direction: column; }
    .card-row .card-thumb-wrap {
        flex: none;
        width: 100%;
        position: static;
    }
    .card-row .card-thumb-wrap a { position: static; }
    .card-row .card-thumb-wrap img {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }
    .card-row .card-thumb-placeholder { aspect-ratio: 16 / 9; height: auto; }
}
