/*
Theme Name: MediaVMeste
*/

body {
    font-family: 'Meneghino';
    background-color: #faf8f6;
    font-weight: 400;
    overflow-x: hidden;
    color: var(--foreground);
}
h1, h2, h3, h4, h5, h6 {
    font-family: 'Meneghino';
    font-weight: 700;
}

/* Основные стили */
:root {
    --primary-color: #007bff;
    --dark-color: #343a40;
    --light-color: #e7eef5;
    --overlay-color: rgba(0, 0, 0, 0.7);
    --transition-speed: 0.3s;
    --color-gray-100: oklch(96.7% .003 264.542);
    --text-primary: #1a202c;
    --foreground: #171717;
}

/* Шапка */
.header {
    background-color: #faf8f6;
    border-bottom: 1px solid var(--color-gray-100);
    z-index: 1030;
    height: 70px;
}

.navbar {
    padding: 0.5rem 1rem;
    position: relative;
}

/* Логотип */
.navbar-brand {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.logo-text {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--dark-color);
    text-decoration: none;
    letter-spacing: 1px;
}

/* Поиск */
.search-icon-wrapper {
    position: relative;
    z-index: 1001;
    display: flex;
    align-items: center;
}

.search-toggle {
    font-size: 1.3rem;
    color: var(--dark-color);
    background-color: #f0ede9;
    border: none;
    border-radius: 50px;
    transition: color 0.3s
    ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-toggle:hover {
    background-color: #e2e8f0;
}

.search-form-wrapper {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 350px;
    padding-top: 10px;
    z-index: 1000;
}

.search-form-wrapper.active {
    display: block;
}

.search-form .input-group {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.search-form .form-control {
    border: 2px solid #e9ecef;
    border-right: none;
    padding: 12px 15px;
    font-size: 1rem;
}

.search-form .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: none;
}

.search-form .btn {
    border: 2px solid var(--primary-color);
    background-color: var(--primary-color);
    color: white;
    padding: 12px 20px;
    transition: background-color 0.3s ease;
}

.search-form .btn:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

/* Бургер-меню (всегда видно) */
.burger-menu {
    border: none;
    padding: 0.5rem 1rem;
    background: none;
    cursor: pointer;
    z-index: 1001;
    display: flex !important; /* Переопределяем Bootstrap */
    align-items: center;
}

.burger-menu-icon {
    display: block;
    width: 25px;
    height: 20px;
    position: relative;
}

.burger-menu-icon::before,
.burger-menu-icon::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 3px;
    background-color: var(--dark-color);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.burger-menu-icon::before {
    top: 0;
    left: 0;
}

.burger-menu-icon::after {
    bottom: 0;
    left: 0;
}

.burger-menu-icon span {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 100%;
    height: 3px;
    background-color: var(--dark-color);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Анимация бургер-меню при открытии */
.sidebar-menu.active ~ .header .burger-menu-icon::before {
    transform: rotate(45deg);
    top: 8px;
}

.sidebar-menu.active ~ .header .burger-menu-icon::after {
    transform: rotate(-45deg);
    bottom: 8px;
}

.sidebar-menu.active ~ .header .burger-menu-icon span {
    opacity: 0;
}

.burger-menu:hover .burger-menu-icon::before,
.burger-menu:hover .burger-menu-icon::after,
.burger-menu:hover .burger-menu-icon span {
    background-color: var(--primary-color);
}

/* Боковое меню */
.sidebar-menu {
    position: fixed;
    top: 0;
    right: -350px;
    width: 320px;
    height: 100vh;
    background-color: #000;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.15);
    z-index: 1040;
    transition: right var(--transition-speed) ease;
    display: flex;
    flex-direction: column;
}

.sidebar-menu.active {
    right: 0;
}

.sidebar-header {
    padding: 1.5rem 1.5rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #000;
    color: #fff;
}

.close-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 1.875rem;
    color: #fff;
    background: none;
    border: none;
    cursor: pointer;
}

button.btn.close-menu svg {
    width: 35px;
    height: 35px;
}

.close-menu:hover {
    color: var(--primary-color);
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 2rem 1.5rem;
}

/* Стили меню */
.menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-item {
    margin-bottom: 0.75rem;
}
.page_item a {
    display: block;
    padding: 0.875rem 1.25rem;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    transition: all var(--transition-speed) ease;
    font-size: 1.1rem;
    font-weight: 500;
    border-left: 3px solid transparent;
}

.menu-item a:hover,
.menu-item a:focus {
    background-color: rgba(0, 123, 255, 0.08);
    color: var(--primary-color);
    padding-left: 1.5rem;
    border-left-color: var(--primary-color);
}

.menu-item.current-menu-item > a {
    background-color: rgba(0, 123, 255, 0.1);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

/* Overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
    z-index: 1035;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-speed) ease, visibility var(--transition-speed) ease;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Адаптивность */
@media (max-width: 768px) {
    .search-form-wrapper {
        width: 280px;
    }

    .sidebar-menu {
        width: 280px;
    }

    .logo-text {
        font-size: 1.5rem;
    }
}

@media (max-width: 576px) {
    .navbar {
        padding: 0.5rem 0;
    }

    .search-form-wrapper {
        width: 250px;
    }

    .sidebar-menu {
        width: 100%;
        right: -100%;
    }

    .logo-text {
        font-size: 1.3rem;
    }

    .search-toggle,
    .burger-menu {
        padding: 0.5rem;
    }
}

/* Анимации */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.menu-item {
    animation: slideIn 0.3s ease forwards;
    opacity: 0;
}

.menu-item:nth-child(1) { animation-delay: 0.1s; }
.menu-item:nth-child(2) { animation-delay: 0.15s; }
.menu-item:nth-child(3) { animation-delay: 0.2s; }
.menu-item:nth-child(4) { animation-delay: 0.25s; }
.menu-item:nth-child(5) { animation-delay: 0.3s; }


/* Модальное окно поиска */
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1050;
    display: none;
}

.search-modal.active {
    display: block;
}

.search-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
}

