@import url("ar-fonts.css");

/* =============================================================
   ar-theme.css — Arabic / Gulf market layer for Hanart (ar site)
   Scope: HTML language & direction only (html[lang="ar"], [dir="rtl"])
   Nothing here rewrites base component structure; it re-skins and
   mirrors. Base styles.css stays the source of layout truth.
   ============================================================= */

/* ---------- 1. design tokens: warm Gulf palette ---------- */
html[lang="ar"] {
  --font-body: "Tajawal", "Inter", "Noto Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  --font-head: "Tajawal", "Inter", "Noto Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  --font-display: "Noto Kufi Arabic", "Tajawal", "Segoe UI", Tahoma, sans-serif;

  --radius: 5px;
  --radius-lg: 10px;

  /* warm neutrals replace the cool greys */
  --mist: #faf6ee;
  --bg-soft: #f8f3e8;
  --line: #e4dccb;
  --border-color: #e4dccb;
  --accent-light: #fbf5e8;
  --accent-soft: #e9dcbf;
  --tint-warm: #f3e8cd;

  /* gold as the regional accent, with a legible on-dark variant */
  --gold: #a9803e;
  --gold-deep: #8c672c;
  --gold-soft: #e7d9bb;
  --gold-on-dark: #ddbd7c;

  --slate: #55606b;
  --ink: #12181f;
}

/* ---------- 2. typography sized for Arabic ---------- */
html[lang="ar"] * {
  letter-spacing: normal !important;
  text-transform: none !important;
}

html[lang="ar"] body {
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.95;
  color: #1a222b;
  font-feature-settings: "kern" 1;
  text-rendering: optimizeLegibility;
}

html[lang="ar"] h1,
html[lang="ar"] h2 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.55;
  letter-spacing: 0;
  word-spacing: 0;
}

html[lang="ar"] h3,
html[lang="ar"] h4,
html[lang="ar"] h5,
html[lang="ar"] h6 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.6;
}

html[lang="ar"] p,
html[lang="ar"] li,
html[lang="ar"] td,
html[lang="ar"] dd {
  line-height: 1.95;
}

html[lang="ar"] .lede,
html[lang="ar"] .lead,
html[lang="ar"] .section-sub,
html[lang="ar"] .hero-sub {
  line-height: 1.85;
}

/* Latin-only tokens (ISO, ASTM, model codes) stay in the Latin face */
html[lang="ar"] .stat-num,
html[lang="ar"] .metric,
html[lang="ar"] .nums {
  font-family: "Inter", var(--font-body);
  font-variant-numeric: tabular-nums;
}

/* ---------- 3. mirroring helpers ---------- */
html[dir="rtl"] {
  --dir-flip: -1;
}

html[dir="rtl"] input,
html[dir="rtl"] textarea,
html[dir="rtl"] select {
  text-align: right;
}

html[dir="rtl"] input::placeholder,
html[dir="rtl"] textarea::placeholder {
  text-align: right;
}

html[dir="rtl"] .record-place {
  text-align: left;
}

html[dir="rtl"] .text-right {
  text-align: left;
}

html[dir="rtl"] .text-left {
  text-align: right;
}

/* numeric/Latin runs inside Arabic paragraphs: isolate so they read LTR */
html[lang="ar"] .num,
html[lang="ar"] .data-table td[data-num] {
  unicode-bidi: isolate;
}

/* arrows that live in the copy: keep glyph order, but nudge spacing */
html[dir="rtl"] .card-link,
html[dir="rtl"] .arrow-link {
  gap: 8px;
}

/* chevrons in nav / accordions point the other way */
html[dir="rtl"] .nav-chev,
html[dir="rtl"] .lang-chev {
  transform: scaleX(-1);
}

/* ---------- 4. header / topbar / language menu ---------- */
html[lang="ar"] .site-header {
  border-bottom: 1px solid rgba(169, 128, 62, 0.28);
}

html[lang="ar"] .site-header::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-on-dark), transparent);
  opacity: 0.55;
  pointer-events: none;
}

html[lang="ar"] .nav-main a,
html[lang="ar"] .topbar a,
html[lang="ar"] .footer a {
  font-weight: 500;
}

html[lang="ar"] .topbar-hours,
html[lang="ar"] .topbar-label {
  font-weight: 500;
  color: #cfdae4;
}

