.single-post-article {
    padding: 50px 0 82px;
    @media (max-width: 480px) {
        .content {
            position: relative;
            margin-top: -76px;
            background-color: #fff;
            border-top-left-radius: 32px;
            border-top-right-radius: 32px;
            z-index: 1;
        }
    }

    .single-post-article__wrapper {
        display: flex;
        gap: 80px;
        padding-bottom: 50px;
    }

    @media (max-width: 1024px) {
        .single-post-article__wrapper {
            display: block;
        }
    }
    @media (max-width: 480px) {
        .single-post-article__wrapper {
            padding-bottom: 27px;
        }
    }

    .single-post-article__info-desktop {
        display: block;
    }

    .single-post-article__info-mobile {
        width: 100%;
        min-height: 306px;
        background-repeat: no-repeat;
        background-size: cover;
        display: none;
    }

    @media (max-width: 480px) {
        .single-post-article__info-desktop {
            display: none;
        }

        .single-post-article__info-mobile {
            display: block;
        }

        .single-post-article__info-mobile .single-post-article__title {
            max-width: 300px;
            margin: auto;
            font-size: 24px;
            font-weight: 700;
            line-height: 32px;
            color: #fff;
            text-align: center;
            padding: 50px 20px 0;
            margin-bottom: 0;
        }
    }

    .single-post-article__left {
        flex: 0 1 772px;
    }

    .single-post-article__right {
        flex: 0 1 500px;
    }

    .btn-single-post {
        min-width: 294px;
        height: 57px;
        padding: 0 15px;
    }

    .single-post-article__date {
        font-size: 12px;
        line-height: 27px;
        color: #717171;
        margin-bottom: 15px;
    }

    .single-post-article__meta {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 8px 12px;
        margin-bottom: 15px;
    }

    .single-post-article__meta .single-post-article__date {
        margin-bottom: 0;
    }

    .single-post-article__meta--mobile {
        display: none;
    }

    .single-post-article__author {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        font-size: 12px;
        line-height: 27px;
        color: #717171;
    }

    .single-post-article__author-name {
        font-weight: 600;
        color: #140101;
    }

    .single-post-article__meta--desktop .single-post-article__author::before {
        content: "•";
        margin-right: 3px;
        opacity: 0.65;
    }

    @media (max-width: 480px) {
        .single-post-article__meta--desktop {
            display: none;
        }

        .single-post-article__meta--mobile {
            display: flex;
            justify-content: center;
            gap: 6px 10px;
            margin: 10px auto 0;
            padding: 0 20px;
        }

        .single-post-article__meta--mobile .single-post-article__date--mobile {
            display: block;
            margin: 0;
        }

        .single-post-article__meta--mobile .single-post-article__author,
        .single-post-article__meta--mobile .single-post-article__author-name {
            color: #fff;
        }

        .single-post-article__meta--mobile .single-post-article__author::before {
            content: "•";
            margin-right: 3px;
            opacity: 0.75;
        }
    }

    @media (max-width: 640px) {
        .single-post-article__date {
            margin-bottom: 5px;
        }
    }
    @media (max-width: 480px) {
        .single-post-article__date--desktop {
            display: none;
        }
    }

    .single-post-article__date--mobile {
        display: none;
    }

    @media (max-width: 480px) {
        .single-post-article__date--mobile {
            display: block;
            font-size: 12px;
            line-height: 27px;
            color: #fff;
            text-align: center;
            margin-top: 10px;
        }
    }

    .single-post-article__title {
        font-size: 36px;
        line-height: 44px;
        color: #1a1a1a;
        margin-bottom: 25px;
    }

    @media (max-width: 1024px) {
        .single-post-article__title {
            font-size: 28px;
            line-height: 34px;
        }
    }
    @media (max-width: 640px) {
        .single-post-article__title {
            font-size: 24px;
            line-height: 32px;
            margin-bottom: 15px;
        }
    }

    .single-post-article__thumbnail img {
        width: 100%;
        height: 300px;
        object-fit: cover;
        border-radius: 16px;
    }

    .article-intro {
        font-size: 16px;
        line-height: 24px;
        color: #555562;
        padding: 30px 0 36px;
        @media (max-width: 480px) {
            text-align: justify;
            padding: 0 0 27px;
        }
    }

    .article-intro strong {
        font-weight: 700;
    }

    .quick-overview {
        background-color: #E5E7EB;
        border: 1px solid #DDDDDD;
        border-radius: 6px;
        padding: 30px;
        margin-bottom: 30px;
    }

    @media (max-width: 640px) {
        .quick-overview {
            padding: 27px;
            margin-bottom: 54px;
        }
    }

    .quick-overview h2 {
        font-size: 36px;
        line-height: 50px;
        font-weight: 500;
        color: #140101;
        margin-bottom: 30px;
    }

    @media (max-width: 1024px) {
        .quick-overview h2 {
            font-size: 28px;
            line-height: 38px;
        }
    }
    @media (max-width: 640px) {
        .quick-overview h2 {
            font-size: 24px;
            line-height: 32px;
            margin-bottom: 20px;
        }
    }

    .quick-overview p {
        @media (max-width: 480px) {
            text-align: justify;
        }
    }

    .quick-overview p {
        font-size: 16px;
        line-height: 24px;
        color: rgba(20, 1, 1, 0.8);
    }

    .quick-overview ul li {
        font-size: 14px;
        line-height: 24px;
        color: rgba(20, 1, 1, 0.6);
    }

    .quick-overview p:not(:last-child) {
        margin-bottom: 35px;
    }

    @media (max-width: 640px) {
        .quick-overview p:not(:last-child) {
            margin-bottom: 23px;
        }
    }

    .quick-overview ul li {
        position: relative;
    }

    .quick-overview ul {
        padding-left: 15px;
    }

    .quick-overview ul li:before {
        content: '•';
        position: absolute;
        left: -15px;
        color: #140101;
    }

    .article-section h2 {
        font-size: 36px;
        line-height: 50px;
        font-weight: 700;
        color: #140101;
        margin-bottom: 30px;
    }

    @media (max-width: 1024px) {
        .article-section h2 {
            font-size: 28px;
            line-height: 38px;
        }
    }
    @media (max-width: 640px) {
        .article-section h2 {
            font-size: 24px;
            line-height: 32px;
            margin-bottom: 20px;
        }
    }

    .article-section p {
        font-size: 16px;
        line-height: 24px;
        color: #555562;
    }

    .article-section p:not(:last-child) {
        margin-bottom: 30px;
    }

    @media (max-width: 640px) {
        .article-section p:not(:last-child) {
            margin-bottom: 30px;
        }
    }
    @media (max-width: 480px) {
        .article-section p {
            text-align: justify;
        }
    }

    .article-section strong {
        font-weight: 700;
        color: #ED1C24;
    }

    .single-post-article__right aside {
        border-radius: 16px;
        position: sticky;
        top: 100px;
    }

    .single-post-article__table-of-contents h2 {
        font-size: 24px;
        line-height: 24px;
        font-weight: 700;
        color: #140101;
        background-color: #EDF2FF;
        padding: 30px;
        text-align: center;
        border-top-left-radius: 16px;
        border-top-right-radius: 16px;
        border: 2px solid #9CA3AF;
    }

    @media (max-width: 1024px) {
        .single-post-article__table-of-contents--desktop {
            display: none !important;
        }

        .single-post-article__table-of-contents--mobile {
            display: block !important;
            margin-top: 50px;
        }
    }
    @media (min-width: 1025px) {
        .single-post-article__table-of-contents--desktop {
            display: block !important;
        }

        .single-post-article__table-of-contents--mobile {
            display: none !important;
        }
    }

    @media (max-width: 1024px) {
        .single-post-article__order-now--desktop {
            display: none !important;
        }

        .single-post-article__order-now--mobile {
            display: flex !important;
        }
    }
    @media (min-width: 1025px) {
        .single-post-article__order-now--desktop {
            display: flex !important;
        }

        .single-post-article__order-now--mobile {
            display: none !important;
        }
    }

    @media (max-width: 480px) {
        .single-post-article__order-now--mobile .btn {
            font-size: 20px;
            font-weight: 700;
            line-height: 27px;
        }
    }


    .toc-link {
        display: block;
        font-size: 16px;
        line-height: 1.2;
        color: #140101;
        padding: 20px 30px;
        transition: all 0.3s ease;
    }

    .toc-list li {
        border-left: 1px solid #9CA3AF;
        border-right: 1px solid #9CA3AF;
        border-bottom: 1px solid #9CA3AF;
    }

    .toc-list li:last-child {
        border-bottom-left-radius: 16px;
        border-bottom-right-radius: 16px;
    }

    .toc-link.active {
        font-weight: 700;
    }

    .toc-link:active,
    .toc-link:focus {
        outline: none;
    }


    .single-post-article__order-now {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        min-height: 400px;
        background-color: #E6F0FF;
        border: 3px solid #EDF2FF;
        border-radius: 12px;
        padding: 20px;
        margin-top: 25px;
        text-align: center;
    }

    @media (max-width: 640px) {
        .single-post-article__order-now {
            margin-bottom: 20px;
            padding: 30px 20px;
        }
    }
    @media (max-width: 480px) {
        .single-post-article__order-now {
            min-height: 296px;
            padding: 27px;
            margin: 17px 0 54px;
        }
    }

    .single-post-article__order-now h3 {
        font-size: 22px;
        line-height: 50px;
        font-weight: 700;
        color: #140101;
        margin-bottom: 20px;
    }

    @media (max-width: 480px) {
        .single-post-article__order-now h3 {
            font-size: 24px;
            line-height: 32px;
        }
    }


    .single-post-article__order-now p {
        max-width: 395px;
        font-size: 14px;
        line-height: 27px;
        margin: 0 auto 30px;
    }

    @media (max-width: 480px) {
        .single-post-article__order-now p {
            font-size: 16px;
            line-height: 24px;
            margin-bottom: 20px;
        }
    }

    .single-post-article__order-now p strong {
        font-weight: 700;
    }

    .single-post-article__order-now a {
        font-size: 20px;
        line-height: 27px;
        font-weight: 700;
        padding: 18px;
    }

    @media (max-width: 1180px) {
        .single-post-article__order-now a {
            font-size: 16px;
            padding: 16px 24px;
        }
    }
    @media (max-width: 640px) {
        .single-post-article__order-now a {
            padding: 12px 18px;
        }
    }

    .related-posts {
        padding-top: 20px;
    }

    .related-posts__container {
        max-width: 1067px;
        margin: auto;
    }

    .related-posts__title {
        font-size: 36px;
        line-height: 44px;
        font-weight: 400;
        color: #030A19;
        text-align: center;
        margin-bottom: 40px;
    }

    @media (max-width: 480px) {
        .related-posts__title {
            font-size: 24px;
            line-height: 1.2;
            margin-bottom: 27px;
        }
    }

    .related-posts__swiper {
        overflow: hidden;
    }

    .related-posts__swiper .swiper-wrapper {
        align-items: stretch;
    }

    .related-posts__item {
        height: auto;
        display: flex !important;
    }

    .related-posts__item .related-posts__wrapper {
        display: flex;
        flex-direction: column;
        height: 100%;
        background-color: #fff;
        border-radius: 16px;
        overflow: hidden;
        width: 100%;
    }

    .related-posts__thumbnail {
        flex-shrink: 0;
    }

    .related-posts__thumbnail img {
        width: 100%;
        height: 246px;
        object-fit: cover;
        border-top-left-radius: 16px;
        border-top-right-radius: 16px;
    }

    .related-posts__date {
        font-size: 11px;
        line-height: 18px;
        color: #A8A8A8;
        margin: 30px 0 20px;
        flex-shrink: 0;
    }

    .related-posts__item-title {
        font-size: 18.4px;
        line-height: 30px;
        font-weight: 700;
        color: #140101;
        margin-bottom: 37px;
        flex-grow: 1;
    }

    .related-posts__read-more {
        max-width: 170px;
        width: calc(100% - 60px);
        height: 50px;
        font-size: 13.4px;
        line-height: 18px;
        font-weight: 400;
        border-radius: 50px;
        overflow: hidden;
        color: #fff;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 14px;
        background-color: #ED1C24;
        transition: all 0.3s ease;
        margin-top: auto;
        flex-shrink: 0;
    }

    .related-posts__read-more:hover {
        background-color: rgba(200, 20, 30, 1);
    }

    .related-posts__content {
        display: flex;
        flex-direction: column;
    }

    .swiper-scrollbar {
        display: none;
    }

    @media (max-width: 480px) {
        .related-posts {
            padding-top: 0;
        }

        .related-posts__swiper {
            overflow: visible;
            padding-bottom: 34px;
        }

        .related-posts__swiper .swiper-slide {
            height: auto;
        }

        .related-posts__item .related-posts__wrapper {
            position: relative;
            height: 160px;
            min-height: 160px;
            border-radius: 16px;
            cursor: pointer;
        }

        .related-posts__thumbnail,
        .related-posts__thumbnail img {
            height: 100%;
        }

        .related-posts__thumbnail img {
            border-radius: 16px;
        }

        .related-posts__item .related-posts__wrapper::before {
            content: "";
            position: absolute;
            inset: 0;
            border-radius: 16px;
            background: rgba(5, 7, 42, 0.55);
            z-index: 1;
        }

        .related-posts__date {
            display: none;
        }

        .related-posts__item-title {
            position: absolute;
            inset: 0;
            z-index: 2;
            margin: 0;
            padding: 20px 16px;
            display: flex;
            align-items: center;
            justify-content: center;
            text-align: center;
            color: #fff;
            font-size: 14px;
            line-height: 24px;
            font-weight: 400;
        }

        .related-posts__read-more {
            position: absolute;
            inset: 0;
            z-index: 3;
            opacity: 0;
            width: 100%;
            max-width: none;
            height: auto;
            margin: 0;
            border-radius: 16px;
            font-size: 0;
            line-height: 0;
            color: transparent;
            background: transparent;
            gap: 0;

        }

        .related-posts__read-more svg,
        .related-posts__read-more span {
            display: none;
        }

        .related-posts__scrollbar {
            position: absolute;
            left: 50%;
            transform: translateX(-50%);
            bottom: 0;
            width: 240px;
            height: 6px;
            background: #d9e0f2;
            border-radius: 999px;
            display: block;
        }

        .related-posts__scrollbar .swiper-scrollbar-drag {
            background: #3f6ddf;
            border-radius: 999px;
        }
    }

}

