/* ============================================
   Blog Styles
   ============================================ */

/* Breadcrumbs - стили унифицированы в main.css */

/* Blog Main */
.blog-main {
    padding: 40px 0;
}

.blog-main__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Blog Header */
.blog-header {
    margin-bottom: 40px;
    text-align: center;
}

.blog-header__title {
    font-size: 48px;
    font-weight: 500;
    color: var(--secondary-color);
    margin: 0 0 20px 0;
}

.blog-header__description {
    font-size: 18px;
    color: var(--secondary-color);
    opacity: 0.8;
    margin: 0;
}

@media (max-width: 768px) {
    .blog-header__title {
        font-size: 32px;
    }
    .blog-header__description {
        font-size: 16px;
    }
}

/* Blog Tabs */
.blog-tabs {
    margin-bottom: 40px;
}

.blog-tabs__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.blog-tabs__list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.blog-tabs__item {
    margin: 0;
}

.blog-tabs__link {
    display: block;
    padding: 12px 20px;
    color: var(--secondary-color);
    text-decoration: none;
    background-color: var(--body-color);
    border: 1px solid var(--secondary-color);
    border-bottom: 3px solid var(--secondary-color);
    border-radius: 25px;
    transition: all 0.3s ease;
    text-align: center;
    min-width: 120px;
}

.blog-tabs__link:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.blog-tabs__link--active {
    border-bottom-color: var(--primary-color);
    background-color: var(--primary-color);
    font-weight: 600;
    color: var(--secondary-color);
}

@media (max-width: 768px) {
    .blog-tabs__list {
        flex-direction: column;
        gap: 10px;
    }
    
    .blog-tabs__link {
        width: 100%;
        padding: 15px 20px;
        font-size: 14px;
    }
}

/* Blog Posts Grid */
.blog-posts {
    margin-top: 40px;
}

.blog-posts__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.blog-posts__empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--secondary-color);
    opacity: 0.6;
    font-size: 18px;
}

@media (max-width: 768px) {
    .blog-posts__grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Blog Card */
.blog-card {
    background-color: var(--body-color);
    border: 1px solid var(--secondary-color);
    border-bottom: 3px solid var(--secondary-color);
    border-radius: 25px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.blog-card__link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.blog-card__image-wrapper {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background-color: var(--body-color);
}

.blog-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.blog-card__image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--body-color) 0%, var(--primary-color) 100%);
}

.blog-card__content {
    padding: 25px;
}

.blog-card__category {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--secondary-color);
    padding: 5px 12px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 15px;
}

.blog-card__title {
    font-size: 24px;
    font-weight: 500;
    color: var(--secondary-color);
    margin: 0 0 15px 0;
    line-height: 1.3;
}

.blog-card__excerpt {
    font-size: 14px;
    color: var(--secondary-color);
    opacity: 0.8;
    margin: 0 0 15px 0;
    line-height: 1.6;
}

.blog-card__meta {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: var(--secondary-color);
    opacity: 0.6;
}

.blog-card__date,
.blog-card__reading-time {
    margin: 0;
}

/* Load More Button */
.blog-posts__load-more {
    text-align: center;
    margin-top: 40px;
    width: 100%;
}

.blog-posts__load-more-btn {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 10px;
    font-family: Montserrat, sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.3s ease, transform 0.3s ease;
    display: inline-block;
    margin: 0 auto;
}

.blog-posts__load-more-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.blog-posts__load-more-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Blog Post Detail */
.blog-post-detail {
    padding: 40px 0;
}

.blog-post-detail__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.blog-post-article {
    max-width: 1100px;
    margin: 0 auto;
}

/* Blog Post Header */
.blog-post-header {
    margin-bottom: 30px;
}

.blog-post-header__category {
    margin-bottom: 15px;
}

.blog-post-header__category-link {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--secondary-color);
    padding: 8px 16px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: opacity 0.3s ease;
}

.blog-post-header__category-link:hover {
    opacity: 0.8;
}

.blog-post-header__title {
    font-size: 42px;
    font-weight: 500;
    color: var(--secondary-color);
    margin: 0 0 20px 0;
    line-height: 1.2;
}

.blog-post-header__meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 14px;
    color: var(--secondary-color);
    opacity: 0.7;
}

