/*
 Theme Name:   Techtlk Child
 Theme URI:    https://techtlk.rstheme.com/
 Description:  Techtlk Child — AAIT RTL Software Company fixes (update-safe)
 Author:       AAIT
 Author URI:   https://aait.sa
 Template:     techtlk
 Version:      1.0.8
 Text Domain:  techtlk-child
*/

/* ===== SR7 hero under RTL: width collapses to 0 inside Elementor flex ===== */
html[dir="rtl"] .elementor-widget-slider_revolution,
html[dir="rtl"] .elementor-element:has(> .elementor-widget-container > .wp-block-themepunch-revslider),
html[dir="rtl"] .elementor-element:has(sr7-module),
html[dir="rtl"] .e-con:has(sr7-module),
html[dir="rtl"] .e-con:has(.wp-block-themepunch-revslider),
html[dir="rtl"] .wp-block-themepunch-revslider,
html[dir="rtl"] sr7-module,
html[dir="rtl"] .sr7-module,
html[dir="rtl"] rs-module-wrap,
html[dir="rtl"] rs-module {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  flex: 1 1 auto !important;
  align-self: stretch !important;
}

/* SR modules expect LTR coordinate box (width/position math).
   Writing direction for text/buttons must stay RTL on Arabic. */
html[dir="rtl"] .wp-block-themepunch-revslider,
html[dir="rtl"] sr7-module,
html[dir="rtl"] .sr7-module {
  direction: ltr;
  unicode-bidi: isolate;
}

html[dir="rtl"] sr7-module sr7-txt,
html[dir="rtl"] sr7-module .sr7-txt,
html[dir="rtl"] sr7-module a.sr7-layer,
html[dir="rtl"] sr7-module .sr7-layer.sr7-btn,
html[dir="rtl"] sr7-module .sr7-layer.sr7-text,
html[dir="rtl"] .sr7-module sr7-txt,
html[dir="rtl"] .sr7-module .sr7-txt,
html[dir="rtl"] .sr7-module a.sr7-layer,
html[dir="rtl"] .sr7-module .sr7-layer.sr7-btn {
  /* Align block to the RTL side; plaintext keeps EN/AR glyph order correct */
  direction: rtl;
  unicode-bidi: plaintext;
  text-align: right !important;
}

html[dir="rtl"] sr7-module,
html[dir="rtl"] .sr7-module {
  display: block !important;
  min-height: 580px;
}

/* Force full-bleed hero parent */
html[dir="rtl"] .e-con.e-parent:has(sr7-module),
html[dir="rtl"] .e-con.e-parent:has(.wp-block-themepunch-revslider) {
  width: 100% !important;
  max-width: 100% !important;
  --width: 100%;
  --container-max-width: 100%;
}

/* Elementor container width from kit should not crush slider */
html[dir="rtl"] .elementor-16339 > .e-con:first-child {
  max-width: 100% !important;
  width: 100% !important;
}

