html[dir="rtl"] .header__lang .dropdown__btn,
html[dir="rtl"] .header__lang .dropdown__content > a {
    column-gap: 8px;
}
html[dir="rtl"] .header__lang .dropdown__btn::before,
html[dir="rtl"] .header__lang .dropdown__content > a::before {
    margin: 0;
    flex-shrink: 0;
}
html[dir="rtl"] .header__lang .dropdown__btn {
    padding-right: 0;
    padding-inline-end: 16px;
}
html[dir="rtl"] .header__lang .dropdown__btn::after {
    right: auto;
    inset-inline-end: 0;
}

/* Give the open picker and its focus outline clearance from the download link. */
@media (min-width: 992px) {
    html[dir="rtl"] .header .container-fluid {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto auto;
        grid-template-areas: "logo nav picker";
        column-gap: 40px;
    }
    html[dir="rtl"] .header__logo { grid-area: logo; }
    html[dir="rtl"] .header__lang { grid-area: picker; position: relative; right: auto; }
    html[dir="rtl"] .header .navbar { grid-area: nav; height: auto; margin: 0; }
    html[dir="rtl"] .header__lang .dropdown__content { left: 0; right: auto; }
}

html[dir="rtl"] .section--post .article { text-align: start; }
html[dir="rtl"] .article__padding-content ul { padding-inline-start: 0; }
html[dir="rtl"] .article__padding-content ul:not(.no-ico-list) > li {
    padding-left: 0;
    padding-inline-start: 15px;
}
html[dir="rtl"] .article__padding-content ul > li::before {
    left: auto;
    inset-inline-start: 0;
}

@media (max-width: 991.98px) {
    html[dir="rtl"] .header .container-fluid { column-gap: 8px; }
    html[dir="rtl"] .header__logo { min-width: 0; }
    html[dir="rtl"] .header__lang { margin-right: 0; flex-shrink: 0; }
    html[dir="rtl"] .header .hamburger {
        position: relative;
        top: auto;
        right: auto;
        transform: none;
        flex-shrink: 0;
    }
}

/* Home artwork is positioned physically; reverse the RTL flex row, not the text. */
@media (min-width: 992px) {
    html[dir="rtl"] #fullpage .section__columns,
    html[dir="rtl"] #section-intro .section__center { flex-direction: row-reverse; }

    html[dir="rtl"] #section-intro .title,
    html[dir="rtl"] #section-intro .info,
    html[dir="rtl"] :is(#section-footer, .footer--site) .footer__bottom { text-align: start; }
}

html[dir="rtl"] #fullpage .section__content,
html[dir="rtl"] #fullpage .list-accordeon,
html[dir="rtl"] #contactForm .form-control,
html[dir="rtl"] #contactForm .form-select { text-align: start; }
html[dir="rtl"] #contactForm input[type="email"] { direction: ltr; }
html[dir="rtl"] #contactForm input[type="email"]:placeholder-shown { direction: rtl; }

html[dir="rtl"] #fullpage .section__content ul { padding-inline-start: 0; }
html[dir="rtl"] #fullpage .section__content ul:not(.no-ico-list) > li {
    padding-left: 0;
    padding-inline-start: 15px;
}
html[dir="rtl"] #fullpage .section__content ul > li::before {
    left: auto;
    inset-inline-start: 0;
    transform: scaleX(-1);
}

html[dir="rtl"] #section-faqs .list-accordeon__title,
html[dir="rtl"] #section-faqs .list-accordeon__subtitle {
    width: 100%;
    max-width: none;
    padding-inline: 15px 40px;
}
html[dir="rtl"] #section-faqs .ico-down { right: auto; inset-inline-end: 15px; }
html[dir="rtl"] #section-testimonials .testimonials__comment {
    unicode-bidi: plaintext;
    text-align: start;
}

