/*
Theme Name: dds_anasazisports.com
Author: Алексей Захаров
Description: Тема для информационно-образовательного портала о карьерном развитии. Спортивная метафора «карьера — это марафон»: трековая навигация, прогресс-секции, карточки-станции и подвал в стиле блокнота тренера.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: anasazi
*/

/* =========================================================================
   Переменные и сброс
   ====================================================================== */
:root {
    --sand: #F9F7F3;
    --card-bg: #FFFFFF;
    --track-blue: #1B3B6F;
    --night-blue: #0F2A4C;
    --terracotta: #C46D5E;
    --copper: #B45A4B;
    --chrono: #5E6B5C;
    --ink: #21262B;
    --line: #E3DED4;
    --footer-bg: #142A4A;
    --shell: min(92%, 1180px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background-color: var(--sand);
    color: var(--ink);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 18px;
    line-height: 1.7;
    overflow-x: hidden;
}

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

h1, h2, h3, h4 {
    font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--track-blue);
    line-height: 1.25;
    margin: 0 0 0.6em;
}

h1 { font-size: 2.1rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }

a { color: var(--track-blue); transition: color .18s ease; }
a:hover { color: var(--night-blue); }

code, pre, .mono {
    font-family: "Courier New", Courier, monospace;
}

pre {
    background: #11203a;
    color: #f3f1ea;
    padding: 1em;
    border-radius: 8px;
    overflow-x: auto;
    min-width: 0;
}

blockquote {
    margin: 1.4em 0;
    padding: 0.8em 1.2em;
    border-left: 4px solid var(--terracotta);
    background: #fff;
    font-family: "Courier New", Courier, monospace;
    color: var(--chrono);
}

/* =========================================================================
   Контейнер ширины
   ====================================================================== */
.shell {
    width: var(--shell);
    margin-inline: auto;
}

.site-main { padding: 2.4rem 0 3rem; }

/* =========================================================================
   Кнопки — «стартовые бирки»
   ====================================================================== */
.btn {
    display: inline-block;
    font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif;
    font-weight: 700;
    font-size: 1rem;
    padding: 0.7em 1.6em;
    border-radius: 9px;
    border: 2px solid var(--track-blue);
    background: var(--track-blue);
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    transition: transform .12s ease, box-shadow .18s ease, background .18s ease;
}
.btn:hover {
    background: radial-gradient(circle at 50% 40%, var(--track-blue), var(--night-blue));
    color: #fff;
    box-shadow: 0 8px 18px rgba(15, 42, 76, 0.28);
    transform: translateY(-2px);
}
.btn:active { transform: translateY(1px); }

.btn-secondary {
    background: transparent;
    color: var(--terracotta);
    border-color: var(--terracotta);
}
.btn-secondary:hover {
    background: var(--copper);
    border-color: var(--copper);
    color: #fff;
    box-shadow: 0 8px 18px rgba(180, 90, 75, 0.28);
}

/* =========================================================================
   Шапка — «маршрутный лист»
   ====================================================================== */
.site-header {
    background: #fff;
    border-bottom: 3px solid var(--track-blue);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1rem 0;
    flex-wrap: wrap;
}
.brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    min-width: 0;
}
.brand-logo, .brand-mark {
    width: 56px;
    height: 56px;
    flex: 0 0 56px;
    display: block;
}
.brand-text { min-width: 0; }
.brand-title {
    font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--track-blue);
    text-decoration: none;
    display: block;
    line-height: 1.3;
}
.brand-desc {
    font-size: 0.82rem;
    color: var(--chrono);
    margin: 0.2rem 0 0;
    max-width: 46ch;
}

/* Навигация */
.nav-toggle {
    display: none;
    border: 2px solid var(--track-blue);
    background: #fff;
    color: var(--track-blue);
    font-family: "Trebuchet MS", sans-serif;
    font-weight: 700;
    border-radius: 8px;
    padding: 0.5em 0.9em;
    cursor: pointer;
}
.main-nav ul {
    list-style: none;
    display: flex;
    gap: 0.4rem;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}
.main-nav a {
    display: block;
    font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--track-blue);
    text-decoration: none;
    padding: 0.5em 0.9em;
    border-radius: 8px;
    border: 2px solid transparent;
}
.main-nav a:hover,
.main-nav .current-menu-item > a {
    border-color: var(--terracotta);
    color: var(--night-blue);
}

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