@media (max-width: 1024px) {
    .single-post-article {
        padding: 30px 0 50px;
    }
}

@media (max-width: 480px) {
    body.single-post,
    body.single-post main.single-post-page,
    body.single-post .single-post-article {
        overflow-x: hidden;
        max-width: 100%;
    }

    .single-post-article {
        padding: 0 0 50px;
    }
}

/* Базовое состояние списка: полностью схлопнут */
#table-of-contents-desktop {
    margin: 0;
    padding: 0;
    /* Плавность перехода для высоты и прозрачности */
    transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.3s ease,
    margin 0.4s ease;
}

/* Состояние, когда список открыт */
#table-of-contents-desktop.is-open {
    opacity: 1;
    /*  margin-top: 15px; Отступ появляется только при открытии */
}

/* Указатель для заголовка, чтобы пользователь понял, что можно кликнуть */
.single-post-article__table-of-contents h2 {
    cursor: pointer;
    user-select: none;
}

/* Desktop TOC accordion fix */
@media (min-width: 1025px) {
    .single-post-article__table-of-contents .toc-list {
        height: 0;
        margin: 0;
        padding: 0;
        overflow: hidden;
        opacity: 0;
        pointer-events: none;
        transition: height 0.35s ease, opacity 0.25s ease;
    }

    .single-post-article__table-of-contents .toc-list.is-open {
        opacity: 1;
        pointer-events: auto;
    }
}