html[dir="rtl"] #contactForm .form-group { text-align: start; }
@media (min-width: 768px) {
    html[dir="rtl"] :is(#section-footer, .footer--site) .footer__left { text-align: start; }
}
@media (min-width: 992px) {
    html[dir="rtl"] #section-chinetools .info { max-width: 50%; }
}

html[dir="rtl"] :is(#section-footer, .footer--site) .footer__sharers { flex-wrap: wrap; gap: 10px; }
html[dir="rtl"] :is(#section-footer, .footer--site) .footer__sharers a { margin: 0; }

@media (min-width: 768px) {
    html[dir="rtl"] :is(#section-footer, .footer--site) .footer__bottom .container-fluid {
        max-width: 1240px;
        margin-inline: auto;
        padding-inline: 15px;
        column-gap: 32px;
    }
    html[dir="rtl"] :is(#section-footer, .footer--site) .footer__left {
        display: flex;
        flex: 1;
        flex-wrap: wrap;
        align-items: baseline;
        gap: 6px 14px;
    }
    html[dir="rtl"] :is(#section-footer, .footer--site) .footer__left a,
    html[dir="rtl"] :is(#section-footer, .footer--site) .copyright {
        border: 0;
        margin: 0;
        padding: 0;
    }
    html[dir="rtl"] :is(#section-footer, .footer--site) .copyright { flex-basis: 100%; }
    html[dir="rtl"] :is(#section-footer, .footer--site) .footer__right {
        width: auto;
        margin-inline: 0;
        text-align: end;
    }
    html[dir="rtl"] :is(#section-footer, .footer--site) .footer__khanji-school .img,
    html[dir="rtl"] :is(#section-footer, .footer--site) .footer__sharers {
        justify-content: flex-end;
        margin-inline: 0;
    }
}

html[dir="rtl"] #contactForm .select2-selection__rendered {
    text-align: start;
    padding-inline: 25px 50px;
}
html[dir="rtl"] #contactForm .select2-selection__arrow b {
    right: auto;
    left: 25px;
}
/* Select2 appends the open results to the document, outside #contactForm. */
html[dir="rtl"] #select2-subject-results .select2-results__option {
    text-align: start;
    padding-inline: 25px;
}
html[dir="rtl"] #contactForm .form-label--legal {
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
}
html[dir="rtl"] #contactForm .form-label--legal .form-control--checkbox {
    flex-shrink: 0;
    margin: 0;
}
html[dir="rtl"] #contactForm .form-label--legal .form-label-text {
    width: auto;
    max-width: none;
    padding: 0;
}
html[dir="rtl"] #legal-check:focus-visible + label .form-control--checkbox,
html[dir="rtl"] #contactForm .select2-selection:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

@media (min-width: 992px) {
    html[dir="rtl"] #section-testimonials .swiper-button-next { left: 60px; right: auto; }
    html[dir="rtl"] #section-testimonials .swiper-button-prev { right: 60px; left: auto; }
    html[dir="rtl"] #section-testimonials .swiper-button-next svg,
    html[dir="rtl"] #section-testimonials .swiper-button-prev svg { transform: scaleX(-1); }
}

@media (max-width: 767px) {
    html[dir="rtl"] #section-academycoursesupplement .container::after {
        left: 0;
        width: 100%;
    }
    html[dir="rtl"] #section-academycoursesupplement .pet-video {
        margin-inline: -30px;
    }
}

@media (max-width: 767px) {
    html[dir="rtl"] #fullpage .title > .bg:is(.chinese, .japan, .korean) {
        margin-inline: 0 auto;
        background-position: right center;
    }
}

html[dir="rtl"] #postListForm .form-group { column-gap: 8px; }
html[dir="rtl"] #postListForm .blog-search-button {
    margin-inline: 0;
}
html[dir="rtl"] .blog-filter-mobile summary::after {
    inset-inline: auto 20px;
}
html[dir="rtl"] .blog-search-state a:not(.btn) {
    margin-inline: 0 16px;
}
@media (min-width: 768px) {
    html[dir="rtl"] #postListForm { margin-inline: 20px 0; }
    html[dir="rtl"] #postsResults[data-compact] .grid-item {
        inset-inline: var(--post-left) auto;
    }
}

html[dir="rtl"] .author-profile__content,
html[dir="rtl"] .author-profile__description p,
html[dir="rtl"] .section--author-articles {
    text-align: start;
}
html[dir="rtl"] .section--post .back-link {
    margin-inline: 0;
    gap: 15px;
}
html[dir="rtl"] .section--post .back-link svg {
    margin: 0;
    transform: scaleX(-1);
}

html[dir="rtl"] .section--cookies { text-align: start; }

html[dir="rtl"] .section--about-us,
html[dir="rtl"] .section--about-us .flex-content .info,
html[dir="rtl"] .section--about-us .colaborators__info {
    text-align: start;
}
html[dir="rtl"] .section--about-us .colaborators__info {
    padding-inline: 20px 0;
    min-width: 0;
}
@media (min-width: 768px) {
    html[dir="rtl"] .section--about-us .flex-content .info { padding-inline: 20px 0; }
    html[dir="rtl"] .section--about-us .colaborators li { padding-inline: 0 25px; }
}

html[dir="rtl"] .section--terms-privacy {
    text-align: start;
    overflow-wrap: anywhere;
}
html[dir="rtl"] .section--terms-privacy :is(ul, ol) {
    padding-inline: 2em 0;
}
html[dir="rtl"] .section--terms-privacy a[href^="mailto:"] {
    direction: ltr;
    unicode-bidi: isolate;
}

html[dir="rtl"] .error-404 .error-404__info {
    text-align: start;
}
@media (min-width: 768px) {
    html[dir="rtl"] .error-404 .error-404__info { padding-inline: 0 40px; }
    html[dir="rtl"] .error-404 .error-404__figure { padding-inline: 40px 0; }
}
@media (max-width: 767px) {
    html[dir="rtl"] .error-404 .error-404__info { width: 100%; }
}
