/* Global Translator Pro - translation-safe presentation for Al-Hadara.
 * English/French adjusts text, the header, and explicit department interfaces.
 * Do not mirror unrelated page sections, image cards, staff carousels or sliders.
 */

/* Google's translation frame must not add a blank band over WordPress. */
html { height:auto!important; }
body { min-height:100vh!important; top:0!important; }
#gtp-google-widget { position:fixed; inset-inline-start:12px; bottom:12px; z-index:10; }
#gtp-google-widget.skiptranslate { display:block!important; width:1px!important; height:1px!important; overflow:hidden!important; clip-path:inset(50%); pointer-events:none!important; }
html.gtp-native-google font { font-family:inherit!important; font-size:inherit!important; font-weight:inherit!important; font-style:inherit!important; line-height:inherit!important; letter-spacing:inherit!important; }
html.gtp-native-google .gtp-menu-label {font:inherit;line-height:inherit;letter-spacing:normal;word-spacing:normal;}
/* Arabic display fonts are wider in Latin and can separate translated words.
   Keep each menu label intact and retain the site's authored font size. */
html.gtp-native-google[data-gtp-language-dir="ltr"] :is(.hdm-top-link,.wpr-nav-menu > li > a,.hdm-primary-menu > li > a) {
    font-family:Arial,Helvetica,sans-serif!important;
    letter-spacing:normal!important;
    word-spacing:normal!important;
    text-align:start!important;
}
html.gtp-native-google[data-gtp-language-dir="ltr"] .hdm-upper-link {justify-content:flex-start!important;}
html.gtp-native-google[data-gtp-language-dir="ltr"] #header nav[data-id="menu"] > ul {
    flex-wrap:wrap!important;justify-content:flex-start!important;direction:ltr!important;
    min-width:0!important;
}
html.gtp-native-google[data-gtp-language-dir="ltr"] .hdm-upper-link {
    text-transform:none!important;padding-inline:8px!important;
    white-space:nowrap!important;
}
html.gtp-native-google .gtp-header-overlay { margin-bottom:calc(-1 * var(--gtp-header-height,150px))!important; }

/* Text alignment is applied with property-level backups by gtp-layout.js.
   This preserves centered cards and also overrides Elementor inline !important rules. */

/* Proper English list markers (not a change to card or grid order). */
html.gtp-native-google[data-gtp-language-dir="ltr"] [data-gtp-list-dir="ltr"] {
    direction:ltr!important;
    text-align:left!important;
    padding-left:var(--gtp-list-indent,2em)!important;
    padding-right:0!important;
}
html.gtp-native-google[data-gtp-language-dir="ltr"] [data-gtp-list-dir="ltr"] > li {
    direction:ltr!important;
    text-align:left!important;
}
html.gtp-native-google[data-gtp-language-dir="ltr"] [data-gtp-list-dir="ltr"] .elementor-icon-list-item {
    direction:ltr!important;
    flex-direction:row!important;
}
html.gtp-native-google[data-gtp-language-dir="ltr"] li[data-gtp-pseudo-before="ltr"],
html.gtp-native-google[data-gtp-language-dir="ltr"] li[data-gtp-pseudo-after="ltr"] {
    padding-left:var(--gtp-li-indent,1.5em)!important;
    padding-right:0!important;
    text-align:left!important;
}
html.gtp-native-google[data-gtp-language-dir="ltr"] li[data-gtp-pseudo-before="ltr"]::before {
    right:auto!important;
    left:var(--gtp-before-offset,0px)!important;
}
html.gtp-native-google[data-gtp-language-dir="ltr"] li[data-gtp-pseudo-after="ltr"]::after {
    right:auto!important;
    left:var(--gtp-after-offset,0px)!important;
}

/* Decorative 01/02 labels: move the label, NOT the containing card. */
html.gtp-native-google[data-gtp-language-dir="ltr"] [data-gtp-number-dir="ltr"] {
    direction:ltr!important;
    text-align:left!important;
}
html.gtp-native-google[data-gtp-language-dir="ltr"] [data-gtp-number-dir="ltr"][data-gtp-number-pos="absolute"] {
    right:auto!important;
    left:var(--gtp-number-offset,0px)!important;
}
html.gtp-native-google[data-gtp-language-dir="ltr"] [data-gtp-number-dir="ltr"][data-gtp-number-pos="flow"] {
    margin-left:0!important;
    margin-right:auto!important;
    align-self:flex-start!important;
}

