
/* =========================================================
   JASSAD — VERSION ARABE RTL
========================================================= */

/* Direction générale */
html[dir="rtl"],
body.rtl {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] body,
body.rtl {
    direction: rtl;
}

/* =========================================================
   TYPOGRAPHIE ARABE
========================================================= */

html[dir="rtl"] body,
body.rtl {
    font-family: "Cairo", "Tajawal", "Arial", sans-serif;
}

html[dir="rtl"] p,
html[dir="rtl"] .box-text,
html[dir="rtl"] .box-text2,
html[dir="rtl"] .box-content,
html[dir="rtl"] .about-text,
html[dir="rtl"] .sec-text,
html[dir="rtl"] .event-text,
html[dir="rtl"] .blog-text,
body.rtl p,
body.rtl .box-text,
body.rtl .box-text2,
body.rtl .box-content,
body.rtl .about-text,
body.rtl .sec-text,
body.rtl .event-text,
body.rtl .blog-text {
    text-align: justify;
}

/* =========================================================
   HEADER ET MENU DESKTOP
========================================================= */

html[dir="rtl"] .th-header,
body.rtl .th-header {
    direction: rtl;
}

@media (min-width: 1200px) {
    html[dir="rtl"] .main-menu > ul,
    body.rtl .main-menu > ul {
        display: flex !important;
        flex-direction: row;
        direction: rtl;
        flex-wrap: nowrap !important;
        align-items: center !important;
    }

    html[dir="rtl"] .main-menu > ul > li,
    body.rtl .main-menu > ul > li {
        white-space: nowrap;
        margin-left: 7px !important;
        margin-right: 7px !important;
    }

    html[dir="rtl"] .main-menu > ul > li > a,
    body.rtl .main-menu > ul > li > a {
        white-space: nowrap;
        font-size: 13px !important;
    }

    /* Sous-menus */
    html[dir="rtl"] .main-menu .sub-menu,
    body.rtl .main-menu .sub-menu {
        right: 0;
        left: auto;
        text-align: right;
    }

    /* Sous-menu imbriqué */
    html[dir="rtl"] .main-menu .sub-menu .sub-menu,
    body.rtl .main-menu .sub-menu .sub-menu {
        right: 100%;
        left: auto;
    }
}

/* =========================================================
   HEADER STICKY
========================================================= */

