/*
Theme Name: dds_alexhsudesign.com
Theme URI: https://alexhsudesign.com/
Author: Алексей Худеев
Author URI: https://alexhsudesign.com/
Description: Тема контентно-образовательного сайта о географии, трекинге, курсах гидов и языковых школах. Аналоговая картографическая эстетика, терракотовые и оливковые акценты, карточки-маршруты, журнал-подвал.
Version: 1.1
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ahsudesign
*/

/* ========== CSS переменные ========== */
:root {
    --bg-page: #F9F6F0;
    --bg-card: #E8EDF2;
    --bg-deep: #EFE9DC;
    --text-main: #2C2A27;
    --text-muted: #5E5A52;
    --accent: #C25A3C;
    --accent-dark: #A6462B;
    --olive: #6A7152;
    --olive-dark: #525940;
    --warn: #D8A25E;
    --line: #D7CEBD;
    --white: #FFFFFF;
    --shadow-sm: 0 1px 2px rgba(44,42,39,0.08);
    --shadow-md: 0 3px 10px rgba(44,42,39,0.10);
    --shadow-lg: 0 6px 22px rgba(44,42,39,0.14);
    --radius-btn: 6px;
    --radius-tag: 30px;
    --radius-card: 4px;
    --font-head: 'Montserrat', system-ui, -apple-system, sans-serif;
    --font-body: 'Lora', Georgia, serif;
}

/* ========== Сброс и база ========== */
*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--bg-page);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

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

/* ========== Типографика ========== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-head);
    color: var(--text-main);
    line-height: 1.25;
    margin: 1.4em 0 0.6em;
    letter-spacing: -0.005em;
}
h1 { font-size: 2.1rem; font-weight: 700; }
h2 { font-size: 1.65rem; font-weight: 600; }
h3 { font-size: 1.3rem; font-weight: 600; }
h4 { font-size: 1.1rem; font-weight: 600; }

p {
    margin: 0 0 1em;
}

a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color 0.15s, border-color 0.15s;
}
a:hover { color: var(--accent-dark); border-bottom-color: var(--accent-dark); }

blockquote {
    margin: 1.4em 0;
    padding: 0.8em 1.3em;
    border-left: 4px solid var(--olive);
    background: var(--bg-deep);
    font-style: italic;
    color: var(--text-muted);
}

code, pre {
    font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
    background: var(--bg-card);
    border-radius: 4px;
}
code { padding: 2px 6px; font-size: 0.92em; }
pre { padding: 14px 16px; overflow-x: auto; font-size: 0.92em; }

hr {
    border: 0;
    border-top: 1px dashed var(--line);
    margin: 2em 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.4em 0;
    border: 1px solid var(--line);
}
th, td {
    border: 1px solid var(--line);
    padding: 0.6em 0.9em;
    text-align: left;
}
th { background: var(--bg-card); font-family: var(--font-head); font-weight: 600; }

/* ========== Кнопки ========== */
.btn {
    display: inline-block;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.7em 1.4em;
    border-radius: var(--radius-btn);
    border: 0;
    cursor: pointer;
    text-decoration: none;
    border-bottom: 0;
    transition: background 0.18s, color 0.18s, transform 0.1s, box-shadow 0.18s;
    box-shadow: var(--shadow-sm);
}
.btn-primary {
    background: var(--olive);
    color: var(--white);
}
.btn-primary:hover {
    background: var(--accent);
    color: var(--white);
    border-bottom-color: transparent;
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}
.btn-outline {
    background: transparent;
    color: var(--accent);
    border: 1.5px solid var(--accent);
    box-shadow: none;
}
.btn-outline:hover {
    background: var(--accent);
    color: var(--white);
    border-color: var(--accent);
    border-bottom-color: var(--accent);
}
.btn-tag {
    display: inline-block;
    padding: 0.35em 0.9em;
    border-radius: var(--radius-tag);
    background: var(--bg-card);
    color: var(--text-main);
    font-family: var(--font-head);
    font-size: 0.85rem;
    border-bottom: 0;
    margin: 0 4px 6px 0;
    transition: background 0.15s, color 0.15s;
}
.btn-tag:hover, .btn-tag.is-active {
    background: var(--olive);
    color: var(--white);
    border-bottom-color: transparent;
}

/* ========== Контейнеры ========== */
.wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.site-content {
    padding: 36px 0 64px;
}