.search-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 500px;
    background-color: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid #e9ecef;
    overflow: hidden;
    z-index: 1;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.search-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: #6c757d;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 2;
}

.search-modal-close:hover {
    background-color: #e7eef5;
    color: #495057;
}

.search-modal-body {
    padding: 40px 30px 30px;
}

.search-modal-title {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    color: #212529;
    margin-bottom: 25px;
}

.search-input-wrapper {
    position: relative;
    margin-bottom: 25px;
}

.search-modal-input {
    width: 100%;
    padding: 15px 60px 15px 20px;
    font-size: 1rem;
    border: 1px solid #e9ecef;
    border-radius: 50px;
    background-color: #e7eef5;
    color: #212529;
    transition: all 0.3s ease;
}

.search-modal-input:focus {
    outline: none;
    border-color: #e9ecef;
    background-color: white;
    box-shadow: none;
}

.search-modal-submit {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background-color: #212529;
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.search-modal-submit:hover {
    background-color: #007bff;
    transform: translateY(-50%) scale(1.05);
}

.search-tags-title {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 12px;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.search-tag {
    padding: 8px 16px;
    font-size: 0.85rem;
    background-color: #e7eef5;
    color: #212529;
    border: 1px solid #e9ecef;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-tag:hover {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
    transform: translateY(-2px);
}

/* Адаптивность для модального окна */
@media (max-width: 576px) {
    .search-modal-content {
        width: 95%;
        max-width: none;
        margin: 0 10px;
    }

    .search-modal-body {
        padding: 30px 20px 25px;
    }

    .search-modal-title {
        font-size: 1.3rem;
    }

    .search-modal-input {
        padding: 12px 55px 12px 15px;
        font-size: 0.95rem;
    }

    .search-modal-submit {
        width: 42px;
        height: 42px;
    }
}
/* Плавные переходы для всех интерактивных элементов */
.search-modal-content,
.sidebar-menu,
.overlay,
.search-modal-overlay,
.burger-menu-icon span,
.menu-item,
.search-tag {
    transition: all 0.3s ease;
}

/* Улучшенные стили для активных состояний */
.search-modal.active .search-modal-content {
    animation: modalAppear 0.3s ease forwards;
}

@keyframes modalAppear {
    from {
        opacity: 0;
        transform: translate(-50%, -60%) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Запрет скролла при открытых модальных окнах */
body.no-scroll {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* Анимация для пунктов меню при закрытии */
.sidebar-menu:not(.active) .menu-item {
    opacity: 0;
    transform: translateX(20px);
}

/* Лоадер для поиска (опционально) */
.search-loader {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
/* Индикатор загрузки поиска */
.search-modal-submit .fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Ошибка в поле ввода */
.search-modal-input.error {
    border-color: #dc3545 !important;
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Состояния body */
body.modal-open {
    overflow: hidden;
    padding-right: 15px;
}

body.menu-open {
    overflow: hidden;
    padding-right: 15px;
}

/* Адаптивные стили для тегов */
.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.search-tag {
    padding: 6px 12px;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    background: #e7eef5;
    color: #495057;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.search-tag:hover {
    background: #007bff;
    color: white;
    border-color: #007bff;
    transform: translateY(-2px);
}

/* Адаптивность модального окна */
@media (max-width: 768px) {
    .search-modal-content {
        width: 95%;
        margin: 0 10px;
        max-width: none;
    }

    .search-modal-body {
        padding: 20px 15px;
    }

    .search-modal-title {
        font-size: 1.2rem;
        margin-bottom: 15px;
    }

    .search-modal-input {
        padding: 10px 45px 10px 15px;
        font-size: 14px;
    }

    .search-modal-submit {
        width: 36px;
        height: 36px;
        right: 4px;
    }
}
/* Стили для категорий поиска */
.search-categories {
    margin-top: 25px;
}

.search-categories-title {
    font-size: 0.95rem;
    color: #6c757d;
    margin-bottom: 12px;
    font-weight: 500;
}

.categories-container {
    max-height: 300px;
    overflow-y: auto;
    padding-right: 5px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.categories-container::-webkit-scrollbar {
    width: 6px;
}

.categories-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.categories-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

.category-group {
    margin-bottom: 5px;
    border-radius: 8px;
    overflow: hidden;
}
.search-categories .category-item {
    border: none;
    border-radius: 50px;
    padding: 5px 15px;
    margin-bottom: 0;
}


.category-item {
    text-align: left;
    margin-bottom: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    gap: 8px;
}
.search-categories .category-item.active {
    background: #007bff;
    border-color: #007bff;
    color: #fff;
}

.category-item.main-category {
    background: #e7eef5;
    font-weight: 500;
}

.category-item.subcategory {
    padding-left: 30px;
    background: white;
    border-left: 3px solid #dee2e6;
    font-size: 0.9rem;
}

.category-name {
    flex: 1;
    text-align: left;
}

.category-count {
    background: rgba(0, 0, 0, 0.1);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    min-width: 25px;
    text-align: center;
}
.category-item.main-category.active .category-count {
    color: #fff;
}

.category-item.active .category-count {
    background: rgba(255, 255, 255, 0.3);
}

.category-toggle {
    font-size: 0.8rem;
    margin-left: 10px;
    transition: transform 0.3s ease;
}

.category-item.active .category-toggle {
    transform: rotate(180deg);
}

.subcategories {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding-left: 15px;
}

.subcategories.expanded {
    max-height: 500px;
}

.selected-category {
    background: #e7f3ff;
    padding: 10px 15px;
    border-radius: 8px;
    border-left: 4px solid #007bff;
}

.search-actions {
    display: flex;
    gap: 10px;
}

.search-actions .btn {
    flex: 1;
    padding: 8px 15px;
    font-size: 16px;
    border-radius: 50px;
    height: 52px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .categories-container {
        max-height: 250px;
    }

    .search-actions {
        flex-direction: column;
        gap: 8px;
    }
}

/* Главная страница - фильтры и новости */

/* Секция фильтров */

.filter-controls .btn {
    margin-left: 8px;
}

.filter-controls .btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Фильтры-теги */
.filters-container {
    overflow-x: auto;
    padding-bottom: 10px;
}

.main-content-search .filters-container {
    justify-content: flex-start;
}

.filter-tags {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    min-width: min-content;
}

.filter-tag {
    display: inline-flex;
    align-items: center;
    padding: 10px 16px;
    border: none;
    border-radius: 50px;
    background: #e7eef5;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
}
.filter-tag.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.filter-tag-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.filter-tag.active .filter-tag-count {
    background: rgba(255, 255, 255, 0.3);
}

/* Сетка новостей */
.news-grid {
    min-height: 500px;
}

.news-card .card {
    transition: all 0.3s ease;
    height: 100%;
    border-radius: 20px;
    border: none;
}

.news-card .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
}

.news-card .card-img-top {
    transition: transform 0.5s ease;
}

.card-img-top {
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
}

.news-card .card:hover .card-img-top img {
    transform: scale(1.05);
}

.news-card .card-title a {
    transition: color 0.3s ease;
}

.news-card .card-title a:hover {
    color: var(--primary-color) !important;
}

.badge {
    font-size: 14px;
    padding: 8px 15px;
    border-radius: 50px;
    color: #000;
    font-weight: 400;
}

/* Анимации загрузки */
.news-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

#load-more {
    min-width: 180px;
    padding: 12px 30px;
    position: relative;
}

#load-more .load-more-spinner {
    margin-left: 8px;
}

/* Пустое состояние */
.news-empty-state {
    text-align: center;
    padding: 60px 20px;
}

.news-empty-state i {
    font-size: 48px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .category-filter-section .row {
        margin-bottom: 15px;
    }

    .filter-controls {
        margin-top: 15px;
        display: flex;
        justify-content: center;
    }

    .filter-tag {
        padding: 6px 12px;
        font-size: 13px;
    }

    .news-card {
        margin-bottom: 20px;
    }
}

@media (max-width: 576px) {
    .filter-tags {
        gap: 6px;
    }

    .filter-tag {
        padding: 5px 10px;
        font-size: 12px;
    }

    .news-card .card-body {
        padding: 15px;
    }
}
/* Стили для времени в карточках новостей */
.time-ago {
    color: #666;
    font-size: 12px;
    white-space: nowrap;
    font-weight: 500;
}

.date {
    color: #888;
    font-size: 12px;
    white-space: nowrap;
}

/* Адаптивность для времени */
@media (max-width: 768px) {
    .category-badges {
        flex-wrap: wrap;
    }

    .category-badges time {
        font-size: 11px;
        margin-top: 5px;
        width: 100%;
        text-align: right;
    }
}

/* Стили для страницы статьи */
.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content h2,
.article-content h3,
.article-content h4 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.article-content h2 {
    font-size: 1.8rem;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 0.5rem;
}

.article-content h3 {
    font-size: 1.5rem;
}

.article-content h4 {
    font-size: 1.3rem;
}

.article-content ul,
.article-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content blockquote {
    border-left: 4px solid #007bff;
    padding-left: 1.5rem;
    margin-left: 0;
    margin-right: 0;
    font-style: italic;
    color: #555;
    background-color: #f9f9f9;
    padding: 1rem 1.5rem;
    margin: 2rem 0;
}

.article-content img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-content .wp-block-image {
    margin: 2rem 0;
}

.article-content .aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.article-content .alignleft {
    float: left;
    margin-right: 1.5rem;
    margin-bottom: 1rem;
}

.article-content .alignright {
    float: right;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.article-content table {
    width: 100%;
    margin: 2rem 0;
    border-collapse: collapse;
}

.article-content table th,
.article-content table td {
    padding: 0.75rem;
    border: 1px solid #dee2e6;
}

.article-content table th {
    background-color: #e7eef5;
    font-weight: 600;
}

/* Навигация между статьями */
.article-navigation a:hover {
    background-color: #e7eef5;
    text-decoration: none;
}

/* Похожие статьи */
.related-articles .card {
    transition: transform 0.3s ease;
}

.related-articles .card:hover {
    transform: translateY(-5px);
}

/* Адаптивность */
@media (max-width: 768px) {
    .article-content {
        font-size: 1rem;
    }

    .article-content h2 {
        font-size: 1.5rem;
    }

    .article-content h3 {
        font-size: 1.3rem;
    }

    .article-meta {
        flex-wrap: wrap;
    }

    .article-meta > div {
        margin-bottom: 0.5rem;
    }

    .article-navigation .prev-article,
    .article-navigation .next-article {
        text-align: left !important;
    }
}
/* Боковое меню с категориями */
.sidebar-categories {
    margin-bottom: 2rem;
}

.sidebar-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.categories-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-item {
    margin-bottom: 20px;
}

.category-link {
    display: flex;
    align-items: center;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    border: none;
}

.category-link.active {
    background-color: var(--category-color, var(--primary-color));
    border-color: var(--category-color, var(--primary-color));
}

.category-link.active .category-name {
    color: var(--text-color, #ffffff);
    font-weight: 600;
}

.category-link.active .category-count {
    background-color: rgba(255, 255, 255, 0.3);
    color: var(--text-color, #ffffff);
}

.category-icon {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 12px;
    flex-shrink: 0;
}

.category-name {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.sidebar-categories .category-name {
    font-size: 18px;
}

.category-count {
    background-color: rgba(255, 255, 255, 0.3);
    color: #000;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    min-width: 24px;
    text-align: center;
    margin-left: 8px;
    transition: all 0.3s ease;
}

.category-toggle {
    margin-left: 8px;
    color: var(--text-muted);
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.category-toggle.active {
    transform: rotate(180deg);
}

/* Все категории */
.all-categories .category-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.all-categories .category-name {
    color: white;
    font-weight: 600;
}

.all-categories .category-count {
    background-color: rgba(255, 255, 255, 0.3);
    color: white;
}

.all-categories .category-link:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
}

/* Подкатегории */
.subcategories-list {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0 1.5rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.subcategories-list.expanded {
    max-height: 500px;
}

.subcategory .category-link {
    padding: 0.6rem 1rem;
    background-color: rgba(var(--category-color-rgb, 0, 123, 255), 0.05);
    border: 1px solid rgba(var(--category-color-rgb, 0, 123, 255), 0.1);
}

.subcategory .category-icon {
    width: 8px;
    height: 8px;
    margin-right: 10px;
}

.subcategory .category-name {
    font-size: 0.9rem;
}

.subcategory .category-count {
    font-size: 0.75rem;
    padding: 1px 6px;
}

/* Быстрые ссылки */
.sidebar-links {
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
}

.links-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.links-list li {
    margin-bottom: 0.5rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.6rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    font-size: 0.95rem;
}

.sidebar-link:hover {
    background-color: var(--hover-background);
    color: var(--primary-color);
}

.sidebar-link i {
    width: 20px;
    text-align: center;
}

.search-sidebar-link {
    cursor: pointer;
}

/* Активная категория */
.category-item.current-category .category-link {
    background-color: var(--category-color, var(--primary-color));
    border-color: var(--category-color, var(--primary-color));
}

.category-item.current-category .category-name {
    color: var(--text-color, #ffffff);
}

.category-item.current-category .category-count {
    background-color: rgba(255, 255, 255, 0.3);
    color: var(--text-color, #ffffff);
}

/* Анимация при открытии */
@keyframes slideInCategory {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.category-item {
    animation: slideInCategory 0.3s ease forwards;
    opacity: 0;
}

.category-item:nth-child(1) { animation-delay: 0.1s; }
.category-item:nth-child(2) { animation-delay: 0.15s; }
.category-item:nth-child(3) { animation-delay: 0.2s; }
.category-item:nth-child(4) { animation-delay: 0.25s; }
.category-item:nth-child(5) { animation-delay: 0.3s; }
.category-item:nth-child(6) { animation-delay: 0.35s; }
.category-item:nth-child(7) { animation-delay: 0.4s; }
.category-item:nth-child(8) { animation-delay: 0.45s; }

/* Адаптивность */
@media (max-width: 768px) {
    .sidebar-title {
        font-size: 1rem;
    }

    .category-name {
        font-size: 0.9rem;
    }

    .category-count {
        font-size: 0.75rem;
        padding: 1px 6px;
        min-width: 20px;
    }

    .sidebar-link {
        padding: 0.5rem 0.8rem;
        font-size: 0.9rem;
    }
}
.text-subTitle {
    font-family: 'Fantasque Sans Mono';
}
.wrapper-telegram {
    background-color: #ebebeb;
    padding: 50px 0px;
    border-radius: 20px;
}
.back-button-wrapper button {
    background-color: transparent;
    border: none;
}
footer {
    background-color: #30394a;
    padding: 30px 0;
    color: #aaafb8;
}
ul.contacts-footer a {
    color: #aaafb8;
}
ul.contacts-footer {
    margin: 0;
    padding: 0;
    list-style: none;
}
/* Стили для бесконечного скролла */
#infinite-scroll-trigger {
    clear: both;
    margin: 20px 0;
}

#infinite-scroll-loader {
    transition: opacity 0.3s ease;
}

/* Плавное появление новых постов */
#news-posts > div {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Стили для блока "Читайте также" */
.read-also-section {
    margin-top: 3rem;
}

.read-also-card {
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.3s ease;
}

.read-also-card:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transform: translateY(-3px);
}

.read-also-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.read-also-title a {
    color: #333;
    font-weight: 600;
}

.read-also-title a:hover {
    color: #007bff;
    text-decoration: underline;
}

.read-also-excerpt p {
    color: #666;
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.read-also-link {
    color: #007bff;
    font-weight: 500;
}

.read-also-link:hover {
    color: #0056b3;
    text-decoration: underline;
}
.page-template-page-about .article-content h2 {
    border-bottom: 0px solid #f0f0f0;
}

ul.last-nav li a {
    font-size: 18px;
    color: #fff;
    text-decoration: none;
}
ul.last-nav {
    margin: 40px 0 0;
    list-style: none;
    padding: 0;
}