/*
  This is your main CSS style sheet file, its content and the content generated by visual-override.js and the Custom CSS tool are merged into one, the style.css file.
  Therefore, attach only the style.css file to the head section.
*/
/* Добавьте это в начало вашего CSS файла */
/* ИСПРАВЛЕНО: больше не скрываем подменю через aria-hidden - теперь управляем через JS класс .active */

* {
    margin: 0; /* Изменено с auto на 0 */
    padding: 0; /* Изменено с 1px на 0 для точности */
    box-sizing: border-box;
    text-decoration: none;
}

:root {
    /* Цветовая палитра — современная, с игровым акцентом */
    --primary-color: #6c5ce7; /* Насыщенный фиолетовый */
    --primary-light: #a29bfe; /* Светлый фиолетовый */
    --primary-dark: #4834d4; /* Тёмный фиолетовый */
    --secondary-color: #00cec9; /* Бирюзовый акцент */
    --accent-color: #fd79a8; /* Розовый акцент */
    --accent-orange: #e17055; /* Оранжевый акцент */
    --accent-green: #00b894; /* Зелёный для категорий */
    --accent-yellow: #fdcb6e; /* Жёлтый для выделений */
    
    /* Фоны и текст */
    --light-color: #f5f6fa; /* Общий фон */
    --white: #ffffff; /* Белый */
    --dark-color: #2d3436; /* Основной текст */
    --text-secondary: #636e72; /* Вторичный текст */
    --gray-light: #dfe6e9; /* Светлый бордюр */
    --gray: #b2bec3; /* Серый */
    --gray-dark: #636e72; /* Тёмно-серый */
    
    /* Градиенты */
    --gradient-primary: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
    --gradient-accent: linear-gradient(135deg, #fd79a8 0%, #e17055 100%);
    --gradient-hero: linear-gradient(135deg, #0c0c1d 0%, #1a1a3e 50%, #2d1b69 100%);
    
    /* Тени — мягкие, современные */
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --shadow-xl: 0 15px 40px rgba(0,0,0,0.15);
    --shadow-glow: 0 0 20px rgba(108, 92, 231, 0.3);
    
    /* Скругления */
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --border-radius-lg: 16px;
    --border-radius-xl: 24px;
    --border-radius-pill: 50px;
    
    /* Отступы */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2.5rem;
    --spacing-2xl: 4rem;
}

/*** Layout ***/
body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.7;
    color: var(--dark-color);
    background-color: var(--light-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

header {
    grid-area: header;
}

main {
    grid-area: main;
}

aside {
    grid-area: sidebar;
}

/* Стили шапки сайта */
.site-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
    position: sticky; 
    top: 0; 
    z-index: 1100;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.container-post {
    max-width: 820px;
    margin: 40px auto;
    padding: 0 24px;
}

.container-index {
    width: 100%;
    max-width: 90%;
    margin: 0 auto;
    padding: 2rem 1rem;
}
.container-tag { 
    width: 100%;
    max-width: 90%;
    margin: 0 auto;
    padding: 2rem 1rem;
}
.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    flex-wrap: wrap;
}

/* Навигация */
.main-nav {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

/* Меню */
.menu-root,
.menu-root ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu {
    display: flex;
    list-style: none;
}

/* Контейнер для пункта с выпадающим меню */
.menu li {
    position: relative; /* Важно для привязки подменю */
}

.menu a {
    color: var(--dark-color);
    font-weight: 500;
    padding: 0.9rem 1rem;
    position: relative;
    display: block;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
    transition: color 0.25s ease;
}

.menu a::after {
    content: '';
    position: absolute;
    bottom: 0.5rem;
    left: 1rem;
    right: 1rem;
    height: 2px;
    background: var(--gradient-accent);
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.menu a:hover {
    color: var(--primary-color);
}

.menu a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.menu a.active {
    color: var(--primary-color);
    font-weight: 600;
}

.menu a.active::after {
    content: '';
    position: absolute;
    bottom: 0.5rem;
    left: 1rem;
    right: 1rem;
    height: 2px;
    background: var(--gradient-accent);
    border-radius: 2px;
    transform: scaleX(1);
    transform-origin: left;
}

/* Логотип */
#logo {
    display: flex;
    align-items: center;
    font-size: 1.9rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.logotext:hover {
    filter: brightness(1.1);
    transition: filter 0.3s ease;
}

/* Общие стили */
h2 {
    font-size: 2rem;
    margin-bottom: var(--spacing-xl);
    color: var(--dark-color);
    position: relative;
    padding-bottom: 0.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 4px;
    background: var(--gradient-accent);
    border-radius: 2px;
}

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

/* Стили для ссылок */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.25s ease;
}

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

/* Секции */
section {
    margin: 0.5rem;
}

/* Карточки статей */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
    margin-bottom: var(--spacing-xl);
}

.article-card {
    background-color: var(--white);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.35s ease;
    border: 1px solid rgba(0, 0, 0, 0.04);
    
    display: flex;
    flex-direction: column;
    height: 100%;
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(108, 92, 231, 0.15);
}

.article-image {
    height: 0;
    padding-top: 56.25%;
    overflow: hidden;
    position: relative;
    margin-bottom: 1rem;
}

.article-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.article-card:hover .article-image img {
    transform: scale(1.08);
}

.article-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(to top, rgba(0,0,0,0.15), transparent);
    pointer-events: none;
}

.article-content {
    padding: 1.25rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.article-title {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    color: var(--dark-color);
    line-height: 1.45;
    font-weight: 600;
    letter-spacing: -0.01em;
    
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 3em;
}

.article-title a {
    color: inherit;
    text-decoration: none;
}

.article-title a:hover {
    color: var(--primary-color);
}

.article-excerpt {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    flex-grow: 1;
    font-size: 0.95rem;
    line-height: 1.65;

    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-category {
    display: inline-block;
    padding: 0.3rem 0.9rem;
    background: var(--gradient-primary);
    color: white;
    border-radius: var(--border-radius-pill);
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.85rem;
    align-self: flex-start;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(108, 92, 231, 0.3);
}

.article-category.gui {
    background: linear-gradient(135deg, #00b894 0%, #00cec9 100%);
    box-shadow: 0 2px 8px rgba(0, 184, 148, 0.3);
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-light);
    font-size: 0.85rem;
    color: var(--gray-dark);
}

.article-date time {
    margin-right: 0.25rem;
}

.read-more {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.25s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.read-more:hover {
    color: var(--accent-color);
    gap: 8px;
}

/* Полная статья */
.article-full {
    padding: 40px;
    line-height: 1.85;
}

.article-full-header {
    margin-bottom: var(--spacing-xl);
}

.article-full-title {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
    line-height: 1.25;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.article-full-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-lg);
    border-bottom: 2px solid var(--gray-light);
}

.article-full-date {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.article-full-image {
    margin-bottom: var(--spacing-xl);
}

.article-full-image img {
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    width: 100%;
}

.article-full-content {
    font-size: 1.1rem;
    line-height: 1.9;
}

.article-full-content h2 {
    font-size: 1.8rem;
    margin: var(--spacing-xl) 0 var(--spacing-md);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--dark-color);
}

.article-full-content h3 {
    font-size: 1.5rem;
    margin: var(--spacing-lg) 0 var(--spacing-md);
    color: var(--dark-color);
    font-weight: 600;
}

.article-full-content p {
    font-size: 1.1rem;
    color: #3a3a3a;
    margin-bottom: 1.5rem;
    letter-spacing: -0.005em;
}

.article-full-content p:first-of-type {
    font-size: 1.15rem;
    color: var(--dark-color);
    font-weight: 400;
}
/* --- Общие стили для секций сайдбара --- */
aside section {
    margin-bottom: 40px;
    padding: 0 10px;
}

aside h3 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--gray-light);
    color: var(--dark-color);
    font-weight: 700;
}

/* --- 1. Секция "Выбранные статьи" (Selected Posts) --- */
.article-navigation {
    display: flex;
    flex-direction: column;
}

.prev-article {
    display: block;
    padding: 14px 0;
    color: var(--dark-color);
    text-decoration: none;
    font-size: 0.95rem;
    line-height: 1.5;
    border-bottom: 1px solid var(--gray-light);
    transition: all 0.3s ease;
    font-weight: 500;
}

.prev-article:hover {
    color: var(--primary-color);
    padding-left: 10px;
}

/* --- 2. Рекомендуемые статьи (Featured Posts) --- */
.featured-posts__list {
    counter-reset: featured-counter;
    padding: 0;
    list-style: none;
}

.featured-posts__list li {
    position: relative;
    padding: 12px 0 12px 40px;
    border-bottom: 1px solid var(--gray-light);
}

.featured-posts__list li::before {
    counter-increment: featured-counter;
    content: counter(featured-counter);
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary-color);
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(108, 92, 231, 0.1);
    border-radius: 50%;
}