/* Only detected PRIMARY navigation is directional. Do not apply direction to the
   entire header: its upper menu, e-mail and telephone strip keep their layout. */
html.gtp-native-google[data-gtp-language-dir="ltr"] [data-gtp-primary-menu="ltr"] {
    direction:ltr!important;
    text-align:left!important;
}
html.gtp-native-google[data-gtp-language-dir="ltr"] [data-gtp-primary-menu="ltr"] > li > .sub-menu {
    left:0!important;
    right:auto!important;
}
@media (min-width:1025px) {
    html.gtp-native-google[data-gtp-language-dir="ltr"] [data-gtp-primary-menu="ltr"] .sub-menu .sub-menu {
        left:100%!important;
        right:auto!important;
    }
}
html.gtp-native-google[data-gtp-language-dir="ltr"] [data-gtp-search-dir="ltr"] {
    direction:ltr!important;
    text-align:left!important;
}

/* College departments' multi-level overlay: LTR labels & chevrons, original panel dimensions. */
html.gtp-native-google[data-gtp-language-dir="ltr"] #hdm-panel {
    direction:ltr!important;
    text-align:left!important;
}
html.gtp-native-google[data-gtp-language-dir="ltr"] #hdm-panel :is(h1,h2,h3,h4,h5,h6,p,li,summary,a,button,[role="menuitem"],[role="heading"]) {
    direction:ltr!important;
    text-align:left!important;
}
html.gtp-native-google[data-gtp-language-dir="ltr"] #hdm-panel a.hdm-link,
html.gtp-native-google[data-gtp-language-dir="ltr"] #hdm-panel a.hdm-link span {
    direction:ltr!important;
    text-align:left!important;
    overflow-wrap:break-word;
}
html.gtp-native-google[data-gtp-language-dir="ltr"] #hdm-panel a.hdm-link {
    box-sizing:border-box;
    max-width:100%;
    font-family:Arial,Helvetica,sans-serif!important;
    font-size:14px!important;
    line-height:1.6!important;
}
html.gtp-native-google[data-gtp-language-dir="ltr"] #hdm-panel a.hdm-link svg {
    flex-shrink:0;
    margin-left:auto;
    margin-right:0;
}
/* Only the forward chevrons inside a department link are mirrored. */
html.gtp-native-google[data-gtp-language-dir="ltr"] #hdm-panel a.hdm-link > svg,
html.gtp-native-google[data-gtp-language-dir="ltr"] #hdm-panel a.hdm-link > span:last-child svg {
    transform:rotate(180deg)!important;
}

/* Hide Google's extra floating control, but keep the original language switcher. */
html.gtp-native-google .VIpgJd-ZVi9od-aZ2wEe-wOHMyf,
html.gtp-native-google .VIpgJd-ZVi9od-aZ2wEe-OiiCO { display:none!important; }

/* 1.1.5 REGRESSION REPAIR:
   These four department interfaces intentionally mirror. Their rules were
   accidentally removed in 1.1.4. No selector here changes the page root or
   unrelated Elementor grids/cards/carousels. Marking is reversed on Arabic. */
html.gtp-native-google[data-gtp-language-dir="ltr"] [data-gtp-content-dir="ltr"] {
    direction:ltr!important;
}
html.gtp-native-google[data-gtp-language-dir="ltr"] [data-gtp-content-dir="ltr"]
:is(nav,table,thead,tbody,tfoot,tr,dl,dt,dd,summary,[role="tablist"],
.hadara-curriculum-workspace,.hadara-curriculum-index,
.hadara-modules-grid,.hadara-catalog-pills,.hadara-stage-head,.hadara-module-head) {
    direction:ltr!important;
}
html.gtp-native-google[data-gtp-language-dir="ltr"] [data-gtp-content-dir="ltr"]
:is(dt,dd,th,td,summary) {
    text-align:start!important;
}
/* Definition rows: keep the label at reading start and its value at the end.
   This moves the 54/20 statistics without flipping the neighbouring hero image. */
html.gtp-native-google[data-gtp-language-dir="ltr"] .hadara-hero-intro[data-gtp-content-dir="ltr"] dl,
html.gtp-native-google[data-gtp-language-dir="ltr"] .hadara-hero-intro[data-gtp-content-dir="ltr"] dl > div {
    direction:ltr!important;
}

/* Non-intrusive failure policy: never inject translation banners into tabs. */
.gtp-dynamic-notice {display:none!important;}

