/*
 * RTL.CSS — Thiqa Theme
 * RTL-specific overrides and directional fixes.
 * Loaded only when is_rtl() is true (Arabic locale).
 */

/* ==========================================================================
   DIRECTIONAL RESETS
   ========================================================================== */
body {
    direction: rtl;
    text-align: right;
}

/* Section title underline — align right */
.section-title::after {
    margin-right: 0;
    margin-left: auto;
}

.section-title.centered::after {
    margin-inline: auto;
}

/* ==========================================================================
   NAVIGATION
   ========================================================================== */
.thiqa-nav__list {
    flex-direction: row-reverse;
}

.thiqa-nav__dropdown {
    right: 0;
    left: auto;
}

.thiqa-nav__item--has-children > a::after {
    margin-right: var(--space-2);
    margin-left: 0;
    transform: rotate(0deg);
}

.mobile-nav {
    right: auto;
    left: 0;
    transform: translateX(-100%);
}
.mobile-nav.is-open {
    transform: translateX(0);
}

/* ==========================================================================
   PRICE TICKER
   ========================================================================== */
.ticker-track {
    /* RTL: scroll right to left — reversed direction handled in JS */
    animation-direction: reverse;
}

/* ==========================================================================
   CARDS & CONTENT
   ========================================================================== */
.card__icon {
    margin-right: 0;
    margin-left: var(--space-3);
}

.card__meta {
    flex-direction: row-reverse;
}

/* Certificate card rate badge */
.cert-card__badge {
    right: auto;
    left: var(--space-4);
}

/* ==========================================================================
   FORMS
   ========================================================================== */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
select,
textarea {
    text-align: right;
    direction: rtl;
}

.form-field__icon {
    right: var(--space-4);
    left: auto;
}

.form-field input,
.form-field select,
.form-field textarea {
    padding-right: var(--space-10);
    padding-left: var(--space-4);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero__content {
    text-align: right;
}

.hero__cta {
    flex-direction: row;
    justify-content: flex-start;
}

/* ==========================================================================
   PRICE INDICATORS
   ========================================================================== */
.price-up::before   { content: '▲ '; }
.price-down::before { content: '▼ '; }

/* ==========================================================================
   TABLE
   ========================================================================== */
.stocks-table th,
.stocks-table td {
    text-align: right;
}

.stocks-table th:last-child,
.stocks-table td:last-child {
    text-align: left;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer__grid {
    direction: rtl;
}

/* ==========================================================================
   BREADCRUMBS
   ========================================================================== */
.breadcrumb__separator {
    transform: scaleX(-1);
}

/* ==========================================================================
   SIDEBAR
   ========================================================================== */
.thiqa-sidebar {
    border-right: none;
    border-left: 1px solid var(--color-border);
    padding-right: 0;
    padding-left: var(--space-8);
}

/* ==========================================================================
   CALCULATOR
   ========================================================================== */
.calc-result__label {
    text-align: right;
}