.featured-posts__list a.invert {
    color: var(--dark-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.25s ease;
}

.featured-posts__list a.invert:hover {
    color: var(--primary-color);
}

/* --- 3. Список авторов (Authors) --- */
aside section ul {
    list-style: none;
    padding: 0;
}

aside section ul li {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    padding: 8px 0;
}

aside section ul li img {
    border-radius: 50%;
    object-fit: cover;
    margin-right: 14px;
    border: 2px solid var(--gray-light);
    transition: all 0.3s ease;
    width: 44px;
    height: 44px;
}

aside section ul li a {
    text-decoration: none;
    color: var(--dark-color);
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.25s ease;
}

aside section ul li a sup {
    color: var(--gray);
    font-weight: normal;
    margin-left: 4px;
}

aside section ul li:hover img {
    border-color: var(--primary-color);
    transform: scale(1.1);
}



/* Рекламные баннеры */
.ad-banner {
    margin: var(--spacing-xl) 0;
    text-align: center;
}

.banner-placeholder {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px dashed var(--gray);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-xl);
    color: var(--gray-dark);
    font-size: 1rem;
}

.banner-placeholder small {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

/* Боковое меню слева */
.menu-left {
    background-color: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
    position: sticky;
    top: 100px;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

/* Заголовок меню */
.menu-left__title {
    font-size: 1.3rem;
    margin-bottom: var(--spacing-lg);
    color: var(--dark-color);
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary-color);
    font-weight: 700;
    letter-spacing: -0.01em;
}

/* Навигация в боковом меню */

.menu-left__list,
.menu-left__list2 {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    list-style: none;
}

.menu-left__item {
    width: 100%;
    margin: 0;
}

.menu-left__link {
    display: block;
    padding: 0.9rem 1.1rem;
    color: var(--dark-color);
    font-weight: 500;
    border-radius: var(--border-radius-sm);
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    font-size: 0.95rem;
}

.menu-left__link:hover {
    color: var(--primary-color);
    background-color: rgba(108, 92, 231, 0.06);
    border-left-color: var(--primary-color);
    padding-left: 1.4rem;
}

.menu-left__link--active {
    color: var(--primary-color);
    background-color: rgba(108, 92, 231, 0.1);
    border-left-color: var(--primary-color);
    font-weight: 600;
}

/* Второй уровень меню (выпадающий) */
.menu-left__list2 {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 100;
    padding: var(--spacing-xs) 0;
    min-width: 220px;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.menu-left__list2 li {
    width: 100%;
    padding: 0 0.5rem;
}

.menu-left__list2 .menu-left__link {
    padding: var(--spacing-sm) var(--spacing-md);
    border-left: none;
    font-size: 0.9rem;
}

.menu-left__list2 .menu-left__link:hover {
    background-color: rgba(108, 92, 231, 0.08);
    padding-left: 1.2rem;
}

/* Футер */
/* --- СТИЛИ ФУТЕРА --- */
.site-footer {
    background: var(--gradient-hero);
    color: #e0e0e0;
    padding: 60px 0 25px;
    margin-top: 80px;
    position: relative;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-accent);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    gap: 50px;
    justify-content: space-between;
}

.footer-section {
    flex: 1;
    min-width: 260px;
}

.footer-section h3 {
    font-size: 1.2rem;
    color: #ffffff;
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 700;
}

.footer-section p {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #a0a0a0;
}

/* Соцсети (SVG) */
.social-links {
    display: flex;
    gap: 16px;
    margin-top: 24px;
}

.social-links svg {
    width: 36px;
    height: 36px;
    transition: all 0.3s ease;
    filter: brightness(0.9);
}

.social-links a:hover svg {
    transform: translateY(-3px) scale(1.1);
    filter: brightness(1.2);
}

/* Меню Publii в футере */
.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li a {
    color: #a0a0a0;
    text-decoration: none;
    padding: 8px 0;
    display: block;
    transition: all 0.25s ease;
    font-size: 0.95rem;
}

.footer-section ul li a:hover {
    color: var(--secondary-color);
    padding-left: 6px;
}

/* Нижняя часть */
.footer-bottom {
    margin-top: 50px;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
    font-size: 0.85rem;
    color: #707070;
}

/* Кнопка "Наверх" */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 52px;
    height: 52px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.4);
}

