/*
Theme Name: dds_manright.ru
Author: Артём Савельев
Description: Тема информационно-справочного портала о среднем профессиональном образовании. Дизайн-концепция «Цифровой навигатор»: строгая сетка, холодная палитра, асимметричные акценты.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: dnav
*/

:root {
    --bg: #F2F5F9;
    --bg-alt: #E6EFF5;
    --deep: #0B1A2F;
    --ink: #1E2A3A;
    --accent: #E34A6F;
    --accent-dark: #C43C5E;
    --teal: #2EC4B6;
    --muted: #7B8A9B;
    --line: #D0D9E5;
    --white: #FFFFFF;
    --sans: "Inter", "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
    --serif: Georgia, "Times New Roman", serif;
}

/* ---------- база ---------- */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    overflow-x: hidden;
    color: var(--ink);
    font-family: var(--serif);
    font-size: 17px;
    line-height: 1.72;
    background-color: var(--bg);
    background-image:
        repeating-linear-gradient(45deg, rgba(150, 168, 190, .20) 0 1px, transparent 1px 26px),
        repeating-linear-gradient(-45deg, rgba(150, 168, 190, .20) 0 1px, transparent 1px 26px);
}

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

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

.entry-content a,
.widget a,
.comment-text a {
    background-image: linear-gradient(var(--accent), var(--accent));
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 0 1px;
    transition: background-size .25s ease;
}

.entry-content a:hover,
.widget a:hover,
.comment-text a:hover { background-size: 100% 1px; }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--sans);
    color: var(--ink);
    line-height: 1.22;
    margin: 2rem 0 1rem;
    font-weight: 700;
}

h1 { font-size: 3.8rem; letter-spacing: .02em; margin-top: 0; }
h2 { font-size: 2rem; }
h3 { font-size: 1.45rem; }
h4 { font-size: 1.2rem; }

p { margin: 0 0 1.15em; }

ul, ol { padding-left: 1.3rem; }

blockquote {
    margin: 2rem 0;
    padding: 1.4rem 1.8rem;
    background: var(--bg-alt);
    border-left: 4px solid var(--teal);
    font-style: italic;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.6rem 0;
    background: var(--white);
    font-size: .95rem;
}

table, th, td { border: 1px solid var(--line); }

th, td { padding: .65rem .8rem; text-align: left; }

th { background: var(--bg-alt); font-family: var(--sans); }

code, pre { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: .9em; }

pre { background: var(--deep); color: #E6EFF5; padding: 1rem; overflow-x: auto; }

/* ---------- сетка ---------- */

.shell { width: min(92%, 1180px); margin-inline: auto; }
.shell-wide { width: min(85%, 1180px); }

.site-main { padding: 2.6rem 0 4rem; }

.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67%) minmax(0, 27%);
    justify-content: space-between;
    gap: 2.5rem 6%;
}

.layout-single {
    display: block;
    width: 85%;
    margin-left: auto;
    margin-right: auto;
}

.content-area { min-width: 0; }

/* ---------- кнопки ---------- */

.btn {
    display: inline-block;
    font-family: var(--sans);
    font-size: .92rem;
    font-weight: 600;
    letter-spacing: .02em;
    padding: .72rem 1.5rem;
    border: 2px solid transparent;
    border-radius: 0 0 4px 4px;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease;
}

.btn-primary {
    background: var(--accent);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(227, 74, 111, .22);
}

.btn-primary:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(227, 74, 111, .34);
}

.btn-ghost {
    background: transparent;
    color: var(--ink);
    border-color: var(--teal);
}

.btn-ghost:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(46, 196, 182, .26);
    color: var(--ink);
}

/* ---------- приёмы оформления ---------- */

.corner { position: relative; }

.corner::before {
    content: "";
    position: absolute;
    top: 9px;
    left: 9px;
    width: 14px;
    height: 14px;
    border-top: 2px solid var(--accent);
    border-left: 2px solid var(--accent);
    pointer-events: none;
    z-index: 2;
}

