/* Arabic / right-to-left overrides. Loaded by layouts/app.blade.php ONLY when the locale is `ar`.
   Bootstrap 4 (loaded globally) has no RTL build, so flex rows/grid already follow `dir`, but
   directional utilities (ml-*, mr-*, text-left, float-*) do not — mirror them here as needed. */

:root { --ar-font: 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, Arial, sans-serif; }

html[dir="rtl"] body,
html[dir="rtl"] button,
html[dir="rtl"] input,
html[dir="rtl"] select,
html[dir="rtl"] textarea { font-family: var(--ar-font); }

/* Arabic has no letter-case; wide tracking breaks the joined letters. */
html[dir="rtl"] * { letter-spacing: 0 !important; }

/* Bootstrap 4 directional utilities */
html[dir="rtl"] .text-left  { text-align: right !important; }
html[dir="rtl"] .text-right { text-align: left !important; }
html[dir="rtl"] .float-left  { float: right !important; }
html[dir="rtl"] .float-right { float: left !important; }
html[dir="rtl"] .ml-auto { margin-left: 0 !important; margin-right: auto !important; }
html[dir="rtl"] .mr-auto { margin-right: 0 !important; margin-left: auto !important; }
html[dir="rtl"] .mr-2 { margin-right: 0 !important; margin-left: .5rem !important; }
html[dir="rtl"] .mr-4 { margin-right: 0 !important; margin-left: 1.5rem !important; }
html[dir="rtl"] .ml-2 { margin-left: 0 !important; margin-right: .5rem !important; }
html[dir="rtl"] .ml-4 { margin-left: 0 !important; margin-right: 1.5rem !important; }

/* ------------------------------------------------------------------ header */
.ar-header {
  display: flex; align-items: center; gap: 16px;
  padding: 10px 3%; background: #fff; border-bottom: 1px solid #e6e6e6;
  position: sticky; top: 0; z-index: 1000;
}
.ar-header__logo img { height: 64px; width: auto; display: block; }
.ar-header__nav { display: flex; gap: 8px 18px; flex: 1; flex-wrap: wrap; }
.ar-header__nav a {
  color: #0d0d0d; font-weight: 600; font-size: 14px; text-decoration: none; padding: 6px 0; white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.ar-header__nav a:hover, .ar-header__nav a.active { color: #e96358; border-bottom-color: #e96358; }
.ar-header__actions { display: flex; align-items: center; gap: 10px; }
.ar-header__lang { font-weight: 700; color: #0d0d0d; text-decoration: none; padding: 0 8px; font-family: 'Geist', sans-serif; }
.ar-header__lang:hover { color: #e96358; }
.ar-btn {
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  font-family: var(--ar-font); font-weight: 700; font-size: 14px; line-height: 1;
  border-radius: 999px; padding: 11px 22px; border: 1.5px solid #e6e6e6; background: #fff; color: #0d0d0d;
  text-decoration: none; transition: .15s;
}
.ar-btn:hover { border-color: #e96358; color: #e96358; }
.ar-btn--primary { background: #e96358; border-color: #e96358; color: #fff; }
.ar-btn--primary:hover { background: #ba4f46; border-color: #ba4f46; color: #fff; }

@media (max-width: 991.98px) {
  .ar-header { flex-wrap: wrap; gap: 8px 14px; }
  .ar-header__logo img { height: 48px; }
  .ar-header__nav { order: 3; flex-basis: 100%; gap: 6px 16px; }
  .ar-header__actions { margin-inline-start: auto; }
  .ar-hide-sm { display: none; }
}

/* ------------------------------------------------------------------ footer */
.ar-footer { margin-top: 48px; border-top: 1px solid #fb5850; background: #fff; }
.ar-footer__grid {
  display: grid; gap: 32px; padding: 40px 3%;
  grid-template-columns: 1.4fr 1fr 1fr 1.4fr;
}
.ar-footer__logo { height: 64px; width: auto; }
.ar-footer__tagline { margin-top: 12px; font-weight: 600; line-height: 1.7; }
.ar-footer h4 { font-size: 16px; font-weight: 700; margin-bottom: 12px; }
.ar-footer ul { list-style: none; margin: 0; padding: 0; }
.ar-footer li { margin-bottom: 8px; }
.ar-footer a { color: #0d0d0d; text-decoration: none; }
.ar-footer a:hover { color: #e96358; }
.ar-footer p { font-size: 14px; line-height: 1.8; }
.ar-footer__bar { background: #fff8f8; padding: 14px 3%; font-size: 14px; }
@media (max-width: 767.98px) { .ar-footer__grid { grid-template-columns: 1fr; padding: 28px 5%; } }

/* Modals (English Zoho form for now) must still read left-to-right inside the iframe. */
html[dir="rtl"] .modal-header .close { margin: -1rem auto -1rem -1rem; }