#back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

#back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(108, 92, 231, 0.5);
}

/* Sidebar menu */
.sidebar-menu {
    display: grid;
    grid-row-gap: 26px;
    row-gap: 26px;
    padding-top: var(--layout-view-offset-y);
    padding-bottom: var(--layout-view-offset-y);
    padding-left: var(--layout-left-aside-offset);
    padding-right: 8px;
}

/* Related posts */
#related-posts .article-card {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

#related-posts .article-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(108, 92, 231, 0.15);
}

#related-posts .article-card .article-image {
    height: 0;
    padding-top: 56.25%;
    overflow: hidden;
    position: relative;
}

#related-posts .article-card .article-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

#related-posts .article-card:hover .article-image img {
    transform: scale(1.08);
}

/* Items */
.items {
    display: flex;
    justify-content: flex-start; /* выравнивание по левому краю */
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
}
/* Шапка категории */
.tag-header {
    text-align: center;
    margin-bottom: 50px;
    padding: 0 20px;
}

.tag-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 10px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.03em;
}

/* СЕТКА СТАТЕЙ */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    padding: 30px;
}

/* КАРТОЧКА */
.post-card {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.post-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(108, 92, 231, 0.15);
}

.post-card-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.6s ease;
}

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

.post-card-content {
    padding: 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.post-card-title {
    font-size: 1.2rem;
    color: var(--dark-color);
    line-height: 1.45;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 3em;
    letter-spacing: -0.01em;
}

.post-card-date {
    font-size: 13px;
    color: var(--gray-dark);
    margin-bottom: 12px;
}

.post-card-excerpt {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 20px;
}

.post-card-readmore {
    margin-top: auto;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.25s ease;
}

.post-card-readmore:hover {
    color: var(--accent-color);
}

/* Общие отступы страницы */
.container-tags {
    width: 100%;
    max-width: 90%;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.tags-page-header {
    text-align: center;
    margin-bottom: 50px;
}

.tags-page-title {
    font-size: 2.8rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.03em;
}

/* Сетка тегов */
.tags-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 28px;
}

/* Карточка тега */
.tag-card {
    background: var(--white);
    border-radius: var(--border-radius-xl);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
}

.tag-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.tag-card-image img,
.tag-placeholder {
    width: 100%;
    height: 170px;
    object-fit: cover;
    background: var(--gray-light);
}

.tag-card-content {
    padding: 24px;
}

.tag-card-name {
    font-size: 1.3rem;
    margin: 0 0 8px 0;
    color: var(--dark-color);
    font-weight: 700;
    letter-spacing: -0.01em;
}

.tag-card-count {
    font-size: 0.85rem;
    color: var(--white);
    background: var(--gradient-primary);
    padding: 5px 14px;
    border-radius: var(--border-radius-pill);
    display: inline-block;
    margin-bottom: 14px;
    font-weight: 600;
}

.tag-card-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
/* Основные стили меню */


.menu-root,
.menu-root ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}
.menu-root li::before {
    content: "";
}



