/* ============================================
   SITE.CSS — структура сайта
   ============================================
   Только структура: layout, header, footer, sidebar, container.
   Стили TipTap-блоков — в blocks.css
   ============================================ */


/* ============================================
   1. БАЗА
   ============================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--site-font);
    font-size: 16px;
    line-height: 1.6;
    color: #1f2937;
    background: #f4f6f8;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Sticky footer: body на всю высоту экрана, flex-колонка */
        min-height: 100vh;
        display: flex;
        flex-direction: column;
}

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

a {
    color: var(--site-primary);
    text-decoration: none;
    transition: color 0.15s ease;
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0 0 0.5em;
    font-weight: 700;
    line-height: 1.3;
}

h1 {
    font-size: 2rem;
}

h2 {
    font-size: 1.5rem;
}

h3 {
    font-size: 1.25rem;
}

h4 {
    font-size: 1.125rem;
}

h5 {
    font-size: 1rem;
}

h6 {
    font-size: 0.875rem;
}

p {
    margin: 0 0 1em;
}


/* ============================================
   2. КОНТЕЙНЕР
   ============================================ */

.site-container {
    width: 95%;
    max-width: 2000px;
    margin: 0 auto;
    padding: 0 16px;
}


/* ============================================
   3. СЕТКА САЙТА (layout)
   ============================================
   Три колонки: левый сайдбар | контент | правый сайдбар
   ============================================ */

.site-main {
    padding: 24px 0;
    min-height: 400px;
flex: 1 0 auto;
}

.site-footer {
    flex-shrink: 0;
}

.site-layout {
    display: grid;
    gap: 20px;
    grid-template-columns: 22% 1fr 15%;
    align-items: start;
}

/* Если один из сайдбаров пустой — перестраиваем сетку */

.site-layout:not(:has(.site-sidebar--left)) {
    grid-template-columns: 1fr 22%;
}

.site-layout:not(:has(.site-sidebar--right)) {
    grid-template-columns: 22% 1fr;
}

.site-layout:not(:has(.site-sidebar--left)):not(:has(.site-sidebar--right)) {
    grid-template-columns: 1fr;
}

/* Контент — гибкий по ширине */

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



/* ============================================
   4. АДАПТИВ
   ============================================ */

/* Планшет — правый сайдбар вниз */

@media (max-width: 1200px) {

    .site-layout,
    .site-layout:not(:has(.site-sidebar--right)) {
        grid-template-columns: 22% 1fr;
    }

    .site-sidebar--right {
        grid-column: 1 / -1;
    }
}

/* Мобильный — всё в одну колонку */

@media (max-width: 992px) {

    .site-layout,
    .site-layout:not(:has(.site-sidebar--left)),
    .site-layout:not(:has(.site-sidebar--right)),
    .site-layout:not(:has(.site-sidebar--left)):not(:has(.site-sidebar--right)) {
        grid-template-columns: 1fr;
    }

    /* Порядок на мобильном: контент → левый сайдбар → правый сайдбар */
    .site-content {
        order: 1;
    }

    .site-sidebar--left {
        order: 2;
    }

    .site-sidebar--right {
        order: 3;
    }
}


/* ============================================
   5. ШАПКА
   ============================================ */

.site-header {
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    position: relative;
    z-index: 100;
}


/* ---- 5.1. Верхняя полоса: лого + действия ---- */

.site-header__top {
    padding: 16px 0;
    border-bottom: 1px solid #e5e7eb;
}

.site-header__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}


/* ---- 5.2. Бренд (лого + название) ---- */

.site-brand {
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    color: inherit;
    flex-shrink: 0;
}

.site-brand:hover {
    color: inherit;
}

.site-brand__logo {
    max-height: 60px;
    width: auto;
    display: block;
    flex-shrink: 0;
}

.site-brand__text {
    min-width: 0;
}

.site-brand__name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.2;
    margin-bottom: 2px;
}

.site-brand__tagline {
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.3;
}


/* ---- 5.3. Действия (BVI + поиск) ---- */

.site-header__actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}


/* BVI — красная, заметная */

.site-bvi-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #dc2626;
    color: #fff !important;
    border-radius: var(--site-radius);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s ease;
}

.site-bvi-btn:hover {
    background: #b91c1c;
    color: #fff !important;
}

.site-bvi-btn i {
    font-size: 15px;
}


/* Поиск */

