/*
Theme Name: dds_vames.ru
Theme URI: https://vames.ru/
Author: Анна Белова
Description: Тема для образовательного онлайн-проекта о косметической химии, составах и профессиональном уходе.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: dds_vames
*/

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

:root {
    --bg: #F8F6FC;
    --bg-alt: #F0ECF9;
    --deep: #1A1530;
    --deep-blue: #1B2352;
    --surface: #FFFFFF;
    --text: #1E1A2B;
    --accent: #B37BEB;
    --accent-2: #E0B0FF;
    --muted: #8B83A0;
    --shadow: 0 6px 18px 4px rgba(26, 21, 48, 0.08);
    --shadow-hover: 0 14px 30px 6px rgba(26, 21, 48, 0.16);
    --radius: 12px;
    --radius-btn: 8px;
    --font-head: "Bahnschrift", "DIN Alternate", "Segoe UI Semibold", "Trebuchet MS", "Franklin Gothic Medium", sans-serif;
    --font-body: "Segoe UI", "Helvetica Neue", "Noto Sans", Arial, sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.7;
    color: var(--text);
    background-color: var(--bg);
    background-image:
        repeating-linear-gradient(45deg, rgba(179, 123, 235, 0.055) 0 1px, transparent 1px 22px),
        repeating-linear-gradient(-45deg, rgba(179, 123, 235, 0.055) 0 1px, transparent 1px 22px);
}

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

p {
    margin: 0 0 1.1em;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-head);
    color: var(--text);
    line-height: 1.2;
    letter-spacing: 0.01em;
    margin: 0 0 0.6em;
    font-weight: 600;
}

h1 { font-size: 3.2rem; }
h2 { font-size: 2.1rem; }
h3 { font-size: 1.45rem; }
h4 { font-size: 1.2rem; }

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

/* Анимированное подчёркивание снизу вверх */
.entry-content a,
.widget a,
.breadcrumbs a,
.nav-list a,
.card-more,
.entry-footer a {
    background-image: linear-gradient(var(--accent-2), var(--accent-2));
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 100% 0;
    transition: background-size 0.22s ease, color 0.22s ease;
}

.entry-content a:hover,
.widget a:hover,
.breadcrumbs a:hover,
.nav-list a:hover,
.card-more:hover,
.entry-footer a:hover {
    background-size: 100% 2px;
}

:focus-visible {
    outline: 2px solid var(--accent-2);
    outline-offset: 2px;
}

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

/* Контейнер контентных страниц: 85% без сайдбара, 92% с сайдбаром */
.page-shell {
    width: min(92%, 1180px);
    margin-inline: auto;
}

body.no-sidebar .page-shell {
    width: min(85%, 1180px);
}

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

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

/* Заголовки секций: линия-акцент слева под текстом */
.section-title {
    position: relative;
    padding-bottom: 0.55em;
    margin-bottom: 1.2rem;
}

.section-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 62px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), rgba(179, 123, 235, 0));
    border-radius: 2px;
}

.section-title.is-centered {
    text-align: center;
}

.section-title.is-centered::after {
    left: 50%;
    transform: translateX(-50%);
}

/* Градиентная заливка ключевых слов и цифр */
.hl {
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 600;
}

/* Пунктирный разделитель из квадратных точек */
.dots-divider {
    height: 5px;
    width: 190px;
    margin: 0 auto;
    background-image: repeating-linear-gradient(90deg, var(--accent-2) 0 5px, transparent 5px 16px);
}

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

.btn,
.btn-ghost {
    display: inline-block;
    font-family: var(--font-head);
    font-size: 1rem;
    letter-spacing: 0.02em;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-btn);
    cursor: pointer;
    transition: background-color 0.22s ease, color 0.22s ease, transform 0.22s ease, border-color 0.22s ease;
}

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

.btn:hover,
.btn:focus {
    background: var(--accent-2);
    border-color: var(--accent-2);
    color: var(--deep);
    transform: translateY(-2px);
}

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

.btn-ghost:hover,
.btn-ghost:focus {
    background: var(--accent-2);
    border-color: var(--accent-2);
    color: var(--deep);
    transform: translateY(-2px);
}


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

.site-header {
    position: static;
    background: var(--deep);
    color: #EDE8F7;
    padding: 1.4rem 0 0;
    border-bottom: 3px solid rgba(179, 123, 235, 0.35);
}

.header-top {
    display: flex;
    align-items: flex-start;
    gap: 1.4rem;
    flex-wrap: wrap;
}

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