html[lang="ar"] .lang-dropdown,
html[dir="rtl"] .lang-dropdown {
  direction: rtl;
}

html[dir="rtl"] .lang-code {
  margin-left: 0;
  margin-right: auto;
}

html[dir="rtl"] .lang-dropdown li a {
  justify-content: flex-start;
}

/* ---------- 5. heroes ---------- */
html[lang="ar"] .hero-title {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0;
  text-wrap: balance;
}

html[lang="ar"] .hero-kicker,
html[lang="ar"] .kick,
html[lang="ar"] .kicker {
  font-weight: 600;
  color: var(--gold-on-dark);
}

html[dir="rtl"] .page-hero::before,
html[dir="rtl"] .hero-media::after {
  transform: scaleX(-1);
}

html[lang="ar"] .breadcrumb {
  letter-spacing: 0;
}

/* gold frame inset on page heroes — a Gulf-facing detail, low contrast */
html[lang="ar"] .page-hero::after {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(221, 189, 124, 0.35);
  border-radius: 2px;
  pointer-events: none;
}

/* ---------- 6. section heads + eyebrows ---------- */
html[lang="ar"] .eyebrow,
html[lang="ar"] .card-eyebrow {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--gold-deep);
  display: inline-block;
}

html[lang="ar"] .eyebrow::before,
html[lang="ar"] .card-eyebrow::before {
  content: "◆";
  color: var(--gold);
  font-size: 0.72em;
  margin-inline-end: 7px;
  vertical-align: 0.12em;
}

html[lang="ar"] .section-title::after {
  content: "";
  display: block;
  width: 54px;
  height: 2px;
  margin: 14px 0 0;
  background: linear-gradient(90deg, var(--gold), rgba(169, 128, 62, 0));
}

/* ---------- 7. cards, lists, bands ---------- */
html[lang="ar"] .card-link,
html[lang="ar"] .arrow-link {
  font-size: 0.82rem;
  font-weight: 700;
  padding: 9px 14px;
  border-color: rgba(169, 128, 62, 0.4);
  color: var(--navy);
}