.site-search {
    display: flex;
    align-items: stretch;
    border: 1px solid #d1d5db;
    border-radius: var(--site-radius);
    overflow: hidden;
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.site-search:focus-within {
    border-color: var(--site-primary);
    box-shadow: 0 0 0 3px rgba(9, 132, 227, 0.15);
}

.site-search__input {
    padding: 8px 14px;
    border: none;
    outline: none;
    font-size: 14px;
    min-width: 200px;
    font-family: inherit;
    background: transparent;
    color: #111827;
}

.site-search__input::placeholder {
    color: #9ca3af;
}

.site-search__btn {
    padding: 8px 16px;
    background: var(--site-primary);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.15s ease;
}

.site-search__btn:hover {
    background: var(--site-accent);
}


/* ---- 5.4. Меню ---- */

.site-nav {
    background: var(--site-primary);
    position: relative;
}

.site-nav__toggle {
    display: none;
    padding: 14px 16px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
}

.site-nav__list {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: stretch;
}

.site-nav__item {
    position: relative;
}

.site-nav__link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 14px 18px;
    color: #fff !important;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
    transition: background 0.15s ease;
    border: none;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
    line-height: 1.3;
}

.site-nav__link:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff !important;
}

.site-nav__link--parent {
    /* родитель с детьми — тот же стиль */
}

.site-nav__arrow {
    font-size: 10px;
    margin-left: 2px;
    opacity: 0.8;
}


/* ---- 5.5. Подменю ---- */

