/*
Theme Name: dds_amomfs.com
Description: Тема для информационного сайта о челюстно-лицевой хирургии и обучении по специальности.
Author: Роман Крылов
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: mfsurg
*/

/* =========================================================
   1. Переменные и база
   ========================================================= */

:root {
    --bg-main: #F4F6FA;
    --bg-alt: #E9EDF5;
    --bg-head: #FFFFFF;
    --bg-foot: #1B2133;
    --line: #D0D7E5;
    --ink: #1F2638;
    --accent: #7C7FD1;
    --accent-dark: #5B5EAE;
    --accent-soft: #9CA3D9;
    --muted: #79819B;
    --shadow-card: 0 4px 14px rgba(27, 33, 51, 0.04);
    --shadow-card-hover: 0 12px 24px rgba(27, 33, 51, 0.08);
    --shadow-btn: 0 4px 12px rgba(124, 127, 209, 0.3);
    --font: 'Inter', 'Manrope', 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background: var(--bg-main);
    color: var(--ink);
    font-family: var(--font);
    font-size: 17px;
    font-weight: 400;
    line-height: 1.72;
    letter-spacing: 0.012em;
    -webkit-font-smoothing: antialiased;
}

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

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

.entry-content a,
.page-intro a,
.card-excerpt a,
.widget a {
    background-image: linear-gradient(var(--accent), var(--accent));
    background-repeat: no-repeat;
    background-size: 100% 0;
    background-position: 0 100%;
    transition: background-size 0.2s ease, color 0.2s ease;
}

.entry-content a:hover,
.page-intro a:hover,
.card-excerpt a:hover,
.widget a:hover {
    background-size: 100% 2px;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.01em;
    color: var(--ink);
    margin: 0 0 0.7em;
}

h1 {
    font-size: 3.0rem;
}

h2 {
    font-size: 1.85rem;
}

h3 {
    font-size: 1.32rem;
}

h4 {
    font-size: 1.12rem;
}

p {
    margin: 0 0 1.15em;
}

ul, ol {
    margin: 0 0 1.2em;
    padding-left: 1.35em;
}

li {
    margin-bottom: 0.45em;
}

blockquote {
    margin: 2em 0 2em 2.2rem;
    padding: 1.6rem 1.8rem;
    background: #FFFFFF;
    border-left: 4px solid var(--accent);
    border-radius: 0 8px 8px 0;
    font-size: 1.2rem;
    line-height: 1.6;
    box-shadow: var(--shadow-card);
}

blockquote p:last-child {
    margin-bottom: 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 1.6em;
    border: 1px solid var(--line);
    background: #FFFFFF;
}

th, td {
    border: 1px solid var(--line);
    padding: 0.7rem 0.9rem;
    text-align: left;
}

th {
    background: var(--bg-alt);
    font-weight: 700;
}

code, pre {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
    background: var(--bg-alt);
    font-size: 0.92em;
}

pre {
    padding: 1rem 1.2rem;
    overflow-x: auto;
    border-radius: 8px;
}

/* =========================================================
   2. Контейнер
   ========================================================= */

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

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

/* =========================================================
   3. Кнопки
   ========================================================= */

.btn {
    display: inline-block;
    padding: 0.72rem 1.5rem;
    border-radius: 6px;
    font-size: 0.97rem;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: background-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-solid {
    background: var(--accent);
    color: #FFFFFF;
    border: 2px solid var(--accent);
}

.btn-solid:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    box-shadow: var(--shadow-btn);
    color: #FFFFFF;
}

.btn-ghost {
    background: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
}

.btn-ghost:hover {
    background: var(--accent);
    color: #FFFFFF;
    box-shadow: var(--shadow-btn);
}

.btn-ghost-light {
    color: #FFFFFF;
    border-color: rgba(255, 255, 255, 0.7);
}

.btn-ghost-light:hover {
    background: #FFFFFF;
    color: var(--ink);
    border-color: #FFFFFF;
}

/* =========================================================
   4. Шапка
   ========================================================= */

.site-top {
    background: var(--bg-head);
    border-bottom: 1px solid var(--line);
}

.site-top-inner {
    display: flex;
    align-items: center;
    gap: 1.6rem;
    padding: 1.15rem 0;
    flex-wrap: wrap;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    min-width: 0;
    margin-right: auto;
}

.brand-link {
    display: block;
    flex: 0 0 auto;
}

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

.brand-mark {
    display: block;
}

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