.sticker {
    display: inline-block;
    background: var(--accent);
    color: var(--white);
    font-family: var(--sans);
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .06em;
    line-height: 1.5;
    padding: .16rem .85rem .16rem .55rem;
    clip-path: polygon(0 0, 100% 0, calc(100% - 9px) 100%, 0 100%);
}

.rubric {
    font-family: var(--sans);
    font-size: .74rem;
    font-weight: 600;
    letter-spacing: .14em;
    color: var(--muted);
}

.rubric::after {
    content: " •";
    color: var(--accent);
}

.section-title {
    position: relative;
    font-family: var(--sans);
    font-size: 2rem;
    padding-top: 1.15rem;
    margin: 0 0 1.7rem;
    text-align: left;
}

.section-title::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 46%;
    max-width: 320px;
    height: 1px;
    background: var(--line);
}

.section-title::after {
    content: "";
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--accent);
    margin-left: .7rem;
    vertical-align: .3em;
}

.section-sep {
    border: 0;
    border-top: 1px solid var(--line);
    margin: 0;
}

/* ---------- шапка ---------- */

.site-header {
    background: var(--deep);
    color: #DCE6F0;
    border-bottom: 3px solid var(--accent);
}

.header-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    padding: 1.4rem 0;
}

.brand {
    display: flex;
    align-items: flex-start;
    gap: .9rem;
    min-width: 0;
    flex: 1 1 340px;
}

.brand-logo { width: 54px; height: 54px; flex: 0 0 auto; }

.brand-text { min-width: 0; }

.brand-name {
    display: block;
    font-family: var(--sans);
    font-size: .98rem;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: .01em;
    color: var(--white);
}

.brand-name:hover { color: var(--teal); }

.brand-desc {
    margin: .35rem 0 0;
    font-size: .8rem;
    line-height: 1.5;
    color: #90A2B6;
}

.nav-toggle {
    display: none;
    background: transparent;
    border: 2px solid var(--teal);
    color: #DCE6F0;
    font-family: var(--sans);
    font-size: .85rem;
    padding: .5rem .9rem;
    border-radius: 0 0 4px 4px;
    cursor: pointer;
}

.site-nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 1.6rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-nav a {
    font-family: var(--sans);
    font-size: .92rem;
    font-weight: 600;
    letter-spacing: .03em;
    color: #DCE6F0;
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
    transition: color .2s ease, border-color .2s ease;
}

.site-nav a:hover,
.site-nav .current-menu-item > a {
    color: var(--white);
    border-bottom-color: var(--accent);
}

/* ---------- крошки ---------- */

.breadcrumbs {
    font-family: var(--sans);
    font-size: .82rem;
    color: var(--muted);
    padding: 1.3rem 0 0;
}

.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs .sep { color: var(--teal); margin: 0 .25rem; }

/* ---------- карточки записей ---------- */

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
    gap: 1.8rem;
}

.card {
    display: flex;
    flex-direction: column;
    position: relative;
    min-width: 0;
    background: var(--white);
    border: 0;
    border-left: 4px solid var(--teal);
    border-radius: 12px 12px 0 0;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(11, 26, 47, .08);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 32px rgba(11, 26, 47, .14);
    border-left-color: var(--accent);
}

.card-thumb { display: block; }

.card-thumb a { display: block; }

.card-thumb img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 88%);
}

.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.15rem 1.35rem 1.5rem;
    min-width: 0;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .7rem;
    margin-bottom: .6rem;
}

.card-title {
    font-size: 1.24rem;
    margin: 0 0 .6rem;
}

.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--accent); }

