/* Kurdish (Sorani) and Arabic pages: right-to-left layout, Arabic-script
   fonts, and the language switcher. */

/* ---------- fonts: Latin words keep the site fonts, Arabic script uses Noto ---------- */
html[lang=ckb], html[lang=ar]{
  --font-display:'Cormorant Garamond','Noto Naskh Arabic','Iowan Old Style',Georgia,serif;
  --font-body:'Work Sans','Noto Sans Arabic','Segoe UI',system-ui,sans-serif;
  --pol-font-display:'Fraunces','Noto Naskh Arabic',serif;
  --pol-font-body:'Jost','Noto Sans Arabic',sans-serif;
}
/* Arabic script joins its letters: spacing them out, slanting them or
   capitalising has no place here. */
html[dir=rtl] body *{letter-spacing:0 !important;font-style:normal !important;}
html[dir=rtl] h1,html[dir=rtl] h2,html[dir=rtl] h3,html[dir=rtl] h4{line-height:1.45;}
html[dir=rtl] p,html[dir=rtl] li,html[dir=rtl] blockquote{line-height:1.9;}
html[dir=rtl] .eyebrow{font-size:13px;}
/* no large opening letter: Arabic-script letters join, so lifting the
   first one out would break the word */
html[dir=rtl] .story-text p:first-child::first-letter{float:none;font-size:inherit;line-height:inherit;padding:0;color:inherit;font-family:inherit;}
html[dir=rtl] .story-text .first-word{color:var(--gold);font-family:var(--font-display);font-weight:600;font-size:1.15em;}
/* English kept as is (names, reviews) sits in its own left-to-right run */
html[dir=rtl] bdi{unicode-bidi:isolate;}
/* phone numbers and e-mail addresses always read left to right */
html[dir=rtl] .tel-link,html[dir=rtl] a[href^="tel:"]:not(.btn):not(.psx-btn):not(.pol-btn),
html[dir=rtl] a[href^="mailto:"]{direction:ltr;unicode-bidi:isolate;}

/* ---------- arrows and chevrons point the other way ---------- */
html[dir=rtl] .back-arrow,html[dir=rtl] .pol-nav .back-arrow{transform:scaleX(-1);}

/* ---------- heroes ---------- */
/* Plastic Surgery: the photo leaves room on the left, so the text stays there */
@media (min-width:761px){
  html[dir=rtl] .psx-hero .psx-intro{align-items:flex-end;}
  html[dir=rtl] .psx-hero .psx-title,html[dir=rtl] .psx-hero .psx-lede{width:min(560px,50%);text-align:right;}
  html[dir=rtl] .psx-hero .psx-rule{margin-right:0;margin-left:calc(min(560px,50%) - 56px);}
}
/* phones: Arabic-script headings run taller, so the hero titles are set a size smaller */
@media (max-width:760px){
  html[dir=rtl] .psx-hero .psx-title{font-size:36px;line-height:1.3;}
  html[dir=rtl] .dx-hero h1{font-size:38px;line-height:1.3;}
}
/* Dermatology: text moves to the right, so the dark shading follows it */
html[dir=rtl] .dx-hero::after{background:linear-gradient(270deg,rgba(20,14,9,.82) 0%,rgba(20,14,9,.55) 45%,rgba(20,14,9,.1) 100%),linear-gradient(0deg,rgba(20,14,9,.55),rgba(20,14,9,0) 50%);}

/* full-width bands: the left-to-right centring trick, mirrored */
html[dir=rtl] .blood-band,html[dir=rtl] .services .services-grid,html[dir=rtl] .duo-photos{margin-left:0;margin-right:calc(50% - 50vw);}
/* Blood testing: the tubes sit on the right of the picture, so the text stays left */
@media (min-width:861px){ html[dir=rtl] .blood-text{margin-left:0;margin-right:auto;} }

/* IV and peptide lists: the gold bar and its spacing sit on the right */
html[dir=rtl] .ivB-row{padding:22px 18px 22px 0;}
html[dir=rtl] .ivB-row::before{left:auto;right:0;}

/* buttons: the Arabic-script font needs a taller line, which made the
   buttons grow and left English words (WhatsApp) sitting high; a set line
   height keeps them the same size as in English */