.site-nav__sub {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 240px;
    background: #fff;
    border-radius: var(--site-radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 8px 0;
    margin: 0;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    z-index: 200;
}

.site-nav__item--has-children:hover>.site-nav__sub,
.site-nav__subitem--has-children:hover>.site-nav__sub {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.site-nav__sub .site-nav__sub {
    top: 0;
    left: 100%;
    margin-left: 4px;
}

.site-nav__subitem {
    position: relative;
}

.site-nav__sublink {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    color: #1f2937 !important;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.15s ease, color 0.15s ease;
}

.site-nav__sublink:hover {
    background: #f3f4f6;
    color: var(--site-primary) !important;
}


/* ============================================
   6. АДАПТИВ — ШАПКА
   ============================================ */

@media (max-width: 992px) {

    /* Верхняя полоса — в столбик */
    .site-header__row {
        flex-direction: column;
        align-items: stretch;
    }

    .site-brand {
        justify-content: center;
    }

    .site-brand__logo {
        max-height: 44px;
    }

    .site-brand__name {
        font-size: 1.1rem;
    }

    .site-header__actions {
        justify-content: center;
        flex-wrap: nowrap;
    }

    .site-search {
        flex: 1;
    }

    .site-search__input {
        min-width: 0;
        flex: 1;
    }

    /* Меню — гамбургер */
    .site-nav__toggle {
        display: block;
    }

    .site-nav__collapse {
        display: none;
    }

    .site-nav__collapse.show {
        display: block;
    }

    .site-nav__list {
        flex-direction: column;
    }

    .site-nav__item {
        width: 100%;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .site-nav__link {
        width: 100%;
        padding: 14px 20px;
        justify-content: flex-start;
    }

    /* Подменю на мобильном — раскрываются вниз, а не абсолютно */
    .site-nav__sub {
        position: static;
        background: rgba(0, 0, 0, 0.15);
        box-shadow: none;
        border-radius: 0;
        padding: 0;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
        margin: 0;
    }

    .site-nav__item--has-children.is-open>.site-nav__sub,
    .site-nav__subitem--has-children.is-open>.site-nav__sub {
        display: block;
    }

    .site-nav__subitem {
        width: 100%;
    }

    .site-nav__sublink {
        padding: 12px 20px 12px 36px;
        color: rgba(255, 255, 255, 0.9) !important;
    }

    .site-nav__sublink:hover {
        background: rgba(255, 255, 255, 0.1);
        color: #fff !important;
    }

    .site-nav__sub .site-nav__sublink {
        padding-left: 52px;
    }

    .site-nav__arrow {
        transform: rotate(90deg);
    }
}


@media (max-width: 576px) {
    .site-bvi-btn span {
        display: none;
        /* только иконка на телефоне */
    }

    .site-bvi-btn {
        padding: 10px 12px;
    }

    .site-search__input {
        min-width: 0;
    }
}


/* ============================================
   7. ФУТЕР
   ============================================ */

.site-footer {
    background: #1a1d21;
    color: #e5e7eb;
    margin-top: 40px;
    padding: 40px 0 20px;
    flex-shrink: 0;
}

.site-footer__columns {
    display: grid;
    gap: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
}

/* Равномерное распределение колонок */

.site-footer__columns--count-1 {
    grid-template-columns: 1fr;
}

.site-footer__columns--count-2 {
    grid-template-columns: repeat(2, 1fr);
}

.site-footer__columns--count-3 {
    grid-template-columns: repeat(3, 1fr);
}

.site-footer__columns--count-4 {
    grid-template-columns: repeat(4, 1fr);
}


/* ---- 7.1. Колонка футера ---- */

.site-footer__col {
    min-width: 0;
    color: #d1d5db;
    font-size: 14px;
    line-height: 1.6;
}


/* ---- 7.2. Лого в футере ---- */

.footer-logo__img {
    max-height: 50px;
    width: auto;
    margin-bottom: 10px;
    display: block;
}

.footer-logo__name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
}

.footer-logo__tagline {
    font-size: 13px;
    color: #9ca3af;
}


/* ---- 7.3. Меню в футере ---- */

.footer-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-menu__item {
    margin-bottom: 8px;
}

.footer-menu__link {
    color: #d1d5db !important;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.footer-menu__link:hover {
    color: #fff !important;
}


/* ---- 7.4. Текст в футере ---- */

.footer-text {
    color: #d1d5db;
    font-size: 14px;
    line-height: 1.7;
}

.footer-text p {
    margin: 0 0 8px;
}

.footer-text a {
    color: #93c5fd !important;
}

.footer-text a:hover {
    color: #fff !important;
}


/* ---- 7.5. HTML-колонка ---- */

.footer-html {
    color: #d1d5db;
    font-size: 14px;
    line-height: 1.6;
}

.footer-html a {
    color: #93c5fd !important;
}

.footer-html a:hover {
    color: #fff !important;
}


/* ---- 7.6. Копирайт ---- */

.site-footer__bottom {
    text-align: center;
    font-size: 13px;
    color: #9ca3af;
    padding-top: 4px;
}


/* ============================================
   8. АДАПТИВ — ФУТЕР
   ============================================ */

@media (max-width: 992px) {

    .site-footer__columns--count-3,
    .site-footer__columns--count-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .site-footer {
        padding: 30px 0 16px;
    }

    .site-footer__columns,
    .site-footer__columns--count-2,
    .site-footer__columns--count-3,
    .site-footer__columns--count-4 {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}


/* ============================================
   9. САЙДБАРЫ
   ============================================ */

.site-sidebar {
    background: #fff;
    border-radius: var(--site-radius);
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

/* Отступы между блоками внутри сайдбара */
.site-sidebar>* {
    margin-bottom: 20px;
}

.site-sidebar>*:last-child {
    margin-bottom: 0;
}


/* ---- 9.1. Заголовки внутри сайдбара ---- */

.site-sidebar h1,
.site-sidebar h2,
.site-sidebar h3,
.site-sidebar h4,
.site-sidebar h5,
.site-sidebar h6 {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--site-primary);
}


/* ---- 9.2. Текст ---- */

.site-sidebar p {
    margin: 0 0 12px;
    font-size: 14px;
    line-height: 1.6;
    color: #4b5563;
}

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


/* ---- 9.3. Ссылки ---- */

.site-sidebar a {
    color: var(--site-primary);
    transition: color 0.15s ease;
}

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


/* ---- 9.4. Списки ---- */

.site-sidebar ul,
.site-sidebar ol {
    padding-left: 0;
    list-style: none;
    margin: 0;
}

.site-sidebar ul li,
.site-sidebar ol li {
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.5;
    color: #4b5563;
}

.site-sidebar ul li:last-child,
.site-sidebar ol li:last-child {
    margin-bottom: 0;
}


/* ---- 9.5. Картинки ---- */

.site-sidebar img {
    max-width: 100%;
    height: auto;
    border-radius: var(--site-radius);
}


/* ============================================
   10. ХЛЕБНЫЕ КРОШКИ
   ============================================ */

.breadcrumbs {
    margin-bottom: 20px;
}

.breadcrumbs__list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 14px;
}

.breadcrumbs__item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #6b7280;
}

.breadcrumbs__item::after {
    content: '›';
    color: #d1d5db;
    font-size: 16px;
    line-height: 1;
}

.breadcrumbs__item:last-child::after {
    display: none;
}

.breadcrumbs__link {
    color: #6b7280;
    text-decoration: none;
    transition: color 0.15s ease;
}

.breadcrumbs__link:hover {
    color: var(--site-primary);
}

.breadcrumbs__current {
    color: #1f2937;
    font-weight: 500;
}


/* ============================================
   11. СТРАНИЦА ПОСТА
   ============================================ */

.post-detail {
    background: #fff;
    border-radius: var(--site-radius);
    padding: 32px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

@media (max-width: 768px) {
    .post-detail {
        padding: 20px;
    }
}


/* ---- 11.1. Заголовок поста ---- */

.post-title {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.25;
    color: #111827;
    margin: 0 0 16px;
}

@media (max-width: 768px) {
    .post-title {
        font-size: 1.5rem;
    }
}


/* ---- 11.2. Мета-информация ---- */

.post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    font-size: 14px;
    color: #6b7280;
    padding-bottom: 16px;
    margin-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.post-meta__item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.post-meta__item i {
    font-size: 13px;
    opacity: 0.8;
}

.post-meta__category {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: var(--site-primary);
    color: #fff !important;
    border-radius: var(--site-radius);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s ease;
}

.post-meta__category:hover {
    background: var(--site-accent);
    color: #fff !important;
}


/* ---- 11.3. Теги ---- */

.post-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    font-size: 14px;
}

.post-tags__label {
    color: #6b7280;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.post-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    background: #f3f4f6;
    color: #4b5563 !important;
    border-radius: var(--site-radius);
    font-size: 13px;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.post-tag:hover {
    background: var(--site-primary);
    color: #fff !important;
}


/* ---- 11.4. Превью-картинка ---- */

.post-image {
    margin-bottom: 24px;
    border-radius: var(--site-radius);
    overflow: hidden;
}

.post-image img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    display: block;
}


/* ---- 11.5. Контент поста ---- */

.post-body {
    font-size: 1.0625rem;
    line-height: 1.75;
    color: #1f2937;
}


/* ---- 11.6. Поделиться ---- */

.post-share {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.post-share__label {
    font-size: 14px;
    color: #6b7280;
}

.post-share__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--site-radius);
    background: #f3f4f6;
    color: #4b5563 !important;
    text-decoration: none;
    font-size: 15px;
    transition: background 0.15s ease, color 0.15s ease;
}

