/**
 * RTL overrides — loaded only when is_rtl() is true (Persian / Arabic locales)
 * Mirrors layout: paddings, flex directions, text alignment, absolute positions.
 */

/* Base direction */
body { direction: rtl; text-align: right; font-family: "Inter", "Tahoma", "Arial", sans-serif; }

/* NAVBAR */
.navbar { flex-direction: row-reverse; }
.logo { flex-direction: row-reverse; }
.logo-mark { flex-direction: row-reverse; }
.logo-b { border-radius: 0 4px 4px 0; }
.logo-c { border-radius: 4px 0 0 4px; }
.logo-txt { margin-left: 0; margin-right: 10px; }
.nav-links { flex-direction: row-reverse; }
.nav-right { flex-direction: row-reverse; }

/* LANG DROPDOWN */
.lang-dropdown { right: auto; left: 0; }

/* MOBILE MENU */
.mobile-close { right: auto; left: 20px; }
.mobile-menu ul { align-items: flex-end; }
.mobile-lang { flex-direction: row-reverse; }

/* HERO */
.hero-content { text-align: right; }
.hero-badge { flex-direction: row-reverse; }
.slider-prev { left: auto; right: 20px; }
.slider-next { right: auto; left: 20px; }
.slider-dots { direction: ltr; }

/* SEARCH BOX */
.deal-tabs { flex-direction: row-reverse; }
.filter-row { flex-direction: row-reverse; flex-wrap: nowrap; }
.fbtn { flex-direction: row-reverse; text-align: right; }
.fi-l { flex-direction: row-reverse; }
.farr { margin-left: 0; margin-right: 4px; }
.drop { left: auto; right: 0; }
.fw:last-child .drop { right: auto; left: 0; }
.drop-hd { text-align: right; }
.dopt { flex-direction: row-reverse; }
.dopt.sel::after { margin-left: 0; margin-right: auto; }
.dopt-sub { text-align: right; }
.pq-btn { text-align: right; }
.plbl { text-align: right; }
.rng-lbl { text-align: right; }
.rooms-g { direction: rtl; }
.pcur { flex-direction: row-reverse; }
.pinputs { flex-direction: row-reverse; }
.rng-inp { flex-direction: row-reverse; }
.search-submit { flex-direction: row-reverse; }

/* PROPERTY CARDS */
.sec-hd { flex-direction: row-reverse; }
.cards-grid { direction: rtl; }
.card-tags { left: auto; right: 12px; }
.offer-badge { right: auto; left: 12px; }
.card-fav { right: auto; left: 12px; }
.card-loc::before { display: none; }
.card-loc::after { content: "\1F4CD"; font-size: 11px; margin-right: 4px; }
.card-specs { flex-direction: row-reverse; }
.spec-i { flex-direction: row-reverse; }
.see-all { flex-direction: row-reverse; }
.see-all::after { content: "\2190"; }

/* STATS BAR */
.stats-bar { direction: rtl; }

/* SECTION TITLES */
.sec-title::after { margin-right: 0; }
.detail-title { flex-direction: row-reverse; }
.detail-title::before { flex-shrink: 0; }

/* SINGLE PROPERTY */
.prop-gallery { direction: rtl; }
.prop-layout { direction: rtl; }
.price-row { flex-direction: row-reverse; }
.prop-cur { flex-direction: row-reverse; }
.act-btns { flex-direction: row-reverse; }
.specs-grid { direction: rtl; }
.pspec { text-align: center; }
.dtable td:first-child { text-align: right; }
.dtable td:last-child { text-align: left; }
.amenities-wrap { flex-direction: row-reverse; }
.amenity-tag { flex-direction: row-reverse; }

/* CONTACT WIDGET */
.cw-head { flex-direction: row-reverse; }
.cw-btns { direction: rtl; }
.cw-btn { flex-direction: row-reverse; }

/* ABOUT SECTION */
.about-sec { direction: rtl; }
.about-stats { flex-direction: row-reverse; }

/* CONTACT BAR */
.contact-bar { flex-direction: row-reverse; }
.ct-btns { flex-direction: row-reverse; }
.cta-btn { flex-direction: row-reverse; }

/* FOOTER */
.footer-top { direction: rtl; }
/* logo-mark sits on the right naturally with direction:rtl; row-reverse was double-reversing it to the left */
.footer-logo-b { border-radius: 0 3px 3px 0; }
.footer-logo-c { border-radius: 3px 0 0 3px; }
.footer-logo-name { margin-left: 0; margin-right: 8px; }
/* direction:rtl + flex row → icon on right, text extends left — correct RTL order */
/* flex-end in a column RTL flex is the LEFT edge; use flex-start for RIGHT alignment */
.footer-links { align-items: flex-start; }
.footer-bottom { flex-direction: row-reverse; }

/* ARCHIVE FILTERS */
.archive-filters { flex-direction: row-reverse; }
.active-filter-chips { flex-direction: row-reverse; }

/* MAP */
.map-hd { flex-direction: row-reverse; }
.map-togs { flex-direction: row-reverse; }

/* PAGINATION */
.page-numbers { direction: ltr; display: inline-block; }

/* PROPERTY CAROUSEL */
.pcar-hd { flex-direction: row-reverse; }
.car-wrap { flex-direction: row-reverse; } /* prev btn on right, next btn on left in RTL */
.car-track { direction: ltr; } /* keep card order and scroll direction consistent */

/* RESPONSIVE RTL */
@media (max-width: 768px) {
  .slider-prev { left: auto; right: 8px; }
  .slider-next { right: auto; left: 8px; }
  .filter-row { flex-direction: row-reverse; flex-wrap: wrap; }
  .fw:last-child .drop { right: auto; left: 0; }
}