.blog-post-header__date,
.blog-post-header__updated,
.blog-post-header__reading-time,
.blog-post-header__views {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.blog-post-header__date i,
.blog-post-header__updated i,
.blog-post-header__reading-time i,
.blog-post-header__views i {
    font-size: 14px;
    opacity: 0.8;
}

@media (max-width: 768px) {
    .blog-post-header__title {
        font-size: 28px;
    }
}

/* Blog Post Featured Image */
.blog-post-featured {
    margin-bottom: 40px;
    border-radius: 25px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.blog-post-featured__image {
    max-width: 600px;
    width: 100%;
    height: auto;
    display: block;
    border-radius: 25px;
}

/* Blog Post Content Wrapper */
.blog-post-content-wrapper {
    display: flex;
    gap: 40px;
    margin-bottom: 40px;
    align-items: flex-start;
}

.blog-post-content {
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
    margin-left: -100px;
}

.blog-post-content__text {
    font-size: 18px;
    line-height: 1.8;
    color: var(--secondary-color);
    word-wrap: break-word;
}

.blog-post-content__text .table-responsive {
    /* Дополнительная защита внутри контента */
    max-width: 100%;
    overflow-x: auto;
}

/* Убеждаемся, что все таблицы обернуты правильно */
.blog-post-content__text table:not(.table-responsive table) {
    /* Если таблица не внутри .table-responsive, оборачиваем стилями */
    display: block;
    overflow-x: auto;
    width: 100%;
    max-width: 100%;
}

.blog-post-content__text .table-responsive {
    /* Дополнительная защита внутри контента */
    max-width: 100%;
    overflow-x: auto;
}

.blog-post-content__text h2 {
    font-size: 32px;
    font-weight: 500;
    margin: 40px 0 20px 0;
    color: var(--secondary-color);
}

.blog-post-content__text h3 {
    font-size: 24px;
    font-weight: 500;
    margin: 30px 0 15px 0;
    color: var(--secondary-color);
}

.blog-post-content__text h4 {
    font-size: 20px;
    font-weight: 500;
    margin: 25px 0 12px 0;
    color: var(--secondary-color);
}

.blog-post-content__text p {
    margin: 0 0 20px 0;
}

.blog-post-content__text img {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
    margin: 20px 0;
}

/* Исключаем изображения слайдера из общих стилей */
.blog-post-content__text .blog-post-slider__image {
    margin: 0;
    border-radius: 0;
}

.blog-post-content__text ul,
.blog-post-content__text ol {
    margin: 20px 0;
    padding-left: 30px;
}

.blog-post-content__text li {
    margin: 10px 0;
}

/* Blockquote (TinyMCE) */
.blog-post-content__text blockquote {
    margin: 24px 0;
    padding: 14px 18px;
    border-left: 4px solid var(--secondary-color);
    background: rgba(25, 26, 35, 0.06);
    border-radius: 12px;
}

.blog-post-content__text blockquote p {
    margin: 0;
}

.blog-post-content__text blockquote cite {
    display: block;
    margin-top: 10px;
    font-style: normal;
    opacity: 0.8;
}

@media (max-width: 992px) {
    .blog-post-content-wrapper {
        flex-direction: column;
    }
    
    .blog-post-sidebar {
        order: 0;
    }
    
    .blog-post-content {
        order: 1;
        margin-left: 0;
    }
}

/* Ограничения для мобильных устройств */
@media (max-width: 768px) {
    .blog-post-detail__container {
        overflow-x: hidden;
        width: 100%;
        position: relative;
    }
    
    .blog-post-article {
        overflow-x: hidden;
        width: 100%;
        position: relative;
    }
    
    .blog-post-content-wrapper {
        overflow-x: hidden; /* Скрываем горизонтальную прокрутку, но слайдер может выходить */
        width: 100%;
        max-width: 100%;
        position: relative;
    }
    
    .blog-post-content {
        overflow-x: hidden; /* Скрываем горизонтальную прокрутку, но слайдер может выходить */
        max-width: 100%;
        position: relative;
    }
    
    .blog-post-content__text {
        overflow-x: hidden;
        max-width: 100%;
        width: 100%;
        position: relative;
        /* Предотвращение горизонтальной прокрутки */
        touch-action: pan-y;
    }
    
    .blog-post-content__text * {
        max-width: 100%;
        box-sizing: border-box;
    }
}

/* Blog Post Sidebar */
.blog-post-sidebar {
    flex: 0 0 280px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-self: flex-start;
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow: hidden;
    margin-bottom: 0;
}

.blog-post-author-wrapper {
    flex: 0 0 auto;
    flex-shrink: 0;
}

.blog-post-toc-wrapper {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
}

/* Author Card */
.blog-post-author {
    background-color: var(--body-color);
    border: 1px solid var(--secondary-color);
    border-radius: 15px;
    padding: 20px;
    width: 100%;
}

.blog-post-author__photo {
    margin-bottom: 15px;
    text-align: center;
}

.blog-post-author__image {
    width: 100%;
    max-width: 150px;
    height: auto;
    border-radius: 50%;
    object-fit: cover;
    aspect-ratio: 1;
    border: 2px solid var(--secondary-color);
}

.blog-post-author__content {
    text-align: center;
}

.blog-post-author__name {
    font-size: 20px;
    font-weight: 600;
    color: var(--secondary-color);
    margin: 0 0 10px 0;
}

.blog-post-author__name-link {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-post-author__name-link:hover {
    color: var(--primary-color);
}

.blog-post-author__specialization {
    font-size: 16px;
    font-weight: 500;
    color: var(--secondary-color);
    opacity: 0.85;
    margin: 0 0 10px 0;
}

.blog-post-author__social {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--secondary-color);
}

.blog-post-author__social-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 6px 12px;
    border: 1px solid var(--primary-color);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.blog-post-author__social-link:hover {
    background-color: var(--primary-color);
    color: var(--body-color);
    transform: translateY(-2px);
}

.blog-post-author__social-link i {
    font-size: 16px;
}


@media (max-width: 992px) {
    .blog-post-author {
        position: static;
        max-height: none;
        margin-bottom: 20px;
    }
}

/* TOC (Table of Contents) */
.blog-post-toc {
    flex: 0 0 280px;
}

.toc {
    background-color: var(--body-color);
    border: 1px solid var(--secondary-color);
    border-radius: 15px;
    padding: 0;
    width: 100%;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease;
}

.toc:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.toc__header {
    padding: 20px 20px 15px;
    border-bottom: 1px solid var(--secondary-color);
    background-color: var(--body-color);
}

.toc__toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    width: 100%;
    text-align: left;
    transition: opacity 0.2s ease;
}

.toc__toggle:hover {
    opacity: 0.8;
}

.toc__toggle:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 4px;
}