/* =========================================================================
   Хлебные крошки
   ====================================================================== */
.breadcrumbs {
    font-size: 0.85rem;
    color: var(--chrono);
    margin: 0 0 1.6rem;
    font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif;
}
.breadcrumbs a { color: var(--track-blue); text-decoration: none; }
.breadcrumbs a:hover { color: var(--terracotta); }
.breadcrumbs .sep { color: var(--terracotta); margin: 0 0.2rem; }

/* =========================================================================
   Карточки записей — «тренировочные станции»
   ====================================================================== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.8rem;
}

.card {
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    background-image: linear-gradient(rgba(94, 107, 92, 0.04) 1px, transparent 1px);
    background-size: 100% 8px;
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 26px rgba(20, 42, 74, 0.14);
}

.card-thumb {
    display: block;
    overflow: hidden;
}
.card-thumb img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}
.card-thumb-placeholder {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, var(--track-blue), var(--chrono));
}

.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.2rem 1.3rem 1.4rem;
    min-width: 0;
}
.card-title {
    font-size: 1.15rem;
    margin: 0 0 0.5rem;
}
.card-title a { text-decoration: none; color: var(--track-blue); }
.card-title a:hover { color: var(--terracotta); }

.card-meta {
    font-family: "Courier New", Courier, monospace;
    font-size: 0.8rem;
    color: var(--terracotta);
    margin: 0 0 0.6rem;
}

.card-excerpt {
    color: var(--ink);
    font-size: 0.95rem;
    margin: 0 0 1rem;
}
.card-excerpt p {
    margin: 0 0 0.5em;
    background: none;
}

.card-foot { margin-top: auto; }

/* =========================================================================
   Главная — тематические секции
   ====================================================================== */
.front-section { padding: 2.6rem 0; }
.front-section + .front-section { border-top: 1px dashed var(--line); }
.section-head {
    text-align: center;
    margin-bottom: 1.8rem;
}
.section-head .kicker {
    font-family: "Courier New", Courier, monospace;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--terracotta);
    font-size: 0.8rem;
}

/* Hero / маршрутная карта */
.hero {
    background: radial-gradient(circle at 20% 20%, #21477f, var(--track-blue));
    color: #fff;
    padding: 3.4rem 0;
}
.hero h1 { color: #fff; font-size: 2.5rem; }
.hero p { color: #e5ecf6; max-width: 60ch; }
.hero .btn { border-color: #fff; }
.hero-quote-slider {
    margin-top: 1.6rem;
    font-family: "Courier New", Courier, monospace;
    min-height: 2.4em;
}
.hero-quote-slider .quote {
    display: none;
    color: #ffd9cf;
}
.hero-quote-slider .quote.is-active { display: block; }

/* Километровая шкала */
.km-track {
    display: flex;
    align-items: center;
    gap: 0;
    margin: 1.6rem 0;
    padding: 0;
    list-style: none;
    counter-reset: km;
    flex-wrap: wrap;
}
.km-track li {
    flex: 1 1 80px;
    min-width: 0;
    text-align: center;
    position: relative;
    padding: 1.4rem 0.3rem 0;
    font-family: "Courier New", Courier, monospace;
    font-size: 0.78rem;
    color: var(--chrono);
}
.km-track li::before {
    content: "";
    position: absolute;
    top: 0.55rem;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--line);
}
.km-track li::after {
    content: "";
    position: absolute;
    top: 0.15rem;
    left: 50%;
    transform: translateX(-50%);
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--terracotta);
    border: 3px solid var(--sand);
}

/* Экипировка будущего — три «снаряда» */
.gear-columns {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.6rem;
}
.gear {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 1.6rem 1.4rem;
    background: var(--card-bg);
    min-width: 0;
}
.gear h3 { color: var(--track-blue); }
.gear-knowledge { background-image: repeating-linear-gradient(45deg, rgba(27,59,111,0.06) 0 6px, transparent 6px 12px); }
.gear-skills { background-image: repeating-linear-gradient(0deg, rgba(196,109,94,0.07) 0 4px, transparent 4px 10px); }
.gear-strategy { background-image: repeating-linear-gradient(90deg, rgba(94,107,92,0.12) 0 3px, transparent 3px 14px); }

/* Карточки категорий — «спортивные станции» */
.station-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.4rem;
}
.station {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 1.5rem 1.3rem;
    background: var(--card-bg);
    min-width: 0;
}
.station .icon {
    display: inline-flex;
    width: 46px;
    height: 46px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--track-blue);
    color: #fff;
    font-family: "Courier New", monospace;
    font-weight: 700;
    margin-bottom: 0.7rem;
}
.station h3 { font-size: 1.1rem; }
.station p { font-size: 0.92rem; color: var(--chrono); margin: 0; }