.brand-name {
    display: block;
    font-size: 1.02rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.brand-name a {
    color: var(--ink);
}

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

.brand-tagline {
    display: block;
    margin-top: 0.25rem;
    color: var(--muted);
    font-size: 0.8rem;
    line-height: 1.45;
    max-width: 46ch;
}

.nav-toggle {
    display: none;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 0.85rem;
    background: transparent;
    border: 2px solid var(--accent);
    border-radius: 6px;
    color: var(--accent);
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
}

.nav-toggle-bar {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--accent);
}

.nav-toggle-bar + .nav-toggle-bar {
    margin-top: 0;
}

.nav-toggle.is-active {
    background: var(--accent);
    color: #FFFFFF;
}

.nav-toggle.is-active .nav-toggle-bar {
    background: #FFFFFF;
}

.primary-menu {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.primary-menu li {
    margin: 0;
    position: relative;
}

.primary-menu a {
    display: inline-block;
    padding: 0.3rem 0;
    color: var(--ink);
    font-size: 0.97rem;
    font-weight: 600;
    border-bottom: 2px solid transparent;
}

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

.primary-menu .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 210px;
    margin: 0;
    padding: 0.5rem 0;
    list-style: none;
    background: #FFFFFF;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow-card);
    z-index: 20;
}

.primary-menu li:hover > .sub-menu {
    display: block;
}

.primary-menu .sub-menu a {
    display: block;
    padding: 0.4rem 1rem;
    border-bottom: none;
}

/* Приём №1: акцентная полоса под шапкой */
.accent-bar {
    height: 4px;
    background: var(--accent);
}

.accent-bar--study {
    background: var(--accent-soft);
}

.accent-bar--risk {
    background: var(--accent-dark);
}

/* =========================================================
   5. Хлебные крошки
   ========================================================= */

.crumbs {
    padding: 1.6rem 0 0.4rem;
    color: var(--muted);
    font-size: 0.86rem;
}

.crumbs a {
    color: var(--muted);
}

.crumbs a:hover {
    color: var(--accent);
}

.crumbs-sep {
    color: var(--accent-soft);
    padding: 0 0.15rem;
}

/* =========================================================
   6. Раскладки
   ========================================================= */

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

.layout-single {
    display: block;
    padding: 2.2rem 0 0;
}

.layout-single .content-area {
    width: 85%;
    margin-left: auto;
    margin-right: auto;
}

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

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

.page-title,
.entry-title {
    margin-bottom: 0.5rem;
}

.page-intro {
    color: var(--muted);
}

.empty-note {
    padding: 1.4rem 1.6rem;
    background: var(--bg-alt);
    border-radius: 10px;
    color: var(--muted);
}

/* =========================================================
   7. Карточки записей
   ========================================================= */

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

.card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #FFFFFF;
    border: none;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
}

.card-thumb {
    position: relative;
    overflow: hidden;
}

.card-thumb a {
    display: block;
}

.card-thumb img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.card-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(to bottom, rgba(27, 33, 51, 0.16), rgba(27, 33, 51, 0) 32%, rgba(27, 33, 51, 0) 68%, rgba(27, 33, 51, 0.18)),
        linear-gradient(to right, rgba(27, 33, 51, 0.12), rgba(27, 33, 51, 0) 20%, rgba(27, 33, 51, 0) 80%, rgba(27, 33, 51, 0.12));
}

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

.card-title {
    font-size: 1.16rem;
    margin: 0.35rem 0 0.6rem;
}

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

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

.card-excerpt {
    color: var(--muted);
    font-size: 0.95rem;
    margin-bottom: 1.1rem;
}

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

.card-more {
    margin: auto 0 0;
}

.card-more .btn {
    padding: 0.55rem 1.1rem;
    font-size: 0.9rem;
}

.post-meta {
    color: var(--muted);
    font-size: 0.82rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.post-meta-sep {
    color: var(--accent-soft);
}

.post-meta-cat {
    color: var(--accent-dark);
    font-weight: 600;
}

/* =========================================================
   8. Главная страница
   ========================================================= */

.front-shell {
    padding-top: 2rem;
}

.front-section {
    width: 85%;
    margin-left: auto;
    margin-right: auto;
    padding: 80px 0;
}

.section-title {
    border-left: 4px solid var(--accent);
    padding-left: 12px;
    margin-bottom: 0.55em;
}

.section-lead {
    max-width: 68ch;
    color: var(--muted);
    margin-bottom: 2.4rem;
}

/* Hero */
.fs-hero {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background: linear-gradient(135deg, #E9EDF5, #D5DCEA);
    min-height: 420px;
    display: flex;
    align-items: center;
}

.fs-hero-media {
    position: absolute;
    inset: 0;
}

.fs-hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.fs-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(27, 33, 51, 0.94) 0%, rgba(27, 33, 51, 0.78) 42%, rgba(91, 94, 174, 0.35) 78%, rgba(213, 220, 234, 0.12) 100%);
    z-index: 2;
}

