/*
Theme Name: dds_strelka-gid.ru
Theme URI: https://strelka-gid.ru/
Author: Алексей Родионов
Description: Тема для информационно-образовательного портала о транспортных профессиях и учебных заведениях. Дизайн-концепция «Лаборатория маршрутов»: японский минимализм, индустриальная графика и навигационная логика.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: strgid
*/

:root {
    --bg: #F4F7FC;
    --bg-alt: #E8EDF5;
    --ink: #1E262F;
    --accent: #E85D3A;
    --steel: #3A7CA5;
    --muted: #6B7A8F;
    --hard: #C8D0DC;
    --paper: #FFFFFF;
    --shell: min(92%, 1180px);
}

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

html { scroll-behavior: smooth; }

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background-color: var(--bg);
    background-image: repeating-linear-gradient(45deg, rgba(58, 124, 165, 0.04) 0, rgba(58, 124, 165, 0.04) 1px, transparent 1px, transparent 40px);
    color: var(--ink);
    font-family: "Inter", "Manrope", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    font-size: 17px;
    line-height: 1.72;
    letter-spacing: 0.012em;
}

body::after {
    content: "";
    position: fixed;
    right: -60px;
    bottom: -60px;
    width: 340px;
    height: 340px;
    z-index: -1;
    pointer-events: none;
    opacity: 0.06;
    background-repeat: no-repeat;
    background-size: contain;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cg fill='none' stroke='%233A7CA5' stroke-width='4'%3E%3Ccircle cx='100' cy='100' r='86'/%3E%3Ccircle cx='100' cy='100' r='58'/%3E%3Cpath d='M100 14v24M100 162v24M14 100h24M162 100h24M100 46l22 54-22 54-22-54z'/%3E%3C/g%3E%3C/svg%3E");
}

.shell { width: var(--shell); margin-inline: auto; }
.front-inner { width: min(85%, 1180px); margin-inline: auto; }

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

a { color: var(--accent); text-decoration: underline; text-decoration-style: dashed; text-underline-offset: 3px; }
a:hover, a:focus { text-decoration-style: solid; }

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.18;
    letter-spacing: -0.01em;
    margin: 0 0 0.8rem;
}

h1 { font-size: 2.1rem; }
h2 { font-size: 1.55rem; }
h3 { font-size: 1.22rem; }

p { margin: 0 0 1.05rem; }

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

blockquote {
    margin: 1.6rem 0;
    padding: 1.4rem 1.6rem;
    background: linear-gradient(180deg, #FFFFFF 0%, #D9E2EF 100%);
    border-radius: 8px;
    font-size: 1.06rem;
}

table { width: 100%; border-collapse: collapse; margin: 1.4rem 0; border: 1px solid var(--hard); }
th, td { border: 1px solid var(--hard); padding: 0.6rem 0.8rem; text-align: left; }
th { background: var(--bg-alt); font-weight: 700; }

code, pre { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }
pre { overflow-x: auto; padding: 1rem; background: var(--bg-alt); border-radius: 8px; }

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

.btn {
    display: inline-block;
    padding: 0.72rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    border: 2px solid transparent;
    border-radius: 0;
    cursor: pointer;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 3px), calc(100% - 3px) 100%, 0 100%);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.btn-accent { background: var(--accent); color: #FFFFFF; border-color: var(--accent); }
.btn-accent:hover, .btn-accent:focus { transform: translateY(2px); box-shadow: 4px 0 0 0 var(--ink); color: #FFFFFF; }

.btn-ghost { background: transparent; color: var(--ink); border-color: var(--steel); }
.btn-ghost:hover, .btn-ghost:focus { transform: translateY(2px); box-shadow: 4px 0 0 0 var(--accent); color: var(--ink); }

/* ---------- Верхняя навигационная полоса ---------- */

.track-bar { display: flex; width: 100%; height: 4px; }
.track-seg { flex: 1 1 33.333%; }
.track-seg-steel { background: var(--steel); }
.track-seg-accent { background: var(--accent); }
.track-seg-void { background: transparent; }

/* ---------- Шапка ---------- */

.site-header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(58, 124, 165, 0.18);
}

.header-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 0;
}

.brand { display: flex; align-items: center; gap: 0.9rem; min-width: 0; flex: 1 1 auto; }
.brand-link { display: block; line-height: 0; text-decoration: none; }
.brand-logo { width: 46px; height: auto; display: block; }
.brand-mark { display: block; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }

.site-title {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--ink);
    max-width: 640px;
}

.site-desc {
    font-size: 0.78rem;
    line-height: 1.45;
    color: var(--muted);
    max-width: 640px;
}