html[lang="ar"] .card-link:hover,
html[lang="ar"] .arrow-link:hover {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

html[lang="ar"] .trust-list li,
html[lang="ar"] .check-list li,
html[lang="ar"] .checklist li {
  line-height: 1.8;
}

/* gold hairline on card tops, only where cards already exist */
html[lang="ar"] .cap-card,
html[lang="ar"] .sys-card,
html[lang="ar"] .case-card {
  border-top: 2px solid rgba(169, 128, 62, 0.35);
}

/* dark bands get a low-opacity geometric star pattern */
html[lang="ar"] .stats-bar,
html[lang="ar"] .cta-band,
html[lang="ar"] .band--dark,
html[lang="ar"] .footer {
  background-image:
    linear-gradient(rgba(10, 42, 74, 0.0), rgba(10, 42, 74, 0.0)),
    url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='108' height='108' viewBox='0 0 108 108'%3E%3Cg fill='none' stroke='%23ddbd7c' stroke-opacity='.14' stroke-width='1'%3E%3Crect x='24' y='24' width='60' height='60'/%3E%3Crect x='24' y='24' width='60' height='60' transform='rotate(45 54 54)'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: auto, 216px 216px;
}

/* ---------- 8. tables + forms ---------- */
html[lang="ar"] .data-table th {
  font-weight: 700;
  color: var(--navy);
  background: var(--accent-light);
}

html[lang="ar"] .data-table td,
html[lang="ar"] .data-table th {
  line-height: 1.7;
  font-size: 0.94rem;
}

html[lang="ar"] .input,
html[lang="ar"] .select,
html[lang="ar"] .textarea,
html[lang="ar"] label {
  font-family: var(--font-body);
  text-align: right;
}

html[lang="ar"] .input,
html[lang="ar"] .select,
html[lang="ar"] .textarea {
  font-size: 1rem;
  line-height: 1.6;
}

html[lang="ar"] .form-label,
html[lang="ar"] .field-label {
  font-weight: 700;
  color: var(--navy);
}

/* ---------- 9. buttons ---------- */
html[lang="ar"] .btn {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.98rem;
  padding: 14px 26px;
  line-height: 1.5;
}

html[lang="ar"] .btn-primary {
  box-shadow: inset 0 0 0 1px rgba(221, 189, 124, 0.45);
}

html[lang="ar"] .btn-ghost,
html[lang="ar"] .btn-outline {
  border-color: rgba(169, 128, 62, 0.55);
}

/* ---------- 10. footer ---------- */
html[lang="ar"] .footer {
  direction: rtl;
}

html[lang="ar"] .footer-title {
  font-weight: 700;
  color: #f4ead4;
}

html[lang="ar"] .footer-brand-name {
  font-family: "Inter", var(--font-head);
  letter-spacing: 0.08em;
}

html[lang="ar"] .footer a:hover {
  color: var(--gold-on-dark);
}

/* ---------- 11. sticky inquiry bar (mobile / tablet) ---------- */
.ar-sticky {
  display: none;
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 120;
  direction: rtl;
  background: #08203a;
  border-top: 1px solid rgba(221, 189, 124, 0.45);
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
  gap: 8px;
  box-shadow: 0 -8px 24px rgba(6, 25, 46, 0.28);
}

.ar-sticky__btn {
  flex: 1 1 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 46px;
  padding: 8px 10px;
  border-radius: 5px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  line-height: 1.2;
}

.ar-sticky__btn svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.ar-sticky__call {
  background: rgba(255, 255, 255, 0.1);
  color: #f2e7cf;
  border: 1px solid rgba(221, 189, 124, 0.4);
}

.ar-sticky__wa {
  background: #1f7a5c;
  color: #fff;
}

.ar-sticky__quote {
  background: var(--gold);
  color: #10202f;
  flex: 1.25 1 0;
}

@media (max-width: 900px) {
  .ar-sticky {
    display: flex;
  }

  html[lang="ar"] body {
    padding-bottom: 62px;
  }
}

/* ---------- 12. small-screen tightening ---------- */
@media (max-width: 640px) {
  html[lang="ar"] body {
    font-size: 16px;
  }

  html[lang="ar"] h1 {
    line-height: 1.6;
  }

  html[lang="ar"] .btn {
    padding: 13px 20px;
  }
}

/* ---------- 13. Arabic-specific type scale ---------- */
html[lang="ar"] .hero-title {
  font-size: clamp(2.05rem, 3.55vw, 3.3rem);
  max-width: 24ch;
  line-height: 1.42;
  font-weight: 600;
}

html[lang="ar"] .page-hero h1 {
  font-size: clamp(1.7rem, 2.6vw, 2.4rem);
  max-width: 34ch;
  line-height: 1.5;
}

html[lang="ar"] .hero-sub {
  max-width: 64ch;
  font-size: 1.06rem;
  line-height: 1.85;
}

html[lang="ar"] .section-title {
  font-size: clamp(1.5rem, 2.1vw, 2rem);
  line-height: 1.55;
}

html[lang="ar"] .card-title,
html[lang="ar"] .capability-title {
  font-size: 1.06rem;
  line-height: 1.55;
}

html[lang="ar"] em,
html[lang="ar"] i {
  font-style: normal;
}

html[lang="ar"] .footer {
  font-size: 0.96rem;
}

html[lang="ar"] .footer .footer-title {
  font-size: 0.9rem;
}

/* ---------- 14. print ---------- */
@media print {
  .ar-sticky {
    display: none !important;
  }
}

/* --- contrast fix: WhatsApp CTA sits on the dark map panel --- */
html[dir="rtl"] .map-cta .btn-whatsapp,
html[lang="ar"] .map-cta .btn-whatsapp {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.38);
}
html[dir="rtl"] .map-cta .btn-whatsapp:hover,
html[lang="ar"] .map-cta .btn-whatsapp:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.55);
  color: #ffffff;
}

/* --- contrast fix: light stat bars need dark labels --- */
html[lang="ar"] .stats-bar.stats-light .stat-label,
html[dir="rtl"] .stats-bar.stats-light .stat-label {
  color: #5d5544;
}
html[lang="ar"] .stats-bar.stats-light .stat-value,
html[dir="rtl"] .stats-bar.stats-light .stat-value {
  color: #2c2c2c;
}
/* =============================================================
   GULF PALETTE v2 — deep pine green + gold on warm sand
   Overrides the cool deep-sea blue base so the whole ar mirror
   reads as a Gulf-market site. Tokens only; no layout changes.
   ============================================================= */