.post-share__btn:hover {
    background: var(--site-primary);
    color: #fff !important;
}


/* ============================================
   12. НАВИГАЦИЯ ПРЕД./СЛЕД.
   ============================================ */

.post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 24px;
}

@media (max-width: 768px) {
    .post-nav {
        grid-template-columns: 1fr;
    }
}

.post-nav__item {
    display: block;
    padding: 16px 20px;
    background: #fff;
    border-radius: var(--site-radius);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.04);
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

a.post-nav__item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.post-nav__item--disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.post-nav__label {
    display: block;
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 6px;
}

.post-nav__title {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.3;
}

.post-nav__item--next {
    text-align: right;
}


/* ============================================
   13. ПОХОЖИЕ ПОСТЫ
   ============================================ */

.post-related {
    margin-top: 32px;
    padding: 24px;
    background: #fff;
    border-radius: var(--site-radius);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.post-related__title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.post-related__title i {
    color: var(--site-primary);
}

.post-related__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

@media (max-width: 992px) {
    .post-related__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .post-related__grid {
        grid-template-columns: 1fr;
    }
}

.post-related__card {
    display: block;
    background: #f9fafb;
    border-radius: var(--site-radius);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.post-related__card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.post-related__img {
    height: 120px;
    overflow: hidden;
    background: #e5e7eb;
}

.post-related__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.post-related__card:hover .post-related__img img {
    transform: scale(1.05);
}

.post-related__img--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 24px;
}

.post-related__body {
    padding: 12px 14px;
}

.post-related__name {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.3;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-related__date {
    font-size: 12px;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 4px;
}


/* ============================================
   14. СТРАНИЦА (Page)
   ============================================ */

.page-detail {
    background: #fff;
    border-radius: var(--site-radius);
    padding: 32px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

@media (max-width: 768px) {
    .page-detail {
        padding: 20px;
    }
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.25;
    color: #111827;
    margin: 0 0 20px;
}

@media (max-width: 768px) {
    .page-title {
        font-size: 1.5rem;
    }
}

.page-image {
    margin-bottom: 24px;
    border-radius: var(--site-radius);
    overflow: hidden;
}

.page-image img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    display: block;
}

.page-body {
    font-size: 1.0625rem;
    line-height: 1.75;
    color: #1f2937;
}


/* ============================================
   15. ПОДСТРАНИЦЫ
   ============================================ */

.subpages {
    margin-top: 32px;
    padding: 20px 24px;
    background: #f9fafb;
    border-radius: var(--site-radius);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.subpages__title {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.subpages__title i {
    color: var(--site-primary);
}

.subpages__list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.subpages__item {
    /* пусто */
}

.subpages__link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #fff;
    border-radius: var(--site-radius);
    color: #1f2937 !important;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.subpages__link:hover {
    background: var(--site-primary);
    color: #fff !important;
    transform: translateX(4px);
}

.subpages__link i {
    font-size: 12px;
    opacity: 0.7;
}


/* ============================================
   16. СПИСОК ПОСТОВ + КАРТОЧКА
   ============================================ */

.post-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

.post-card {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 20px;
    padding: 16px;
    background: #fff;
    border-radius: var(--site-radius);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

/* Превью */

.post-card__image {
    display: block;
    height: 160px;
    border-radius: var(--site-radius);
    overflow: hidden;
    background: #f3f4f6;
}

.post-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.post-card:hover .post-card__image img {
    transform: scale(1.05);
}

.post-card__image--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 32px;
}

/* Градиент для карточки без картинки */

.post-card__image--gradient {
    display: flex !important;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.post-card__image--gradient.gradient-1 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

.post-card__image--gradient.gradient-2 {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%) !important;
}

.post-card__image--gradient.gradient-3 {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%) !important;
}

.post-card__image--gradient.gradient-4 {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%) !important;
}

.post-card__image--gradient.gradient-5 {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%) !important;
}