.nav-toggle {
    display: inline-grid;
    grid-template-columns: auto auto;
    align-items: center;
    gap: 3px 10px;
    background: transparent;
    border: 2px solid var(--steel);
    color: var(--ink);
    font: inherit;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 0.55rem 0.9rem;
    cursor: pointer;
}

.nav-toggle-bar { grid-column: 1; display: block; width: 20px; height: 2px; background: var(--ink); }
.nav-toggle-label { grid-column: 2; grid-row: 1 / span 3; }

.main-nav { display: none; flex-basis: 100%; }
.main-nav.is-open { display: block; }

.nav-list { list-style: none; margin: 0.6rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.2rem; }
.nav-list li { min-width: 0; }
.nav-list a {
    display: block;
    padding: 0.55rem 0;
    color: var(--ink);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    border-bottom: 1px solid rgba(58, 124, 165, 0.14);
}
.nav-list a:hover, .nav-list a:focus { color: var(--accent); }
.nav-list .current-menu-item > a { color: var(--accent); }

/* ---------- Основное поле ---------- */

.site-main { display: block; padding-bottom: 70px; }

.breadcrumbs {
    padding: 1.4rem 0 0.6rem;
    font-size: 0.84rem;
    color: var(--muted);
}
.breadcrumbs a { color: var(--steel); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs .sep { color: var(--accent); margin: 0 0.25rem; }

.layout-single { display: block; width: 85%; margin-left: auto; margin-right: auto; }
.layout-with-sidebar { display: block; }
.content-area { min-width: 0; }

.page-head { margin: 1.4rem 0 2rem; }
.page-title { font-size: 1.9rem; }
.page-lead { color: var(--muted); font-size: 1rem; }
.archive-desc { color: var(--muted); }

.post-meta { font-size: 0.8rem; color: var(--muted); letter-spacing: 0.05em; text-transform: uppercase; }
.post-meta a { color: var(--steel); text-decoration: none; }
.post-meta a:hover { color: var(--accent); }
.meta-sep { color: var(--accent); }

.single-thumb { margin: 0 0 1.6rem; }
.single-thumb img { display: block; width: 100%; height: auto; border-radius: 8px; }

.entry-content h2, .entry-content h3 { margin-top: 2rem; }
.entry-content h2::before,
.entry-content h3::before {
    content: "◆";
    color: var(--accent);
    font-size: 0.7em;
    margin-right: 0.5rem;
    vertical-align: 0.12em;
}
.entry-content img { display: block; border-radius: 8px; }
.entry-tags { margin-top: 1.6rem; font-size: 0.85rem; }
.entry-tags a { color: var(--steel); }
.page-links { margin-top: 1.2rem; font-size: 0.9rem; }
.empty-note { color: var(--muted); }

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

.card-list { display: flex; flex-direction: column; gap: 2.2rem; }

.card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--paper);
    border: none;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 6px 6px 0 0 var(--hard);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 6px 6px 0 0 var(--accent); }

.card-thumb-wrap { position: relative; overflow: hidden; flex: none; width: 100%; }
.card-thumb-wrap a { display: block; position: static; }
.card-thumb-wrap img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }

.card-body { flex: 1; min-width: 0; padding: 1.4rem 1.5rem 1.6rem; display: flex; flex-direction: column; }
.card-title { font-size: 1.24rem; margin: 0.5rem 0 0.7rem; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { color: var(--accent); }
.card-excerpt { color: #35414F; font-size: 0.97rem; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-more { align-self: flex-start; margin-top: auto; }

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

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 2.6rem 0 0;
}
.pagination .page-numbers {
    display: inline-block;
    padding: 0.5rem 0.9rem;
    border: 2px solid var(--hard);
    background: var(--paper);
    color: var(--ink);
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 3px), calc(100% - 3px) 100%, 0 100%);
}
.pagination a.page-numbers:hover { border-color: var(--accent); color: var(--accent); }
.pagination .page-numbers.current { background: var(--accent); border-color: var(--accent); color: #FFFFFF; }
.pagination .page-numbers.dots { border: none; background: transparent; }

.comment-navigation .nav-links { display: flex; gap: 1rem; margin-top: 1.5rem; font-size: 0.9rem; }

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

.sidebar { min-width: 0; margin-top: 3rem; }

.sidebar .widget {
    background: var(--paper);
    box-shadow: 0 4px 18px rgba(30, 38, 47, 0.08);
    border-radius: 8px;
    padding: 1.4rem 1.5rem;
    margin-bottom: 1.6rem;
    color: var(--ink);
}
.sidebar .widget-title { font-size: 1.02rem; margin-bottom: 0.9rem; color: var(--ink); }
.sidebar .widget-title::before { content: "◆"; color: var(--accent); font-size: 0.66em; margin-right: 0.45rem; vertical-align: 0.14em; }
.sidebar .widget ul { list-style: none; margin: 0; padding: 0; }
.sidebar .widget li { padding: 0.5rem 0; border-bottom: 1px solid var(--bg-alt); font-size: 0.94rem; }
.sidebar .widget li:last-child { border-bottom: none; }
.sidebar .widget a { color: var(--ink); text-decoration: none; }
.sidebar .widget a:hover { color: var(--accent); }
.sidebar .widget .post-date { display: block; color: var(--muted); font-size: 0.8rem; }

/* ---------- Формы ---------- */

.search-form { margin: 1.4rem 0; }
.search-label { display: block; font-size: 0.85rem; font-weight: 700; margin-bottom: 0.4rem; }
.search-row { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.search-field, input[type="text"], input[type="email"], input[type="url"], input[type="search"], textarea {
    flex: 1 1 200px;
    min-width: 0;
    padding: 0.65rem 0.85rem;
    border: 2px solid var(--hard);
    border-radius: 0;
    background: var(--paper);
    color: var(--ink);
    font: inherit;
    font-size: 0.95rem;
}
textarea { width: 100%; }
.search-field:focus, input:focus, textarea:focus { outline: none; border-color: var(--steel); }

.comments-area { margin-top: 3rem; }
.comments-title { font-size: 1.3rem; }
.comment-list { list-style: none; margin: 0 0 2rem; padding: 0; }
.comment-list .children { list-style: none; padding-left: 1.4rem; }
.comment-item { background: var(--paper); border-radius: 8px; padding: 1.1rem 1.3rem; margin-bottom: 1rem; box-shadow: 4px 4px 0 0 var(--hard); }
.comment-head { font-size: 0.84rem; color: var(--muted); margin-bottom: 0.4rem; }
.comment-author { font-weight: 700; color: var(--ink); }
.comment-reply { font-size: 0.85rem; }
.comment-form label { display: block; font-size: 0.85rem; font-weight: 700; margin-bottom: 0.3rem; }
.comment-form p { margin-bottom: 1rem; }
.comment-form input[type="submit"], .comment-form .submit {
    background: var(--accent);
    color: #FFFFFF;
    border: 2px solid var(--accent);
    padding: 0.72rem 1.5rem;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 3px), calc(100% - 3px) 100%, 0 100%);
}

/* ---------- Секции главной ---------- */