.layout-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}
.layout-grid.has-sidebar {
    grid-template-columns: 67% 27%;
    gap: 6%;
}
.layout-grid.no-sidebar .main-col {
    width: 85%;
    margin: 0 auto;
}

@media (max-width: 960px) {
    .layout-grid.has-sidebar { grid-template-columns: 1fr; gap: 40px; }
    .layout-grid.no-sidebar .main-col { width: 100%; }
}

/* ========== Шапка ========== */
.site-header {
    background: var(--bg-page);
    border-bottom: 1px solid var(--line);
    padding: 18px 0;
}
.site-header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}
.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    border-bottom: 0;
    flex: 1 1 auto;
    min-width: 0;
}
.brand:hover { border-bottom: 0; }
.brand-logo {
    width: 52px;
    height: 52px;
    display: block;
    flex: 0 0 auto;
}
.brand-text { min-width: 0; }
.brand-title {
    display: block;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--text-main);
    line-height: 1.25;
    margin: 0;
}
.brand-tagline {
    display: block;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 3px;
    line-height: 1.35;
    font-style: italic;
}

/* ========== Навигация ========== */
.nav-primary ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.nav-primary a {
    display: inline-block;
    padding: 8px 14px;
    font-family: var(--font-head);
    font-weight: 500;
    font-size: 0.98rem;
    color: var(--text-main);
    border-bottom: 2px dashed transparent;
    text-decoration: none;
    transition: border-color 0.2s, color 0.15s;
}
.nav-primary a:hover,
.nav-primary .current-menu-item > a,
.nav-primary .current_page_item > a {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.nav-toggle {
    display: none;
    background: transparent;
    border: 1.5px solid var(--line);
    border-radius: var(--radius-btn);
    padding: 8px 14px;
    font-family: var(--font-head);
    font-size: 0.9rem;
    color: var(--text-main);
    cursor: pointer;
}

@media (max-width: 780px) {
    .nav-toggle { display: inline-block; }
    .nav-primary {
        display: none;
        width: 100%;
        flex: 0 0 100%;
    }
    .nav-primary.is-open { display: block; }
    .nav-primary ul {
        flex-direction: column;
        gap: 2px;
        padding: 8px 0;
    }
    .nav-primary a {
        display: block;
        padding: 10px 4px;
    }
}

/* ========== Хлебные крошки ========== */
.breadcrumbs {
    font-size: 0.88rem;
    color: var(--text-muted);
    padding: 14px 0;
    font-family: var(--font-head);
}
.breadcrumbs a {
    color: var(--text-muted);
    border-bottom: 1px dotted var(--line);
}
.breadcrumbs a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.breadcrumbs .sep { margin: 0 6px; opacity: 0.55; }
.breadcrumbs .current { color: var(--text-main); }

/* ========== Карточки записей ========== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 26px;
    margin: 28px 0;
}

.card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s, transform 0.15s;
}
.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    background: var(--bg-card);
}

.card-body {
    flex: 1;
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
}

.card-badge {
    display: inline-block;
    padding: 3px 10px;
    background: var(--bg-card);
    color: var(--olive-dark);
    font-family: var(--font-head);
    font-size: 0.75rem;
    letter-spacing: 0.02em;
    border-radius: var(--radius-tag);
    margin-bottom: 10px;
    align-self: flex-start;
}

.card-title {
    font-family: var(--font-head);
    font-size: 1.08rem;
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 10px;
}
.card-title a {
    color: var(--text-main);
    border-bottom: 0;
}
.card-title a:hover { color: var(--accent); }

.card-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 10px;
    font-family: var(--font-head);
}

.card-excerpt {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 14px;
    flex: 1;
}
.card-excerpt p { margin: 0 0 0.5em; background: none; }

.card-footer {
    margin-top: auto;
    padding-top: 6px;
}

/* ========== Главная: тематические секции ========== */
.section {
    padding: 40px 0;
    border-bottom: 1px dashed var(--line);
}
.section:last-of-type { border-bottom: 0; }
.section-heading {
    font-family: var(--font-head);
    font-size: 1.7rem;
    margin-top: 0;
    margin-bottom: 6px;
}
.section-lead {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 70ch;
    margin-bottom: 22px;
}

/* Карта направлений */
.routes-map {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin-top: 18px;
}
.route-pin {
    position: relative;
    padding: 20px 22px;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    transition: transform 0.18s, box-shadow 0.18s, background 0.18s;
}
.route-pin:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    background: var(--white);
}
.route-pin-icon {
    width: 34px;
    height: 34px;
    color: var(--accent);
    margin-bottom: 10px;
}
.route-pin-title {
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 1.05rem;
    margin: 0 0 6px;
    color: var(--text-main);
}
.route-pin p {
    font-size: 0.92rem;
    color: var(--text-muted);
    margin: 0 0 12px;
}

