/* ─── MediTravel Solutions — base styles ───────────────────────── */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Manrope', ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-feature-settings: 'ss01', 'ss02';
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

:root {
  /* navy + turquoise from logo, extended with Mediterranean warmth */
  --navy:        #0E3B52;
  --navy-deep:   #07273A;
  --teal:        #2DA8A8;
  --teal-deep:   #1B7575;
  --terracotta:  #D8704A;
  --saffron:     #E8B14A;
  --sand:        #F4ECDD;
  --sand-soft:   #FAF6EE;
  --bone:        #FBF9F4;
  --ink:         #14222B;
  --ink-soft:    #4A5862;
  --ink-faint:   #8896A0;
  --rule:        #E6DDC9;
  --rule-soft:   #F0E9D8;

  --bg:          var(--bone);
  --primary:     var(--navy);
  --accent:      var(--teal);
  --warm:        var(--terracotta);

  /* type scale */
  --display:     'Instrument Serif', 'Cormorant Garamond', Georgia, serif;
  --sans:        'Manrope', ui-sans-serif, system-ui, sans-serif;
  --arabic:       'Cairo', 'Tajawal', 'Segoe UI', 'Tahoma', sans-serif;
  --arabic-display: 'Reem Kufi', 'Cairo', 'Amiri', serif;

  --maxw: 1280px;
  --pad: clamp(20px, 4vw, 56px);
}

/* ─── typography ──────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: -0.012em;
  line-height: 1.04;
  margin: 0;
  color: var(--navy-deep);
  text-wrap: balance;
}
h1 { font-size: clamp(48px, 7vw, 104px); }
h2 { font-size: clamp(36px, 4.6vw, 68px); }
h3 { font-size: clamp(24px, 2.4vw, 36px); }
h4 { font-size: clamp(18px, 1.6vw, 22px); }

p { margin: 0; line-height: 1.55; color: var(--ink-soft); }
a  { color: inherit; text-decoration: none; }

.eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal-deep);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
  display: inline-block;
}

.italic-it { font-style: italic; font-family: var(--display); font-weight: 400; }

/* ─── layout ──────────────────────────────────────────────────── */
.shell { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); }
.section { padding: clamp(72px, 10vw, 140px) 0; }
.section-tight { padding: clamp(48px, 6vw, 80px) 0; }

.row { display: flex; align-items: center; gap: 12px; }
.between { display: flex; align-items: center; justify-content: space-between; }

.divider {
  height: 1px;
  background: var(--rule);
  margin: 0;
  border: 0;
}

/* ─── buttons ─────────────────────────────────────────────────── */
.btn {
  font-family: var(--sans);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14.5px;
  letter-spacing: 0.005em;
  border: 0;
  cursor: pointer;
  transition: transform .15s ease, background .2s ease, color .2s ease, box-shadow .2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--navy-deep);
  color: var(--bone);
}
.btn-primary:hover { background: var(--navy); }
.btn-accent {
  background: var(--terracotta);
  color: white;
}
.btn-accent:hover { background: #C25E3D; }
.btn-ghost {
  background: transparent;
  color: var(--navy-deep);
  border: 1px solid color-mix(in srgb, var(--navy-deep) 22%, transparent);
}
.btn-ghost:hover { background: rgba(14,59,82,.06); }
.btn-light {
  background: rgba(255,255,255,.16);
  color: white;
  border: 1px solid rgba(255,255,255,.28);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.btn-light:hover { background: rgba(255,255,255,.24); }
.btn .arrow { display: inline-block; transition: transform .2s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ─── chips ───────────────────────────────────────────────────── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border-radius: 999px;
  background: var(--sand);
  color: var(--navy-deep);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.chip-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--teal); }

/* ─── cards ───────────────────────────────────────────────────── */
.card {
  background: white;
  border-radius: 20px;
  border: 1px solid var(--rule-soft);
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 60px -28px rgba(14,59,82,.28);
  border-color: var(--rule);
}

/* ─── pattern: subtle zellige geometry ────────────────────────── */
.zellige {
  background-image:
    radial-gradient(circle at 50% 50%, rgba(14,59,82,.06) 1px, transparent 1.5px),
    radial-gradient(circle at 0 0,    rgba(14,59,82,.04) 1px, transparent 1.5px),
    radial-gradient(circle at 100% 100%, rgba(14,59,82,.04) 1px, transparent 1.5px);
  background-size: 28px 28px;
  background-position: 0 0, 14px 14px, 14px 14px;
}

.star-pat {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'><g fill='none' stroke='%230E3B52' stroke-opacity='.07' stroke-width='1'><path d='M40 8 L48 32 L72 32 L52 46 L60 70 L40 56 L20 70 L28 46 L8 32 L32 32 Z'/><circle cx='40' cy='40' r='14'/></g></svg>");
  background-size: 80px 80px;
}

/* ─── focus ───────────────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ─── transitions ─────────────────────────────────────────────── */
.fade-in { animation: fadeIn .5s ease both; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── nav ─────────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bone) 86%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid color-mix(in srgb, var(--rule) 60%, transparent);
}
.nav-inner { display: flex; align-items: center; gap: 32px; height: 76px; }
.nav-logo { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.nav-logo-mark { width: 38px; height: 38px; }
.nav-logo-text { font-family: var(--display); font-size: 22px; line-height: 1; color: var(--navy-deep); }
.nav-logo-text small { display:block; font-family: var(--sans); font-size: 9.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--teal-deep); margin-top: 4px; }
.nav-links { display: flex; align-items: center; gap: 26px; margin-left: auto; }
.nav-link { font-size: 14px; font-weight: 500; color: var(--ink); cursor: pointer; position: relative; }
.nav-link:hover { color: var(--teal-deep); }
.nav-link.active { color: var(--navy-deep); }
.nav-lang-wrap { position: relative; }
.nav-lang {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--rule);
  font-size: 12px; font-weight: 600; color: var(--ink);
  background: white; cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
  font-family: inherit;
}
.nav-lang:hover { border-color: var(--teal-deep); background: var(--sand-soft); }
.nav-lang[aria-expanded="true"] { border-color: var(--teal-deep); background: var(--sand-soft); }
.nav-lang-flag { font-size: 14px; line-height: 1; }
.nav-lang-code { letter-spacing: .04em; }
.nav-lang-caret { transition: transform .2s ease; opacity: .6; }
.nav-lang[aria-expanded="true"] .nav-lang-caret { transform: rotate(180deg); }

