/*
 * EmblazsAI — Arabic / RTL overrides
 * Loaded only on Arabic pages (html[dir="rtl"]).
 *
 * Bootstrap 5 uses logical CSS properties (margin-inline-start/end,
 * padding-inline-start/end) which respond correctly to dir="rtl" without
 * Bootstrap RTL. These overrides handle the remaining physical-property
 * rules in app.css and set the Arabic font.
 *
 * FONT SETUP (manual step required):
 *   Download Noto Sans Arabic from:
 *   https://github.com/notofonts/arabic/releases
 *   Place these files in /public/assets/fonts/:
 *     NotoSansArabic-Regular.woff2
 *     NotoSansArabic-Medium.woff2
 *     NotoSansArabic-SemiBold.woff2
 *     NotoSansArabic-Bold.woff2
 */

/* ── Arabic font ─────────────────────────────────────────────────────────── */

@font-face {
    font-family: 'Noto Sans Arabic';
    src: url('../fonts/NotoSansArabic-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Noto Sans Arabic';
    src: url('../fonts/NotoSansArabic-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Noto Sans Arabic';
    src: url('../fonts/NotoSansArabic-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Noto Sans Arabic';
    src: url('../fonts/NotoSansArabic-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* ── Base ────────────────────────────────────────────────────────────────── */

[dir="rtl"] body,
[dir="rtl"] button,
[dir="rtl"] input,
[dir="rtl"] select,
[dir="rtl"] textarea {
    font-family: 'Noto Sans Arabic', 'Inter', system-ui, sans-serif;
}

/* ── Navbar ──────────────────────────────────────────────────────────────── */

/* Language switcher separator — reverse the pipe sides */
[dir="rtl"] .embz-lang-switcher {
    flex-direction: row-reverse;
}

/* ── Hero ────────────────────────────────────────────────────────────────── */

[dir="rtl"] .embz-hero-title,
[dir="rtl"] .embz-hero-sub {
    text-align: right;
}

[dir="rtl"] .embz-btn-group {
    justify-content: flex-start;
}

/* ── Section headers ─────────────────────────────────────────────────────── */

[dir="rtl"] .embz-section-header p {
    margin-right: 0;
    margin-left: auto;
}

[dir="rtl"] .embz-section-header.centered,
[dir="rtl"] .embz-section-header.centered p,
[dir="rtl"] .embz-section-header.centered .embz-delivery-notice {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

/* ── Academy / service cards ─────────────────────────────────────────────── */

[dir="rtl"] .embz-link-arrow {
    flex-direction: row-reverse;
}

[dir="rtl"] .embz-link-arrow .bi-arrow-right::before {
    content: "\f12f"; /* bi-arrow-left */
}

/* ── Program cards ───────────────────────────────────────────────────────── */

[dir="rtl"] .embz-program-meta {
    flex-direction: row-reverse;
}

[dir="rtl"] .embz-program-item-actions {
    flex-direction: row-reverse;
}

[dir="rtl"] .embz-program-outcomes-list li {
    padding-left: 0;
    padding-right: 22px;
}

[dir="rtl"] .embz-program-outcomes-list li::before {
    left: auto;
    right: 0;
}

[dir="rtl"] .embz-curriculum-item {
    flex-direction: row-reverse;
}

/* ── Pillar / why section ────────────────────────────────────────────────── */

[dir="rtl"] .embz-pillar-num {
    text-align: right;
}

/* ── Batch / countdown ───────────────────────────────────────────────────── */

[dir="rtl"] .embz-batch-meta {
    flex-direction: row-reverse;
}

[dir="rtl"] .embz-batch-context-item {
    flex-direction: row-reverse;
}

[dir="rtl"] .embz-batch-context-label {
    text-align: right;
}

/* ── Announcement bar ────────────────────────────────────────────────────── */

[dir="rtl"] .embz-announcement-bar {
    text-align: center;
}

/* ── Forms ───────────────────────────────────────────────────────────────── */

[dir="rtl"] .embz-reg-label,
[dir="rtl"] .embz-reg-input,
[dir="rtl"] .embz-label,
[dir="rtl"] .embz-input {
    text-align: right;
}

[dir="rtl"] .embz-mobile-row {
    flex-direction: row-reverse;
}

/* ── Footer RTL ──────────────────────────────────────────────────────────── */

[dir="rtl"] .embz-footer-links {
    text-align: right;
}

[dir="rtl"] .embz-footer-heading {
    text-align: right;
}

[dir="rtl"] .embz-footer-copy {
    text-align: right;
}

/* WhatsApp icon: keep space after icon in RTL */
[dir="rtl"] .embz-footer-links .bi-whatsapp {
    margin-right: 0;
    margin-left: 4px;
}

/* ── Delivery notice ─────────────────────────────────────────────────────── */

.embz-delivery-notice {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    text-align: center;
    margin-top: var(--space-sm);
    margin-bottom: 0;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* ── Language switcher in nav ────────────────────────────────────────────── */

.embz-lang-switcher {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--color-text-muted);
    white-space: nowrap;
}

.embz-lang-switcher .embz-lang-active {
    color: var(--color-text);
    font-weight: 600;
}

.embz-lang-switcher .embz-lang-sep {
    color: var(--color-border);
    user-select: none;
}

.embz-lang-switcher a {
    color: var(--color-text-muted);
    text-decoration: none;
    transition: color .15s ease;
}

.embz-lang-switcher a:hover {
    color: var(--color-secondary);
}

/* ── Open batches — single region card centred on Arabic pages ───────────── */
[dir="rtl"] .embz-region-grid {
    grid-template-columns: 1fr;
    max-width: 420px;
}