.card-excerpt { font-size: .95rem; color: #3A4756; }

.card-excerpt p { margin: 0 0 .5em; background: none; }

.card-more { align-self: flex-start; margin-top: auto; }

/* ---------- главная ---------- */

.fs { padding: 4.2rem 0; }
.fs-alt { background: var(--bg-alt); }

.hero {
    position: relative;
    background: var(--deep);
    color: #E4ECF5;
    overflow: hidden;
    padding: 4.6rem 0 3.4rem;
}

.hero-map {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: .22;
    pointer-events: none;
}

.hero-compass {
    position: absolute;
    right: -60px;
    bottom: -70px;
    width: 340px;
    height: 340px;
    opacity: .05;
    pointer-events: none;
}

.hero-inner { position: relative; z-index: 1; }

.hero h1 {
    color: var(--white);
    font-size: 3.8rem;
    max-width: 16ch;
    margin-bottom: 1.2rem;
}

.hero-sub {
    font-size: 1.1rem;
    max-width: 56ch;
    color: #C6D5E4;
    margin-bottom: 2rem;
}

.hero-mail {
    margin: 3.2rem 0 0;
    font-family: var(--sans);
    font-size: .76rem;
    letter-spacing: .08em;
    color: #7F92A8;
}

.hero-mail a { color: #9FB2C6; }
.hero-mail a:hover { color: var(--teal); }

/* статистика */

.fs-stats {
    background: linear-gradient(135deg, var(--bg-alt) 0%, var(--bg) 100%);
    background-image:
        repeating-linear-gradient(135deg, rgba(46, 196, 182, .07) 0 1px, transparent 1px 14px),
        linear-gradient(135deg, #E6EFF5 0%, #F2F5F9 100%);
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 42px), calc(100% - 42px) 100%, 0 100%);
    padding: 4rem 0;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2rem;
}

.stat { min-width: 0; }

.stat-num {
    font-family: var(--sans);
    font-size: 4rem;
    font-weight: 700;
    line-height: 1;
    color: var(--ink);
    letter-spacing: -.02em;
}

.stat-line {
    width: 48px;
    height: 3px;
    background: var(--teal);
    margin: .9rem 0 .8rem;
}

.stat-label {
    font-family: var(--sans);
    font-size: .88rem;
    color: var(--muted);
    line-height: 1.45;
}

/* последние записи */

.fs-latest { padding: 4.2rem 0; }

.latest-more { margin-top: 2.4rem; }

/* шаги */

.fs-steps { position: relative; overflow: hidden; }

.steps-track {
    position: relative;
    margin-top: 2.6rem;
    padding-left: 6%;
    padding-right: 6%;
}

.step {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 1.4rem;
    max-width: 560px;
    padding: 1.6rem 1.8rem;
    background: var(--white);
    box-shadow: 0 8px 20px rgba(11, 26, 47, .08);
    border-radius: 12px 12px 0 0;
    margin-bottom: 2.4rem;
}

.step-2 { margin-left: auto; transform: translateX(0); }

.step-num {
    flex: 0 0 auto;
    width: 62px;
    height: 62px;
    border: 2px solid var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--sans);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}

.step-body { min-width: 0; }

.step-body h3 { margin: .2rem 0 .5rem; font-size: 1.18rem; }

.step-body p { margin: 0; font-size: .96rem; color: #3A4756; }

.step-link {
    position: relative;
    display: block;
    height: 46px;
    margin-bottom: 2.4rem;
    border-left: 2px dashed var(--teal);
    width: 0;
    margin-left: 22%;
}

.step-link-right { margin-left: 78%; }

/* рубрикатор */

.topics-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.4rem;
    margin-top: 2.4rem;
}

.topic {
    position: relative;
    display: block;
    min-width: 0;
    padding: 1.7rem 1.6rem;
    background: var(--white);
    color: var(--ink);
    font-family: var(--sans);
    font-weight: 600;
    font-size: 1.12rem;
    border-left: 4px solid transparent;
    box-shadow: 0 8px 20px rgba(11, 26, 47, .06);
    transition: border-color .22s ease, transform .22s ease, box-shadow .22s ease;
}

.topic:nth-child(even) { background: #EDF2F7; }

.topic span {
    display: block;
    margin-top: .45rem;
    font-family: var(--serif);
    font-size: .9rem;
    font-weight: 400;
    color: var(--muted);
}

.topic:hover {
    border-left-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 16px 30px rgba(11, 26, 47, .12);
}

/* ---------- записи и страницы ---------- */

.page-head { margin-bottom: 1.8rem; }

.entry-title { font-size: 2.5rem; margin: .8rem 0 .9rem; }

.entry-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .8rem;
    margin-bottom: 1.4rem;
}