/* Анимация появления */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .5s ease, transform .5s ease;
}
.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================================================
   Запись и страница
   ====================================================================== */
.entry-header { margin-bottom: 1.4rem; }
.entry-title { font-size: 2rem; }
.entry-meta {
    font-family: "Courier New", Courier, monospace;
    font-size: 0.85rem;
    color: var(--terracotta);
}
.entry-thumb { margin: 1.2rem 0; }
.entry-thumb img { display: block; width: 100%; border-radius: 12px; }
.entry-content { margin-bottom: 2rem; }
.entry-content img { border-radius: 8px; }

/* Таблицы */
.entry-content table {
    border-collapse: collapse;
    width: 100%;
    margin: 1.4rem 0;
}
.entry-content table,
.entry-content th,
.entry-content td {
    border: 1px solid var(--chrono);
}
.entry-content th,
.entry-content td {
    padding: 0.6em 0.8em;
    text-align: left;
}
.entry-content th {
    background: var(--track-blue);
    color: #fff;
    font-family: "Trebuchet MS", sans-serif;
}

/* =========================================================================
   Сайдбар
   ====================================================================== */
.sidebar { min-width: 0; }
.sidebar .widget {
    background: var(--card-bg);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 1.3rem 1.3rem;
    margin-bottom: 1.6rem;
}
.sidebar .widget-title {
    color: var(--track-blue);
    font-size: 1.1rem;
    border-bottom: 2px solid var(--terracotta);
    padding-bottom: 0.4rem;
    margin-top: 0;
}
.sidebar .widget,
.sidebar .widget a,
.sidebar .widget li {
    color: var(--ink);
}
.sidebar .widget a { text-decoration: none; }
.sidebar .widget a:hover { color: var(--terracotta); }
.sidebar .widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.sidebar .widget li {
    padding: 0.4rem 0;
    border-bottom: 1px dashed var(--line);
    font-size: 0.95rem;
}
.sidebar .widget li:last-child { border-bottom: none; }
.sidebar .widget .post-date {
    display: block;
    font-family: "Courier New", monospace;
    font-size: 0.78rem;
    color: var(--chrono);
}

/* =========================================================================
   Пагинация — медальоны-номера
   ====================================================================== */
.pagination { margin: 2.4rem 0 0; }
.pagination ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0;
    margin: 0;
    justify-content: center;
}
.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 0.4rem;
    border-radius: 50%;
    border: 2px solid var(--track-blue);
    font-family: "Trebuchet MS", sans-serif;
    font-weight: 700;
    text-decoration: none;
    color: var(--track-blue);
}
.pagination a:hover {
    background: var(--track-blue);
    color: #fff;
}
.pagination .current {
    background: var(--terracotta);
    border-color: var(--terracotta);
    color: #fff;
}

/* =========================================================================
   Комментарии — «судейский протокол»
   ====================================================================== */
.comments-area { margin-top: 2.6rem; }
.comment-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.comment-list .children {
    list-style: none;
    margin: 0 0 0 1.6rem;
    padding: 0;
}
.protocol-comment { margin: 1.2rem 0; }
.protocol-body {
    border: 1px solid var(--chrono);
    border-left: 5px solid var(--terracotta);
    border-radius: 8px;
    background: #fff;
    padding: 1.1rem 1.2rem;
}
.protocol-head {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.6rem;
}
.bib-number {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--track-blue);
    color: #fff;
    border-radius: 6px;
    font-family: "Courier New", monospace;
    font-weight: 700;
}
.protocol-author {
    font-family: "Trebuchet MS", sans-serif;
    font-weight: 700;
    color: var(--track-blue);
    display: block;
}
.protocol-meta time {
    font-family: "Courier New", monospace;
    font-size: 0.78rem;
    color: var(--chrono);
}
.protocol-pending { color: var(--copper); font-style: italic; }
.protocol-foot { font-size: 0.85rem; }

.comment-respond {
    margin-top: 1.8rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 1.4rem 1.4rem;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.6em 0.7em;
    border: 1px solid var(--chrono);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
}
.comment-form textarea { min-height: 120px; }