/* Шаги / подход */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 20px;
    margin-top: 14px;
}
.step {
    padding: 18px 20px;
    background: var(--bg-deep);
    border-radius: var(--radius-card);
    border-left: 3px solid var(--olive);
}
.step-num {
    font-family: var(--font-head);
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    color: var(--olive-dark);
    text-transform: uppercase;
    margin-bottom: 6px;
}
.step h3 {
    margin: 0 0 8px;
    font-size: 1.08rem;
}
.step p { margin: 0; color: var(--text-muted); font-size: 0.94rem; }

/* Навигатор-перекрёсток */
.crossroads {
    background: var(--bg-card);
    border-radius: var(--radius-card);
    padding: 28px 26px;
    margin-top: 18px;
}
.crossroads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-top: 16px;
}
.crossroads-item {
    position: relative;
    padding-left: 22px;
}
.crossroads-item::before {
    content: '';
    position: absolute;
    left: 0; top: 8px;
    width: 10px; height: 10px;
    border-left: 2px solid var(--accent);
    border-top: 2px solid var(--accent);
    transform: rotate(45deg);
}
.crossroads-item h4 {
    margin: 0 0 6px;
    font-family: var(--font-head);
    font-size: 1rem;
}
.crossroads-item p {
    margin: 0 0 8px;
    color: var(--text-muted);
    font-size: 0.92rem;
}
.crossroads-item a { font-family: var(--font-head); font-size: 0.9rem; }

/* ========== Контент одиночной записи / страницы ========== */
.entry-header { margin-bottom: 20px; }
.entry-title {
    margin: 0 0 10px;
    font-size: 2rem;
}
.entry-meta {
    font-family: var(--font-head);
    font-size: 0.88rem;
    color: var(--text-muted);
}
.entry-thumb {
    display: block;
    width: 100%;
    max-height: 440px;
    object-fit: cover;
    border-radius: var(--radius-card);
    margin-bottom: 24px;
}
.entry-content {
    font-size: 1.05rem;
}
.entry-content h2, .entry-content h3 { margin-top: 1.6em; }
.entry-content ul, .entry-content ol { padding-left: 1.4em; margin: 1em 0; }
.entry-content li { margin-bottom: 0.4em; }

/* ========== Сайдбар / виджеты ========== */
.site-sidebar { font-size: 0.98rem; }
.widget {
    background: var(--bg-deep);
    border-radius: var(--radius-card);
    padding: 20px 22px;
    margin-bottom: 22px;
    border: 1px solid var(--line);
}
.widget-title {
    font-family: var(--font-head);
    font-size: 1rem;
    margin: 0 0 12px;
    color: var(--olive-dark);
    letter-spacing: 0.02em;
    text-transform: uppercase;
}
.widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.widget li {
    padding: 6px 0;
    border-bottom: 1px dotted var(--line);
}
.widget li:last-child { border-bottom: 0; }
.widget li a {
    color: var(--text-main);
    border-bottom: 0;
}
.widget li a:hover { color: var(--accent); }

/* ========== Подвал ========== */
.site-footer {
    background: var(--accent);
    color: var(--white);
    padding: 48px 0 22px;
    margin-top: 56px;
    font-size: 0.95rem;
}
.site-footer a { color: var(--white); border-bottom-color: rgba(255,255,255,0.4); }
.site-footer a:hover { color: var(--bg-page); border-bottom-color: var(--bg-page); }
.footer-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 36px;
    margin-bottom: 32px;
}
.footer-columns .widget {
    background: transparent;
    border: 0;
    padding: 0;
    margin: 0;
}
.footer-columns .widget-title {
    color: rgba(255,255,255,0.85);
    border-bottom: 1px dashed rgba(255,255,255,0.35);
    padding-bottom: 8px;
    margin-bottom: 14px;
}
.footer-columns .widget li {
    border-bottom-color: rgba(255,255,255,0.15);
}
.footer-columns .widget li a { color: var(--white); }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.25);
    padding-top: 16px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.86rem;
    color: rgba(255,255,255,0.85);
    font-family: var(--font-head);
}
.footer-coords {
    letter-spacing: 0.04em;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 780px) {
    .footer-columns { grid-template-columns: 1fr; gap: 28px; }
}

