/* =========================================================
   rtl.css – Comprehensive Right-to-Left Layout Overrides
   Loaded automatically by WordPress for RTL locales.
   ========================================================= */

/* === HTML & Body === */
html { direction: rtl; }
body {
  direction: rtl;
  text-align: right;
}

/* === Layout === */
.site-wrapper { direction: rtl; }

/* === Header === */
.site-header          { direction: rtl; }
.header-inner         { flex-direction: row-reverse; }

/* Branding aligned right */
.site-branding        { text-align: right; }

/* === Navigation === */
.main-navigation      { direction: rtl; }
.main-navigation ul   { flex-direction: row; justify-content: flex-start; }
.main-navigation ul ul { right: 0; left: auto; }

/* Dropdown arrow for RTL */
.main-navigation li.menu-item-has-children > a::after {
  content: ' ▾';
  font-size: 0.7em;
}

/* === Hamburger (mobile): move to left in RTL === */
.menu-toggle { margin-left: 0; margin-right: auto; }

/* === Ticker === */
.ticker-wrapper       { direction: rtl; }
.ticker-label         { margin-left: var(--space-md); margin-right: 0; }
@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(50%); }
}

/* === Hero === */
.hero-section         { direction: rtl; }
.hero-inner           { flex-direction: row-reverse; }

/* === Articles Grid / Cards === */
.articles-grid        { direction: rtl; }
.card-body            { text-align: right; direction: rtl; }
.card-meta            { text-align: right; }

/* === Single Post === */
.single-post          { direction: rtl; }
.entry-header         { text-align: right; }
.entry-content        { direction: rtl; text-align: right; }
.entry-meta           { direction: rtl; text-align: right; }
.entry-meta .byline::before { margin-right: var(--space-sm); margin-left: 0; }

/* Blockquote: flip border from left to right */
.entry-content blockquote {
  border-right: 4px solid var(--color-accent);
  border-left:  none;
  padding-right: var(--space-lg);
  padding-left:  var(--space-md);
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* Lists */
.entry-content ul,
.entry-content ol,
.legal-page .entry-content ul,
.legal-page .entry-content ol {
  padding-right: 1.5rem;
  padding-left:  0;
}

/* === Breadcrumb === */
.breadcrumb { direction: rtl; }
.breadcrumb li::after { content: '‹'; margin-right: var(--space-xs); margin-left: 0; }

/* === Comments === */
.comments-area        { direction: rtl; text-align: right; }
.comment-body         { direction: rtl; }
.comment-author       { float: right; }
.comment-content      { margin-right: 60px; margin-left: 0; }
.children             { padding-right: var(--space-lg); padding-left: 0; }

/* Comment form inputs: keep RTL cursor */
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea { direction: rtl; text-align: right; }

/* === Search Form === */
.search-form          { direction: rtl; }
.search-form .search-field { direction: rtl; text-align: right; }

/* === Footer === */
.site-footer          { direction: rtl; }
.footer-links nav ul  { direction: rtl; justify-content: center; }
.footer-widgets       { direction: rtl; text-align: right; }

/* === Widgets === */
.widget               { direction: rtl; text-align: right; }
.widget ul            { padding-right: 0; padding-left: 0; }

/* === Ad Slots === */
.ad-slot              { direction: rtl; }
/* Label on right side for RTL */
.ad-slot::before {
  left:  auto;
  right: 4px;
}

/* === Legal Pages === */
.legal-page .entry-content { direction: rtl; text-align: right; }

/* === Admin pages === */
.wrap[dir="rtl"]      { text-align: right; }
.wrap[dir="rtl"] .form-table th { text-align: right; }
.wrap[dir="rtl"] .form-table td { text-align: right; }

/* === WordPress Core Overrides for RTL === */
/* Floating fix */
.alignleft  { float: right; margin-left: var(--space-md); margin-right: 0; }
.alignright { float: left;  margin-right: var(--space-md); margin-left: 0; }

/* Gallery captions */
.gallery-caption { text-align: right; }

/* Pagination */
.posts-pagination .nav-links { direction: rtl; }

/* === Category Quick-Nav RTL === */
.chn-cat-nav__list { direction: rtl; }

/* === Elementor Free RTL overrides === */
/* Make Elementor column order correct for RTL */
.elementor-row              { flex-direction: row-reverse; }
.elementor-col-100,
.elementor-col-50,
.elementor-col-33,
.elementor-col-25          { float: right; }
.elementor-text-editor,
.elementor-widget-text-editor { direction: rtl; text-align: right; }
.elementor-heading-title   { direction: rtl; }
.elementor-button          { direction: rtl; }
