/*
Theme Name: dds_assistrus.ru
Author: Антон Воронов
Description: Информационная тема для образовательного навигатора и карьерного хаба assistrus.ru. Холодная палитра, финтех-стилистика.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: assistrus
*/

/* ============================ Токены ============================ */
:root {
    --bg:          #F4F7FC;
    --bg-alt:      #E8EDF5;
    --header-bg:   #FFFFFF;
    --footer-bg:   #0F1A2C;
    --sidebar-bg:  #E8EDF5;
    --text:        #1A2634;
    --accent:      #00A3B2;
    --accent-dark: #008A99;
    --accent2:     #FFA500;
    --muted:       #6B7A8F;
    --deep-blue:   #1A5276;
    --grid-dot:    #D0D9E8;
    --card-shadow: 0 8px 12px rgba(15, 26, 44, 0.06);
    --card-shadow-hover: 0 12px 16px rgba(15, 26, 44, 0.12);
    --font: 'Inter', 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

/* ============================ База ============================ */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font);
    font-weight: 400;
    font-size: 17px;
    line-height: 1.7;
    color: var(--text);
    background-color: var(--bg);
    background-image: radial-gradient(circle, var(--grid-dot) 1px, transparent 1.4px);
    background-size: 24px 24px;
    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(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }

p { margin: 0 0 1.1em; }

h1, h2, h3, h4 { font-weight: 600; line-height: 1.25; color: var(--text); }
h1 { font-size: 3.5rem; margin: 0 0 .6em; letter-spacing: -0.5px; }
h2 { font-size: 1.9rem; margin: 0 0 1em; }
h3 { font-size: 1.35rem; margin: 1.4em 0 .6em; }

/* Оформление заголовков секций */
.entry-content h2,
.front-section h2,
.section-title,
.widget-area h2,
.page-title {
    position: relative;
    padding-left: 16px;
    border-left: 4px solid var(--accent);
}
.entry-content h2::after,
.front-section h2::after,
.section-title::after,
.page-title::after {
    content: "";
    display: block;
    width: 70%;
    height: 2px;
    margin-top: 8px;
    background: var(--accent);
}
.entry-content h2::before,
.front-section h2::before,
.section-title::before,
.page-title::before,
.entry-content h3::before,
.front-section h3::before {
    content: "•";
    color: var(--accent2);
    font-weight: 800;
    margin-right: .4em;
    line-height: 1;
}

/* ============================ Контейнеры ============================ */
.shell { width: min(92%, 1180px); margin-inline: auto; }
.front-inner { width: min(85%, 1180px); margin-inline: auto; }

.site-main { padding: 40px 0 60px; }

/* Финтех-полоса */
.finance-strip {
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent2));
}

/* ============================ Шапка ============================ */
.site-header {
    background: var(--header-bg);
    box-shadow: 0 1px 0 rgba(15, 26, 44, 0.08), 0 4px 14px rgba(15, 26, 44, 0.04);
}
.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 { display: block; max-height: 54px; width: auto; }
.brand-svg { flex: 0 0 auto; }
.brand-text { min-width: 0; }
.brand-name {
    display: block;
    font-weight: 600;
    font-size: 1.02rem;
    line-height: 1.35;
    color: var(--text);
}
.brand-desc {
    display: block;
    font-size: .8rem;
    color: var(--muted);
    line-height: 1.4;
    margin-top: 2px;
    max-width: 620px;
}

/* Навигация */
.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.main-nav a {
    display: block;
    padding: 8px 14px;
    color: var(--text);
    font-weight: 500;
    border-radius: 4px;
    transition: background .18s, color .18s;
}
.main-nav a:hover,
.main-nav .current-menu-item > a {
    background: var(--bg-alt);
    color: var(--accent-dark);
}
.nav-toggle {
    display: none;
    background: none;
    border: 2px solid var(--accent);
    color: var(--accent);
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 1rem;
    cursor: pointer;
}

/* ============================ Хлебные крошки ============================ */
.breadcrumbs {
    font-size: .85rem;
    color: var(--muted);
    padding: 16px 0 0;
}
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs .sep { margin: 0 6px; color: var(--accent); }
.breadcrumbs span { color: var(--text); }

/* ============================ Раскладки ============================ */
.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 2.5fr) minmax(0, 1fr);
    gap: 44px;
    align-items: start;
}
.layout-single { width: min(85%, 1000px); margin-inline: auto; }
.content-area { min-width: 0; }

