/*
Theme Name: ClueToday Premium
Description: Right-to-Left (RTL) stylesheet for Arabic and RTL languages.
*/

html[dir="rtl"],
body.rtl {
  direction: rtl;
  unicode-bidi: embed;
}

/* Typography for Arabic */
html[lang="ar"],
body.rtl {
  --ct-sans: 'Segoe UI', Tahoma, 'Geeza Pro', 'Noto Sans Arabic', Arial, sans-serif;
  --ct-serif: 'Traditional Arabic', 'Amiri', 'Segoe UI', serif;
}

/* Text alignments */
body.rtl,
body.rtl h1,
body.rtl h2,
body.rtl h3,
body.rtl h4,
body.rtl h5,
body.rtl h6,
body.rtl p {
  text-align: right;
}

/* Masthead & Brand */
body.rtl .brand-tagline {
  border-left: 0;
  border-right: 1px solid var(--ct-line);
  padding-left: 0;
  padding-right: 24px;
}

/* Topbar */
body.rtl .topbar-inner {
  flex-direction: row-reverse;
}

body.rtl .topbar-actions {
  flex-direction: row-reverse;
}

body.rtl .ct-lang-dropdown {
  right: auto;
  left: 0;
}

/* Primary Navigation & Submenus */
body.rtl .primary-nav .sub-menu {
  left: auto;
  right: 0;
  text-align: right;
}

body.rtl .primary-nav .sub-menu .sub-menu {
  left: auto;
  right: 100%;
}

body.rtl .primary-nav a[aria-current=page]:after,
body.rtl .primary-nav .current-menu-item>a:after {
  left: auto;
  right: 0;
}

body.rtl .primary-nav .menu-item-has-children>a {
  padding-right: 0;
  padding-left: 45px;
}

body.rtl .submenu-toggle {
  right: auto;
  left: 2px;
}

/* Mobile Navigation */
@media (max-width: 1024px) {
  body.rtl .primary-nav .sub-menu {
    border-left: 0;
    border-right: 2px solid var(--ct-line, #e5e7eb);
    margin: 2px 24px 6px 0;
    padding: 4px 12px 4px 0;
  }
  body.rtl .submenu-toggle {
    right: auto;
    left: 6px;
  }
  body.rtl .primary-nav .menu-item-has-children>a {
    padding-right: 12px;
    padding-left: 48px;
  }
  body.rtl .ct-menu-item-chevron {
    margin-left: 0;
    margin-right: auto;
  }
}

/* Flip Directional Icons */
body.rtl .ct-icon path[d*="m9 5 7 7-7 7"],
body.rtl .ct-icon path[d*="M5 12h14M13 6l6 6-6 6"],
body.rtl .ct-menu-item-chevron .ct-icon {
  transform: scaleX(-1);
}

/* Single Article & Content */
body.rtl .single-article .entry-content {
  text-align: right;
}

body.rtl blockquote {
  border-left: 0;
  border-right: 4px solid var(--ct-accent);
  padding-left: 0;
  padding-right: 20px;
}

body.rtl .bypostauthor {
  border-left: 0;
  border-right: 2px solid var(--ct-accent);
}

body.rtl .comment-author .avatar {
  margin-right: 0;
  margin-left: 10px;
}
