/* SMU same-page Arabic RTL. Online Application and Financial Aid never receive these assets. */
html[dir="rtl"],
body.smu-spt-ar {
    direction: rtl;
}

body.smu-spt-ar {
    text-align: right;
}

body.smu-spt-ar .elementor-widget-text-editor,
body.smu-spt-ar .elementor-heading-title,
body.smu-spt-ar .elementor-button-text,
body.smu-spt-ar p,
body.smu-spt-ar li,
body.smu-spt-ar h1,
body.smu-spt-ar h2,
body.smu-spt-ar h3,
body.smu-spt-ar h4,
body.smu-spt-ar h5,
body.smu-spt-ar h6 {
    direction: rtl;
}

body.smu-spt-ar input,
body.smu-spt-ar textarea,
body.smu-spt-ar select {
    direction: rtl;
    text-align: right;
}

body.smu-spt-ar input[type="email"],
body.smu-spt-ar input[type="tel"],
body.smu-spt-ar [dir="ltr"],
body.smu-spt-ar .smu-topbar__phone {
    direction: ltr !important;
    text-align: left;
}

/* Reverse layout direction for Elementor rows/containers in Arabic. */
body.smu-spt-ar .elementor-section .elementor-container,
body.smu-spt-ar .e-con.e-flex,
body.smu-spt-ar .e-con-inner {
    direction: rtl;
}

body.smu-spt-ar .elementor-section .elementor-row {
    flex-direction: row-reverse;
}

/* The homepage receives a stronger mirrored treatment as requested. */
body.smu-spt-ar.smu-spt-home .elementor-section .elementor-container,
body.smu-spt-ar.smu-spt-home .e-con.e-flex,
body.smu-spt-ar.smu-spt-home .e-con-inner {
    direction: rtl;
}

body.smu-spt-ar.smu-spt-home .elementor-section .elementor-row,
body.smu-spt-ar.smu-spt-home .e-con.e-flex.e-con-boxed > .e-con-inner {
    flex-direction: row-reverse;
}

/* Navigation and common Acadia components. */
body.smu-spt-ar .tp-main-menu,
body.smu-spt-ar .tp-main-menu nav,
body.smu-spt-ar .tp-main-menu ul,
body.smu-spt-ar .mobile-menu,
body.smu-spt-ar .offcanvas__area,
body.smu-spt-ar .tp-breadcrumb,
body.smu-spt-ar .breadcrumb__content {
    direction: rtl;
    text-align: right;
}

body.smu-spt-ar .tp-main-menu ul li .submenu,
body.smu-spt-ar .tp-main-menu ul li ul {
    right: 0;
    left: auto;
    text-align: right;
}

body.smu-spt-ar .swiper,
body.smu-spt-ar .slick-slider,
body.smu-spt-ar .owl-carousel {
    direction: rtl;
}

/* Keep media, numbers, maps and embeds naturally oriented. */
body.smu-spt-ar iframe,
body.smu-spt-ar video,
body.smu-spt-ar canvas,
body.smu-spt-ar svg,
body.smu-spt-ar .smu-no-translate {
    direction: ltr;
}

/* =========================================================
   v1.8 TARGETED LAYOUT FIXES
   Base: v1.7 / stable V1.2 translation engine.
   Nothing below touches images, SVGs, Elementor background
   slideshows, or global Swiper/Slick/Owl components.
   ========================================================= */

/* ---------------------------------------------------------
   HOME HERO: keep the same vertical rhythm as English.
   Arabic copy can otherwise wrap to extra lines and make the
   content-driven Elementor hero taller. On desktop we preserve
   the original Elementor padding and keep the short hero lines
   on one line. Mobile/tablet are left completely untouched.
   --------------------------------------------------------- */
@media (min-width: 1200px) {
    body.smu-spt-ar.smu-spt-home .elementor-element-4a4b579 .elementor-element-5f66388 {
        --padding-top: 134px !important;
        --padding-bottom: 160px !important;
        --padding-left: 0px !important;
        --padding-right: 0px !important;
    }

    body.smu-spt-ar.smu-spt-home .elementor-element-4a4b579 .elementor-element-0d8e112 .tp-el-subtitle,
    body.smu-spt-ar.smu-spt-home .elementor-element-4a4b579 .elementor-element-0d8e112 .tp-el-title,
    body.smu-spt-ar.smu-spt-home .elementor-element-4a4b579 .elementor-element-0d8e112 .tp-home-2-heading-shape {
        white-space: nowrap !important;
    }

    body.smu-spt-ar.smu-spt-home .elementor-element-4a4b579 .elementor-element-0d8e112 .tp-el-title,
    body.smu-spt-ar.smu-spt-home .elementor-element-4a4b579 .elementor-element-0d8e112 .tp-home-2-heading-shape {
        max-width: none !important;
    }
}

/* ---------------------------------------------------------
   HOME: custom Academic Programs slider.
   Its own JavaScript calculates movement in LTR using negative
   translateX(). Keep ONLY this custom slider in LTR geometry;
   Arabic text inside cards stays RTL. This does not touch hero.
   --------------------------------------------------------- */
body.smu-spt-ar .smu-program-slider,
body.smu-spt-ar .smu-program-slider-viewport,
body.smu-spt-ar .smu-program-slider-track,
body.smu-spt-ar .smu-program-slide {
    direction: ltr !important;
}

body.smu-spt-ar .smu-program-slider-track {
    flex-direction: row !important;
}

