/*
Theme Name: dds_bk-mt.ru
Author: Алексей Громов
Description: Информационно-аналитический портал о среднем профессиональном образовании России.
Version: 1.1
Text Domain: bkmt
*/

/* ===== Базовые переменные ===== */
:root {
    --maxw: 1180px;
    --ink: #1c2530;
    --muted: #5a6675;
    --navy: #163560;
    --navy-2: #1f4a82;
    --accent: #1f9e7a;
    --accent-2: #15805f;
    --line: #dfe5ec;
    --bg: #f4f6f9;
    --bg-card: #ffffff;
    --footer-bg: #11253f;
    --footer-ink: #cdd8e6;
    --footer-head: #ffffff;
    --radius: 12px;
    --shadow: 0 2px 14px rgba(20, 40, 70, 0.08);
}

/* ===== Сброс / основа ===== */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.65;
    font-size: 17px;
    overflow-x: hidden;
}
img { max-width: 100%; height: auto; }
a { color: var(--navy-2); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ===== Контейнер ширины (один источник) ===== */
.shell {
    width: min(92%, var(--maxw));
    margin-inline: auto;
}

/* ===== Шапка ===== */
.site-head {
    background: #fff;
    border-bottom: 1px solid var(--line);
}
.head-inner {
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 16px 0;
    flex-wrap: wrap;
}
.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    flex: 1;
}
.brand-logo { display: block; width: 52px; height: 52px; flex: 0 0 auto; }
.brand-text { min-width: 0; }
.brand-name {
    display: block;
    font-weight: 700;
    color: var(--navy);
    font-size: 1.04rem;
    line-height: 1.3;
}
.brand-desc {
    display: block;
    color: var(--muted);
    font-size: 0.82rem;
    margin-top: 2px;
}

.main-nav { width: 100%; }
.nav-toggle {
    display: none;
    background: var(--navy);
    color: #fff;
    border: 0;
    border-radius: 8px;
    padding: 9px 14px;
    font-size: 0.95rem;
    cursor: pointer;
}
.menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.menu a {
    display: block;
    padding: 9px 14px;
    color: var(--ink);
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.97rem;
}
.menu a:hover { background: var(--bg); text-decoration: none; color: var(--navy); }
.menu .current-menu-item > a { background: var(--navy); color: #fff; }

/* ===== Хлебные крошки ===== */
.breadcrumbs {
    font-size: 0.86rem;
    color: var(--muted);
    padding: 16px 0 0;
}
.breadcrumbs a { color: var(--navy-2); }
.breadcrumbs .sep { color: #aab4c2; margin: 0 4px; }

/* ===== Раскладки ===== */
.site-main { padding: 28px 0 48px; }
.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67fr) minmax(0, 27fr);
    gap: 36px;
    align-items: start;
}
.layout-single .content-area,
.content-narrow {
    width: 85%;
    margin-left: auto;
    margin-right: auto;
}
.content-area { min-width: 0; }

/* ===== Сайдбар / виджеты ===== */
.sidebar {
    min-width: 0;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px;
}
.widget { margin-bottom: 26px; }
.widget:last-child { margin-bottom: 0; }
.widget-title {
    font-size: 1.05rem;
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent);
    color: var(--navy);
}
.sidebar, .sidebar a { color: var(--ink); }
.sidebar a:hover { color: var(--accent-2); }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { padding: 7px 0; border-bottom: 1px solid var(--line); }
.sidebar li:last-child { border-bottom: 0; }
.sidebar .post-date { display: block; font-size: 0.78rem; color: var(--muted); }

/* ===== Карточки записей ===== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: 24px;
}
.card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.card-thumb { display: block; }
.card-thumb img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}
.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 18px 20px 22px;
    min-width: 0;
}
.card-title { font-size: 1.18rem; margin: 0 0 8px; }
.card-title a { color: var(--navy); }
.card-meta { font-size: 0.8rem; color: var(--muted); margin-bottom: 10px; }
.card-excerpt { color: var(--ink); margin-bottom: 16px; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card .more-link {
    margin-top: auto;
    align-self: flex-start;
    display: inline-block;
    padding: 8px 16px;
    background: var(--accent);
    color: #fff;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
}
.card .more-link:hover { background: var(--accent-2); text-decoration: none; }

/* ===== Одиночная запись / страница ===== */
.entry {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 32px;
    min-width: 0;
}
.entry-title { margin-top: 0; }
.entry-meta { color: var(--muted); font-size: 0.85rem; margin-bottom: 20px; }
.entry-thumb { margin: 0 0 22px; }
.entry-thumb img { display: block; width: 100%; border-radius: 10px; }
.entry-content img { display: block; height: auto; border-radius: 8px; }
.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.2em 0;
}
.entry-content th, .entry-content td {
    border: 1px solid var(--line);
    padding: 9px 12px;
    text-align: left;
}
.entry-content th { background: var(--bg); }

/* ===== Главная ===== */
.section { padding: 46px 0; }
.section:nth-child(even) { background: #fff; }
.section-head { text-align: center; max-width: 740px; margin: 0 auto 34px; }
.section-head p { color: var(--muted); }

/* текст + иллюстрация */
.split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 40px;
    align-items: center;
}
.split.reverse .split-media { order: -1; }
.split-media img { display: block; width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); }
.split-text p { color: var(--ink); }