.nav-lang-menu {
  position: absolute; top: calc(100% + 8px); right: 0;
  min-width: 180px; padding: 6px;
  background: white; border: 1px solid var(--rule); border-radius: 14px;
  box-shadow: 0 12px 32px rgba(14, 59, 82, .12);
  list-style: none; margin: 0;
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity .15s ease, transform .15s ease, visibility .15s;
  z-index: 60;
}
.nav-lang-wrap.is-open .nav-lang-menu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.nav-lang-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 10px;
  font-size: 14px; font-weight: 500; color: var(--ink);
  text-decoration: none;
  transition: background .12s ease, color .12s ease;
}
.nav-lang-item:hover { background: var(--sand-soft); color: var(--navy-deep); }
.nav-lang-item.is-active { color: var(--teal-deep); font-weight: 600; }
.nav-lang-item .nav-lang-flag { font-size: 16px; }
.nav-lang-item .nav-lang-label { flex: 1; }
.nav-lang-check { color: var(--teal-deep); flex-shrink: 0; }

.nav-cta { margin-left: 4px; }

/* ─── footer ──────────────────────────────────────────────────── */
.foot { background: var(--navy-deep); color: rgba(255,255,255,.78); padding: 80px 0 28px; margin-top: 80px; position: relative; overflow: hidden; }
.foot h4 { color: white; font-family: var(--sans); font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 18px; }
.foot a { display: block; padding: 6px 0; color: rgba(255,255,255,.7); font-size: 14px; }
.foot a:hover { color: white; }
.foot .grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr 1.2fr; gap: 48px; }
.foot-socials { display: flex; gap: 10px; margin-top: 22px; }
.foot-social {
    width: 38px; height: 38px;
    border-radius: 999px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.14);
    color: rgba(255,255,255,.85) !important;
    transition: background .2s, border-color .2s, color .2s, transform .2s;
}
.foot-social:hover {
    background: rgba(255,255,255,.14);
    border-color: rgba(255,255,255,.32);
    color: white !important;
    transform: translateY(-1px);
}

.foot-credit { color: rgba(255,255,255,.4); }
.foot-credit__heart { color: #ff5d6c; }
.foot-credit a {
    display: inline;
    padding: 0;
    color: #c15b39;
    margin-inline-start: 2px;
    font-weight: 600;
    text-decoration: none;
    transition: color .2s;
}
.foot-credit a:hover { color: #d6754f; }
@media (max-width: 880px) { .foot .grid { grid-template-columns: 1fr 1fr; } }

/* ─── form bits ───────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12.5px; font-weight: 600; color: var(--navy-deep); letter-spacing: .02em; }
.field input, .field select, .field textarea {
  font-family: var(--sans);
  font-size: 15px;
  padding: 13px 15px;
  border-radius: 12px;
  border: 1px solid var(--rule);
  background: white;
  color: var(--ink);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(45,168,168,.14);
}

/* ─── reveal on scroll ────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* ─── grids ────────────────────────────────────────────────────── */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 960px) {
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .grid-3 { grid-template-columns: 1fr; }
    .grid-4 { grid-template-columns: 1fr; }
}

.section-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: end;
    margin-bottom: 56px;
}
@media (max-width: 880px) {
    .section-header { grid-template-columns: 1fr; gap: 24px; }
    .section-header p { justify-self: start !important; }
}