.fs { padding: 70px 0; }
.fs-alt { background: var(--bg-alt); }
.fs-facts { background: linear-gradient(180deg, #FFFFFF 0%, #D9E2EF 100%); }

.section-title {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    font-size: 1.5rem;
    margin-bottom: 0.8rem;
}
.section-title::before { content: "◆"; color: var(--accent); font-size: 0.62em; }
.section-title::after { content: ""; flex: 1 1 auto; height: 1px; background: var(--steel); opacity: 0.4; }
.section-lead { color: var(--muted); margin-bottom: 2.2rem; max-width: 620px; }

.hero-grid { display: block; }
.hero-kicker {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--steel);
    margin-bottom: 1rem;
}
.hero-title { font-size: 2.3rem; margin-bottom: 1.2rem; }
.hero-lead { color: #35414F; font-size: 1.03rem; max-width: 640px; margin-bottom: 1.8rem; }

.hero-side { margin-top: 2.6rem; border-left: 4px solid var(--accent); padding: 1.2rem 1.4rem; background: rgba(255, 255, 255, 0.7); }
.hero-side-label { display: block; font-size: 0.76rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.8rem; }
.hero-points { list-style: none; margin: 0; padding: 0; }
.hero-point { font-size: 1.15rem; font-weight: 700; padding: 0.55rem 0; border-bottom: 1px dashed rgba(58, 124, 165, 0.4); }
.hero-point:last-child { border-bottom: none; }
.hero-point-num { color: var(--steel); font-size: 0.85rem; margin-right: 0.6rem; }

.route-line { display: flex; flex-direction: column; gap: 2rem; }
.route-stage { min-width: 0; padding: 1.6rem 1.5rem; background: rgba(255, 255, 255, 0.72); border-radius: 8px; }
.route-num { display: block; font-size: 3.4rem; font-weight: 700; line-height: 1; color: #C3CDDB; }
.route-name { font-size: 1.25rem; margin: 0.5rem 0 0.6rem; }
.route-name::before { content: "◆"; color: var(--accent); font-size: 0.62em; margin-right: 0.45rem; vertical-align: 0.16em; }
.route-text { color: #35414F; font-size: 0.96rem; margin: 0; }

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

.rubric-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.2rem; }
.rubric-tile {
    display: flex;
    align-items: flex-end;
    min-height: 150px;
    min-width: 0;
    padding: 1.6rem 1.5rem;
    border-radius: 8px;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.25;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.rubric-tile:hover { transform: translateX(10px); text-decoration: none; }
.rubric-accent { background: var(--accent); color: #FFFFFF; }
.rubric-steel { background: var(--steel); color: #FFFFFF; }
.rubric-dark { background: var(--ink); color: #FFFFFF; }
.rubric-plain { background: var(--paper); color: var(--ink); border: 2px solid var(--steel); }

.facts-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.6rem; }
.fact { min-width: 0; padding: 0.4rem 0.2rem; }
.fact-num { display: block; font-size: 3rem; font-weight: 700; line-height: 1; color: var(--accent); }
.fact-label { display: block; margin-top: 0.6rem; font-size: 0.88rem; color: var(--muted); }

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

.site-footer { background: var(--ink); color: #D6DDE6; padding: 60px 0 30px; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; }
.footer-col { min-width: 0; }
.footer-col .widget { margin-bottom: 1.6rem; color: #D6DDE6; }
.footer-col .widget-title { font-size: 1rem; color: #FFFFFF; margin-bottom: 0.9rem; }
.footer-col .widget-title::before { content: "◆"; color: var(--accent); font-size: 0.66em; margin-right: 0.45rem; vertical-align: 0.14em; }
.footer-col .widget p { color: #C2CBD6; font-size: 0.93rem; }
.footer-col .widget ul { list-style: none; margin: 0; padding: 0; }
.footer-col .widget li { padding: 0.4rem 0; font-size: 0.93rem; border-bottom: 1px solid rgba(214, 221, 230, 0.14); }
.footer-col .widget li:last-child { border-bottom: none; }
.footer-col .widget a { color: #D6DDE6; text-decoration: none; }
.footer-col .widget a:hover { color: var(--accent); }
.footer-col .widget .post-date { display: block; color: #97A5B5; font-size: 0.8rem; }

.footer-bottom { margin-top: 2.4rem; padding-top: 1.4rem; border-top: 1px solid rgba(214, 221, 230, 0.16); }
.copyright { font-size: 0.85rem; color: #97A5B5; }

/* ---------- Cookie ---------- */

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

.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.4rem;
    background: var(--ink);
    color: #E4EAF1;
    border-top: 4px solid var(--accent);
}
.cookie-text { margin: 0; font-size: 0.88rem; max-width: 780px; }

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

@media (min-width: 601px) {
    h1 { font-size: 2.6rem; }
    .page-title { font-size: 2.2rem; }
    .hero-title { font-size: 2.9rem; }

    .card { flex-direction: row; min-height: 230px; }
    .card-thumb-wrap { flex: 0 0 240px; width: auto; position: relative; }
    .card-thumb-wrap a { position: absolute; top: 0; left: 0; right: 0; bottom: 0; display: block; }
    .card-thumb-wrap img { width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; display: block; }
    .card-body { padding: 1.6rem 1.8rem; }

    .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.4rem; }
    .rubric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .facts-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .route-line { flex-direction: row; gap: 1.6rem; }
    .route-stage { flex: 1 1 0; }
}

@media (min-width: 961px) {
    .fs { padding: 120px 0; }
    .hero-title { font-size: 3.75rem; }
    .page-title { font-size: 2.6rem; }
    .section-title { font-size: 1.85rem; }

    .nav-toggle { display: none; }
    .main-nav { display: block; flex: 0 0 auto; flex-basis: auto; }
    .nav-list { flex-direction: row; align-items: center; gap: 1.6rem; margin: 0; }
    .nav-list a { border-bottom: 2px solid transparent; padding: 0.3rem 0; }
    .nav-list a:hover, .nav-list .current-menu-item > a { border-bottom-color: var(--accent); }

    .layout-with-sidebar {
        display: grid;
        grid-template-columns: minmax(0, 67fr) minmax(0, 27fr);
        gap: 6%;
        align-items: start;
    }
    .sidebar { margin-top: 1.4rem; }

    .hero-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 4rem; align-items: start; }
    .hero-side { margin-top: 0.6rem; }

    .route-line { position: relative; }
    .route-line::before {
        content: "";
        position: absolute;
        top: 34px;
        left: 12%;
        right: 12%;
        height: 0;
        border-top: 2px dashed var(--steel);
        opacity: 0.55;
        z-index: 0;
    }
    .route-stage { position: relative; z-index: 1; }

    .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .rubric-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .rubric-tile { min-height: 210px; font-size: 1.3rem; }

    .facts-row { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
    .fact { padding: 0.4rem 1.6rem; border-left: 1px solid var(--steel); }
    .fact:first-child { border-left: none; padding-left: 0; }
    .fact-num { font-size: 3.6rem; }
}