.post-card__image--gradient.gradient-6 {
    background: linear-gradient(135deg, #30cfd0 0%, #330867 100%) !important;
}

.post-card__image--gradient.gradient-7 {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%) !important;
}

.post-card__image--gradient.gradient-8 {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%) !important;
}

.post-card__initial {
    font-size: 64px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    user-select: none;
    line-height: 1;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

/* Содержимое */

.post-card__body {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.post-card__title {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 8px;
}

.post-card__title a {
    color: #111827 !important;
    text-decoration: none;
    transition: color 0.15s ease;
}

.post-card__title a:hover {
    color: var(--site-primary) !important;
}

.post-card__excerpt {
    font-size: 14px;
    line-height: 1.6;
    color: #6b7280;
    margin: 0 0 12px;
    flex: 1;
}

.post-card__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: #6b7280;
    margin-top: auto;
}

.post-card__meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.post-card__meta-item i {
    font-size: 12px;
    opacity: 0.8;
}

.post-card__category {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    background: var(--site-primary);
    color: #fff !important;
    border-radius: var(--site-radius);
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s ease;
}

.post-card__category:hover {
    background: var(--site-accent);
    color: #fff !important;
}

.post-card__tags {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.post-card__tag {
    padding: 3px 9px;
    background: #f3f4f6;
    color: #4b5563 !important;
    border-radius: var(--site-radius);
    font-size: 12px;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.post-card__tag:hover {
    background: var(--site-primary);
    color: #fff !important;
}

/* ---- Адаптив карточки ---- */

@media (max-width: 768px) {
    .post-card {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 12px;
    }

    .post-card__image {
        height: 200px;
    }

    .post-card__title {
        font-size: 1.125rem;
    }
}


/* ============================================
   17. ЗАГОЛОВОК СТРАНИЦЫ СПИСКА
   ============================================ */

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
    background: #fff;
    border-radius: var(--site-radius);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.04);
    margin-bottom: 20px;
}

.page-header__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-header__title i {
    color: var(--site-primary);
}

.page-header__count {
    font-size: 0.875rem;
    font-weight: 400;
    color: #6b7280;
}

.page-header__desc {
    font-size: 14px;
    color: #6b7280;
    margin: 8px 0 0;
}

@media (max-width: 576px) {
    .page-header {
        padding: 16px 18px;
    }

    .page-header__title {
        font-size: 1.25rem;
    }
}


/* ============================================
   18. ИНФО-БЛОК (для категории, тега, автора)
   ============================================ */

.info-block {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 24px;
    background: #fff;
    border-radius: var(--site-radius);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.04);
    margin-bottom: 20px;
}