.doctors-header {
    display: flex;
    justify-content: space-between;
    align-items: end;
    margin-bottom: 36px;
    gap: 20px;
    flex-wrap: wrap;
}

/* hero layout */
.hero-grid {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 56px;
    align-items: center;
}
.hero-visual { position: relative; height: 580px; }
.hero-arch {
    position: absolute; right: 0; top: 0;
    width: 100%; height: 100%;
    clip-path: path('M 0 100% L 0 30% C 0 10%, 35% 0, 50% 0 C 65% 0, 100% 10%, 100% 30% L 100% 100% Z');
    -webkit-clip-path: path('M 0 100% L 0 30% C 0 10%, 35% 0, 50% 0 C 65% 0, 100% 10%, 100% 30% L 100% 100% Z');
    background-size: cover; background-position: center;
}
.hero-arch-overlay {
    position: absolute; inset: 0;
    clip-path: path('M 0 100% L 0 30% C 0 10%, 35% 0, 50% 0 C 65% 0, 100% 10%, 100% 30% L 100% 100% Z');
    -webkit-clip-path: path('M 0 100% L 0 30% C 0 10%, 35% 0, 50% 0 C 65% 0, 100% 10%, 100% 30% L 100% 100% Z');
    background: linear-gradient(180deg, transparent 50%, rgba(14,39,58,.55));
}
.hero-patient-card {
    position: absolute; left: -34px; bottom: 58px;
    width: 280px; padding: 16px;
    background: white; border-radius: 18px;
    box-shadow: 0 30px 60px -28px rgba(14,39,58,.4);
    border: 1px solid var(--rule-soft);
}
.hero-badge {
    position: absolute; top: 28px; right: -18px;
    width: 110px; height: 110px; border-radius: 50%;
    background: var(--terracotta); color: white;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    font-family: var(--display);
    box-shadow: 0 16px 32px -10px rgba(216,112,74,.55);
    transform: rotate(-8deg);
}

@media (max-width: 960px) {
    .hero-grid { grid-template-columns: 1fr; }
    .hero-visual { height: 400px; }
    .hero-stats { grid-template-columns: repeat(2, 1fr) !important; }
    .hero-patient-card { left: 0; width: 240px; }
    .hero-badge { width: 86px; height: 86px; right: 0; }
    .hero-badge > div:first-child { font-size: 24px !important; }
}

/* process section */
.process-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 60px;
    align-items: start;
}
.process-sticky { position: sticky; top: 110px; }
@media (max-width: 880px) {
    .process-grid { grid-template-columns: 1fr; gap: 30px; }
    .process-sticky { position: static; }
}

/* services annexes */
.services-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 18px;
}
.services-large, .services-small {
    position: relative; min-height: 360px; overflow: hidden;
    cursor: pointer; display: block;
}
.services-large img, .services-small img {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.services-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent 30%, rgba(7,39,58,.85));
}
.services-small .services-overlay {
    background: linear-gradient(180deg, transparent 40%, rgba(7,39,58,.88));
}
.services-content {
    position: absolute; bottom: 24px; left: 24px; right: 24px;
    color: white;
}
.services-small .services-content { bottom: 22px; left: 22px; right: 22px; }
@media (max-width: 880px) {
    .services-grid { grid-template-columns: 1fr; }
}

/* testimonials */
.testimonials-grid {
    display: grid;
    grid-template-columns: .9fr 1.1fr;
    gap: 64px;
    align-items: center;
}
.testimonial-image {
    clip-path: path('M 0 100% L 0 30% C 0 10%, 35% 0, 50% 0 C 65% 0, 100% 10%, 100% 30% L 100% 100% Z');
    -webkit-clip-path: path('M 0 100% L 0 30% C 0 10%, 35% 0, 50% 0 C 65% 0, 100% 10%, 100% 30% L 100% 100% Z');
}
@media (max-width: 880px) {
    .testimonials-grid { grid-template-columns: 1fr; gap: 30px; }
}

/* faq */
.faq-grid {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: 56px;
}
@media (max-width: 880px) {
    .faq-grid { grid-template-columns: 1fr; gap: 30px; }
}

/* cta */
.cta-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 40px;
    align-items: center;
}
@media (max-width: 720px) {
    .cta-grid { grid-template-columns: 1fr; }
}