.brand-logo,
.brand-mark {
    flex: 0 0 auto;
    display: block;
    width: 54px;
    height: 54px;
}

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

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

.site-title {
    font-family: var(--font-head);
    font-size: 1.05rem;
    line-height: 1.35;
    margin: 0 0 0.35rem;
    font-weight: 600;
}

.site-title a {
    color: #FFFFFF;
}


.site-description {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.5;
    color: #A79FC4;
    max-width: 70ch;
}

.header-search {
    flex: 0 1 260px;
    min-width: 0;
    padding-top: 0.3rem;
}

.main-nav {
    margin-top: 1.2rem;
    border-top: 1px solid rgba(224, 176, 255, 0.16);
}

.nav-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.8rem;
    margin: 0;
    padding: 0.7rem 0;
}

.nav-list a {
    color: #E6E0F5;
    font-family: var(--font-head);
    font-size: 1rem;
    letter-spacing: 0.02em;
    padding: 0.2rem 0;
}

.nav-list a:hover {
    color: var(--accent-2);
}

.nav-list .current-menu-item > a {
    color: var(--accent-2);
}

.nav-list ul {
    list-style: none;
    padding: 0.2rem 0 0 1rem;
    margin: 0;
}

.nav-toggle {
    display: none;
    background: transparent;
    border: 2px solid rgba(224, 176, 255, 0.4);
    border-radius: var(--radius-btn);
    color: #EDE8F7;
    font-family: var(--font-head);
    font-size: 0.95rem;
    padding: 0.5rem 0.9rem;
    margin: 0.8rem 0;
    cursor: pointer;
}

/* =========================================================
   4. Поиск
   ========================================================= */

.search-form {
    display: flex;
    gap: 0.5rem;
    min-width: 0;
}

.search-form .search-field {
    flex: 1 1 auto;
    min-width: 0;
    border: 1px solid rgba(139, 131, 160, 0.45);
    border-radius: var(--radius-btn);
    padding: 0.6rem 0.8rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text);
    background: #FFFFFF;
}

.search-form .search-field:focus {
    border-color: var(--accent);
    outline: none;
}

.search-form .search-submit {
    flex: 0 0 auto;
    background: var(--accent);
    color: #FFFFFF;
    border: 2px solid var(--accent);
    border-radius: var(--radius-btn);
    font-family: var(--font-head);
    padding: 0.6rem 1.1rem;
    cursor: pointer;
    transition: background-color 0.22s ease, transform 0.22s ease, color 0.22s ease;
}

.search-form .search-submit:hover {
    background: var(--accent-2);
    border-color: var(--accent-2);
    color: var(--deep);
    transform: translateY(-2px);
}

/* =========================================================
   5. Раскладка страниц
   ========================================================= */

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

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

.layout-single {
    display: block;
}

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

.breadcrumbs {
    font-size: 0.86rem;
    color: var(--muted);
    margin-bottom: 1.4rem;
    line-height: 1.6;
}

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

.breadcrumbs .sep {
    margin: 0 0.35rem;
    color: var(--muted);
}

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

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

.sidebar {
    min-width: 0;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem 1.4rem;
}

.sidebar .widget {
    margin-bottom: 1.8rem;
    color: var(--text);
}

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

.sidebar .widget-title {
    font-size: 1.1rem;
    color: var(--text);
    position: relative;
    padding-bottom: 0.5rem;
    margin-bottom: 0.9rem;
}

.sidebar .widget-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 54px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), rgba(179, 123, 235, 0));
    border-radius: 2px;
}

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

.sidebar .widget li {
    position: relative;
    padding: 0 0 0.75rem 1.3rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid rgba(139, 131, 160, 0.18);
    color: var(--text);
}

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

.sidebar .widget li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.62em;
    width: 10px;
    height: 11px;
    background: var(--accent);
    clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}

.sidebar .widget a {
    color: var(--text);
}

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

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

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

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

.card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.card-thumb-wrap {
    display: block;
    overflow: hidden;
}

.card-thumb-wrap a {
    display: block;
}


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

.card-thumb-wrap a.card-thumb-empty {
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #2A2350, var(--deep-blue));
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-thumb-empty span {
    width: 46px;
    height: 52px;
    background: rgba(224, 176, 255, 0.55);
    clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}

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

.card-title {
    font-size: 1.22rem;
    margin: 0 0 0.5rem;
}

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

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


.entry-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: var(--muted);
    margin-bottom: 0.7rem;
}

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

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

.meta-dot {
    width: 7px;
    height: 8px;
    background: var(--accent-2);
    clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}