/* ========== Пагинация ========== */
.pagination {
    margin: 34px 0 10px;
    font-family: var(--font-head);
}
.pagination ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
}
.pagination a, .pagination span {
    display: inline-block;
    min-width: 40px;
    padding: 8px 12px;
    text-align: center;
    border: 1px solid var(--line);
    border-radius: var(--radius-btn);
    background: var(--white);
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.92rem;
    border-bottom: 1px solid var(--line);
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.pagination a:hover {
    background: var(--bg-card);
    color: var(--accent);
    border-color: var(--accent);
    border-bottom-color: var(--accent);
}
.pagination .current {
    background: var(--olive);
    color: var(--white);
    border-color: var(--olive);
}

/* ========== Формы / поиск ========== */
.search-form {
    display: flex;
    gap: 8px;
    margin: 10px 0;
}
.search-form input[type="search"] {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-btn);
    font-family: var(--font-body);
    font-size: 0.98rem;
    background: var(--white);
    color: var(--text-main);
}
.search-form input[type="search"]:focus {
    outline: 2px solid var(--olive);
    outline-offset: 1px;
}
.search-form button {
    padding: 10px 18px;
    background: var(--olive);
    color: var(--white);
    border: 0;
    border-radius: var(--radius-btn);
    font-family: var(--font-head);
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
}
.search-form button:hover { background: var(--accent); }

/* ========== Комментарии ========== */
.comments-area {
    margin-top: 40px;
    padding-top: 28px;
    border-top: 1px dashed var(--line);
}
.comments-title {
    font-size: 1.3rem;
    margin: 0 0 18px;
}
.comment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 28px;
}
.comment-list li { margin: 0; }
.comment-body {
    padding: 14px 18px;
    background: var(--bg-deep);
    border-radius: var(--radius-card);
    margin-bottom: 14px;
    border-left: 3px solid var(--olive);
}
.comment-list .children {
    list-style: none;
    padding-left: 22px;
    border-left: 1px dashed var(--line);
    margin-left: 10px;
}
.comment-meta {
    font-family: var(--font-head);
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.comment-author { font-weight: 600; color: var(--text-main); }
.comment-form label { display: block; font-family: var(--font-head); font-size: 0.9rem; margin-bottom: 4px; }
.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: var(--radius-btn);
    font-family: var(--font-body);
    font-size: 0.98rem;
    background: var(--white);
    margin-bottom: 12px;
}
.comment-form textarea { min-height: 130px; resize: vertical; }

/* ========== Cookie-баннер ========== */
.cookie-banner {
    position: fixed;
    left: 18px;
    right: 18px;
    bottom: 18px;
    max-width: 780px;
    margin: 0 auto;
    background: var(--text-main);
    color: var(--bg-page);
    padding: 16px 20px;
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    z-index: 9000;
    font-size: 0.92rem;
    transform: translateY(120%);
    transition: transform 0.35s ease-out;
}
.cookie-banner.is-visible { transform: translateY(0); }
.cookie-banner p { margin: 0; flex: 1 1 220px; color: var(--bg-page); }
.cookie-banner a { color: var(--warn); border-bottom-color: rgba(216,162,94,0.5); }
.cookie-banner .btn {
    background: var(--warn);
    color: var(--text-main);
    padding: 8px 16px;
    font-size: 0.9rem;
}
.cookie-banner .btn:hover { background: var(--accent); color: var(--white); }

/* ========== 404 ========== */
.not-found {
    text-align: center;
    padding: 60px 20px;
}
.not-found-code {
    font-family: var(--font-head);
    font-size: 6rem;
    font-weight: 700;
    line-height: 1;
    color: var(--accent);
    margin: 0;
    letter-spacing: -0.03em;
}
.not-found-title {
    font-size: 1.5rem;
    margin: 10px 0 18px;
}
.not-found-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

/* ========== Адаптив ========== */
@media (max-width: 600px) {
    body { font-size: 16px; }
    h1 { font-size: 1.7rem; }
    h2 { font-size: 1.4rem; }
    .wrap { padding: 0 16px; }
    .section { padding: 28px 0; }
    .section-heading { font-size: 1.4rem; }
    .site-header-inner { gap: 14px; }
    .brand-title { font-size: 1rem; }
    .brand-tagline { font-size: 0.76rem; }
    .cards-grid { grid-template-columns: 1fr; gap: 20px; }
    .entry-title { font-size: 1.5rem; }
}