.fs-hero-svg {
    position: absolute;
    right: 4%;
    top: 50%;
    transform: translateY(-50%);
    width: 380px;
    max-width: 46%;
    height: auto;
    z-index: 3;
}

.fs-hero-body {
    position: relative;
    z-index: 4;
    min-width: 0;
    max-width: 40rem;
    padding: 3.6rem 2.6rem;
}

.fs-hero-kicker {
    margin: 0 0 0.8rem;
    color: var(--accent-soft);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.fs-hero-title {
    color: #FFFFFF;
    margin-bottom: 0.6em;
}

.fs-hero-text {
    color: rgba(255, 255, 255, 0.86);
    font-size: 1.03rem;
    margin-bottom: 1.7rem;
}

.fs-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    margin: 0;
}

/* Таймлайн */
.fs-timeline {
    background: var(--bg-alt);
    padding: 80px 2.4rem;
    border-radius: 12px;
    margin-top: 60px;
}

.tl-list {
    list-style: none;
    margin: 0;
    padding: 0 0 0 2.2rem;
    position: relative;
}

.tl-list::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: var(--accent);
}

.tl-item {
    position: relative;
    min-width: 0;
    margin: 0 0 2.4rem;
    padding-left: 0.4rem;
}

.tl-item:last-child {
    margin-bottom: 0;
}

.tl-item::before {
    content: '';
    position: absolute;
    left: -2.2rem;
    top: 0.55rem;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 4px var(--bg-alt);
}

.tl-title {
    margin-bottom: 0.35rem;
}

.tl-text {
    margin: 0;
    color: var(--muted);
    max-width: 72ch;
}

/* Последние записи */
.fs-latest {
    background: transparent;
}

/* Статистика */
.fs-facts {
    position: relative;
    overflow: hidden;
    background: var(--bg-alt);
    padding: 80px 2.4rem;
    border-radius: 12px;
}

.fs-facts::after {
    content: '';
    position: absolute;
    right: -60px;
    bottom: -70px;
    width: 320px;
    height: 320px;
    background: #C5CBE0;
    opacity: 0.15;
    transform: rotate(45deg);
    border-radius: 24px;
    pointer-events: none;
}

.facts-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
    gap: 2rem 1.8rem;
}

.fact {
    min-width: 0;
}

.fact-num {
    display: block;
    font-size: 4rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.03em;
    color: var(--bg-foot);
}

.fact-label {
    display: block;
    margin-top: 0.7rem;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.55;
}

/* Карта тем */
.topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
    gap: 1.6rem;
}

.topic-tile {
    display: block;
    min-width: 0;
    padding: 1.8rem 1.6rem;
    background: #FFFFFF;
    border-radius: 10px;
    box-shadow: var(--shadow-card);
    color: var(--ink);
    transition: background-color 0.22s ease, color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.topic-tile:hover {
    background: var(--accent);
    color: #FFFFFF;
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
}

.topic-icon {
    display: block;
    width: 40px;
    height: 40px;
    color: var(--accent);
    margin-bottom: 1rem;
}

.topic-tile:hover .topic-icon {
    color: #FFFFFF;
}

.topic-name {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.45rem;
}

.topic-note {
    display: block;
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--muted);
}

.topic-tile:hover .topic-note {
    color: rgba(255, 255, 255, 0.9);
}

/* =========================================================
   9. Запись и страница
   ========================================================= */

.entry {
    min-width: 0;
}

.entry-head {
    margin-bottom: 1.6rem;
}

.entry-media {
    margin: 0 0 1.8rem;
}

.entry-media img {
    width: 100%;
    border-radius: 10px;
    display: block;
}

.entry-content h2 {
    border-left: 4px solid var(--accent);
    padding-left: 12px;
    margin-top: 1.8em;
}

.entry-content h3 {
    margin-top: 1.5em;
}

.entry-content img {
    border-radius: 8px;
}

.entry-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 2rem;
}

.tag-chip {
    display: inline-block;
    padding: 0.32rem 0.8rem;
    background: var(--bg-alt);
    border-radius: 6px;
    color: var(--accent-dark);
    font-size: 0.85rem;
    font-weight: 600;
}

.tag-chip:hover {
    background: var(--accent);
    color: #FFFFFF;
}