.entry-thumb {
    margin: 0 0 1.8rem;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
}

.entry-thumb img {
    width: 100%;
    display: block;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 94%);
}

.entry-content { background: none; }

.entry-content img { margin: 1.2rem 0; }

.entry-content h2 { font-size: 1.7rem; }

.tags-line {
    margin: 2rem 0 0;
    font-family: var(--sans);
    font-size: .85rem;
}

.tags-line a {
    display: inline-block;
    margin: 0 .4rem .4rem 0;
    padding: .2rem .7rem;
    border: 1px solid var(--teal);
    color: var(--ink);
}

.tags-line a:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- сайдбар и виджеты ---------- */

.sidebar { min-width: 0; }

.sidebar .widget {
    position: relative;
    background: var(--white);
    color: var(--ink);
    padding: 1.5rem 1.4rem;
    margin-bottom: 1.6rem;
    box-shadow: 0 8px 20px rgba(11, 26, 47, .08);
    border-radius: 12px 12px 0 0;
}

.sidebar .widget-title {
    font-size: 1.1rem;
    margin: 0 0 1rem;
    color: var(--ink);
}

.sidebar .widget ul { list-style: none; margin: 0; padding: 0; }

.sidebar .widget li {
    padding: .55rem 0;
    border-bottom: 1px solid var(--line);
    font-size: .95rem;
}

.sidebar .widget li:last-child { border-bottom: 0; }

.sidebar .widget a { color: var(--ink); }
.sidebar .widget a:hover { color: var(--accent); }
.sidebar .widget .post-date { display: block; color: var(--muted); font-size: .8rem; }

.search-form { display: flex; gap: .5rem; }

.search-form input[type="search"] {
    flex: 1;
    min-width: 0;
    padding: .6rem .8rem;
    border: 1px solid var(--line);
    background: var(--white);
    font-family: var(--serif);
    font-size: .95rem;
    color: var(--ink);
}

.search-form input[type="search"]:focus { outline: 2px solid var(--teal); }

/* ---------- пагинация ---------- */

.pager {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin: 2.8rem 0 0;
}

.pager .page-numbers {
    display: inline-block;
    padding: .5rem .95rem;
    border: 1px solid var(--line);
    border-radius: 0 0 4px 4px;
    background: var(--white);
    color: var(--ink);
    font-family: var(--sans);
    font-size: .9rem;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

.pager .page-numbers:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.pager .page-numbers.current {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--white);
}

.pager .page-numbers.dots {
    border: 0;
    background: transparent;
    color: var(--muted);
}

/* ---------- комментарии ---------- */

.comments-area { margin-top: 3rem; }

.comments-title { font-size: 1.5rem; }

.comment-list { list-style: none; margin: 0; padding: 0; }

.comment-list ul.children { list-style: none; padding-left: 1.6rem; }

.comment-item {
    position: relative;
    background: var(--white);
    padding: 1.2rem 1.4rem;
    margin-bottom: 1rem;
    box-shadow: 0 8px 20px rgba(11, 26, 47, .06);
    border-radius: 12px 12px 0 0;
}

.comment-head {
    display: flex;
    gap: .8rem;
    align-items: baseline;
    font-family: var(--sans);
    margin-bottom: .5rem;
}

.comment-author { font-weight: 700; }
.comment-date { font-size: .8rem; color: var(--muted); }
.comment-text p:last-child { margin-bottom: 0; }
.comment-reply { font-family: var(--sans); font-size: .85rem; margin-top: .5rem; }

.comment-respond { margin-top: 2rem; }

.comment-form label {
    display: block;
    font-family: var(--sans);
    font-size: .85rem;
    margin-bottom: .3rem;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: .65rem .8rem;
    border: 1px solid var(--line);
    background: var(--white);
    font-family: var(--serif);
    font-size: .95rem;
    color: var(--ink);
    margin-bottom: 1rem;
}

.comment-form textarea { min-height: 140px; }