.card-excerpt {
    color: #464056;
    font-size: 0.96rem;
    margin-bottom: 1.1rem;
}

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

.card-more {
    margin-top: auto;
    align-self: flex-start;
    font-family: var(--font-head);
    color: var(--accent);
}


.card-more:hover {
    color: var(--deep);
}

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

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

.pager .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    padding: 0.5rem 0.85rem;
    border: 2px solid rgba(179, 123, 235, 0.4);
    border-radius: var(--radius-btn);
    background: var(--surface);
    color: var(--text);
    font-family: var(--font-head);
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}


.pager a.page-numbers:hover {
    background: var(--accent-2);
    border-color: var(--accent-2);
    color: var(--deep);
    transform: translateY(-2px);
}

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

.pager .page-numbers.dots {
    border-color: transparent;
    background: transparent;
    min-width: 0;
}

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

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

.entry-title {
    font-size: 2.4rem;
    margin-bottom: 0.6rem;
}

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

.entry-thumb img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 8;
    object-fit: cover;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

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

.entry-content h2 {
    margin-top: 2rem;
    position: relative;
    padding-left: 1.6rem;
}

.entry-content h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.35em;
    width: 14px;
    height: 16px;
    background: var(--accent);
    clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}

.entry-content h3 {
    margin-top: 1.6rem;
}

.entry-content ul {
    list-style: none;
    padding-left: 1.6rem;
}

.entry-content ul li {
    position: relative;
    margin-bottom: 0.6rem;
}

.entry-content ul li::before {
    content: "";
    position: absolute;
    left: -1.6rem;
    top: 0.55em;
    width: 11px;
    height: 12px;
    background: var(--accent);
    clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}

.entry-content ol {
    padding-left: 1.4rem;
}

.entry-content ol li {
    margin-bottom: 0.6rem;
}

.entry-content img {
    height: auto;
    border-radius: var(--radius);
}

.entry-content blockquote {
    margin: 1.8rem 0;
    padding: 1.6rem 1.8rem;
    background: linear-gradient(120deg, var(--deep), var(--deep-blue));
    border-radius: var(--radius);
    color: #EFEAFB;
    font-size: 1.1rem;
}

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

.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.6rem 0;
    border: 1px solid rgba(30, 26, 43, 0.35);
    background: var(--surface);
}

.entry-content th,
.entry-content td {
    border: 1px solid rgba(30, 26, 43, 0.35);
    padding: 0.7rem 0.9rem;
    text-align: left;
}

.entry-content th {
    background: var(--bg-alt);
    font-family: var(--font-head);
}

.entry-footer {
    margin-top: 2rem;
    padding-top: 1.2rem;
    border-top: 1px solid rgba(139, 131, 160, 0.25);
    font-size: 0.9rem;
    color: var(--muted);
}

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

/* =========================================================
   10. Комментарии
   ========================================================= */

.comments-area {
    margin-top: 2.8rem;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.8rem 1.8rem 2rem;
}

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

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

.comment-list ul.children {
    list-style: none;
    margin: 1rem 0 0;
    padding-left: 1.4rem;
    border-left: 2px solid rgba(179, 123, 235, 0.3);
}

.comment-item {
    margin-bottom: 1.2rem;
}

.comment-inner {
    background: var(--bg-alt);
    border-radius: var(--radius);
    padding: 1.1rem 1.3rem;
}

.comment-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.7rem;
    margin-bottom: 0.5rem;
}

.comment-author {
    font-family: var(--font-head);
    font-size: 1.02rem;
}

.comment-date {
    font-size: 0.8rem;
    color: var(--muted);
}

.comment-await {
    color: var(--muted);
    font-size: 0.88rem;
}

.comment-actions {
    font-size: 0.88rem;
}

.comment-actions a {
    color: var(--accent);
}

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

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    border: 1px solid rgba(139, 131, 160, 0.45);
    border-radius: var(--radius-btn);
    padding: 0.65rem 0.8rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    background: var(--bg);
    color: var(--text);
}

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

.comment-form .submit {
    background: var(--accent);
    color: #FFFFFF;
    border: 2px solid var(--accent);
    border-radius: var(--radius-btn);
    font-family: var(--font-head);
    padding: 0.7rem 1.5rem;
    cursor: pointer;
    transition: background-color 0.22s ease, transform 0.22s ease, color 0.22s ease;
}

.comment-form .submit:hover {
    background: var(--accent-2);
    border-color: var(--accent-2);
    color: var(--deep);
    transform: translateY(-2px);
}

.no-comments {
    color: var(--muted);
}