/* CSS classes generated by Publii */
/* Text alignment */
.align-left {}
.align-right {}
.align-center {}
.align-justify {}

/* Post images*/
.post__image--left {}
.post__image--right {}
.post__image--center {}
.post__image--wide {}
.post__image--full {}

/* Post video*/
.post__video {}

/* Post iframe*/
.post__iframe {}

/* Table of content*/
.post__toc {}

/* Separator */
hr {}
.separator--dot {}
.separator--dots {}
.separator--long-line {}

/* Gallery */
.gallery-wrapper {}
.gallery-wrapper--wide {}
.gallery-wrapper--full {}
.gallery {}
.gallery__item {}

/* Menu levels */
.menu-level-x {} /* where 'x' is a menu level number*/
.active {}
.active-parent {}


/* Адаптивность для мобильных устройств */
/* Работа на ПК: раскрытие при наведении */

@media (max-width: 992px) {
    
    .hero {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-content {
        padding-right: 0;
        margin-bottom: var(--spacing-lg);
    }
    
    
}
/* Базовые стили меню */
.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-link, .menu-separator {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: var(--dark-color);
    cursor: pointer;
    font-weight: 600;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.submenu-arrow {
    display: inline-block;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.7em;
    margin-left: 6px;
    opacity: 0.6;
}

.has-submenu.is-open .submenu-arrow {
    transform: rotate(180deg);
}

/* --- СТИЛИ КНОПКИ-БУРГЕРА --- */
.menu-toggle {
    display: none; /* Скрыта на десктопах */
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 2px solid transparent;
    cursor: pointer;
    z-index: 1101;
    padding: 0;
    margin-left: auto;
    flex-shrink: 0;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.menu-toggle:hover {
    background: rgba(108, 92, 231, 0.08);
}

.menu-toggle span {
    width: 22px;
    height: 2.5px;
    background: var(--gradient-primary);
    border-radius: 3px;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

/* Анимация бургера в крестик */
.menu-toggle.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}
/* --- /СТИЛИ КНОПКИ-БУРГЕРА --- */

/* --- ПК ВЕРСИЯ (769px и выше) --- */
@media (min-width: 769px) {
    .menu-root {
        display: flex;
        align-items: center;
        gap: 4px;
        list-style: none;
    }

    .menu-root li {
        position: relative;
    }

    /* Основные пункты меню */
    .menu-root > li > .menu-link {
        padding: 12px 18px;
        color: var(--dark-color);
        font-weight: 600;
        font-size: 0.95rem;
        letter-spacing: 0.01em;
        border-radius: 8px;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        position: relative;
    }

    .menu-root > li > .menu-link::before {
        content: '';
        position: absolute;
        bottom: 6px;
        left: 50%;
        transform: translateX(-50%) scaleX(0);
        width: calc(100% - 36px);
        height: 2px;
        background: var(--gradient-accent);
        border-radius: 2px;
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        transform-origin: center;
    }

    .menu-root > li:hover > .menu-link {
        color: var(--primary-color);
        background: rgba(108, 92, 231, 0.06);
    }

    .menu-root > li:hover > .menu-link::before {
        transform: translateX(-50%) scaleX(1);
    }

    .menu-root > li.active > .menu-link {
        color: var(--primary-color);
        background: rgba(108, 92, 231, 0.1);
        font-weight: 700;
    }

    .menu-root > li.active > .menu-link::before {
        transform: translateX(-50%) scaleX(1);
    }

    /* Выпадающее меню */
    .submenu {
        position: absolute;
        top: 100%;
        left: 0;
        background: var(--white);
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
        min-width: 220px;
        display: none;
        z-index: 1000;
        border-radius: 12px;
        overflow: hidden;
        padding: 8px 0;
        border: 1px solid rgba(0, 0, 0, 0.06);
        animation: submenuFadeIn 0.3s ease;
    }

    /* Невидимый «мостик» — заполняет зазор между пунктом и подменю,
       чтобы hover не сбрасывался при переходе курсора */
    .submenu::before {
        content: '';
        position: absolute;
        top: -12px;
        left: 0;
        right: 0;
        height: 12px;
        background: transparent;
    }

    @keyframes submenuFadeIn {
        from {
            opacity: 0;
            transform: translateY(-8px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .has-submenu:hover .submenu,
    .has-submenu:focus-within .submenu {
        display: block;
    }

    .submenu .menu-link {
        padding: 12px 20px;
        color: var(--dark-color);
        font-weight: 500;
        font-size: 0.9rem;
        transition: all 0.25s ease;
        position: relative;
    }

    .submenu .menu-link::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 3px;
        background: var(--gradient-primary);
        border-radius: 0 3px 3px 0;
        transform: scaleY(0);
        transition: transform 0.25s ease;
    }

    .submenu .menu-link:hover {
        background: rgba(108, 92, 231, 0.06);
        color: var(--primary-color);
        padding-left: 26px;
    }

    .submenu .menu-link:hover::before {
        transform: scaleY(1);
    }

    /* Второй уровень вложенности */
    .submenu .submenu {
        top: 0;
        left: 100%;
    }

    /* Невидимый «мостик» для второго уровня — по вертикали */
    .submenu .submenu::before {
        content: '';
        position: absolute;
        top: 0;
        bottom: 0;
        left: -12px;
        width: 12px;
        background: transparent;
    }

    .has-submenu:hover .submenu .submenu {
        display: none;
    }

    .submenu .has-submenu:hover .submenu {
        display: block;
    }

    .submenu-arrow::after {
        content: ' ▸';
        float: right;
        font-size: 0.85em;
        opacity: 0.5;
        margin-left: 12px;
    }

    .submenu .submenu .submenu-arrow::after {
        content: ' ▸';
    }
}
/* --- Адаптивность --- */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }
    
    .social-links {
        justify-content: center;
    }
    aside {
        margin-top: 30px;
        padding: 0 15px;
    }
    
    .prev-article, .featured-posts__list li {
        padding-top: 15px;
        padding-bottom: 15px;
    }
    
    /* Бургер кнопка видна на мобильных */
    .menu-toggle {
        display: flex;
        order: 2;
    }
    
    /* Хедер - элементы в строку */
    .header-content {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        flex-wrap: nowrap;
        position: relative;
        padding: 14px 0;
    }
    
    /* Логотип */
    #logo {
        order: 0;
        flex-shrink: 0;
    }
    
    /* Скрываем обычное меню на мобильных (visibility позволяет детям быть видимыми) */
    .main-nav {
        visibility: hidden !important;
    }
    
    /* Мобильное меню видно даже внутри скрытого родителя */
    .main-nav .sidebar-nav {
        visibility: visible !important;
        display: block !important;
    }
    
    /* Поиск на мобильных */
    .search-box {
        order: 3;
    }
    
    .sidebar-nav {
        width: 100%;
        background: var(--white);
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        overflow-y: auto;
        z-index: 1100;
        padding: 90px 0 30px;
        transform: translateX(-100%);
        transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
        background: var(--white);
        box-shadow: var(--shadow-xl);
    }
    
    .sidebar-nav.active {
        transform: translateX(0);
    }

    .menu-root {
        display: flex;
        flex-direction: column;
        gap: 2px;
        list-style: none;
    }

    .menu-link, .menu-separator {
        border-bottom: none;
        font-size: 1rem;
        padding: 16px 28px;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        font-weight: 600;
        letter-spacing: 0.01em;
        position: relative;
    }
    
    .menu-link::after {
        content: '';
        position: absolute;
        right: 28px;
        top: 50%;
        transform: translateY(-50%);
        width: 0;
        height: 100%;
        background: rgba(108, 92, 231, 0.06);
        border-radius: 8px;
        transition: width 0.3s ease;
    }
    
    .menu-link:hover, .menu-separator:hover {
        background: transparent;
        color: var(--primary-color);
        padding-left: 34px;
    }
    
    .menu-link:hover::after {
        width: calc(100% - 56px);
    }

    .submenu {
        background: linear-gradient(180deg, #f8f9fa 0%, #f5f6fa 100%);
        padding: 8px 0 8px 16px;
        display: none;
        border-radius: 12px;
        margin: 4px 0;
    }
    
    .submenu.active {
        display: block;
    }

    .submenu .menu-link,
    .submenu .menu-separator {
        font-size: 0.95rem;
        padding: 14px 24px;
        font-weight: 500;
    }
    
    .submenu .menu-link::after {
        right: 24px;
    }

    .submenu .submenu {
        background: linear-gradient(180deg, #f0f2f5 0%, #eef0f3 100%);
        padding: 6px 0 6px 24px;
    }

    .submenu-arrow::after {
        content: ' ▾';
        float: right;
        font-size: 0.9em;
        opacity: 0.6;
    }
    
    /* Оверлей для затемнения фона */
    .nav-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1099;
        opacity: 0;
        transition: opacity 0.35s ease;
        backdrop-filter: blur(3px);
    }
    
    .nav-overlay.active {
        display: block;
        opacity: 1;
    }
    
    /* АДАПТИВНОСТЬ ДЛЯ МОБИЛЬНЫХ */
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 16px;
    }
    
    .tag-title { font-size: 1.8rem; }
    
    .container-tag { 
        width: 100%;
        max-width: 95%;
        margin: 0 auto;
        padding: 1.5rem 0.75rem;
    }
    /* Мобильный список тегов*/
    .container-tags {
        width: 100%;
        max-width: 95%;
        margin: 0 auto;
        padding: 1.5rem 0.75rem;
    }

    .tags-grid { grid-template-columns: 1fr; }
    .tags-page-title { font-size: 2rem; }
    
    h2 { font-size: 1.6rem; }

    .articles-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .article-full {
        padding: 20px 16px;
    }
    
    .container-index {
        max-width: 95%; 
        padding: 1.5rem 0.75rem; 
    }
    
    .article-full-title {
        font-size: 1.6rem;
        font-weight: 700;
        margin-bottom: 1rem;
        line-height: 1.25;
    }
    
    .menu-left {
        position: static;
        margin-top: 1rem;
        margin-bottom: var(--spacing-xl);
    }
    
    .menu-left__list {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .menu-left__link {
        text-align: left;
        border-left: 3px solid transparent;
        padding: 0.85rem 1rem;
    }
    
    .menu-left__link:hover {
        border-left-color: var(--primary-color);
        padding-left: 1.2rem;
    }
    
    .menu-left__link--active {
        border-left-color: var(--primary-color);
    }
    
    
    .menu-left__list2 {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background-color: transparent;
        padding: var(--spacing-xs) 0 var(--spacing-xs) var(--spacing-md);
        display: none;
    }
    
    .menu-left__list2 {
        list-style: none;
        padding-left: 20px; /* Смещение вправо для визуальной вложенности */
    }
    
    .menu-left__list2 .menu-left__link {
        padding: var(--spacing-xs) var(--spacing-sm);
        border-bottom: none;
    }
    
    .main-nav .main-nav {
        display: block;
        position: static;
        width: 100%;
    }

  .menu li.active {
    display: block;
  }
  
  /* Блокировка скролла при открытом меню */
  body.nav-open {
    overflow: hidden;
  }
}
@media (max-width: 480px) {
    .menu {
        justify-content: center;
        gap: 8px;
        flex-wrap: wrap;
    }
    
    #logo {
        font-size: 1.5rem;
    }
    
    .article-full-title {
        font-size: 1.4rem;
    }
    
    .article-full-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .articles-grid {
        gap: 20px;
    }
    
    .article-content {
        padding: 1rem;
    }
    
    #back-to-top {
        bottom: 20px;
        right: 20px;
        width: 46px;
        height: 46px;
    }
}
@media (max-width: 576px) {
    h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .hero {
        padding: var(--spacing-md);
    }
    
    #subscribe-form {
        flex-direction: column;
    }
    
    #subscribe-form input,
    #subscribe-form button {
        width: 100%;
        border-radius: var(--border-radius);
        margin-bottom: var(--spacing-sm);
    }
    
    .menu-left {
        padding: var(--spacing-md);
    }
    
    .menu-left__title {
        font-size: 1.15rem;
        text-align: left;
    }
    
    .menu-left__list {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .author-header {
        padding: 1.5rem 1rem;
    }
    
    .post-card-content {
        padding: 18px;
    }
}
/* Контейнер профиля автора */
.author-header {
    text-align: center;
    margin-bottom: 4rem;
    padding: 2rem;
    background: #f9f9f9;
    border-radius: 12px;
}