.info-block__image {
    width: 80px;
    height: 80px;
    border-radius: var(--site-radius);
    overflow: hidden;
    flex-shrink: 0;
    background: #f3f4f6;
}

.info-block__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.info-block__body {
    flex: 1;
    min-width: 0;
}

.info-block__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 8px;
    line-height: 1.3;
}

.info-block__desc {
    font-size: 14px;
    color: #4b5563;
    line-height: 1.6;
    margin: 0 0 12px;
}

.info-block__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13px;
    color: #6b7280;
}

.info-block__meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

@media (max-width: 576px) {
    .info-block {
        flex-direction: column;
        padding: 18px;
        gap: 14px;
    }

    .info-block__title {
        font-size: 1.25rem;
    }
}


/* ============================================
   19. ПУСТОЕ СОСТОЯНИЕ (нет постов)
   ============================================ */

.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: var(--site-radius);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.empty-state__icon {
    font-size: 48px;
    color: #d1d5db;
    margin-bottom: 16px;
    display: block;
}

.empty-state__text {
    font-size: 15px;
    color: #6b7280;
    margin: 0;
}


/* ============================================
   20. ПАГИНАЦИЯ
   ============================================ */

.pagination-wrap {
    margin-top: 32px;
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.pagination__item {
    /* пусто */
}

.pagination__link,
.pagination__current,
.pagination__dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 10px;
    border-radius: var(--site-radius);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
    border: 1px solid rgba(0, 0, 0, 0.06);
    background: #fff;
    color: #4b5563;
}

.pagination__link:hover {
    background: var(--site-primary);
    color: #fff !important;
    border-color: var(--site-primary);
}

.pagination__current {
    background: var(--site-primary);
    color: #fff;
    border-color: var(--site-primary);
    cursor: default;
}

.pagination__dots {
    border: none;
    background: transparent;
    cursor: default;
    color: #9ca3af;
}

.pagination__item--disabled .pagination__link {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.pagination__link i {
    font-size: 12px;
}


/* Градиент для карточки без картинки */

.post-card__image--gradient {
    display: flex !important;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.post-card__initial {
    font-size: 64px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    user-select: none;
    line-height: 1;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}


/* ============================================
   21. ФОРМА ПОИСКА (на странице поиска)
   ============================================ */

.search-box {
    background: #fff;
    border-radius: var(--site-radius);
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.04);
    margin-bottom: 20px;
}

.search-box__form {
    display: flex;
    gap: 12px;
}

.search-box__input {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid #e5e7eb;
    border-radius: var(--site-radius);
    font-size: 16px;
    font-family: inherit;
    color: #111827;
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    min-width: 0;
}

.search-box__input:focus {
    outline: none;
    border-color: var(--site-primary);
    box-shadow: 0 0 0 4px rgba(9, 132, 227, 0.12);
}

.search-box__input::placeholder {
    color: #9ca3af;
}

.search-box__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border: none;
    border-radius: var(--site-radius);
    background: var(--site-primary);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s ease;
    white-space: nowrap;
}

.search-box__btn:hover {
    background: var(--site-accent);
}

@media (max-width: 576px) {
    .search-box {
        padding: 16px;
    }

    .search-box__form {
        flex-direction: column;
        gap: 10px;
    }

    .search-box__btn {
        justify-content: center;
    }
}


/* ============================================
   22. СТРАНИЦА 404
   ============================================ */

.error-page {
    background: #fff;
    border-radius: var(--site-radius);
    padding: 60px 24px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.04);
    max-width: 720px;
    margin: 0 auto;
}

/* Огромная 404 */