/* =========================================================
   11. Главная: общие правила секций
   ========================================================= */

.front-section {
    padding: 3.2rem 0;
}

.front-section.is-alt {
    background: var(--bg-alt);
}

.front-section .front-shell {
    min-width: 0;
}

/* 11.1 Hero */

.fs-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(125deg, var(--deep) 0%, #241C4B 55%, var(--deep-blue) 100%);
    color: #F1ECFB;
    padding: 3.6rem 0 3.8rem;
}

.fs-hero::after {
    content: "";
    position: absolute;
    right: -80px;
    bottom: -140px;
    width: 460px;
    height: 460px;
    opacity: 0.07;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 600'%3E%3Cpath fill='%23B37BEB' d='M300 60c78 0 168 42 198 118 30 76 4 172-52 228-56 56-152 82-224 58S82 380 78 300 118 150 172 108 222 60 300 60Z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
}

.hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 2.6rem;
    align-items: center;
}

.hero-eyebrow {
    display: inline-block;
    font-family: var(--font-head);
    font-size: 0.82rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent-2);
    margin-bottom: 1rem;
}

.hero-title {
    color: #FFFFFF;
    margin-bottom: 1rem;
}

.hero-text {
    color: #C9C1E4;
    font-size: 1.05rem;
    max-width: 56ch;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    margin-top: 1.6rem;
}

.hero-art img {
    display: block;
    width: 100%;
    height: auto;
}

/* 11.2 Статистика */

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

.stat-item {
    min-width: 0;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem 1.3rem;
    text-align: center;
}

.stat-num {
    display: block;
    font-family: var(--font-head);
    font-size: 2.6rem;
    line-height: 1.1;
    color: var(--accent-2);
    margin-bottom: 0.35rem;
}

.stat-label {
    display: block;
    font-size: 0.92rem;
    color: var(--text);
}

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

.fs-latest .front-shell > .section-title {
    margin-bottom: 1.6rem;
}

.latest-foot {
    margin-top: 1.8rem;
}

/* 11.4 Таймлайн */

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

.timeline::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    margin-left: -2px;
    background: linear-gradient(180deg, var(--accent), var(--accent-2));
    border-radius: 2px;
}

.timeline li {
    position: relative;
    width: 46%;
    min-width: 0;
    margin-bottom: 2rem;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.3rem 1.5rem;
}

.timeline li:nth-child(odd) {
    margin-right: auto;
}

.timeline li:nth-child(even) {
    margin-left: auto;
}

.timeline li::before {
    content: "";
    position: absolute;
    top: 1.6rem;
    width: 20px;
    height: 22px;
    background: var(--accent);
    clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}

.timeline li:nth-child(odd)::before {
    right: -8.7%;
    transform: translateX(50%);
}

.timeline li:nth-child(even)::before {
    left: -8.7%;
    transform: translateX(-50%);
}

.tl-step {
    display: block;
    font-family: var(--font-head);
    font-size: 0.8rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.4rem;
}

.tl-title {
    font-size: 1.2rem;
    margin-bottom: 0.4rem;
}

.timeline p {
    margin: 0;
    font-size: 0.95rem;
    color: #4A4459;
}

/* 11.5 Рубрикатор («пробирки») */

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

.topic-vial {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 0;
    padding: 2rem 1.2rem 1.6rem;
    border-radius: 90px 90px 10px 10px;
    box-shadow: var(--shadow);
    color: var(--text);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}


.topic-vial:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}

.topic-vial img {
    display: block;
    width: 66px;
    height: 66px;
    margin-bottom: 0.9rem;
}

.topic-name {
    font-family: var(--font-head);
    font-size: 1.1rem;
    margin-bottom: 0.35rem;
}

.topic-note {
    font-size: 0.88rem;
    color: #4A4459;
}