/* ============================ Сайдбар ============================ */
.sidebar {
    background: var(--sidebar-bg);
    border-radius: 8px;
    padding: 22px 22px 8px;
    min-width: 0;
}
.sidebar .widget { margin-bottom: 26px; }
.sidebar .widget-title {
    font-size: 1.1rem;
    margin: 0 0 .8em;
    color: var(--text);
    padding-left: 12px;
    border-left: 4px solid var(--accent);
}
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { margin-bottom: .55em; line-height: 1.4; }
.sidebar a { color: var(--text); }
.sidebar a:hover { color: var(--accent-dark); }

/* ============================ Карточки записей ============================ */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: 28px;
}
.card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    border-top: 2px solid transparent;
    transition: box-shadow .2s, transform .2s, border-color .2s;
}
.card:hover {
    box-shadow: var(--card-shadow-hover);
    border-top-color: var(--accent);
}
.card-thumb { display: block; }
.card-thumb img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}
.card-thumb-placeholder {
    display: block;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, var(--accent), var(--deep-blue));
    position: relative;
}
.card-thumb-placeholder::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255,255,255,.14) 1px, transparent 1.4px);
    background-size: 18px 18px;
}
.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 18px 20px 20px;
    min-width: 0;
}
.card-title { font-size: 1.2rem; margin: 0 0 .4em; line-height: 1.3; }
.card-title a { color: var(--text); }
.card-title a:hover { color: var(--accent-dark); }
.card-meta { font-size: .8rem; color: var(--muted); margin-bottom: .6em; }
.card-excerpt { color: #38485a; font-size: .95rem; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-more { margin-top: auto; padding-top: 12px; }

/* ============================ Кнопки ============================ */
.btn {
    display: inline-block;
    padding: 12px 26px;
    font-weight: 600;
    font-size: .98rem;
    color: #fff;
    background: var(--accent);
    border: 2px solid var(--accent);
    cursor: pointer;
    clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
    transition: background .18s, transform .18s, border-color .18s, color .18s;
}
.btn:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    color: #fff;
    transform: translateY(-2px);
}
.btn-outline {
    color: var(--accent-dark);
    background: #fff;
    border: 2px solid var(--accent);
}
.btn-outline:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* Текстовые ссылки в статье */
.entry-content a {
    color: var(--accent-dark);
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 3px;
}
.entry-content a:hover {
    text-decoration-style: solid;
    color: var(--accent);
}

/* ============================ Контент записи/страницы ============================ */
.entry-header { margin-bottom: 18px; }
.entry-title { font-size: 2.4rem; margin: .2em 0 .3em; }
.entry-meta { color: var(--muted); font-size: .85rem; }
.entry-content { font-size: 1.02rem; }
.entry-content img { border-radius: 6px; }
.entry-thumb { margin: 0 0 24px; }
.entry-thumb img { width: 100%; border-radius: 8px; display: block; }

/* Таблицы */
.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.4em 0;
}
.entry-content table, .entry-content th, .entry-content td {
    border: 1px solid #c4d0e0;
}
.entry-content th, .entry-content td { padding: 10px 14px; text-align: left; }
.entry-content th { background: var(--bg-alt); }

blockquote {
    margin: 1.4em 0;
    padding: 18px 22px;
    background: var(--bg-alt);
    border-left: 4px solid var(--accent);
    border-radius: 4px;
    color: #2a3a4c;
}
blockquote p:last-child { margin-bottom: 0; }