html[dir="rtl"] .th-header.header-layout3 .sticky-wrapper.sticky,
body.rtl .th-header.header-layout3 .sticky-wrapper.sticky {
    background-color: #ffffff !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

html[dir="rtl"] .th-header.header-layout3 .sticky-wrapper.sticky
.main-menu > ul > li > a,
body.rtl .th-header.header-layout3 .sticky-wrapper.sticky
.main-menu > ul > li > a {
    color: #362d7e !important;
}

/* =========================================================
   BOUTONS DU HEADER
========================================================= */

html[dir="rtl"] .jassad-header-actions,
body.rtl .jassad-header-actions {
    direction: rtl;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
}

/* =========================================================
   MENU MOBILE
========================================================= */

html[dir="rtl"] .th-menu-wrapper,
body.rtl .th-menu-wrapper {
    direction: rtl;
}

html[dir="rtl"] .th-menu-area,
body.rtl .th-menu-area {
    text-align: right;
}

html[dir="rtl"] .th-mobile-menu,
body.rtl .th-mobile-menu {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .th-mobile-menu a,
body.rtl .th-mobile-menu a {
    text-align: right;
}

html[dir="rtl"] .th-mobile-menu .sub-menu,
body.rtl .th-mobile-menu .sub-menu {
    padding-right: 20px;
    padding-left: 0;
}

/* Tiroir mobile : ouverture depuis la droite en RTL */
html[dir="rtl"] .th-menu-wrapper .th-menu-area,
body.rtl .th-menu-wrapper .th-menu-area {
    left: auto;
    right: -110%;
    border-right: none;
    border-left: 3px solid var(--theme-color);
}

html[dir="rtl"] .th-menu-wrapper.th-body-visible .th-menu-area,
body.rtl .th-menu-wrapper.th-body-visible .th-menu-area {
    right: 0;
    left: auto;
}

/* Bouton de fermeture : passe à gauche du tiroir */
html[dir="rtl"] .th-menu-wrapper .th-menu-toggle,
body.rtl .th-menu-wrapper .th-menu-toggle {
    right: auto;
    left: -16.5px;
}

/* Chevrons des liens du menu mobile à droite */
html[dir="rtl"] .th-mobile-menu ul li a,
body.rtl .th-mobile-menu ul li a {
    padding-left: 0;
    padding-right: 18px;
}

html[dir="rtl"] .th-mobile-menu ul li a:before,
body.rtl .th-mobile-menu ul li a:before {
    left: auto;
    right: 0;
    margin-right: 0;
    margin-left: 10px;
}

/* =========================================================
   HERO / BANNIÈRE
========================================================= */

html[dir="rtl"] .th-hero-wrapper.hero-3 .hero-style3,
body.rtl .th-hero-wrapper.hero-3 .hero-style3 {
    text-align: right;
}

html[dir="rtl"] .th-hero-wrapper.hero-3 .hero-title,
body.rtl .th-hero-wrapper.hero-3 .hero-title {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .th-hero-wrapper.hero-3 .hero-title p,
body.rtl .th-hero-wrapper.hero-3 .hero-title p {
    line-height: 1.6;
    text-align: right;
}

html[dir="rtl"] #heroSlide5 .hero-title .title,
html[dir="rtl"] #heroSlide5 .hero-title .d-block,
body.rtl #heroSlide5 .hero-title .title,
body.rtl #heroSlide5 .hero-title .d-block {
    line-height: 1.3 !important;
}

/* Mobile */
@media (max-width: 991px) {
    html[dir="rtl"] .th-hero-wrapper.hero-3 .hero-style3,
    body.rtl .th-hero-wrapper.hero-3 .hero-style3 {
        text-align: center;
    }

    html[dir="rtl"] .th-hero-wrapper.hero-3 .hero-title p,
    body.rtl .th-hero-wrapper.hero-3 .hero-title p {
        text-align: center;
    }
}

/* =========================================================
   TITRES ET SECTIONS
========================================================= */

html[dir="rtl"] section,
body.rtl section {
    direction: rtl;
}

html[dir="rtl"] .sec-title,
html[dir="rtl"] .box-title,
body.rtl .sec-title,
body.rtl .box-title {
    text-align: right;
}

html[dir="rtl"] .th-team.team-box .box-content,
body.rtl .th-team.team-box .box-content {
    text-align: right;
}

/* =========================================================
   CARTES
========================================================= */

html[dir="rtl"] .card,
html[dir="rtl"] .event-card,
html[dir="rtl"] .blog-card,
html[dir="rtl"] .speaker-card,
html[dir="rtl"] .team-card,
html[dir="rtl"] .product-card,
body.rtl .card,
body.rtl .event-card,
body.rtl .blog-card,
body.rtl .speaker-card,
body.rtl .team-card,
body.rtl .product-card {
    direction: rtl;
    text-align: right;
}

/* =========================================================
   FORMULAIRES
========================================================= */

html[dir="rtl"] input,
html[dir="rtl"] textarea,
html[dir="rtl"] select,
body.rtl input,
body.rtl textarea,
body.rtl select {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] input[type="email"],
html[dir="rtl"] input[type="url"],
html[dir="rtl"] input[type="tel"],
html[dir="rtl"] input[type="number"],
body.rtl input[type="email"],
body.rtl input[type="url"],
body.rtl input[type="tel"],
body.rtl input[type="number"] {
    direction: ltr;
    text-align: left;
}

/* =========================================================
   TABLEAUX
========================================================= */

html[dir="rtl"] table,
body.rtl table {
    direction: rtl;
}

html[dir="rtl"] th,
html[dir="rtl"] td,
body.rtl th,
body.rtl td {
    text-align: right;
}

/* =========================================================
   FOOTER
========================================================= */

html[dir="rtl"] footer,
html[dir="rtl"] .footer-wrapper,
html[dir="rtl"] .footer-layout,
body.rtl footer,
body.rtl .footer-wrapper,
body.rtl .footer-layout {
    direction: rtl;
    text-align: right;
}

/* =========================================================
   PARTENAIRES JASSAD
   Conserver l'ordre visuel des logos
========================================================= */

html[dir="rtl"] #partenaires .partners-row,
html[dir="rtl"] #partenaires .brand-wrapp,
body.rtl #partenaires .partners-row,
body.rtl #partenaires .brand-wrapp {
    direction: ltr;
}

html[dir="rtl"] #partenaires .brand-card,
body.rtl #partenaires .brand-card {
    direction: ltr;
}

/* =========================================================
   GALERIE INSTAGRAM
   Conserver la disposition alternée des images
========================================================= */

html[dir="rtl"] .instagram-gallery,
body.rtl .instagram-gallery {
    direction: ltr;
}

html[dir="rtl"] .instagram-gallery .gallery-insta_wrapp,
body.rtl .instagram-gallery .gallery-insta_wrapp {
    direction: ltr;
}

/* =========================================================
   ACCESSIBILITÉ
========================================================= */

@media (prefers-reduced-motion: reduce) {
    html[dir="rtl"] *,
    html[dir="rtl"] *::before,
    html[dir="rtl"] *::after,
    body.rtl *,
    body.rtl *::before,
    body.rtl *::after {
        scroll-behavior: auto;
    }
}
.footer-text {
    padding-bottom: 20px;
    line-height: 1.3;
    overflow: visible;
}

@media (max-width: 767px) {
    .footer-text {
        padding-bottom: 35px;
        margin-bottom: 25px;
        line-height: 1.3;
        overflow: visible;
    }
}