/* Arabic typography — IBM Plex Sans Arabic (readable, modern, bilingual) */
html[dir="rtl"] body,
html[dir="rtl"] body.rtl,
html[dir="rtl"] .elementor-widget-heading .elementor-heading-title,
html[dir="rtl"] .elementor-widget-text-editor,
html[dir="rtl"] .elementor-widget-button .elementor-button,
html[dir="rtl"] .elementor-nav-menu,
html[dir="rtl"] .elementor-icon-list-text,
html[dir="rtl"] .rs-menu ul li a,
html[dir="rtl"] .menu > li > a,
html[dir="rtl"] input,
html[dir="rtl"] textarea,
html[dir="rtl"] select,
html[dir="rtl"] button,
html[dir="rtl"] .wpcf7,
html[dir="rtl"] .aait-wa__tip {
  font-family: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
html[dir="rtl"] body {
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: 0;
}
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3,
html[dir="rtl"] h4, html[dir="rtl"] h5, html[dir="rtl"] h6,
html[dir="rtl"] .elementor-heading-title {
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0;
}
html[dir="rtl"] p {
  line-height: 1.75;
}

/* Preloader stay hidden */
#preloader,
.preloader,
.loader-wrap {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}


/* Hero / iconbox writing direction on Arabic */
html[dir="rtl"] .rs-iconbox-area .box-inner {
  direction: rtl;
}
html[dir="rtl"] .rs-iconbox-area .text-area,
html[dir="rtl"] .rs-iconbox-area .text-area .title,
html[dir="rtl"] .rs-iconbox-area .text-area p {
  direction: rtl !important;
  text-align: right !important;
  unicode-bidi: isolate;
}

/* AAIT: topbar + footer social icons */
.elementor-location-header .elementor-widget-rs-social-icons .rs-social-menu,
.elementor-location-header .elementor-widget-rs-social-icons .rs-social-menu li a { color:#fff !important; }
.elementor-location-header .elementor-widget-rs-social-icons .rs-social-menu li a {
  display:inline-flex !important; align-items:center; justify-content:center;
  width:28px; height:28px; font-size:16px !important; line-height:1 !important;
}
.elementor-location-header .elementor-widget-rs-social-icons .social-hover-text,
.elementor-location-header .elementor-widget-rs-social-icons .social-text { display:none !important; }
.elementor-location-footer .elementor-widget-rs-social-icons .rs-social-menu {
  display:flex !important; flex-wrap:wrap; gap:10px; list-style:none !important; margin:0 !important; padding:0 !important;
}
.elementor-location-footer .elementor-widget-rs-social-icons .rs-social-menu li a {
  display:inline-flex !important; align-items:center; justify-content:center;
  width:36px; height:36px; border-radius:50%; background:rgba(255,255,255,.08);
  color:#fff !important; font-size:16px !important;
}
.elementor-location-footer .elementor-widget-rs-social-icons .social-hover-text,
.elementor-location-footer .elementor-widget-rs-social-icons .social-text { display:none !important; }


/* Override Latin-only Space Grotesk from kit/theme on Arabic pages */
html[dir="rtl"] body,
html[dir="rtl"] .elementor,
html[dir="rtl"] .elementor-widget,
html[dir="rtl"] .elementor-heading-title,
html[dir="rtl"] .elementor-button,
html[dir="rtl"] .elementor-nav-menu a,
html[dir="rtl"] .menu a,
html[dir="rtl"] .rs-menu a,
html[dir="rtl"] p,
html[dir="rtl"] li,
html[dir="rtl"] span:not([class*="icon"]):not([class*="fa"]):not([class*="ri-"]),
html[dir="rtl"] a:not([class*="social"]):not([class*="icon"]),
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3,
html[dir="rtl"] h4, html[dir="rtl"] h5, html[dir="rtl"] h6,
html[dir="rtl"] input, html[dir="rtl"] textarea, html[dir="rtl"] button {
  font-family: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif !important;
}

/* Headings: Elementor kit forces Space Grotesk — override hard on AR */
html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] h4,
html[dir="rtl"] h5,
html[dir="rtl"] h6,
html[dir="rtl"] .elementor-heading-title,
html[dir="rtl"] .elementor-widget-heading .elementor-heading-title,
html[dir="rtl"] .elementor-widget-heading .elementor-heading-title.elementor-size-default,
html[dir="rtl"] .elementor-widget-heading .elementor-heading-title.elementor-size-large,
html[dir="rtl"] .elementor-widget-heading .elementor-heading-title.elementor-size-xl,
html[dir="rtl"] .elementor-widget-heading .elementor-heading-title.elementor-size-xxl,
html[dir="rtl"] .title,
html[dir="rtl"] .rs-heading .title,
html[dir="rtl"] .rs-addon-slider .title,
html[dir="rtl"] sr7-module .sr7-txt,
html[dir="rtl"] sr7-module sr7-txt {
  font-family: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif !important;
}