/* nav responsive */
@media (max-width: 880px) {
    .nav-links { gap: 14px; }
    .nav-link { display: none; }
    .nav-link.active { display: inline-block; }
    .nav-cta { display: none; }
}

/* ─── RTL (arabe) ──────────────────────────────────────────────── */
[dir="rtl"] body { font-family: var(--arabic), 'Manrope', ui-sans-serif, system-ui, sans-serif; }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] h4 { font-family: var(--arabic), var(--display); letter-spacing: 0; line-height: 1.25; }
[dir="rtl"] .italic-it { font-style: normal; }

/* nav : reverse + dropdown s'aligne à gauche */
[dir="rtl"] .nav-links { margin-left: 0; margin-right: auto; }
[dir="rtl"] .nav-lang-menu { right: auto; left: 0; }
[dir="rtl"] .nav-lang-caret { transform: scaleX(-1); }
[dir="rtl"] .nav-lang[aria-expanded="true"] .nav-lang-caret { transform: scaleX(-1) rotate(180deg); }

/* arrow → devient ← visuellement (on retourne le glyphe) */
[dir="rtl"] .arrow { display: inline-block; transform: scaleX(-1); }

/* hero : on garde la grille mais on inverse l'ordre visuel */
[dir="rtl"] .hero-grid { direction: rtl; }
[dir="rtl"] .hero-stats { text-align: right; }
[dir="rtl"] .hero-patient-card div[style*="margin-left: auto"] { margin-left: 0 !important; margin-right: auto !important; }

/* section-header (titre + texte côté droit) */
[dir="rtl"] .section-header > p { justify-self: start !important; }

/* doctors-header : aligner le bouton à gauche */
[dir="rtl"] .doctors-header { direction: rtl; }

/* footer : grille reste mais texte aligné à droite */
[dir="rtl"] .foot { text-align: right; }
[dir="rtl"] .foot a { padding-right: 0; }
[dir="rtl"] .foot div[style*="display:flex; justify-content:space-between"] { flex-direction: row-reverse; }

/* CTA final : bloc à droite repasse à gauche */
[dir="rtl"] .cta-grid > div[style*="align-items:flex-end"] { align-items: flex-start !important; }

/* boutons : gap conservé mais flèche retournée (gérée plus haut via .arrow) */
[dir="rtl"] .btn { letter-spacing: 0; }

/* cards & process : numérotation reste lisible */
[dir="rtl"] .process-grid > ol { direction: rtl; }
[dir="rtl"] details > summary { direction: rtl; }

/* page-hero grid : image à gauche */
[dir="rtl"] .page-hero-grid.with-image { direction: rtl; }

/* breadcrumbs / path indicators : flèches inversées */
[dir="rtl"] [style*="margin: 0 10px"] { display: inline-block; transform: scaleX(-1); }

/* chips : laissez tels quels (puces décoratives), texte arabe lit RTL nativement */

/* form fields : labels et placeholders à droite */
[dir="rtl"] .field input, [dir="rtl"] .field select, [dir="rtl"] .field textarea { text-align: right; }

/* testimonials : ordre image / texte (image à droite, texte à gauche en RTL) */
[dir="rtl"] .testimonials-grid { direction: rtl; }

/* ─── typographie arabe ────────────────────────────────────────────
   Cairo = corps de texte lisible. Reem Kufi = titres premium.
   +6% de taille car l'arabe a une densité visuelle plus élevée et
   line-height généreuse pour les diacritiques.
*/
html[lang="ar"],
html[lang="ar"] body,
[dir="rtl"] body {
  font-family: var(--arabic);
  font-feature-settings: 'kern' 1, 'liga' 1;
  line-height: 1.78;
  font-size: 17px;
}

html[lang="ar"] h1,
html[lang="ar"] h2,
html[lang="ar"] h3,
html[lang="ar"] h4,
html[lang="ar"] .display,
[dir="rtl"] .nav-logo-text {
  font-family: var(--arabic-display);
  font-weight: 600;
  letter-spacing: 0;
}

html[lang="ar"] .italic-it {
  font-family: var(--arabic-display);
  font-style: normal;
}

html[lang="ar"] .nav-link,
html[lang="ar"] .btn,
html[lang="ar"] button,
html[lang="ar"] .foot h4,
html[lang="ar"] label,
html[lang="ar"] input,
html[lang="ar"] select,
html[lang="ar"] textarea {
  font-family: var(--arabic);
}

/* numéros et liens latins (téléphone, email) restent en sans-serif latin */
html[lang="ar"] [dir="ltr"],
html[lang="ar"] a[href^="tel:"],
html[lang="ar"] a[href^="mailto:"],
html[lang="ar"] a[href^="https://wa.me"] {
  font-family: var(--sans);
  unicode-bidi: isolate;
}