.entry-nav {
    display: flex;
    justify-content: space-between;
    gap: 1.4rem;
    flex-wrap: wrap;
    margin: 2.6rem 0 0;
    padding: 1.4rem 1.6rem;
    background: var(--bg-alt);
    border-radius: 10px;
    font-size: 0.95rem;
}

.entry-nav > div {
    min-width: 0;
}

.page-links {
    margin-top: 1.4rem;
    font-size: 0.95rem;
}

.error-actions {
    margin-top: 1.6rem;
}

/* =========================================================
   10. Сайдбар и виджеты
   ========================================================= */

.sidebar {
    min-width: 0;
}

.sidebar .widget {
    background: var(--bg-alt);
    border-radius: 10px;
    padding: 1.4rem 1.5rem;
    margin-bottom: 1.6rem;
    color: var(--ink);
}

.sidebar .widget-title {
    font-size: 1.05rem;
    margin-bottom: 0.9rem;
    padding-left: 10px;
    border-left: 4px solid var(--accent);
    color: var(--ink);
}

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

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

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

.sidebar .widget a {
    color: var(--ink);
    font-weight: 600;
    font-size: 0.95rem;
}

.sidebar .widget a:hover {
    color: var(--accent-dark);
}

.sidebar .widget .post-date {
    display: block;
    color: var(--muted);
    font-size: 0.8rem;
}

/* =========================================================
   11. Подвал
   ========================================================= */

.site-bottom {
    background: var(--bg-foot);
    color: #C7CCDA;
    padding: 3.4rem 0 2rem;
}

.footer-cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 2.2rem;
}

.footer-col {
    min-width: 0;
}

.site-bottom .widget {
    margin-bottom: 1.4rem;
    color: #C7CCDA;
    font-size: 0.94rem;
}

.site-bottom .widget-title {
    color: #FFFFFF;
    font-size: 1.02rem;
    margin-bottom: 0.9rem;
    padding-left: 10px;
    border-left: 4px solid var(--accent-soft);
}

.site-bottom .widget p {
    color: #C7CCDA;
}

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

.site-bottom .widget li {
    padding: 0.35rem 0;
}

.site-bottom .widget a {
    color: #DCE1EC;
    font-size: 0.94rem;
}

.site-bottom .widget a:hover {
    color: var(--accent-soft);
}

.site-bottom .widget .post-date {
    display: block;
    color: #9299AD;
    font-size: 0.8rem;
}

.footer-line {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.6rem 1.4rem;
    margin-top: 2.2rem;
    padding-top: 1.4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.88rem;
}

.footer-copy,
.footer-mail {
    margin: 0;
    color: #9299AD;
    min-width: 0;
}

.footer-mail a {
    color: var(--accent-soft);
}

.footer-mail a:hover {
    color: #FFFFFF;
}

/* =========================================================
   12. Пагинация
   ========================================================= */

.pager {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 2.6rem;
}

.pager .page-numbers {
    display: inline-block;
    min-width: 42px;
    padding: 0.5rem 0.85rem;
    background: #FFFFFF;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--ink);
    font-size: 0.94rem;
    font-weight: 600;
    text-align: center;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.pager a.page-numbers:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #FFFFFF;
    box-shadow: var(--shadow-btn);
}

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

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

.comment-pager {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.4rem;
    font-size: 0.92rem;
}

/* =========================================================
   13. Формы поиска и комментариев
   ========================================================= */

.search-form {
    margin: 1.4rem 0;
}

.search-label {
    display: block;
    margin-bottom: 0.4rem;
    color: var(--muted);
    font-size: 0.86rem;
}

.search-row {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.search-field,
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    flex: 1 1 200px;
    min-width: 0;
    padding: 0.65rem 0.9rem;
    background: #FFFFFF;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--ink);
    font-family: var(--font);
    font-size: 0.95rem;
}

.search-field:focus,
.comment-form input:focus,
.comment-form textarea:focus {
    outline: 2px solid var(--accent-soft);
    outline-offset: 1px;
}

.search-submit {
    flex: 0 0 auto;
}

.comments {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--line);
}

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

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

.comment-list .children {
    list-style: none;
    margin: 1rem 0 0;
    padding-left: 1.4rem;
    border-left: 2px solid var(--line);
}

.comment-item {
    background: #FFFFFF;
    border-radius: 10px;
    padding: 1.2rem 1.4rem;
    margin-bottom: 1.1rem;
    box-shadow: var(--shadow-card);
}

