/*
Theme Name: dds_numschool.ru
Author: Анна Белова
Description: Аналитическая тема для информационного ресурса-навигатора по новым профессиям. Профориентация на основе данных, а не мистики.
Version: 1.1
Text Domain: numschool
*/

/* ---------- Переменные ---------- */
:root {
    --navy: #10203f;
    --navy-2: #1a3a6b;
    --accent: #00bfa6;
    --accent-2: #2563eb;
    --gold: #f5b700;
    --bg: #f5f7fb;
    --surface: #ffffff;
    --ink: #16223a;
    --muted: #5a6b85;
    --line: #e2e8f2;
    --maxw: 1180px;
    --radius: 14px;
    --shadow: 0 8px 30px rgba(16, 32, 63, 0.08);
}

/* ---------- База ---------- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 17px;
    line-height: 1.7;
    color: var(--ink);
    background: var(--bg);
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: Georgia, "Times New Roman", serif;
    line-height: 1.25;
    color: var(--navy);
    margin: 0 0 0.5em;
}

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

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

p { margin: 0 0 1em; }

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

.btn {
    display: inline-block;
    background: var(--accent);
    color: #042a26;
    font-weight: 600;
    padding: 0.7em 1.4em;
    border-radius: 10px;
    transition: background 0.2s, transform 0.2s;
}
.btn:hover { background: #00d8bd; text-decoration: none; transform: translateY(-1px); }

/* ---------- Шапка ---------- */
.site-header {
    background: var(--surface);
    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-logo, .brand-figure { flex: 0 0 auto; display: block; }
.brand-figure svg { display: block; }
.brand-text { min-width: 0; }
.brand-name {
    font-family: Georgia, serif;
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--navy);
    display: block;
    line-height: 1.2;
}
.brand-name a { color: inherit; }
.brand-desc {
    font-size: 0.8rem;
    color: var(--muted);
    display: block;
    max-width: 520px;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 22px;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}
.main-nav a {
    color: var(--navy);
    font-weight: 600;
    padding: 6px 0;
}
.nav-toggle {
    display: none;
    background: var(--navy);
    color: #fff;
    border: 0;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 1rem;
    cursor: pointer;
}

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

@media (max-width: 960px) {
    .layout-with-sidebar { grid-template-columns: 1fr; gap: 32px; }
    .layout-single .content-area { width: 100%; }
}

/* ---------- Хлебные крошки ---------- */
.crumbs {
    font-size: 0.88rem;
    color: var(--muted);
    padding: 16px 0 0;
}
.crumbs a { color: var(--accent-2); }
.crumbs .sep { color: var(--line); margin: 0 4px; }

/* ---------- Карточки записей ---------- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 28px;
}
.card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 14px 40px rgba(16, 32, 63, 0.13); }
.card-thumb {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}
.card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 22px;
}
.card-title { font-size: 1.2rem; margin-bottom: 0.4em; }
.card-title a { color: var(--navy); }
.card-meta {
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 0.8em;
}
.card-excerpt { color: var(--ink); }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-more {
    margin-top: auto;
    padding-top: 12px;
    font-weight: 600;
    color: var(--accent-2);
}

/* ---------- Одиночная запись / страница ---------- */
.entry {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 36px;
    box-shadow: var(--shadow);
}
.entry-title { font-size: 2rem; }
.entry-meta { font-size: 0.85rem; color: var(--muted); margin-bottom: 1.4em; }
.entry-content { min-width: 0; }
.entry-content img { border-radius: 10px; }
.entry-content h2, .entry-content h3 { margin-top: 1.4em; }
.entry-thumb { margin-bottom: 1.4em; border-radius: 10px; overflow: hidden; }
.entry-thumb img { display: block; width: 100%; height: auto; }

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

/* ---------- Сайдбар / виджеты ---------- */
.sidebar { min-width: 0; }
.widget {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px;
    margin-bottom: 28px;
    color: var(--ink);
}
.widget-title {
    font-size: 1.1rem;
    margin-bottom: 0.7em;
    color: var(--navy);
    border-bottom: 2px solid var(--accent);
    padding-bottom: 0.3em;
}
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { padding: 7px 0; border-bottom: 1px dashed var(--line); }
.widget li:last-child { border-bottom: 0; }
.widget a { color: var(--accent-2); }
.widget .post-date { color: var(--muted); font-size: 0.8rem; }

/* ---------- Главная ---------- */
.section { padding: 56px 0; }
.section:nth-child(even) { background: var(--surface); }
.section-title { font-size: 1.9rem; margin-bottom: 0.3em; }
.section-lead { color: var(--muted); max-width: 720px; margin-bottom: 1.8em; }