.toc__toggle[aria-expanded="false"] .toc__icon {
    transform: rotate(-90deg);
}

.toc__icon {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
    color: var(--secondary-color);
    flex-shrink: 0;
}

.toc__title {
    font-size: 18px;
    font-weight: 600;
    color: var(--secondary-color);
    margin: 0;
}

.toc__list {
    list-style: none;
    margin: 0;
    padding: 15px 20px 20px;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    min-height: 0;
    scrollbar-width: thin;
    scrollbar-color: var(--secondary-color) transparent;
}

.toc__list--hidden {
    display: none !important;
}

.toc__list::-webkit-scrollbar {
    width: 6px;
}

.toc__list::-webkit-scrollbar-track {
    background: transparent;
}

.toc__list::-webkit-scrollbar-thumb {
    background-color: var(--secondary-color);
    border-radius: 3px;
    opacity: 0.3;
}

.toc__list::-webkit-scrollbar-thumb:hover {
    opacity: 0.5;
}

.toc__sublist {
    list-style: none;
    margin: 5px 0 0 0;
    padding: 0 0 0 20px;
    border-left: 2px solid var(--secondary-color);
    opacity: 1; /* Убираем opacity, чтобы дочерние элементы были такого же цвета */
    position: relative;
}

.toc__sublist .toc__link {
    color: #2A2B35; /* Явно задаем цвет для дочерних элементов */
}

.toc__sublist .toc__number {
    color: #2A2B35; /* Явно задаем цвет для номеров дочерних элементов */
}

.toc__sublist::before {
    content: '';
    position: absolute;
    left: -2px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, 
        transparent 0%, 
        var(--primary-color) 20%, 
        var(--primary-color) 80%, 
        transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Декоративная линия для вложенных списков - делаем ее приглушенной */
.toc__sublist {
    border-left-color: rgba(25, 26, 35, 0.2); /* Приглушенная линия, но не влияет на текст */
}

/* Активная секция только на десктопе */
@media (min-width: 993px) {
    .toc__sublist:has(.toc__link--active)::before {
        opacity: 1;
    }
}

.toc__item {
    margin: 4px 0;
    position: relative;
}

.toc__item--h2 {
    margin-top: 8px;
    margin-bottom: 4px;
}

.toc__item--h2:first-child {
    margin-top: 0;
}

.toc__item--h3 {
    margin-left: 0;
    margin-top: 2px;
    margin-bottom: 2px;
}

.toc__item--h4 {
    margin-left: 0;
    margin-top: 2px;
    margin-bottom: 2px;
}

.toc__link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #2A2B35; /* Темно-серый для лучшего контраста */
    text-decoration: none;
    font-size: 14px;
    line-height: 1.6;
    transition: all 0.2s ease;
    padding: 8px 12px;
    border-radius: 8px;
    position: relative;
    margin-left: -12px;
    margin-right: -12px;
    font-weight: 400;
}

.toc__link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background-color: var(--primary-color);
    border-radius: 0 2px 2px 0;
    transition: all 0.2s ease;
    opacity: 0.6;
}

.toc__link:hover {
    color: #1A5C2E; /* Темно-зеленый для лучшей читаемости при hover */
    background-color: rgba(25, 26, 35, 0.08);
}

.toc__link:hover::before {
    height: 60%;
    opacity: 1; /* Полная непрозрачность при hover */
    background-color: #1A5C2E; /* Темно-зеленый цвет для лучшей видимости */
}

.toc__link:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Активная секция только на десктопе */
@media (min-width: 993px) {
    .toc__link--active {
        color: #0F4A1F; /* Более темный зеленый для активного состояния */
        font-weight: 600;
        background-color: rgba(185, 255, 102, 0.15); /* Светло-зеленый фон */
    }

    .toc__link--active::before {
        height: 80%;
        background-color: #0F4A1F; /* Темно-зеленый индикатор */
    }
}

.toc__number {
    flex-shrink: 0;
    font-weight: 600;
    min-width: 2.5em;
    color: #2A2B35; /* Такой же цвет, как у родительских элементов */
    font-variant-numeric: tabular-nums;
}

.toc__link:hover .toc__number {
    color: #1A5C2E;
}

/* Активная секция только на десктопе */
@media (min-width: 993px) {
    .toc__link--active .toc__number {
        color: #0F4A1F; /* Темно-зеленый для активного номера */
        font-weight: 700;
    }
}

.toc__text {
    flex: 1;
    word-break: break-word;
    color: inherit; /* Наследует цвет от родителя */
}

.toc__indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #0F4A1F; /* Темно-зеленый индикатор */
    opacity: 0;
    transition: opacity 0.2s ease;
    flex-shrink: 0;
}

/* Активная секция только на десктопе */
@media (min-width: 993px) {
    .toc__link--active .toc__indicator {
        opacity: 1;
    }
}