/* Круглая аватарка */
.author-header img {
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    margin-bottom: 1rem;
}

/* Сетка для списка постов (страница автора) */
.author-articles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Карточка отдельного поста */
.author-articles article {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s;
}

.author-articles article:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

/* Текстовое содержимое постов */
.author-articles article h2 {
    font-size: 1.25rem;
    margin: 1rem;
    line-height: 1.4;
}

.author-articles article h2 a {
    text-decoration: none;
    color: #333;
}

.author-articles article p {
    padding: 0 1rem 1rem;
    font-size: 0.9rem;
    color: #666;
    flex-grow: 1;
}

/* Дата и теги */
.author-articles time {
    font-size: 0.8rem;
    color: #999;
    padding: 0 1rem;
    margin-bottom: 0.5rem;
}


/* Исправления для списков */
#tems-left-ul,
#tems-left-ul li,
.menu-left__list2,
.menu-left__list2 li {
    list-style-type: none;
    /*padding-left: 0; */
}

/* Курсор-лупа для картинок в статьях */
.post__content img {
  cursor: zoom-in;
  transition: opacity 0.2s ease;
}
.post__content img:hover {
  opacity: 0.9;
}

/* Оверлей для увеличенной картинки */
.fg-lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(10, 10, 15, 0.92);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease-in-out;
  cursor: zoom-out;
  backdrop-filter: blur(5px);
}