/* сетка иконок/преимуществ */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 22px;
}
.feature {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px 22px;
    min-width: 0;
}
.feature svg { width: 46px; height: 46px; margin-bottom: 12px; }
.feature h3 { margin-bottom: 6px; }
.feature p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* статистика */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
    gap: 22px;
    text-align: center;
}
.stat {
    background: linear-gradient(160deg, var(--navy), var(--navy-2));
    color: #fff;
    border-radius: var(--radius);
    padding: 30px 18px;
    min-width: 0;
}
.stat-num { display: block; font-size: 2.4rem; font-weight: 800; color: #fff; line-height: 1; }
.stat-label { display: block; margin-top: 10px; color: #d8e3f2; font-size: 0.95rem; }

/* шаги */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 24px;
    counter-reset: step;
}
.step {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px 22px 24px;
    position: relative;
    min-width: 0;
}
.step::before {
    counter-increment: step;
    content: counter(step);
    display: grid;
    place-items: center;
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-weight: 800;
    margin-bottom: 14px;
}
.step h3 { margin-bottom: 6px; }
.step p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* галерея */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: 16px;
}
.gallery figure { margin: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.gallery img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

/* цитата */
.pullquote {
    background: linear-gradient(160deg, var(--navy), var(--navy-2));
    color: #fff;
    border-radius: 16px;
    padding: 46px 40px;
    text-align: center;
}
.pullquote p { font-size: 1.4rem; font-weight: 600; margin: 0 auto; max-width: 820px; color: #fff; }
.pullquote cite { display: block; margin-top: 16px; color: #cdd9ea; font-style: normal; font-size: 0.95rem; }

/* FAQ */
.faq { max-width: 820px; margin: 0 auto; }
.faq details {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 4px 20px;
    margin-bottom: 12px;
}
.faq summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--navy);
    padding: 14px 0;
    list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--accent); font-weight: 800; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0 0 14px; color: var(--muted); }

/* CTA */
.cta {
    background: #fff;
    border: 1px solid var(--line);
    border-left: 5px solid var(--accent);
    border-radius: var(--radius);
    padding: 34px 30px;
    text-align: center;
}
.cta h2 { margin-bottom: 8px; }
.cta p { color: var(--muted); margin-bottom: 18px; }
.btn {
    display: inline-block;
    padding: 12px 26px;
    background: var(--navy);
    color: #fff;
    border-radius: 9px;
    font-weight: 700;
}
.btn:hover { background: var(--navy-2); text-decoration: none; }

.home-latest .cards-grid { margin-top: 8px; }

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

/* ===== Форма поиска ===== */
.search-form { display: flex; gap: 8px; }
.search-form input[type="search"] {
    flex: 1;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 1rem;
}
.search-form button {
    padding: 10px 18px;
    border: 0;
    border-radius: 8px;
    background: var(--accent);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}
.search-form button:hover { background: var(--accent-2); }

/* ===== Комментарии ===== */
.comments-area { margin-top: 36px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list li { border-bottom: 1px solid var(--line); padding: 16px 0; }
.comment-list .children { list-style: none; padding-left: 24px; }
.comment-author { font-weight: 700; color: var(--navy); }
.comment-meta { font-size: 0.8rem; color: var(--muted); margin-bottom: 6px; }
.comment-respond input[type="text"],
.comment-respond input[type="email"],
.comment-respond input[type="url"],
.comment-respond textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    margin-bottom: 12px;
    font-family: inherit;
    font-size: 1rem;
}
.comment-respond .submit {
    padding: 11px 24px;
    border: 0;
    border-radius: 8px;
    background: var(--navy);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

/* ===== 404 ===== */
.error-404 { text-align: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 48px 30px; }
.error-404 .code { font-size: 4rem; font-weight: 800; color: var(--accent); line-height: 1; }
.error-404 .search-form { max-width: 460px; margin: 22px auto 0; }

/* ===== Подвал ===== */
.site-foot {
    background: var(--footer-bg);
    color: var(--footer-ink);
    padding: 46px 0 0;
    margin-top: 40px;
}
.foot-cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 32px;
}
.foot-col { min-width: 0; }
.foot-col, .foot-col p { color: var(--footer-ink); }
.foot-col .widget-title { color: var(--footer-head); border-bottom-color: var(--accent); }
.foot-col a { color: #e3ebf6; }
.foot-col a:hover { color: #fff; }
.foot-col ul { list-style: none; margin: 0; padding: 0; }
.foot-col li { padding: 6px 0; border: 0; }
.foot-col .post-date { color: #9fb1c7; font-size: 0.78rem; display: block; }
.foot-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    margin-top: 40px;
    padding: 20px 0;
    text-align: center;
    font-size: 0.85rem;
    color: #9fb1c7;
}

/* ===== Cookie-баннер ===== */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 999;
    background: #0d1d33;
    color: #e6edf6;
    padding: 16px 0;
    box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.25);
}
.cookie-inner {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    justify-content: space-between;
}
.cookie-inner p { margin: 0; font-size: 0.9rem; flex: 1; min-width: 240px; }
.cookie-inner a { color: #7fd6bb; }
.cookie-accept {
    padding: 10px 22px;
    border: 0;
    border-radius: 8px;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}
.cookie-accept:hover { background: var(--accent-2); }

/* ===== Адаптив ===== */
@media (max-width: 960px) {
    .layout-with-sidebar { grid-template-columns: 1fr; }
    .layout-single .content-area, .content-narrow { width: 100%; }
    .split { grid-template-columns: 1fr; }
    .split.reverse .split-media { order: 0; }
}
@media (max-width: 600px) {
    body { font-size: 16px; }
    h1 { font-size: 1.7rem; }
    h2 { font-size: 1.4rem; }
    .nav-toggle { display: inline-block; margin-top: 8px; }
    .menu { display: none; flex-direction: column; width: 100%; margin-top: 10px; }
    .menu.is-open { display: flex; }
    .entry { padding: 22px; }
    .pullquote { padding: 32px 22px; }
}