/* hero / текст + иллюстрация */
.split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 48px;
    align-items: center;
}
.split.reverse .split-media { order: -1; }
.split-media img { width: 100%; height: auto; border-radius: var(--radius); display: block; }
.split-body { min-width: 0; }

@media (max-width: 760px) {
    .split { grid-template-columns: 1fr; gap: 28px; }
    .split.reverse .split-media { order: 0; }
}

/* сетка иконок-направлений */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 28px;
}
.feature {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 28px;
    min-width: 0;
}
.section:nth-child(even) .feature { background: #f3f6fc; }
.feature-icon {
    width: 52px;
    height: 52px;
    margin-bottom: 14px;
    display: block;
}
.feature h3 { font-size: 1.2rem; }
.feature p { color: var(--muted); margin: 0; }

/* пошаговый блок */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 28px;
    counter-reset: step;
}
.step {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 28px 24px 24px;
    min-width: 0;
}
.step::before {
    counter-increment: step;
    content: counter(step);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--navy);
    color: #fff;
    font-family: Georgia, serif;
    font-weight: bold;
    margin-bottom: 14px;
}
.step h3 { font-size: 1.1rem; }
.step p { color: var(--muted); margin: 0; }

/* статистика / факты */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 28px;
    text-align: center;
}
.stat {
    background: var(--navy);
    color: #eaf1ff;
    border-radius: var(--radius);
    padding: 32px 22px;
    min-width: 0;
}
.stat-num {
    font-family: Georgia, serif;
    font-size: 2.4rem;
    font-weight: bold;
    color: var(--accent);
    display: block;
    line-height: 1.1;
}
.stat-label { font-size: 0.92rem; color: #c2d2ee; }

/* список последних записей на главной */
.home-posts { padding: 56px 0; }

/* ---------- Пагинация ---------- */
.pager {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: 40px 0 0;
}
.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(--surface);
    color: var(--navy);
    font-weight: 600;
}
.pager a.page-numbers:hover { background: #eef3fb; text-decoration: none; }
.pager .page-numbers.current {
    background: var(--navy);
    color: #fff;
    border-color: var(--navy);
}
.pager .page-numbers.dots { border: 0; background: none; }

/* ---------- Комментарии ---------- */
.comments-area { margin-top: 40px; }
.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(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 18px;
}
.comment-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.comment-author { font-weight: 700; color: var(--navy); }
.comment-date { font-size: 0.8rem; color: var(--muted); }
.comment-await { color: var(--gold); font-size: 0.85rem; }

.comment-respond {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px;
    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: inherit;
    margin-top: 4px;
}
.comment-form p { margin-bottom: 14px; }
.comment-form .submit {
    background: var(--accent);
    color: #042a26;
    border: 0;
    padding: 0.7em 1.6em;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
}

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

/* ---------- 404 ---------- */
.notfound {
    text-align: center;
    padding: 60px 0;
}
.notfound h1 { font-size: 4rem; color: var(--accent); }
.notfound .search-form { max-width: 480px; margin: 24px auto; }

/* ---------- Подвал ---------- */
.site-footer {
    background: var(--navy);
    color: #c2d2ee;
    margin-top: 60px;
    padding: 56px 0 24px;
}
.footer-cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 36px;
}
.site-footer .widget {
    background: transparent;
    border: 0;
    padding: 0;
    margin: 0;
    color: #c2d2ee;
}
.site-footer .widget-title { color: #fff; border-bottom-color: var(--accent); }
.site-footer .widget a { color: #8fe7db; }
.site-footer .widget li { border-bottom-color: rgba(255, 255, 255, 0.12); }
.site-footer .widget .post-date { color: #9fb6dd; }
.site-copyright {
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    margin-top: 36px;
    padding-top: 20px;
    font-size: 0.85rem;
    color: #9fb6dd;
}

/* ---------- Cookie-баннер ---------- */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 999;
    background: rgba(16, 32, 63, 0.97);
    color: #eaf1ff;
    padding: 18px 0;
}
.cookie-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}
.cookie-inner p { margin: 0; font-size: 0.92rem; min-width: 0; }
.cookie-inner a { color: var(--accent); }
.cookie-accept {
    background: var(--accent);
    color: #042a26;
    border: 0;
    padding: 0.6em 1.4em;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    flex: 0 0 auto;
}

/* ---------- Адаптив ---------- */
@media (max-width: 760px) {
    .nav-toggle { display: inline-block; }
    .main-nav { width: 100%; display: none; }
    .main-nav.open { display: block; }
    .main-nav ul { flex-direction: column; gap: 0; }
    .main-nav li { border-bottom: 1px solid var(--line); }
    .header-inner { gap: 14px; }
}