/* Активное состояние */
.fg-lightbox-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* Сама увеличенная картинка */
.fg-lightbox-img {
  max-width: 95%;
  max-height: 92vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.6);
  transform: scale(0.95);
  transition: transform 0.25s ease-in-out;
}

.fg-lightbox-overlay.active .fg-lightbox-img {
  transform: scale(1);
}

/* Отключение скролла страницы */
body.lightbox-open {
  overflow: hidden;
}

/* Контейнер галереи */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin: 28px 0;
}

/* Элемент галереи */
.gallery__item {
  margin: 0;
  overflow: hidden;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  transition: all 0.35s ease;
  border: 1px solid rgba(0,0,0,0.04);
}

.gallery__item:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-md);
}

.gallery__item img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.5s ease;
}

.gallery__item:hover img {
  transform: scale(1.05);
}

/* Модальное окно (Lightbox) */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 10000;
  user-select: none;
}

.lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox__img {
  max-width: 85%;
  max-height: 85%;
  border-radius: 4px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

/* Кнопки управления */
.lightbox__close,
.lightbox__btn {
  position: absolute;
  color: #fff;
  font-family: Arial, sans-serif;
  cursor: pointer;
  transition: opacity 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox__close:hover,
.lightbox__btn:hover {
  opacity: 0.7;
}

.lightbox__close {
  top: 20px;
  right: 75px;
  font-size: 40px;
  line-height: 1;
}

.lightbox__btn {
  top: 50%;
  transform: translateY(-50%);
  font-size: 50px;
  width: 60px;
  height: 100%;
}

.lightbox__btn--prev { left: 10px; }
.lightbox__btn--next { right: 10px; }

/* Скрытие стрелок на совсем маленьких экранах для удобства тапа */
@media (max-width: 576px) {
  .lightbox__btn { font-size: 35px; width: 40px; }
  .lightbox__img { max-width: 90%; }
}

/* Контейнер списка */
ul {
  list-style: none;
  padding-left: 0;
  margin: 24px 0;
}

/* Элемент списка */
ul li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 14px;
  line-height: 1.7;
}

/* Создание аккуратного кастомного маркера */
ul li::before {
  content: "•";
  position: absolute;
  left: 8px;
  top: 0;
  color: var(--primary-color);
  font-weight: bold;
  font-size: 20px;
  line-height: 1.6;
}

/* Сброс отступов параграфа внутри li */
ul li p.ds-markdown-paragraph {
  margin: 0;
  display: inline;
}
/* Добавьте это в ваш style.css */

.article-full-content .table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 28px 0;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    width: 100%;
    background: var(--white);
}