html[lang="ar"] {
  --navy: #0f3b34;
  --navy-deep: #07241f;
  --navy-mid: #16564a;
  --steel: #2b5b50;
  --night: #07241f;

  --accent: #1c6a5a;
  --accent-dark: #135043;
  --accent-strong: #0c332c;
  --accent-soft: #cbb489;
  --accent-on-dark: #e8d09e;
  --accent-light: #f6efdf;
  --tint-warm: #f1e5cb;

  --primary: #0f3b34;
  --ink: #13201c;
  --ink-2: #31423c;
  --slate: #57675f;
  --text-light: #efe7d6;
  --text-on-dark: #f0e8d7;
  --divider-on-dark: #3c5f56;
  --whatsapp: #128c5e;
  --whatsapp-hover: #0c6b47;
}

/* warm sand page ground, with a very light arabesque grain */
html[lang="ar"] body {
  background-color: #fffdf8;
  background-image:
    radial-gradient(circle at 12% 18%, rgba(169, 128, 62, 0.05), transparent 42%),
    radial-gradient(circle at 88% 8%, rgba(15, 59, 52, 0.045), transparent 45%);
  background-attachment: fixed;
}

html[lang="ar"] ::selection {
  background: #e8d09e;
  color: #0f3b34;
}

/* ---------- language menu: Arabic is the current language ---------- */
html[lang="ar"] .lang-dropdown a[aria-current="page"] {
  background: linear-gradient(90deg, rgba(232, 208, 158, 0.5), rgba(246, 239, 223, 0.9));
  color: #0f3b34;
  font-weight: 700;
}

html[lang="ar"] .lang-dropdown a[aria-current="page"]::after {
  content: "✓";
  margin-inline-start: auto;
  color: #8c672c;
  font-weight: 700;
}

html[lang="ar"] .lang-dropdown a[aria-current="page"] .lang-code {
  color: #8c672c;
}

html[lang="ar"] .lang-toggle {
  border: 1px solid rgba(221, 189, 124, 0.35);
}

/* ---------- cards & panels get the sand-green pairing ---------- */
html[lang="ar"] .card,
html[lang="ar"] .cap-card,
html[lang="ar"] .sys-card,
html[lang="ar"] .case-card,
html[lang="ar"] .info-card {
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(15, 59, 52, 0.07);
}

html[lang="ar"] .section--alt,
html[lang="ar"] .band--light {
  background-color: #f8f3e8;
}

/* eight-point star ornament behind dark bands, denser than before */
html[lang="ar"] .stats-bar,
html[lang="ar"] .cta-band,
html[lang="ar"] .band--dark,
html[lang="ar"] .footer {
  background-image:
    url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%23e8d09e' stroke-opacity='.16' stroke-width='1'%3E%3Crect x='30' y='30' width='60' height='60'/%3E%3Crect x='30' y='30' width='60' height='60' transform='rotate(45 60 60)'/%3E%3Ccircle cx='60' cy='60' r='7' stroke-opacity='.22'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 240px 240px;
}

/* hero overlay leans to deep green, mirrored so the copy side stays dark
   and the photo side keeps its subject */
html[dir="rtl"] .hero-bg::before {
  background: linear-gradient(270deg, rgba(7, 36, 31, 0.95) 0%, rgba(7, 36, 31, 0.84) 44%, rgba(7, 36, 31, 0.38) 100%);
}

html[dir="rtl"] .page-hero::after {
  background: linear-gradient(270deg, rgba(7, 36, 31, 0.9) 0%, rgba(7, 36, 31, 0.6) 55%, rgba(7, 36, 31, 0.3) 100%);
}

/* section titles carry a small gold diamond, a Gulf editorial habit */
html[lang="ar"] .section-title {
  position: relative;
  padding-inline-start: 0;
}

html[lang="ar"] .section-title::after {
  background: linear-gradient(90deg, #a9803e, rgba(169, 128, 62, 0.15));
}


/* keep the hero photograph readable under the green wash */
html[lang="ar"] .page-hero::before {
  opacity: .5;
}