.error-page__code {
    font-size: clamp(96px, 18vw, 180px);
    font-weight: 900;
    line-height: 1;
    background: linear-gradient(135deg, var(--site-primary) 0%, var(--site-accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    margin-bottom: 16px;
    letter-spacing: -0.05em;
    user-select: none;
    animation: errorPageCodeIn 0.6s ease-out;
}

@keyframes errorPageCodeIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.error-page__title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 12px;
}

.error-page__text {
    font-size: 15px;
    color: #6b7280;
    line-height: 1.7;
    margin: 0 0 32px;
}


/* ---- Котик ---- */

.error-page__cat {
    margin: 0 auto 32px;
    max-width: 220px;
}

.error-page__cat-wrapper {
    width: 200px;
    height: 200px;
    margin: 0 auto 12px;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.error-page__cat-wrapper:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.error-page__cat-loading {
    font-size: 13px;
    color: #9ca3af;
    padding: 0 20px;
    text-align: center;
    line-height: 1.4;
}

.error-page__cat-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.error-page__cat-caption {
    font-size: 13px;
    color: #9ca3af;
    font-style: italic;
}


/* ---- Кнопки действий ---- */

.error-page__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.error-page__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--site-radius);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s ease;
    border: 2px solid transparent;
    cursor: pointer;
    font-family: inherit;
}

.error-page__btn i {
    font-size: 14px;
}

.error-page__btn--primary {
    background: var(--site-primary);
    color: #fff !important;
    border-color: var(--site-primary);
}

.error-page__btn--primary:hover {
    background: var(--site-accent);
    border-color: var(--site-accent);
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.error-page__btn--outline {
    background: #fff;
    color: #4b5563 !important;
    border-color: #e5e7eb;
}

.error-page__btn--outline:hover {
    border-color: var(--site-primary);
    color: var(--site-primary) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}


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

@media (max-width: 576px) {
    .error-page {
        padding: 40px 16px;
    }

    .error-page__code {
        font-size: 96px;
    }

    .error-page__title {
        font-size: 1.375rem;
    }

    .error-page__cat-wrapper {
        width: 160px;
        height: 160px;
    }

    .error-page__actions {
        flex-direction: column;
    }

    .error-page__btn {
        justify-content: center;
        width: 100%;
    }
}


/* Форма картинок на сайте */
img[data-shape="square"] {
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 0;
}

img[data-shape="circle"] {
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 50%;
}

img[data-shape="rounded"] {
    border-radius: 24px;
}


/* Вертикальное выравнивание колонок */
.tiptap-columns[data-valign="stretch"] {
    align-items: stretch;
}

.tiptap-columns[data-valign="start"] {
    align-items: flex-start;
}

.tiptap-columns[data-valign="center"] {
    align-items: center;
}

.tiptap-columns[data-valign="end"] {
    align-items: flex-end;
}


/* ============================================ */
/* ВИДЕО (YouTube / VK / Rutube)                 */
/* ============================================ */

.tiptap-youtube {
    margin: 1.5em auto;
    max-width: 100%;
    /* соотношение сторон через padding-hack */
    position: relative;
}

.tiptap-youtube::before {
    content: '';
    display: block;
    padding-bottom: 56.25%;
    /* 16:9 */
}

.tiptap-youtube[style*="--video-aspect: 9:16"]::before {
    padding-bottom: 177.78%;
    /* 9:16 */
}

.tiptap-youtube iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    border-radius: inherit;
}

.tiptap-youtube--shadow {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.tiptap-video-figure {
    margin: 1.5em auto;
}

.tiptap-video-caption {
    margin-top: 8px;
    font-size: 13px;
    color: #6b7280;
    text-align: center;
    font-style: italic;
}


/* ============================================ */
/* БЛОК: БАННЕРЫ (карусель)                     */
/* ============================================ */

.tiptap-banner {
    position: relative;
    margin: 1.5em 0;
    border-radius: 12px;
    overflow: hidden;
    background: #f3f4f6;
    max-width: 100%;
}

.banner-viewport {
    position: relative;
    width: 100%;
    height: var(--banner-height, 300px);
}

.banner-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.banner-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

.banner-slide-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.banner-slide-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Стрелки */
.banner-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
    color: #111;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    transition: background 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner-arrow:hover {
    background: rgba(255, 255, 255, 1);
}

.banner-arrow--prev {
    left: 12px;
}

.banner-arrow--next {
    right: 12px;
}

/* Точки */
.banner-dots {
    position: absolute;
    bottom: 12px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 10;
}

.banner-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 2px solid #fff;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    transition: background 0.15s;
}

.banner-dot.is-active {
    background: #fff;
}

/* Адаптив */
@media (max-width: 768px) {
    .banner-arrow {
        width: 32px;
        height: 32px;
        font-size: 20px;
    }

    .banner-arrow--prev {
        left: 6px;
    }

    .banner-arrow--next {
        right: 6px;
    }
}