.article-full-content .table-wrapper table {
    width: 100%;
    min-width: 700px;
    border-collapse: collapse;
    font-size: 14px;
    background: var(--white);
}

.article-full-content .table-wrapper th,
.article-full-content .table-wrapper td {
    padding: 14px 18px;
    text-align: left;
    border: 1px solid var(--gray-light);
    vertical-align: middle;
}

.article-full-content .table-wrapper th {
    background: var(--gradient-primary);
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.02em;
}

.article-full-content .table-wrapper tr:nth-child(even) {
    background: #fafbfc;
}

.article-full-content .table-wrapper tr:hover {
    background: rgba(108, 92, 231, 0.06);
}

.article-full-content .table-wrapper td:first-child {
    font-weight: 600;
    background: rgba(108, 92, 231, 0.04);
    white-space: nowrap;
    color: var(--primary-dark);
}

/* Адаптация под мобильные */
@media (max-width: 768px) {
    .article-full-content .table-wrapper table {
        font-size: 13px;
        min-width: 600px;
    }
    
    .article-full-content .table-wrapper th,
    .article-full-content .table-wrapper td {
        padding: 8px 10px;
    }
}

@media (max-width: 480px) {
    .article-full-content .table-wrapper table {
        font-size: 11px;
        min-width: 500px;
    }
    
    .article-full-content .table-wrapper th,
    .article-full-content .table-wrapper td {
        padding: 6px 8px;
    }
}

/* ===================== Missing Styles ===================== */

/* Логотип - изображение */
.logotext img {
    max-height: 40px;
    width: auto;
    vertical-align: middle;
}

/* Ссылка "Читать" */
.read-more {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.read-more:hover {
    color: var(--accent-color);
}

/* Контент карточки поста - растягивается */
.post-card-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* Автор - статьи */
.author-articles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
    margin-top: 2.5rem;
}

.author-articles article {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
}

.author-articles article:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.author-articles article h2 {
    font-size: 1.2rem;
    margin: 1.25rem 1.25rem 0;
    line-height: 1.45;
    font-weight: 600;
}

.author-articles article h2 a {
    text-decoration: none;
    color: var(--dark-color);
}

.author-articles article h2 a:hover {
    color: var(--primary-color);
}

