/*
 * MH PROTOCOL — right-to-left / Arabic layer.
 *
 * Loaded only for the Arabic (/ar/) version. The base stylesheet uses logical
 * properties throughout, so this file handles typography and the few genuinely
 * directional details.
 */

/* ==========================================================================
   1. ARABIC TYPOGRAPHY
   ========================================================================== */
:root{
  /* Californian FB carries no Arabic glyphs, so the brand token is remapped:
     Amiri (an elegant naskh) for setting, Tajawal for micro-labels. */
  --f-brand:  'Amiri', 'Tajawal', Georgia, serif;
  --f-sans:   'Tajawal', 'Inter', -apple-system, 'Segoe UI', Arial, sans-serif;
  --f-arabic: 'Amiri', serif;
}

body{
  font-family:var(--f-sans);
  font-weight:300;
  line-height:1.95;
  letter-spacing:0;            /* Arabic must never be letter-spaced */
}

h1,h2,h3,h4{
  font-family:var(--f-brand);
  font-weight:400;
  line-height:1.46;            /* naskh needs far more leading than Latin */
  letter-spacing:0;
}
h1{font-size:clamp(2.1rem,5.6vw,4.8rem);}
h2{font-size:clamp(1.7rem,3.9vw,3.1rem);}
h3{font-size:clamp(1.15rem,1.8vw,1.55rem);line-height:1.5;}

.lede{font-family:var(--f-brand);line-height:1.9;letter-spacing:0;}
.big{font-family:var(--f-brand);line-height:1.55;letter-spacing:0;}
.pull{font-style:normal;font-family:var(--f-brand);line-height:1.6;}

/* Uppercasing and tracking are Latin conventions — drop both. */
.label,
.idx,
.btn,
.ulink,
.nav-menu a,
.header-cta,
.lang-switch,
.breadcrumbs,
.post-meta,
.foot-col h4,
.field label,
.field-label,
.field-hint,
.form-note,
.contact-list small,
.gal-cap span,
.quote-by span,
.cred span,
.spread-media figcaption,
.hero-rule,
.nav-drawer-foot,
.foot-bar,
.skip-link{
  text-transform:none;
  letter-spacing:0;
  font-family:var(--f-sans);
}
.label{font-size:.8rem;}
.idx{font-size:.78rem;}
.btn{font-size:.86rem;}
.nav-menu a{font-size:.86rem;}
.header-cta,.lang-switch{font-size:.8rem;}
.ulink{font-size:.82rem;}
.breadcrumbs{font-size:.8rem;}
.foot-col h4{font-size:.78rem;font-weight:500;}
.field label,.field-label{font-size:.78rem;}
.contact-list small,.cred span,.gal-cap span,.quote-by span{font-size:.76rem;}
.hero-rule,.foot-bar,.spread-media figcaption,.gal-overlay,.svc-tab-count,.foot-top-link,.gal-cap-loc{font-size:.76rem;text-transform:none;letter-spacing:0;font-family:var(--f-sans);}

.marquee-track span{font-family:var(--f-brand);}

/* Flip horizontal arrow hover nudge in RTL. */
.ulink:hover svg{transform:translateX(-5px);}
.why-item::after{transform-origin:right;}
.svc-tab::before{border-radius:3px 0 0 3px;}

/* Numerals and contact details stay left-to-right inside RTL text. */
[dir="ltr"]{direction:ltr;unicode-bidi:isolate;display:inline-block;}

/* ==========================================================================
   2. DIRECTIONAL FIXES
   ========================================================================== */

/* Skip link lives on the right. */
.skip-link{left:auto;right:-9999px;}
.skip-link:focus{right:1rem;left:auto;}

/* Hamburger bars align to the start edge. */
.nav-toggle{align-items:flex-start;}

/* The scroll rail sweeps the other way. */
@keyframes railRun{0%{left:100%;}100%{left:-40%;}}

/* Marquee travels the opposite direction (the tween is inverted in JS). */
.marquee-track{direction:ltr;}

/* Entry content lists. */
.entry-content blockquote{padding-inline-start:2em;}
.alignleft{float:right;margin:.5em 0 1em 1.6em;}
.alignright{float:left;margin:.5em 1.6em 1em 0;}

/* Select caret moves to the left side of the field. */
.field select{
  background-position:14px 1.4rem, 19px 1.4rem;
  background-image:linear-gradient(225deg,transparent 50%,var(--rose) 50%),
                   linear-gradient(315deg,var(--rose) 50%,transparent 50%);
}

/* Arabic reads better with a little more air in dense lists. */
.index-row p,.pkg-row p,.cred span{line-height:1.9;}
.index-row h3{line-height:1.5;}

/* ==========================================================================
   3. RESPONSIVE PARITY
   ========================================================================== */
@media (max-width:580px){
  .brand-name{letter-spacing:0;font-size:.95rem;}
  h1{font-size:clamp(1.8rem,7.2vw,2.5rem);}
  #about .cred span,#portfolio .gal-cap-loc,.intro-badge-inner span{letter-spacing:0;font-size:.74rem;}
}