.comment-head {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.comment-author {
    font-weight: 700;
}

.comment-date {
    color: var(--muted);
    margin-left: 0.5rem;
}

.comment-text p:last-child {
    margin-bottom: 0;
}

.comment-actions {
    margin-top: 0.6rem;
    font-size: 0.9rem;
}

.comment-hold {
    color: var(--muted);
    font-size: 0.9rem;
}

.comment-form textarea {
    width: 100%;
    min-height: 150px;
    display: block;
}

.comment-form p {
    margin-bottom: 1rem;
}

.comment-form label {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.comment-form .form-submit input[type="submit"],
.comment-form .submit {
    display: inline-block;
    padding: 0.72rem 1.5rem;
    background: var(--accent);
    border: 2px solid var(--accent);
    border-radius: 6px;
    color: #FFFFFF;
    font-family: var(--font);
    font-size: 0.97rem;
    font-weight: 600;
    cursor: pointer;
}

.comment-form .form-submit input[type="submit"]:hover,
.comment-form .submit:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    box-shadow: var(--shadow-btn);
}

.comment-notes,
.comment-form .logged-in-as {
    color: var(--muted);
    font-size: 0.88rem;
}

/* =========================================================
   14. Cookie-баннер
   ========================================================= */

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

.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1.1rem 1.6rem;
    background: var(--bg-foot);
    border-top: 4px solid var(--accent);
    color: #DCE1EC;
}

.cookie-text {
    margin: 0;
    min-width: 0;
    flex: 1 1 320px;
    font-size: 0.9rem;
    line-height: 1.55;
}

.cookie-accept {
    flex: 0 0 auto;
}

/* =========================================================
   15. Адаптив
   ========================================================= */

@media (max-width: 960px) {
    h1 {
        font-size: 2.3rem;
    }

    h2 {
        font-size: 1.6rem;
    }

    .nav-toggle {
        display: inline-flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 3px;
    }

    .nav-toggle-label {
        display: none;
    }

    .primary-nav {
        display: none;
        flex: 1 1 100%;
        order: 5;
    }

    .primary-nav.is-open {
        display: block;
    }

    .primary-menu {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding-top: 0.6rem;
        border-top: 1px solid var(--line);
    }

    .primary-menu a {
        display: block;
        padding: 0.65rem 0;
        border-bottom: 1px solid var(--line);
    }

    .primary-menu .sub-menu {
        display: block;
        position: static;
        border: none;
        box-shadow: none;
        padding: 0 0 0 1rem;
    }

    .layout-with-sidebar {
        display: block;
    }

    .sidebar {
        margin-top: 2.6rem;
    }

    .layout-single .content-area {
        width: 100%;
    }

    .front-section {
        width: 100%;
        padding: 56px 0;
    }

    .fs-timeline,
    .fs-facts {
        padding: 56px 1.8rem;
    }

    .fs-hero-svg {
        opacity: 0.5;
        max-width: 55%;
    }

    .fs-hero-body {
        padding: 2.8rem 2rem;
        max-width: 100%;
    }

    .fact-num {
        font-size: 3.2rem;
    }
}

@media (max-width: 600px) {
    body {
        font-size: 16px;
    }

    h1 {
        font-size: 1.95rem;
    }

    h2 {
        font-size: 1.4rem;
    }

    .brand-tagline {
        display: none;
    }

    .fs-hero {
        min-height: 0;
        border-radius: 10px;
    }

    .fs-hero-svg {
        display: none;
    }

    .fs-hero::before {
        background: linear-gradient(180deg, rgba(27, 33, 51, 0.9) 0%, rgba(27, 33, 51, 0.86) 60%, rgba(91, 94, 174, 0.7) 100%);
    }

    .fs-hero-body {
        padding: 2.2rem 1.4rem;
    }

    .front-section {
        padding: 44px 0;
    }

    .fs-timeline,
    .fs-facts {
        padding: 44px 1.4rem;
        border-radius: 10px;
    }

    .fs-facts::after {
        width: 200px;
        height: 200px;
    }

    .tl-list {
        padding-left: 1.8rem;
    }

    .tl-item::before {
        left: -1.8rem;
    }

    blockquote {
        margin-left: 0;
        padding: 1.2rem 1.3rem;
        font-size: 1.05rem;
    }

    .card-body {
        padding: 1.15rem 1.2rem 1.3rem;
    }

    .topic-tile {
        padding: 1.5rem 1.3rem;
    }

    .empty-note,
    .entry-nav {
        padding: 1.1rem 1.2rem;
    }

    .cookie-banner {
        padding: 1rem 1.2rem;
    }

    .comment-item {
        padding: 1rem 1.1rem;
    }
}