/* 1.1.8: translation text only, preserving Elementor columns and footer blocks. */
html.gtp-native-google[data-gtp-language-dir="ltr"] :is(footer,.elementor-location-footer,#colophon,.site-footer) :is(.elementor-heading-title,.elementor-icon-list-text,li,li>a,h1,h2,h3,h4,h5,h6,p) {
    direction:ltr!important; text-align:left!important;
}
/* About/intro cards: remove RTL auto indentation; do not move their card. */
html.gtp-native-google[data-gtp-language-dir="ltr"] :is(.hadara-hero-intro,.hadara-about-section,.hadara-intro-card,[data-gtp-align-intro]) p {
    direction:ltr!important; text-align:left!important;
    margin-left:0!important; margin-right:auto!important;
}
/* Keep department/other feature cards centered on the home page. */
html.gtp-native-google[data-gtp-language-dir="ltr"] [data-gtp-center-card="1"] :is(h1,h2,h3,h4,h5,h6,p,figcaption) {
    text-align:center!important;
}

/* 1.1.9: English typography fixes only. No footer column reorder. */
html.gtp-native-google[data-gtp-language-dir="ltr"] :is(footer,.elementor-location-footer,#colophon,.site-footer) .elementor-widget-heading,
html.gtp-native-google[data-gtp-language-dir="ltr"] :is(footer,.elementor-location-footer,#colophon,.site-footer) .elementor-widget-heading .elementor-widget-container {
    text-align:left!important;
    justify-content:flex-start!important;
    align-items:stretch!important;
    margin-left:0!important;
    margin-right:auto!important;
}
html.gtp-native-google[data-gtp-language-dir="ltr"] :is(footer,.elementor-location-footer,#colophon,.site-footer) :is(.elementor-heading-title,h1,h2,h3,h4,h5,h6) {
    text-align:left!important; margin-left:0!important; margin-right:auto!important;
}
/* Center each homepage hero counter/label inside its EXISTING column. */
html.gtp-native-google[data-gtp-language-dir="ltr"] [data-gtp-home-stat="1"] :is(h1,h2,h3,h4,h5,h6,p,.elementor-heading-title,.elementor-counter-number,.elementor-counter-title) {
    text-align:center!important;
}
/* Department intro heading + underline start together; card geometry unchanged. */
html.gtp-native-google[data-gtp-language-dir="ltr"] [data-gtp-intro-heading="1"] {
    direction:ltr!important; text-align:left!important;
    margin-left:0!important; margin-right:auto!important;
    align-self:flex-start!important;
}
/* Keep the site's original nav font sizes, and allow two clean rows without
   forcing the entire top/contact bar into a new horizontal layout. */
@media (min-width:1025px) {
    html.gtp-native-google[data-gtp-language-dir="ltr"] [data-gtp-primary-row="ltr"] {gap:clamp(8px,.75vw,16px)!important;}
    html.gtp-native-google[data-gtp-language-dir="ltr"] [data-gtp-primary-menu="ltr"] > li > a {white-space:nowrap;}
    html.gtp-native-google[data-gtp-language-dir="ltr"] .hdm-header-row {
        direction:ltr!important;
        width:100%!important;max-width:100%!important;
        grid-template-columns:110px minmax(0,1fr) 246px!important;
        column-gap:24px!important;
    }
    html.gtp-native-google[data-gtp-language-dir="ltr"] .hdm-primary-menu {
        direction:ltr!important;column-gap:0!important;row-gap:0!important;
    }
    html.gtp-native-google[data-gtp-language-dir="ltr"] .hdm-primary-menu > li {flex:0 0 auto!important;}
    html.gtp-native-google[data-gtp-language-dir="ltr"] .hdm-primary-menu > li > a {white-space:nowrap!important;}
}

/* Counter titles have Elementor's flex-item alignment independent of text-align.
   Fill the existing column so both short and long English labels share its center. */
html.gtp-native-google[data-gtp-language-dir="ltr"] .home .elementor-widget-counter .elementor-counter-title {
    align-self:stretch!important;
    width:100%!important;
    max-width:100%!important;
    margin-inline:0!important;
    text-align:center!important;
    justify-content:center!important;
    box-sizing:border-box;
}
/* A fixed repeating background repaints the translated department on scroll. */
html.gtp-native-google[data-gtp-language-dir="ltr"] body.hadara-academic {
    background-attachment:scroll;
}