.vial-1 { background: #EFE4FC; }
.vial-2 { background: #E6E2FA; }
.vial-3 { background: #F5E6FB; }
.vial-4 { background: #E8E6F8; }

/* =========================================================
   12. CTA и акцентные плашки
   ========================================================= */

.accent-panel {
    background: linear-gradient(120deg, var(--deep) 0%, var(--deep-blue) 100%);
    border-radius: var(--radius);
    color: #EFEAFB;
    padding: 2.4rem 2.2rem;
    box-shadow: var(--shadow);
}

.accent-panel h2,
.accent-panel h3 {
    color: #FFFFFF;
}

.accent-panel p {
    color: #C9C1E4;
}

.accent-panel p:last-of-type {
    margin-bottom: 0;
}

/* =========================================================
   13. 404 и поиск
   ========================================================= */

.error-box {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2.2rem 2rem;
}

.error-code {
    font-family: var(--font-head);
    font-size: 4.6rem;
    line-height: 1;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 0.6rem;
}

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

.error-search {
    margin-top: 1.4rem;
    max-width: 420px;
}

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

.site-footer {
    position: relative;
    overflow: hidden;
    background: var(--deep);
    color: #D6CFEC;
    padding: 3rem 0 1.6rem;
    margin-top: 2rem;
}

.site-footer::after {
    content: "";
    position: absolute;
    right: -110px;
    bottom: -180px;
    width: 420px;
    height: 420px;
    opacity: 0.07;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 600'%3E%3Cpath fill='%23B37BEB' d='M300 60c78 0 168 42 198 118 30 76 4 172-52 228-56 56-152 82-224 58S82 380 78 300 118 150 172 108 222 60 300 60Z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
}

.footer-cols {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
}

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

.footer-col .widget {
    color: #D6CFEC;
    font-size: 0.95rem;
}

.footer-col .widget-title {
    color: #FFFFFF;
    font-size: 1.08rem;
    position: relative;
    padding-bottom: 0.5rem;
    margin-bottom: 0.9rem;
}

.footer-col .widget-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 54px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), rgba(179, 123, 235, 0));
    border-radius: 2px;
}

.footer-col .widget a {
    color: #E4DDF6;
}

.footer-col .widget a:hover {
    color: var(--accent-2);
}

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

.footer-col .widget li {
    position: relative;
    padding-left: 1.2rem;
    margin-bottom: 0.6rem;
}

.footer-col .widget li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.6em;
    width: 9px;
    height: 10px;
    background: var(--accent-2);
    clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}

.footer-col .widget .post-date {
    display: block;
    font-size: 0.8rem;
    color: #A79FC4;
}

.footer-bottom {
    position: relative;
    z-index: 1;
    margin-top: 2.2rem;
    padding-top: 1.2rem;
    border-top: 1px solid rgba(224, 176, 255, 0.18);
    font-size: 0.86rem;
    color: #A79FC4;
}

/* =========================================================
   15. 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;
    background: rgba(26, 21, 48, 0.97);
    color: #E4DDF6;
    padding: 1rem 1.6rem;
    box-shadow: 0 -6px 20px rgba(26, 21, 48, 0.25);
}

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

.cookie-text a {
    color: var(--accent-2);
}

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

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

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

    .layout-with-sidebar {
        grid-template-columns: minmax(0, 1fr);
        row-gap: 2.4rem;
    }

    .hero-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .hero-art {
        order: -1;
        max-width: 420px;
    }

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

    .topics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .footer-cols {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .front-shell {
        width: 92%;
    }
}

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

    h1 { font-size: 1.95rem; }
    h2 { font-size: 1.55rem; }

    .entry-title { font-size: 1.8rem; }

    .header-top {
        gap: 1rem;
    }

    .header-search {
        flex: 1 1 100%;
    }

    .nav-toggle {
        display: inline-block;
    }

    .main-nav {
        margin-top: 0.4rem;
    }

    .nav-list {
        display: none;
        flex-direction: column;
        gap: 0;
        padding-bottom: 0.8rem;
    }

    .nav-list.is-open {
        display: flex;
    }

    .nav-list li {
        border-bottom: 1px solid rgba(224, 176, 255, 0.12);
    }

    .nav-list a {
        display: block;
        padding: 0.6rem 0;
    }

    .front-section {
        padding: 2.4rem 0;
    }

    .fs-hero {
        padding: 2.6rem 0 2.8rem;
    }

    .accent-panel {
        padding: 1.8rem 1.4rem;
    }

    .stats-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .topics-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .footer-cols {
        grid-template-columns: minmax(0, 1fr);
    }

    .timeline::before {
        left: 9px;
        margin-left: 0;
    }

    .timeline li {
        width: auto;
        margin-left: 2.6rem;
    }

    .timeline li:nth-child(odd),
    .timeline li:nth-child(even) {
        margin-left: 2.6rem;
        margin-right: 0;
    }

    .timeline li:nth-child(odd)::before,
    .timeline li:nth-child(even)::before {
        left: -2.6rem;
        right: auto;
        transform: none;
    }

    .comments-area {
        padding: 1.3rem 1.2rem 1.5rem;
    }

    .cookie-banner {
        padding: 0.9rem 1.1rem;
    }

    .error-code {
        font-size: 3.4rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    * {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