/* Плавная прокрутка для якорей */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* Печать */
@media print {
    .toc {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    .toc__toggle {
        display: none;
    }
}

@media (max-width: 992px) {
    .blog-post-sidebar {
        flex: none;
        width: 100%;
        position: static;
        max-height: none;
        overflow: visible;
        gap: 0;
        margin-bottom: 0;
    }
    
    .blog-post-toc-wrapper {
        margin-bottom: 0;
        flex: none;
        min-height: auto;
    }
    
    .blog-post-toc {
        flex: none;
        margin-bottom: 0;
    }
    
    .toc {
        position: static;
        max-height: none;
        overflow-y: visible;
        flex: none;
        min-height: auto;
        margin-bottom: 0;
    }
    
    .toc__toggle {
        display: flex; /* Показываем кнопку, чтобы заголовок был виден */
        pointer-events: none; /* Отключаем клики */
    }
    
    .toc__icon {
        display: none; /* Скрываем только иконку */
    }
    
    .toc__title {
        display: block; /* Убеждаемся, что заголовок виден */
    }
    
    .toc__header {
        padding-bottom: 15px;
    }
}

/* Blog Post FAQ */
.blog-post-faq {
    margin: 60px 0;
    padding: 40px;
    background-color: var(--body-color);
    border-radius: 25px;
}

.blog-post-faq__title {
    font-size: 32px;
    font-weight: 500;
    color: var(--secondary-color);
    margin: 0 0 30px 0;
}

.blog-post-faq__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.blog-post-faq__item {
    border: 1px solid var(--secondary-color);
    border-bottom: 3px solid var(--secondary-color);
    border-radius: 30px;
    overflow: hidden;
    background-color: var(--body-color);
    margin-bottom: 16px;
}

.blog-post-faq__button {
    width: 100%;
    background-color: var(--body-color);
    padding: 20px 40px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 20px;
    text-align: left;
    font-family: Montserrat, sans-serif;
    color: var(--secondary-color);
    transition: color 0.2s ease-in-out;
    position: relative;
}

.blog-post-faq__number {
    font-size: 44px;
    font-weight: bold;
    flex-shrink: 0;
}

.blog-post-faq__button::after {
    content: "\f067";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    height: 35px;
    width: 35px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    border: 1px solid var(--secondary-color);
    background-color: var(--body-color);
    color: var(--secondary-color);
    position: absolute;
    right: 40px;
    transition: all 0.2s ease-in-out;
    flex-shrink: 0;
    margin-left: auto;
}

.blog-post-faq__button--active {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    transition: none;
}

.blog-post-faq__button--active::after {
    content: "\f068";
    background-color: var(--primary-color);
    transition: none;
}

.blog-post-faq__button:focus {
    outline: none;
}

.blog-post-faq__button:hover {
    background-color: var(--body-color);
}

.blog-post-faq__button--active:hover {
    background-color: var(--primary-color);
}

.blog-post-faq__question {
    font-size: 18px;
    font-weight: 500;
    margin: 0;
    flex: 1;
    padding-right: 60px;
}

.blog-post-faq__content {
    max-height: 0;
    overflow: hidden;
    background-color: var(--body-color);
    transition: max-height 0.3s ease-in-out, background-color 0s ease-in-out 0.3s;
}

.blog-post-faq__content--open {
    max-height: 1000px;
    background-color: var(--primary-color);
    transition: max-height 0.3s ease-in-out, background-color 0s ease-in-out;
}

.blog-post-faq__answer {
    padding: 0 40px 20px 40px;
    font-size: 16px;
    line-height: 1.7;
    color: var(--secondary-color);
    margin: 0;
}

@media (max-width: 768px) {
    .blog-post-faq__button {
        padding: 15px 20px;
        font-size: 16px;
        gap: 15px;
    }
    
    .blog-post-faq__number {
        font-size: 32px;
    }
    
    .blog-post-faq__button::after {
        height: 30px;
        width: 30px;
        right: 20px;
        font-size: 14px;
    }
    
    .blog-post-faq__question {
        font-size: 16px;
        padding-right: 50px;
    }
    
    .blog-post-faq__answer {
        padding: 0 20px 15px 20px;
        font-size: 14px;
    }
}

/* Blog Post Sources */
.blog-post-sources {
    margin: 60px 0;
}

.blog-post-sources__title {
    font-size: 32px;
    font-weight: 500;
    color: var(--secondary-color);
    margin: 0 0 30px 0;
}

.blog-post-sources__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.blog-post-sources__item {
    margin-bottom: 20px;
    padding: 20px;
    background-color: var(--body-color);
    border-radius: 15px;
}

.blog-post-sources__link {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: color 0.3s ease;
}

.blog-post-sources__link:hover {
    color: var(--primary-color);
}

.blog-post-sources__title-text {
    font-weight: 600;
    font-size: 16px;
    color: var(--secondary-color);
}

.blog-post-sources__description {
    margin: 10px 0 0 0;
    font-size: 14px;
    color: var(--secondary-color);
    opacity: 0.8;
    line-height: 1.6;
}

/* Blog Post Share */
.blog-post-share {
    margin: 40px 0;
    padding: 30px;
    background-color: var(--body-color);
    border-radius: 15px;
    text-align: center;
}

.blog-post-share__title {
    font-size: 20px;
    font-weight: 600;
    color: var(--secondary-color);
    margin: 0 0 20px 0;
}

.blog-post-share__links {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.blog-post-share__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.blog-post-share__link i {
    font-size: 18px;
    line-height: 1;
}

.blog-post-share__link span {
    line-height: 1;
}

.blog-post-share__link:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* Фирменные цвета для социальных кнопок */
.blog-post-share__link--vk {
    background-color: #0077FF;
    color: white;
}

.blog-post-share__link--telegram {
    background-color: #0088cc;
    color: white;
}

.blog-post-share__link--copy {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
}

.blog-post-share__link--copy i {
    color: white;
}

@media (max-width: 768px) {
    .blog-post-share {
        padding: 20px 15px;
    }
    
    .blog-post-share__links {
        gap: 10px;
    }
    
    .blog-post-share__link {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .blog-post-share__link i {
        font-size: 16px;
    }
}

/* Blog Post Navigation */
.blog-post-navigation {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin: 60px 0;
    padding: 30px;
    background-color: var(--body-color);
    border-radius: 15px;
}

.blog-post-navigation__prev,
.blog-post-navigation__next {
    flex: 1;
}

.blog-post-navigation__next {
    text-align: right;
}

.blog-post-navigation__label {
    display: block;
    font-size: 12px;
    color: var(--secondary-color);
    opacity: 0.6;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.blog-post-navigation__link {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: color 0.3s ease;
}

.blog-post-navigation__link:hover {
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .blog-post-navigation {
        flex-direction: column;
    }
    
    .blog-post-navigation__next {
        text-align: left;
    }
}

/* Blog Post Back */
.blog-post-back {
    margin: 40px 0;
    text-align: center;
}

.blog-post-back__link {
    display: inline-block;
    padding: 12px 24px;
    background-color: var(--primary-color);
    color: var(--secondary-color);
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    transition: opacity 0.3s ease;
}

.blog-post-back__link:hover {
    opacity: 0.8;
}

/* Related Posts */
.related-posts {
    margin-top: 80px;
    padding-top: 60px;
    border-top: 2px solid var(--secondary-color);
}

.related-posts__title {
    font-size: 36px;
    font-weight: 500;
    color: var(--secondary-color);
    margin: 0 0 40px 0;
    text-align: center;
}

.related-posts__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.related-posts__card {
    background-color: var(--body-color);
    border: 1px solid var(--secondary-color);
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.related-posts__card:hover {
    transform: translateY(-5px);
}

.related-posts__link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.related-posts__image-wrapper {
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.related-posts__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-posts__card:hover .related-posts__image {
    transform: scale(1.05);
}

.related-posts__content {
    padding: 20px;
}

.related-posts__card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--secondary-color);
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.related-posts__excerpt {
    font-size: 14px;
    color: var(--secondary-color);
    opacity: 0.8;
    margin: 0;
    line-height: 1.5;
}

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

/* Author Pages */
.blog-authors {
    margin: 40px 0;
}

.blog-authors__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.blog-authors__empty {
    text-align: center;
    color: var(--secondary-color);
    font-size: 18px;
    padding: 60px 20px;
}

.blog-author-card {
    background-color: var(--body-color);
    border: 1px solid var(--secondary-color);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-author-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.blog-author-card__photo {
    margin-bottom: 20px;
}

.blog-author-card__image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--secondary-color);
    margin: 0 auto;
}

.blog-author-card__name {
    font-size: 20px;
    font-weight: 600;
    color: var(--secondary-color);
    margin: 0 0 10px 0;
}

.blog-author-card__name-link {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-author-card__name-link:hover {
    color: var(--primary-color);
}

.blog-author-card__specialization {
    font-size: 16px;
    font-weight: 500;
    color: var(--primary-color);
    margin: 0 0 15px 0;
}

.blog-author-card__bio {
    font-size: 14px;
    color: var(--secondary-color);
    line-height: 1.6;
    margin: 0 0 15px 0;
}

.blog-author-card__stats {
    margin: 15px 0;
}

.blog-author-card__stat {
    font-size: 14px;
    color: var(--secondary-color);
    opacity: 0.8;
}

.blog-author-card__link {
    display: inline-block;
    font-size: 14px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s ease;
}

.blog-author-card__link:hover {
    opacity: 0.7;
}

/* Author Detail Page */
.blog-author-header {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
    padding: 30px;
    background-color: var(--body-color);
    border-radius: 15px;
    border: 1px solid var(--secondary-color);
}

.blog-author-header__photo {
    flex-shrink: 0;
}

.blog-author-header__image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--secondary-color);
}

.blog-author-header__content {
    flex: 1;
}

.blog-author-header__name {
    font-size: 32px;
    font-weight: 600;
    color: var(--secondary-color);
    margin: 0 0 15px 0;
}

.blog-author-header__specialization {
    font-size: 18px;
    font-weight: 500;
    color: var(--primary-color);
    margin: 0 0 10px 0;
}

.blog-author-header__experience {
    font-size: 16px;
    color: var(--secondary-color);
    line-height: 1.6;
    margin: 0 0 15px 0;
}

.blog-author-header__social {
    margin-top: 15px;
}

.blog-author-header__social-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    padding: 8px 16px;
    border: 1px solid var(--secondary-color);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.blog-author-header__social-link:hover {
    background-color: var(--secondary-color);
    color: var(--body-color);
    transform: translateY(-2px);
}

.blog-author-header__social-link i {
    font-size: 18px;
}

.blog-author-bio {
    margin: 40px 0;
    padding: 30px;
    background-color: var(--body-color);
    border-radius: 15px;
    border: 1px solid var(--secondary-color);
}

.blog-author-bio__title {
    font-size: 24px;
    font-weight: 600;
    color: var(--secondary-color);
    margin: 0 0 20px 0;
}

.blog-author-bio__content {
    font-size: 16px;
    line-height: 1.8;
    color: var(--secondary-color);
}

.blog-author-photos {
    margin: 40px 0;
    padding: 30px;
    background-color: var(--body-color);
    border-radius: 15px;
    border: 1px solid var(--secondary-color);
}

.blog-author-photos__title {
    font-size: 24px;
    font-weight: 600;
    color: var(--secondary-color);
    margin: 0 0 20px 0;
}

.blog-author-photos__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.blog-author-photos__item {
    text-align: center;
}

.blog-author-photos__image {
    width: 100%;
    height: auto;
    border-radius: 10px;
    border: 1px solid var(--secondary-color);
    margin-bottom: 10px;
}

.blog-author-photos__description {
    font-size: 14px;
    color: var(--secondary-color);
    opacity: 0.8;
    margin: 0;
}

.blog-author-stats {
    display: flex;
    gap: 30px;
    margin: 40px 0;
    padding: 30px;
    background-color: var(--body-color);
    border-radius: 15px;
    border: 1px solid var(--secondary-color);
}

.blog-author-stats__item {
    flex: 1;
    text-align: center;
}

.blog-author-stats__label {
    display: block;
    font-size: 14px;
    color: var(--secondary-color);
    opacity: 0.8;
    margin-bottom: 8px;
}

.blog-author-stats__value {
    display: block;
    font-size: 24px;
    font-weight: 600;
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .blog-authors__grid {
        grid-template-columns: 1fr;
    }
    
    .blog-author-header {
        flex-direction: column;
        text-align: center;
    }
    
    .blog-author-header__image {
        margin: 0 auto;
    }
    
    .blog-author-photos__grid {
        grid-template-columns: 1fr;
    }
    
    .blog-author-stats {
        flex-direction: column;
        gap: 20px;
    }
}

/* ============================================
   Адаптивные таблицы
   ============================================ */

.table-responsive {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    margin: 20px auto;
    position: relative;
    /* Предотвращение расширения экрана */
    box-sizing: border-box;
    /* Предотвращение zoom на мобильных */
    touch-action: pan-x;
    /* Изоляция прокрутки */
    contain: layout style;
    /* Скругления контейнера */
    border-radius: 15px;
}

.table-responsive::-webkit-scrollbar {
    height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

/* Визуальные индикаторы прокрутки */
.table-responsive::before,
.table-responsive::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 20px;
    pointer-events: none;
    z-index: 1;
    opacity: 0;
}

.table-responsive::before {
    left: 0;
    background: rgba(185, 255, 102, 0.2);
}

.table-responsive::after {
    right: 0;
    background: rgba(185, 255, 102, 0.2);
}

/* Индикаторы прокрутки убраны - они ломают верстку на мобильных */

.table-responsive table {
    width: 100%;
    min-width: 600px;
    max-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 0;
    /* Предотвращение расширения */
    table-layout: auto;
    box-sizing: border-box;
    /* Скругления таблицы */
    border-radius: 13px;
    overflow: hidden;
    /* Фон таблицы */
    background-color: var(--body-color);
}

.table-responsive table th,
.table-responsive table td {
    padding: 14px 18px;
    text-align: left;
    border: 1px solid var(--secondary-color);
    /* Адаптивный текст с переносом */
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    box-sizing: border-box;
}

.table-responsive table th {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
    /* Предотвращение сжатия заголовков */
    white-space: nowrap;
    /* Граница сверху и снизу */
    border-top: 2px solid var(--secondary-color);
    border-bottom: 2px solid var(--secondary-color);
}

.table-responsive table th:first-child {
    border-top-left-radius: 13px;
    border-left: 2px solid var(--secondary-color);
}

.table-responsive table th:last-child {
    border-top-right-radius: 13px;
    border-right: 2px solid var(--secondary-color);
}

.table-responsive table td {
    /* Разрешаем перенос текста в ячейках */
    white-space: normal;
    background-color: var(--body-color);
}

/* Стили для первой строки таблицы (если нет thead/th) */
.table-responsive table tbody > tr:first-child td {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    font-weight: 600;
    border-top: 2px solid var(--secondary-color);
    border-bottom: 2px solid var(--secondary-color);
    white-space: nowrap;
}

.table-responsive table tbody > tr:first-child td:first-child {
    border-top-left-radius: 13px;
    border-left: 2px solid var(--secondary-color);
}

.table-responsive table tbody > tr:first-child td:last-child {
    border-top-right-radius: 13px;
    border-right: 2px solid var(--secondary-color);
}

.table-responsive table td:first-child {
    border-left: 2px solid var(--secondary-color);
}

.table-responsive table td:last-child {
    border-right: 2px solid var(--secondary-color);
}

.table-responsive table tr:last-child td {
    border-bottom: 2px solid var(--secondary-color);
}

.table-responsive table tr:last-child td:first-child {
    border-bottom-left-radius: 13px;
}

.table-responsive table tr:last-child td:last-child {
    border-bottom-right-radius: 13px;
}

.table-responsive table tr:nth-child(even) {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Стили для таблиц с классами */
.table-responsive table.striped tr:nth-child(even) {
    background-color: rgba(0, 0, 0, 0.05);
}

.table-responsive table.bordered {
    border: 2px solid var(--secondary-color);
}

.table-responsive table.bordered th,
.table-responsive table.bordered td {
    border: 1px solid var(--secondary-color);
}

.table-responsive table.compact th,
.table-responsive table.compact td {
    padding: 6px 10px;
    font-size: 14px;
}

@media (max-width: 768px) {
    .table-responsive {
        margin: 15px auto;
        padding: 0;
        /* Улучшенная прокрутка на мобильных */
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        /* Изоляция прокрутки */
        contain: layout style;
        /* Скругления для мобильных */
        border-radius: 12px;
    }
    
    .table-responsive table {
        min-width: 500px;
        font-size: 14px;
        border-radius: 10px;
    }
    
    .table-responsive table th,
    .table-responsive table td {
        padding: 10px 12px;
        font-size: 13px;
        /* Улучшенный перенос на мобильных */
        line-height: 1.4;
    }
    
    .table-responsive table th {
        /* На мобильных разрешаем перенос в заголовках, если нужно */
        white-space: normal;
        font-size: 12px;
    }
    
    .table-responsive table th:first-child {
        border-top-left-radius: 10px;
    }
    
    .table-responsive table th:last-child {
        border-top-right-radius: 10px;
    }
    
    /* Стили для первой строки на мобильных (если нет th) */
    .table-responsive table tbody > tr:first-child td {
        white-space: normal;
        font-size: 12px;
    }
    
    .table-responsive table tbody > tr:first-child td:first-child {
        border-top-left-radius: 10px;
    }
    
    .table-responsive table tbody > tr:first-child td:last-child {
        border-top-right-radius: 10px;
    }
    
    .table-responsive table tr:last-child td:first-child {
        border-bottom-left-radius: 10px;
    }
    
    .table-responsive table tr:last-child td:last-child {
        border-bottom-right-radius: 10px;
    }
}

/* Очень маленькие экраны */
@media (max-width: 480px) {
    .table-responsive {
        margin: 15px auto;
        padding: 0;
        border-radius: 10px;
    }
    
    .table-responsive table {
        min-width: 450px;
        font-size: 12px;
        border-radius: 8px;
    }
    
    .table-responsive table th,
    .table-responsive table td {
        padding: 8px 10px;
        font-size: 12px;
        line-height: 1.3;
    }
    
    .table-responsive table th:first-child {
        border-top-left-radius: 8px;
    }
    
    .table-responsive table th:last-child {
        border-top-right-radius: 8px;
    }
    
    /* Стили для первой строки на очень маленьких экранах (если нет th) */
    .table-responsive table tbody > tr:first-child td:first-child {
        border-top-left-radius: 8px;
    }
    
    .table-responsive table tbody > tr:first-child td:last-child {
        border-top-right-radius: 8px;
    }
    
    .table-responsive table tr:last-child td:first-child {
        border-bottom-left-radius: 8px;
    }
    
    .table-responsive table tr:last-child td:last-child {
        border-bottom-right-radius: 8px;
    }
}

/* ============================================
   Blog Post Slider - SEO Optimized
   ============================================ */

.blog-post-slider {
    margin: 40px 0;
    padding: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

/* Слайдер внутри контента статьи */
.blog-post-content__text .blog-post-slider {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    box-sizing: border-box;
    overflow: hidden;
}

.blog-post-content__text .blog-post-slider__container {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.blog-post-slider__container {
    position: relative;
    max-width: 900px; /* Ограничение ширины на десктопе */
    width: 100%;
    margin: 0 auto; /* Центрирование */
    background-color: var(--body-color);
    border: 1px solid var(--secondary-color);
    border-bottom: 3px solid var(--secondary-color);
    border-radius: 25px;
    overflow: hidden;
    box-sizing: border-box;
}

.blog-post-slider__track {
    position: relative;
    display: flex;
    overflow: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    width: 100%;
    box-sizing: border-box;
}

.blog-post-slider__slide {
    min-width: 100%;
    flex-shrink: 0;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transition: opacity 0.3s ease;
    margin: 0;
    padding: 0;
    width: 100%;
    box-sizing: border-box;
    /* Обнуляем дефолтные стили figure */
    border: 0;
    gap: 0;
}

.blog-post-slider__slide--active {
    opacity: 1;
}

.blog-post-slider__image-wrapper {
    width: 100%;
    aspect-ratio: 16 / 9; /* Единый размер для всех изображений */
    overflow: hidden;
    background-color: var(--body-color);
    display: block;
    position: relative;
    box-sizing: border-box;
    /* Убеждаемся, что контейнер имеет правильную высоту */
    min-height: 0;
    /* Обнуляем все возможные отступы */
    margin: 0;
    padding: 0;
    border: 0;
}

/* Placeholder для lazy loading */
.blog-post-slider__image-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--body-color) 0%, var(--primary-color) 100%);
    opacity: 0.3;
    z-index: 1;
    transition: opacity 0.3s ease;
}

/* Скрываем placeholder когда изображение загружено */
.blog-post-slider__image-wrapper:has(img.loaded)::before,
.blog-post-slider__image-wrapper img.loaded ~ ::before {
    opacity: 0;
    pointer-events: none; /* Добавляем, чтобы placeholder не мешал */
    z-index: 0; /* Понижаем z-index когда скрыт */
}

.blog-post-slider__image {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top; /* Изменено на top для точного выравнивания по верхнему краю */
    display: block;
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    z-index: 2;
    box-sizing: border-box;
    /* Убеждаемся, что изображение заполняет весь контейнер */
    min-width: 100%;
    min-height: 100%;
    margin: 0;
    padding: 0;
}

.blog-post-slider__image.loaded {
    opacity: 1;
}

.blog-post-slider__slide:hover .blog-post-slider__image {
    transform: scale(1.02);
    transform-origin: center center; /* Убеждаемся, что масштабирование из центра */
}

/* Улучшенные подписи для SEO */
.blog-post-slider__caption {
    padding: 20px 30px;
    margin: 0;
    background-color: var(--body-color);
    border-top: 1px solid var(--secondary-color);
    text-align: center;
    box-sizing: border-box;
}

.blog-post-slider__caption-text {
    font-size: 16px;
    font-weight: 500;
    color: var(--secondary-color);
    line-height: 1.6;
    display: block;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Navigation Buttons */
.blog-post-slider__button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 2px solid var(--secondary-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    padding: 0;
    font-family: inherit;
    color: var(--secondary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
}

.blog-post-slider__button:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.blog-post-slider__button:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.blog-post-slider__button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.blog-post-slider__button--prev {
    left: 20px;
}

.blog-post-slider__button--next {
    right: 20px;
}

.blog-post-slider__icon {
    font-size: 32px;
    font-weight: bold;
    line-height: 1;
    display: block;
}

/* Pagination Dots */
.blog-post-slider__pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 20px;
    background-color: var(--body-color);
    box-sizing: border-box;
}

.blog-post-slider__dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--secondary-color);
    background-color: transparent;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
    font-size: 0;
    line-height: 0;
    box-sizing: border-box;
}

.blog-post-slider__dot:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transform: scale(1.2);
}

.blog-post-slider__dot--active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.blog-post-slider__dot:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Адаптивность для планшетов */
@media (max-width: 992px) {
    .blog-post-slider__container {
        max-width: 100%;
    }
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .blog-post-slider {
        margin: 30px 0;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* Внутри контента статьи */
    .blog-post-content__text .blog-post-slider {
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
    
    .blog-post-slider__container {
        max-width: 100%;
        width: 100%;
        border-radius: 15px;
        margin-left: 0;
        margin-right: 0;
        box-sizing: border-box;
    }
    
    .blog-post-slider__image-wrapper {
        aspect-ratio: 4 / 3; /* Более квадратный формат для мобильных */
        width: 100%;
        position: relative;
        overflow: hidden;
        display: block;
        min-height: 0;
    }
    
    /* Убеждаемся, что изображение заполняет контейнер полностью */
    .blog-post-slider__image {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: top; /* То же самое для мобильных */
        display: block;
        min-width: 100%;
        min-height: 100%;
    }
    
    .blog-post-slider__button {
        width: 40px;
        height: 40px;
    }
    
    .blog-post-slider__button--prev {
        left: 10px;
    }
    
    .blog-post-slider__button--next {
        right: 10px;
    }
    
    .blog-post-slider__icon {
        font-size: 24px;
    }
    
    .blog-post-slider__caption {
        padding: 15px 20px;
    }
    
    .blog-post-slider__caption-text {
        font-size: 14px;
    }
    
    .blog-post-slider__pagination {
        padding: 15px;
    }
    
    .blog-post-slider__dot {
        width: 10px;
        height: 10px;
    }
}

/* Очень маленькие экраны */
@media (max-width: 480px) {
    .blog-post-slider {
        margin: 20px 0;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .blog-post-content__text .blog-post-slider {
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
    
    .blog-post-slider__container {
        border-radius: 12px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .blog-post-slider__image-wrapper {
        aspect-ratio: 1 / 1; /* Квадратный формат для очень маленьких экранов */
        width: 100%;
        position: relative;
        overflow: hidden;
        display: block;
        min-height: 0;
    }
    
    /* Убеждаемся, что изображение заполняет контейнер полностью */
    .blog-post-slider__image {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: top; /* То же самое для маленьких экранов */
        display: block;
        min-width: 100%;
        min-height: 100%;
    }
    
    .blog-post-slider__image-wrapper {
        aspect-ratio: 1 / 1; /* Квадратный формат для очень маленьких экранов */
    }
    
    .blog-post-slider__button {
        width: 36px;
        height: 36px;
    }
    
    .blog-post-slider__button--prev {
        left: 8px;
    }
    
    .blog-post-slider__button--next {
        right: 8px;
    }
    
    .blog-post-slider__icon {
        font-size: 20px;
    }
    
    .blog-post-slider__caption {
        padding: 12px 15px;
    }
    
    .blog-post-slider__caption-text {
        font-size: 13px;
    }
    
    .blog-post-slider__pagination {
        padding: 12px;
        gap: 8px;
    }
    
    .blog-post-slider__dot {
        width: 8px;
        height: 8px;
    }
}

/* Touch gestures support */
@media (hover: none) and (pointer: coarse) {
    .blog-post-slider__button {
        opacity: 0.7;
    }
    
    .blog-post-slider:hover .blog-post-slider__button {
        opacity: 1;
    }
}

/* Печать */
@media print {
    .blog-post-slider__button,
    .blog-post-slider__pagination {
        display: none;
    }
    
    .blog-post-slider__track {
        display: block;
    }
    
    .blog-post-slider__slide {
        page-break-inside: avoid;
        margin-bottom: 20px;
        opacity: 1;
    }
    
    .blog-post-slider__caption {
        border-top: 1px solid #000;
    }
}
