/* SOS OPA - Post content, automatic table of contents and contact CTA */
.sosopa-post-content {
    direction: rtl;
    text-align: right;
    width: 100%;
    color: #242424;
    font-family: "Heebo", "Assistant", Arial, sans-serif;
    font-size: 18px;
    line-height: 1.85;
}

.sosopa-post-content *,
.sosopa-post-content *::before,
.sosopa-post-content *::after {
    box-sizing: border-box;
}

.sosopa-post-content p,
.sosopa-post-content h1,
.sosopa-post-content h2,
.sosopa-post-content h3,
.sosopa-post-content h4,
.sosopa-post-content h5,
.sosopa-post-content h6,
.sosopa-post-content li,
.sosopa-post-content blockquote,
.sosopa-post-content figcaption,
.sosopa-post-content td,
.sosopa-post-content th {
    direction: rtl;
    text-align: right;
}

.sosopa-post-content h2,
.sosopa-post-content h3 {
    scroll-margin-top: 120px;
}

.sosopa-post-content ul,
.sosopa-post-content ol {
    padding-right: 1.5em;
    padding-left: 0;
}

.sosopa-post-content img,
.sosopa-post-content video,
.sosopa-post-content iframe {
    max-width: 100%;
    height: auto;
}

.sosopa-post-content pre,
.sosopa-post-content code {
    direction: ltr;
    text-align: left;
}

.sosopa-toc {
    width: 100%;
    margin: 0 0 36px;
    border: 1px solid #d8d8d8;
    border-radius: 14px;
    background: #f8f8f8;
    overflow: hidden;
}

.sosopa-toc summary {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 17px 20px;
    color: #202020;
    font-size: 19px;
    font-weight: 800;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.sosopa-toc summary::-webkit-details-marker {
    display: none;
}

.sosopa-toc summary::after {
    content: "⌃";
    flex: 0 0 auto;
    font-size: 20px;
    line-height: 1;
    transition: transform .2s ease;
}

.sosopa-toc:not([open]) summary::after {
    transform: rotate(180deg);
}

.sosopa-toc[open] summary {
    border-bottom: 1px solid #d8d8d8;
}

.sosopa-toc-list,
.sosopa-toc-sublist {
    list-style: none !important;
    margin: 0;
}

.sosopa-toc-list {
    counter-reset: sosopa-h2;
    padding: 18px 22px 20px !important;
}

.sosopa-toc-level-2 {
    counter-increment: sosopa-h2;
    margin: 8px 0;
}

.sosopa-toc-level-2 > a::before {
    content: counter(sosopa-h2) ". ";
    color: #777;
    font-weight: 500;
}

.sosopa-toc-sublist {
    counter-reset: sosopa-h3;
    padding: 5px 22px 0 0 !important;
}

.sosopa-toc-level-3 {
    counter-increment: sosopa-h3;
    margin: 7px 0;
}

.sosopa-toc-level-3 > a::before {
    content: counter(sosopa-h2) "." counter(sosopa-h3) ". ";
    color: #888;
    font-weight: 500;
}

.sosopa-toc a {
    color: #333;
    text-decoration: none;
}

.sosopa-toc a:hover,
.sosopa-toc a:focus {
    color: #c00000;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.sosopa-contact-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    margin: 56px 0 12px;
    padding: 28px 30px;
    border: 1px solid #e2e2e2;
    border-right: 5px solid #c00000;
    border-radius: 16px;
    background: #f8f8f8;
}

.sosopa-contact-cta__text {
    min-width: 0;
}

.sosopa-contact-cta h2 {
    margin: 0 0 8px !important;
    padding: 0 !important;
    color: #151515;
    font-size: 26px;
    line-height: 1.3;
}

.sosopa-contact-cta h2::after,
.sosopa-contact-cta h2::before {
    display: none !important;
}

.sosopa-contact-cta p {
    margin: 0 !important;
    color: #555;
    font-size: 17px;
    line-height: 1.7;
}

.sosopa-contact-cta__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-height: 50px;
    padding: 13px 25px;
    border: 1px solid #c00000;
    border-radius: 10px;
    background: #c00000;
    color: #fff !important;
    font-weight: 800;
    text-decoration: none !important;
    transition: transform .2s ease, background .2s ease;
}

.sosopa-contact-cta__button:hover,
.sosopa-contact-cta__button:focus {
    background: #990000;
    transform: translateY(-2px);
}

@media (max-width: 767px) {
    .sosopa-post-content {
        font-size: 17px;
        line-height: 1.8;
    }

    .sosopa-toc {
        margin-bottom: 28px;
        border-radius: 12px;
    }

    .sosopa-toc summary {
        padding: 15px 16px;
        font-size: 18px;
    }

    .sosopa-toc-list {
        padding: 15px 16px 17px !important;
    }

    .sosopa-toc-sublist {
        padding-right: 17px !important;
    }

    .sosopa-contact-cta {
        display: block;
        margin-top: 42px;
        padding: 22px 20px;
        border-right-width: 4px;
    }

    .sosopa-contact-cta h2 {
        font-size: 23px;
    }

    .sosopa-contact-cta__button {
        width: 100%;
        margin-top: 18px;
    }
}