/* =========================================================================
   Форма поиска
   ====================================================================== */
.search-form {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.search-form .search-field {
    flex: 1 1 200px;
    min-width: 0;
    padding: 0.6em 0.8em;
    border: 2px solid var(--track-blue);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
}
.search-form .search-submit {
    flex: 0 0 auto;
}

/* =========================================================================
   Подвал — «блокнот тренера»
   ====================================================================== */
.site-footer {
    background: var(--footer-bg);
    color: #eef2f8;
    margin-top: 3rem;
    border-top: 6px solid var(--terracotta);
}
.footer-widgets {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
    padding: 2.6rem 0 1.8rem;
}
.footer-col { min-width: 0; }
.footer-widgets .widget { margin-bottom: 0; }
.footer-widgets .widget-title {
    color: #fff;
    font-size: 1.05rem;
    border-bottom: 1px dashed rgba(255,255,255,0.4);
    padding-bottom: 0.4rem;
}
.footer-widgets .widget,
.footer-widgets .widget p,
.footer-widgets .widget li,
.footer-widgets .widget a {
    color: #d8e1ee;
}
.footer-widgets .widget a { text-decoration: none; }
.footer-widgets .widget a:hover { color: #ffd9cf; }
.footer-widgets .widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.footer-widgets .widget li {
    padding: 0.35rem 0;
    border-bottom: 1px dashed rgba(255,255,255,0.18);
    font-size: 0.92rem;
}
.footer-widgets .widget li:last-child { border-bottom: none; }
.footer-widgets .widget .post-date {
    display: block;
    font-family: "Courier New", monospace;
    font-size: 0.76rem;
    color: #aebccf;
}

.footer-quote {
    border-top: 2px dashed rgba(255,255,255,0.35);
    padding: 1.4rem 0;
    text-align: center;
    font-family: "Courier New", monospace;
    color: #ffd9cf;
}
.site-info {
    border-top: 1px solid rgba(255,255,255,0.15);
    padding: 1.1rem 0;
    text-align: center;
    font-size: 0.85rem;
    color: #aebccf;
}

/* =========================================================================
   Cookie-баннер  (правило [hidden] — ДО основного блока стилей баннера)
   ====================================================================== */
.cookie-banner[hidden] { display: none !important; }

.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    background: var(--night-blue);
    color: #eef2f8;
    padding: 1rem 0;
    box-shadow: 0 -6px 20px rgba(0,0,0,0.22);
}
.cookie-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    flex-wrap: wrap;
}
.cookie-banner p {
    margin: 0;
    font-size: 0.9rem;
    min-width: 0;
}
.cookie-banner a { color: #ffd9cf; }

/* =========================================================================
   404
   ====================================================================== */
.error-404 { text-align: center; padding: 2rem 0; }
.error-404 .code {
    font-family: "Courier New", monospace;
    font-size: 4rem;
    color: var(--terracotta);
    font-weight: 700;
}
.error-404 .search-form { justify-content: center; margin: 1.6rem 0; }

/* =========================================================================
   Адаптив
   ====================================================================== */
@media (max-width: 960px) {
    .layout-with-sidebar {
        grid-template-columns: minmax(0, 1fr);
        gap: 2rem;
    }
    .gear-columns {
        grid-template-columns: minmax(0, 1fr);
    }
    .footer-widgets {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    body { font-size: 17px; }
    h1 { font-size: 1.7rem; }
    .hero h1 { font-size: 1.9rem; }

    .nav-toggle { display: inline-block; }
    .main-nav {
        flex-basis: 100%;
    }
    .main-nav ul {
        flex-direction: column;
        gap: 0.2rem;
    }
    .main-nav[hidden] { display: none !important; }

    .layout-single .content-area { width: 100%; }
    .card-grid { grid-template-columns: minmax(0, 1fr); }
    .footer-widgets { grid-template-columns: minmax(0, 1fr); }
    .station-grid { grid-template-columns: minmax(0, 1fr); }
}

/* =========================================================================
   Главная — внутренний контейнер контента (≈85%)
   ====================================================================== */
.front-shell {
    width: min(85%, 1100px);
    margin-inline: auto;
}
.front-cta { text-align: center; margin-top: 1.6rem; }
.hero .front-cta { text-align: left; }
.front-lead { font-size: 1.05rem; color: var(--chrono); }

/* Скрытый текст для скринридеров */
.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}