.comment-form .submit {
    background: var(--accent);
    color: var(--white);
    border: 0;
    border-radius: 0 0 4px 4px;
    font-family: var(--sans);
    font-weight: 600;
    padding: .72rem 1.5rem;
    cursor: pointer;
}

.comment-form .submit:hover { background: var(--accent-dark); }

/* ---------- подвал ---------- */

.site-footer {
    background: var(--deep);
    color: #C6D5E4;
    padding: 3.4rem 0 2rem;
    border-top: 3px solid var(--teal);
}

.footer-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.2rem;
}

.footer-cols .widget { min-width: 0; color: #C6D5E4; font-size: .94rem; }

.footer-cols .widget-title {
    position: relative;
    font-size: 1.05rem;
    color: var(--white);
    margin: 0 0 1rem;
    padding-bottom: .6rem;
}

.footer-cols .widget-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 42px;
    height: 2px;
    background: var(--accent);
}

.footer-cols .widget ul { list-style: none; margin: 0; padding: 0; }

.footer-cols .widget li { padding: .35rem 0; }

.footer-cols .widget a { color: #C6D5E4; }
.footer-cols .widget a:hover { color: var(--teal); }
.footer-cols .widget p { color: #A9BACD; }

.footer-bottom {
    margin-top: 2.6rem;
    padding-top: 1.4rem;
    border-top: 1px solid rgba(198, 213, 228, .18);
    font-family: var(--sans);
    font-size: .8rem;
    color: #8497AC;
    line-height: 1.6;
}

/* ---------- cookie-баннер ---------- */

.cookie-banner[hidden] { display: none !important; }

.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.6rem;
    background: var(--deep);
    color: #D8E3EF;
    border-top: 3px solid var(--accent);
    font-size: .88rem;
}

.cookie-banner p { margin: 0; max-width: 74ch; }

/* ---------- 404 ---------- */

.error-404 { text-align: left; padding: 1rem 0 3rem; }
.error-404 .code {
    font-family: var(--sans);
    font-size: 6rem;
    font-weight: 700;
    color: var(--teal);
    line-height: 1;
}

/* ---------- адаптив ---------- */

@media (max-width: 960px) {
    h1 { font-size: 2.6rem; }
    .hero h1 { font-size: 2.6rem; }
    .layout-with-sidebar { grid-template-columns: minmax(0, 1fr); }
    .layout-single { width: 100%; }
    .shell-wide { width: min(92%, 1180px); }
    .stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .topics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .step, .step-2 { max-width: none; margin-left: 0; }
    .steps-track { padding-left: 0; padding-right: 0; }
    .step-link, .step-link-right { margin-left: 30px; }
}

@media (max-width: 600px) {
    body { font-size: 16px; }
    h1, .hero h1 { font-size: 2.1rem; }
    h2 { font-size: 1.6rem; }
    .section-title { font-size: 1.6rem; }
    .fs, .fs-stats, .fs-latest { padding: 2.8rem 0; }
    .hero { padding: 3rem 0 2.4rem; }
    .hero-compass { width: 220px; height: 220px; right: -50px; bottom: -50px; }
    .nav-toggle { display: inline-block; }
    .site-nav {
        flex: 1 1 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height .25s ease;
    }
    .site-nav.is-open { max-height: 420px; }
    .site-nav ul { flex-direction: column; gap: .2rem; padding: .6rem 0; }
    .site-nav a { display: block; padding: .5rem 0; }
    .stats-row { grid-template-columns: minmax(0, 1fr); gap: 1.6rem; }
    .stat-num { font-size: 3rem; }
    .topics-grid { grid-template-columns: minmax(0, 1fr); }
    .fs-stats { clip-path: polygon(0 0, 100% 0, 100% calc(100% - 24px), calc(100% - 24px) 100%, 0 100%); }
    .step { flex-direction: column; gap: .9rem; padding: 1.3rem 1.2rem; }
    .entry-title { font-size: 1.9rem; }
    .footer-cols { grid-template-columns: minmax(0, 1fr); }
    .cookie-banner { padding: .9rem 1.1rem; }
}