.author-articles article p {
    padding: 0 1.25rem 1.25rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
    flex-grow: 1;
    line-height: 1.65;
}

.author-articles time {
    font-size: 0.85rem;
    color: var(--gray-dark);
    padding: 0 1.25rem;
    margin-bottom: 0.75rem;
}

/* Author page links */
.author-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2.5rem 2rem;
    background: var(--white);
    border-radius: var(--border-radius-xl);
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: var(--shadow-sm);
}

.author-header img {
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--white);
    box-shadow: var(--shadow-md);
    margin-bottom: 1.2rem;
}

.author-links {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 20px;
}

.author-email,
.author-website {
    display: inline-block;
    padding: 10px 24px;
    border-radius: var(--border-radius-pill);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.author-email {
    background: var(--gray-light);
    color: var(--dark-color);
}

.author-email:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.author-website {
    background: var(--gradient-primary);
    color: white;
}

.author-website:hover {
    background: var(--gradient-accent);
    transform: translateY(-2px);
}

/* Tag featured image */
.tag-featured-image {
    margin-bottom: var(--spacing-lg);
}

/* Subpages styling */
.subpages {
    margin-top: 3rem;
    padding: 1.5rem;
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.subpages h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.subpages ul {
    padding-left: 1.5rem;
}

.subpages ul ul {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.subpages li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.subpages a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.subpages a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

/* Related posts card - image */
#related-posts .article-card .article-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--border-radius-sm);
}

#related-posts .article-card .article-content h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

#related-posts .article-card .article-content p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Pagination styling */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin: 3rem 0;
    flex-wrap: wrap;
}

.pagination a {
    display: inline-block;
    padding: 12px 22px;
    background: var(--white);
    color: var(--dark-color);
    border: 1px solid var(--gray-light);
    border-radius: var(--border-radius-sm);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background: var(--gradient-primary);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.3);
}

.pagination a.active,
.pagination a.current {
    background: var(--gradient-primary);
    color: white;
    border-color: var(--primary-color);
}

/* Author bio section */
#author-bio {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    padding: 2.5rem;
    background: var(--white);
    border-radius: var(--border-radius-lg);
    margin: 2.5rem 0;
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: var(--shadow-sm);
}

#author-bio img {
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 3px solid var(--primary-light);
}

#author-bio h3 a {
    color: var(--dark-color);
    text-decoration: none;
    font-size: 1.3rem;
    font-weight: 700;
}

#author-bio h3 a:hover {
    color: var(--primary-color);
}

#author-bio div {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Post navigation */
#post-navigation {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin: 2.5rem 0;
    padding: 1.5rem 0;
    border-top: 2px solid var(--gray-light);
    border-bottom: 2px solid var(--gray-light);
}

#post-navigation a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    flex: 1;
    transition: all 0.25s ease;
}

#post-navigation a:hover {
    color: var(--accent-color);
    padding-left: 5px;
}

/* Page featured image */
#featured-image {
    margin-bottom: var(--spacing-xl);
}

/* Page entry content */
#page-entry {
    font-size: 1.1rem;
    line-height: 1.85;
}

/* Tag card placeholder */
.tag-placeholder {
    display: block;
    background: linear-gradient(135deg, #f0f2f5 0%, #e4e7eb 100%);
}

/* Container post adjustments */
.container-post {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
}

/* ================= */

/* Блочные цитаты */
.article-full-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding: 1.25rem 1.5rem;
    margin: 2rem 0;
    background: rgba(108, 92, 231, 0.05);
    border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
    font-style: italic;
    color: var(--text-secondary);
}

.article-full-content blockquote p {
    margin-bottom: 0;
}

/* Код в статьях */
.article-full-content code {
    background: rgba(108, 92, 231, 0.08);
    padding: 0.2em 0.5em;
    border-radius: 6px;
    font-size: 0.9em;
    color: var(--primary-dark);
    font-family: 'Consolas', 'Monaco', monospace;
}

.article-full-content pre {
    background: #1e1e2e;
    padding: 1.25rem 1.5rem;
    border-radius: var(--border-radius-lg);
    overflow-x: auto;
    margin: 2rem 0;
    box-shadow: var(--shadow-md);
}

.article-full-content pre code {
    background: none;
    padding: 0;
    color: #cdd6f4;
    font-size: 0.9rem;
    line-height: 1.7;
}

/* Горизонтальный разделитель */
.article-full-content hr {
    border: none;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--gray-light), transparent);
    margin: 2.5rem 0;
}

/* Выделение текста */
.article-full-content mark,
.article-full-content u {
    background: rgba(253, 203, 110, 0.3);
    padding: 0 4px;
    border-radius: 4px;
}

/* Внутренние отступы статьи */
.container-post {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
}

/* Плавная прокрутка */
html {
    scroll-behavior: smooth;
}

/* Кастомный скроллбар */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--light-color);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--primary-light) 100%);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Фокус для доступности */
a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--primary-light);
    outline-offset: 3px;
    border-radius: 4px;
}