html[dir=rtl] :is(.btn,.psx-btn,.pol-btn,.nav-app-btn,.foot-wa-btn,.pol-book-btn,.pol-more,.copy-email-btn,.dx-tag,.pol-nav .back){line-height:1.25;}
/* English words keep the letter spacing they have on the English pages */
html[dir=rtl] :is(.btn,.psx-btn,.pol-btn,.nav-app-btn,.foot-wa-btn,.pol-book-btn,.pol-more) bdi{letter-spacing:.12em !important;}
html[dir=rtl] :is(.eyebrow,.dx-eyebrow,.dx-tabs a,.dx-ba-card figcaption,.dx-stage-cap,.ivB-count,.family-label) bdi{letter-spacing:.14em !important;}
html[dir=rtl] .badge-small bdi{letter-spacing:.04em !important;}

/* counters such as 08 / 09 always read left to right */
html[dir=rtl] :is(.ivB-count,.pol-lb-count,.psx-lb-count){direction:ltr;unicode-bidi:isolate;}

/* App Store / Google Play badges keep their official left-to-right layout */
html[dir=rtl] :is(.app-badge,.foot-app-badge){direction:ltr;}

/* the "by Dolçe" signature is English, so it keeps English order */
html[dir=rtl] .pol-sign{direction:ltr;}

/* ---------- language picker (header) ---------- */
.lang-pick{position:relative;display:flex;align-items:center;flex-shrink:0;}
.lang-btn{all:unset;box-sizing:border-box;cursor:pointer;display:inline-flex;align-items:center;gap:6px;height:32px;padding:0 4px;font-family:'Work Sans','Jost',system-ui,sans-serif;font-size:11.5px;font-weight:600;letter-spacing:.12em;line-height:1;color:inherit;opacity:.88;transition:opacity .25s ease,color .25s ease;-webkit-tap-highlight-color:transparent;}
.lang-btn svg{width:15px;height:15px;flex:none;}
.lang-btn:hover,.lang-pick.open .lang-btn{opacity:1;color:#C6A15B;}
.lang-btn:focus-visible{outline:1px solid #C6A15B;outline-offset:3px;border-radius:4px;}
.lang-menu{position:absolute;top:calc(100% + 10px);inset-inline-end:-10px;z-index:300;min-width:156px;padding:6px;background:#FBF7EF;border:1px solid rgba(166,128,90,.25);border-radius:12px;box-shadow:0 20px 44px -20px rgba(36,26,16,.4);opacity:0;visibility:hidden;transform:translateY(-6px);transition:opacity .25s ease,transform .25s ease,visibility 0s linear .25s;}
.lang-pick.open .lang-menu{opacity:1;visibility:visible;transform:none;transition:opacity .25s ease,transform .25s ease;}
.lang-menu a{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:10px 12px;border-radius:8px;font-family:'Work Sans','Jost',system-ui,sans-serif;font-size:14px;font-weight:500;letter-spacing:0;text-transform:none;color:#3B2A1E;text-decoration:none;transition:background .2s ease,color .2s ease;}
.lang-menu a[lang=ckb],.lang-menu a[lang=ar]{font-family:'Noto Sans Arabic','Work Sans',sans-serif;font-size:15px;}
.lang-menu a:hover{background:rgba(166,128,90,.1);}
.lang-menu a[aria-current=page]{color:#A6805A;}
.lang-menu a[aria-current=page]::after{content:"";width:6px;height:6px;border-radius:50%;background:#C6A15B;flex:none;}
/* colours of each header */
.head-right .lang-btn{color:var(--ink-soft,#5b4a3a);}
header.header-overlay .head-right .lang-btn{color:#F1E9DA;}
.pol-head-right .lang-btn{color:var(--pol-beige,#F1E9DA);}
/* phones: the header row is full, so the picker moves into the fold-out menu */
.lang-row{display:none;}
@media (max-width:600px){ .head-right .lang-pick{display:none;} nav.mainnav .lang-row{display:flex;} }
@media (max-width:760px){ .pol-head-right .lang-pick{display:none;} nav.pol-nav .lang-row{display:flex;} }
/* the logo never gets squeezed; the menu links (which may wrap) give way instead */
@media (min-width:601px){ header > a:has(> .logo-img){flex-shrink:0;} }
.lang-row{gap:8px;padding:18px 0 6px;flex-wrap:wrap;}
nav .lang-row a{width:auto !important;padding:8px 16px !important;border:1px solid currentColor !important;border-radius:999px;font-size:13px !important;font-weight:500;letter-spacing:0 !important;text-transform:none !important;opacity:.7;line-height:1.2;}
nav .lang-row a[lang=ckb],nav .lang-row a[lang=ar]{font-family:'Noto Sans Arabic',sans-serif;font-size:14px !important;}
nav .lang-row a[aria-current=page]{opacity:1;color:#C6A15B !important;border-color:#C6A15B !important;}