body.smu-spt-ar .smu-program-slide-content,
body.smu-spt-ar .smu-program-slide-title,
body.smu-spt-ar .smu-program-slide-subtitle {
    direction: rtl !important;
    text-align: right !important;
}

body.smu-spt-ar .smu-program-slide-content {
    left: 24px;
    right: 34px;
}

/* ---------------------------------------------------------
   HEADER: Stand Alone Programs.
   Acadia's English desktop menu uses left:100% for each nested
   flyout. Preserve that exact flyout geometry for this branch,
   so Elective Courses / Get Yourself Certified / certificates
   open as separate tabs rather than stacking over one another.
   Only the copy is RTL. All other Arabic menus keep normal RTL.
   --------------------------------------------------------- */
@media (min-width: 1200px) {
    /* Stand Alone Programs' own child panel: same geometry as EN. */
    body.smu-spt-ar #menu-item-12596 {
        direction: ltr !important;
    }

    body.smu-spt-ar #menu-item-12596 > ul.tp-submenu,
    body.smu-spt-ar #menu-item-12596 > ul.submenu {
        left: 100% !important;
        right: auto !important;
        top: 0 !important;
        margin: 0 !important;
        transform-origin: 0 0 !important;
        min-width: 252px;
        width: 252px;
        z-index: 10010 !important;
    }

    /* Every deeper tab/flyout follows the English menu cascade. */
    body.smu-spt-ar #menu-item-12596 ul.tp-submenu li,
    body.smu-spt-ar #menu-item-12596 ul.submenu li {
        position: relative !important;
        direction: ltr !important;
    }

    body.smu-spt-ar #menu-item-12596 ul.tp-submenu li > ul.tp-submenu,
    body.smu-spt-ar #menu-item-12596 ul.tp-submenu li > ul.submenu,
    body.smu-spt-ar #menu-item-12596 ul.submenu li > ul.tp-submenu,
    body.smu-spt-ar #menu-item-12596 ul.submenu li > ul.submenu {
        left: 100% !important;
        right: auto !important;
        top: 0 !important;
        margin: 0 !important;
        transform-origin: 0 0 !important;
        min-width: 252px;
        width: 252px;
        z-index: 10020 !important;
    }

    /* Arabic labels remain RTL/right-aligned within EN-like tabs. */
    body.smu-spt-ar #menu-item-12596 > a,
    body.smu-spt-ar #menu-item-12596 ul.tp-submenu li > a,
    body.smu-spt-ar #menu-item-12596 ul.submenu li > a {
        direction: rtl !important;
        text-align: right !important;
        white-space: normal !important;
        line-height: 1.4 !important;
    }

    /* Do not force all descendant flyouts visible from an ancestor.
       Keep only the submenu belonging to the currently hovered LI. */
    body.smu-spt-ar #menu-item-12596 ul.tp-submenu ul.tp-submenu,
    body.smu-spt-ar #menu-item-12596 ul.tp-submenu ul.submenu,
    body.smu-spt-ar #menu-item-12596 ul.submenu ul.tp-submenu,
    body.smu-spt-ar #menu-item-12596 ul.submenu ul.submenu {
        opacity: 0 !important;
        visibility: hidden !important;
    }

    body.smu-spt-ar #menu-item-12596 ul.tp-submenu li:hover > ul.tp-submenu,
    body.smu-spt-ar #menu-item-12596 ul.tp-submenu li:hover > ul.submenu,
    body.smu-spt-ar #menu-item-12596 ul.submenu li:hover > ul.tp-submenu,
    body.smu-spt-ar #menu-item-12596 ul.submenu li:hover > ul.submenu {
        opacity: 1 !important;
        visibility: visible !important;
        transform: scale(1, 1) !important;
    }
}


/* =========================================================
   v1.9 HERO HEIGHT MATCH
   The English desktop hero resolves to roughly 500px from its
   native Elementor padding + heading + CTA. RTL flex inheritance
   can make the Arabic background/slideshow container collapse
   shorter, so pin ONLY the homepage hero/slideshow chain to the
   same desktop minimum height. No IMG/SVG/Swiper content is changed.
   ========================================================= */
@media (min-width: 1200px) {
    body.smu-spt-ar.smu-spt-home .elementor-element-4a4b579,
    body.smu-spt-ar.smu-spt-home .elementor-element-4a4b579 > .elementor-element-da22ccb,
    body.smu-spt-ar.smu-spt-home .elementor-element-4a4b579 .elementor-element-c2c130a {
        min-height: 500px !important;
    }

    /* Make the Elementor slideshow layer fill the matched hero height. */
    body.smu-spt-ar.smu-spt-home .elementor-element-4a4b579 > .elementor-element-da22ccb,
    body.smu-spt-ar.smu-spt-home .elementor-element-4a4b579 > .elementor-element-da22ccb > .elementor-background-slideshow,
    body.smu-spt-ar.smu-spt-home .elementor-element-4a4b579 > .elementor-element-da22ccb > .elementor-background-slideshow .swiper,
    body.smu-spt-ar.smu-spt-home .elementor-element-4a4b579 > .elementor-element-da22ccb > .elementor-background-slideshow .swiper-wrapper,
    body.smu-spt-ar.smu-spt-home .elementor-element-4a4b579 > .elementor-element-da22ccb > .elementor-background-slideshow .swiper-slide {
        min-height: 500px !important;
    }
}