/* ============================ Пагинация ============================ */
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 40px 0 0;
}
.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    background: #fff;
    color: var(--text);
    border: 1px solid #c9d5e5;
    border-radius: 4px;
    font-weight: 600;
    transition: background .16s, color .16s, border-color .16s;
}
.pagination a.page-numbers:hover {
    background: var(--bg-alt);
    border-color: var(--accent);
    color: var(--accent-dark);
}
.pagination .page-numbers.current {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.pagination .page-numbers.dots {
    border: none;
    background: none;
    min-width: auto;
}

/* ============================ Комментарии ============================ */
.comments-area { margin-top: 48px; }
.comments-title, .comment-reply-title { font-size: 1.5rem; }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list li { margin: 0 0 20px; }
.comment-body {
    background: #fff;
    border-radius: 6px;
    padding: 16px 20px;
    box-shadow: var(--card-shadow);
}
.comment-list .children { list-style: none; margin: 16px 0 0 26px; padding: 0; }
.comment-author { font-weight: 600; }
.comment-metadata { font-size: .8rem; 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 12px;
    border: 1px solid #c4d0e0;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    background: #fff;
}
.comment-form label { display: block; margin-bottom: 4px; font-weight: 500; }
.comment-form p { margin-bottom: 14px; }

/* ============================ Форма поиска ============================ */
.search-form { display: flex; gap: 8px; }
.search-form .search-field {
    flex: 1;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid #c4d0e0;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
}
.search-form .search-submit {
    padding: 10px 20px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
}
.search-form .search-submit:hover { background: var(--accent-dark); }

/* ============================ Подвал ============================ */
.site-footer {
    background: var(--footer-bg);
    color: #c7d2e0;
    margin-top: 60px;
    padding: 54px 0 0;
}
.footer-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 40px;
}
.site-footer .widget-title {
    color: #fff;
    font-size: 1.1rem;
    margin: 0 0 1em;
    padding-left: 12px;
    border-left: 4px solid var(--accent);
}
.site-footer .widget { color: #b3c1d3; font-size: .93rem; }
.site-footer a { color: #d8e2ef; }
.site-footer a:hover { color: var(--accent2); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .6em; }
.footer-bottom {
    margin-top: 46px;
    padding: 22px 0;
    border-top: 1px solid rgba(255,255,255,.1);
    font-size: .82rem;
    color: #8fa0b6;
    text-align: center;
}

/* ============================ Cookie-баннер ============================ */
.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: #0F1A2C;
    color: #dbe4f0;
    padding: 16px 22px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,.3);
    border-top: 2px solid var(--accent);
}
.cookie-banner p { margin: 0; font-size: .9rem; min-width: 0; flex: 1; }
.cookie-banner a { color: var(--accent2); }
.cookie-accept {
    padding: 10px 24px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
.cookie-accept:hover { background: var(--accent-dark); }

/* ============================ Главная ============================ */
.front-section { padding: 80px 0; }
.front-section.alt { background: var(--bg-alt); }

/* Hero */
.hero {
    position: relative;
    background: linear-gradient(120deg, rgba(15,26,44,.86), rgba(26,82,118,.72)), url("images/hero.svg");
    background-size: cover;
    background-position: center;
    color: #fff;
    padding: 96px 0;
    overflow: hidden;
}
.hero-inner {
    width: min(85%, 1180px);
    margin-inline: auto;
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: 46px;
    align-items: center;
    position: relative;
    z-index: 2;
}
.hero h1 { color: #fff; font-size: 3.5rem; margin: 0 0 .3em; }
.hero-lead { font-size: 1.15rem; color: #d7e4f0; max-width: 560px; }
.hero-actions { margin-top: 26px; display: flex; gap: 14px; flex-wrap: wrap; }
.hero .btn-outline { background: transparent; color: #fff; border-color: #fff; }
.hero .btn-outline:hover { background: #fff; color: var(--deep-blue); }
.hero-plaque {
    justify-self: end;
    background: rgba(255,255,255,.08);
    backdrop-filter: blur(2px);
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 10px;
    padding: 28px 30px;
    text-align: left;
    min-width: 0;
}
.hero-plaque .label { font-size: .82rem; text-transform: uppercase; letter-spacing: .5px; color: #a9c2d6; }
.hero-plaque .value { font-size: 3rem; font-weight: 700; color: var(--accent2); line-height: 1.05; margin: 6px 0; }
.hero-plaque .note { font-size: .88rem; color: #cdd9e6; }
.hero-hex {
    position: absolute;
    right: -60px;
    bottom: -80px;
    width: 380px;
    opacity: .05;
    z-index: 1;
    pointer-events: none;
}

.front-lead { max-width: 720px; color: #3a4a5c; margin-bottom: 40px; }

/* Таймлайн «Путь к офферу» */
.timeline { position: relative; max-width: 860px; margin: 40px auto 0; }
.timeline::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--accent);
    transform: translateX(-50%);
}
.tl-step {
    position: relative;
    width: 50%;
    padding: 0 44px 42px;
    min-width: 0;
}
.tl-step:nth-child(odd) { left: 0; text-align: right; }
.tl-step:nth-child(even) { left: 50%; text-align: left; }
.tl-dot {
    position: absolute;
    top: 2px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--accent2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    box-shadow: var(--card-shadow);
}
.tl-step:nth-child(odd) .tl-dot { right: -23px; }
.tl-step:nth-child(even) .tl-dot { left: -23px; }
.tl-dot svg { width: 22px; height: 22px; }
.tl-step h3 { margin: 0 0 .3em; font-size: 1.2rem; }
.tl-step h3::before { content: none; }
.tl-step p { color: #46566a; font-size: .95rem; margin: 0; }

/* Статистика */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 30px;
    margin-top: 20px;
}
.stat { text-align: center; min-width: 0; }
.stat .num { font-size: 2.8rem; font-weight: 700; color: var(--accent); line-height: 1.05; }
.stat .cap { color: var(--muted); font-size: .92rem; margin-top: 6px; }

/* Рубрикатор */
.rubricator {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    margin-top: 20px;
}
.rubric {
    display: block;
    position: relative;
    padding: 30px 26px;
    border-radius: 8px;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--deep-blue));
    overflow: hidden;
    transition: transform .2s, background .25s;
    min-width: 0;
}
.rubric::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255,255,255,.12) 1px, transparent 1.4px);
    background-size: 18px 18px;
    opacity: .5;
}
.rubric:hover {
    transform: translateY(-4px);
    background: linear-gradient(135deg, var(--accent2), #e08e00);
    color: #fff;
}
.rubric .r-icon { position: relative; z-index: 2; }
.rubric .r-icon svg { width: 34px; height: 34px; stroke: #fff; }
.rubric .r-name { position: relative; z-index: 2; font-size: 1.2rem; font-weight: 600; margin: 14px 0 4px; }
.rubric .r-sub { position: relative; z-index: 2; font-size: .85rem; color: rgba(255,255,255,.85); }

/* CTA-плашка (используется в подвале главной при необходимости) */
.fs-cta {
    background: linear-gradient(135deg, var(--accent), var(--deep-blue));
    color: #fff;
    padding: 44px 40px;
    border-radius: 10px;
    text-align: center;
}
.fs-cta h2 { color: #fff; border: none; padding: 0; }
.fs-cta h2::before, .fs-cta h2::after { content: none; }

.section-head { text-align: center; margin-bottom: 34px; }
.section-head h2 {
    display: inline-block;
    border-left: none;
    padding-left: 0;
}
.section-head h2::after { margin-left: auto; margin-right: auto; }

/* Последние записи на главной */
.latest-posts { padding: 80px 0; }

/* 404 */
.error-404 { text-align: center; padding: 40px 0 60px; }
.error-404 .big { font-size: 6rem; font-weight: 700; color: var(--accent); line-height: 1; }
.error-404 .search-form { max-width: 480px; margin: 26px auto 0; }

/* ============================ Адаптив ============================ */
@media (max-width: 960px) {
    h1, .hero h1 { font-size: 2.6rem; }
    .layout-with-sidebar { grid-template-columns: 1fr; gap: 40px; }
    .hero-inner { grid-template-columns: 1fr; }
    .hero-plaque { justify-self: stretch; }
    .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .rubricator { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .layout-single, .front-inner, .hero-inner { width: min(92%, 1180px); }
}

@media (max-width: 600px) {
    body { font-size: 16px; }
    h1, .hero h1 { font-size: 2.1rem; }
    h2 { font-size: 1.55rem; }
    .front-section, .hero, .latest-posts { padding: 52px 0; }
    .main-nav {
        display: none;
        width: 100%;
        margin-top: 10px;
    }
    .main-nav.open { display: block; }
    .main-nav ul { flex-direction: column; gap: 2px; }
    .nav-toggle { display: inline-block; }
    .header-inner { flex-wrap: wrap; }
    .footer-cols { grid-template-columns: 1fr; gap: 30px; }
    .rubricator, .stats-row { grid-template-columns: 1fr; }
    .fs-cta { padding: 30px 22px; }

    /* Таймлайн в одну колонку */
    .timeline::before { left: 20px; }
    .tl-step {
        width: 100%;
        left: 0 !important;
        text-align: left !important;
        padding: 0 0 34px 58px;
    }
    .tl-step .tl-dot { left: -2px !important; right: auto !important; }
}
