/* Al Gawhara Medical Clinic: public home page.
   Colours come from the clinic logo (navy, teal, gold). Layout uses logical
   properties so the same CSS serves left-to-right (English, Somali) and
   right-to-left (Arabic). Edit the tokens below to restyle the whole page. */
:root {
  --navy: #0A2A4A;
  --teal: #0C6469;
  --teal-dark: #094E52;
  --gold: #D4AA4E;
  --gold-soft: #F8F0DD;
  --gold-ink: #7A5A12;
  --ink: #10243A;
  --muted: #566879;
  --line: #DCE5EA;
  --paper: #FFFFFF;
  --wash: #F1F6F7;
  --tint: #EAF2F3;
  --danger-bg: #FBEFEC;
  --danger-ink: #8E3B33;
  --r: 14px;
  --font-display: "Cinzel", "Times New Roman", serif;
  --font-body: "Source Sans 3", system-ui, "Segoe UI", sans-serif;
  --font-ar: "Cairo", "Segoe UI", Tahoma, sans-serif;
  --gutter: clamp(16px, 4vw, 32px);
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 1.0625rem/1.6 var(--font-body);
  -webkit-text-size-adjust: 100%;
}
html[lang="ar"] body, html[lang="ar"] button, html[lang="ar"] input, html[lang="ar"] select, html[lang="ar"] textarea { font-family: var(--font-ar); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); }
p { margin: 0; }
h1, h2, h3 { margin: 0; color: var(--navy); font-weight: 600; line-height: 1.2; text-wrap: balance; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
.wrap { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: var(--gutter); }
.small { font-size: .9rem; color: var(--muted); }
.skip { position: absolute; inset-inline-start: 8px; top: -60px; background: var(--navy); color: #fff; padding: 10px 14px; border-radius: 8px; z-index: 50; }
.skip:focus { top: 8px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 22px; border-radius: 999px;
  font: 600 1rem var(--font-body); text-decoration: none; cursor: pointer;
  border: 2px solid var(--teal); transition: background .15s, color .15s, transform .15s;
}
html[lang="ar"] .btn { font-family: var(--font-ar); }
.btn.primary { background: var(--teal); color: #fff; }
.btn.primary:hover { background: var(--teal-dark); border-color: var(--teal-dark); }
.btn.ghost { background: transparent; color: var(--teal); }
.btn.ghost:hover { background: var(--tint); }
.btn.big { min-height: 52px; padding-inline: 30px; font-size: 1.05rem; }
.btn:active { transform: translateY(1px); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 30; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; gap: 20px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--navy); margin-inline-end: auto; }
.brand img { width: 44px; height: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text b { font: 700 1.05rem var(--font-display); letter-spacing: .06em; }
.brand-text i { font: 500 .62rem var(--font-display); letter-spacing: .32em; color: var(--teal); font-style: normal; margin-top: 3px; }
.nav { display: flex; gap: 6px; }
.nav a { padding: 8px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 500; }
.nav a:hover { background: var(--tint); color: var(--teal-dark); }
.tools { display: flex; align-items: center; gap: 10px; }
.lang { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--wash); }
.lang button { border: 0; background: transparent; color: var(--ink); font: 600 .85rem var(--font-body); padding: 6px 12px; border-radius: 999px; cursor: pointer; min-width: 44px; min-height: 34px; }
.lang button[lang="ar"] { font-family: var(--font-ar); }
.lang button[aria-pressed="true"] { background: var(--navy); color: #fff; }
.menu-btn { display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; padding: 0; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.menu-btn span { width: 20px; height: 2px; background: var(--navy); border-radius: 2px; }

/* Hero */
.hero { background:
  radial-gradient(900px 420px at 88% -10%, rgba(12,100,105,.10), transparent 70%),
  radial-gradient(700px 360px at -8% 105%, rgba(212,170,78,.14), transparent 70%),
  var(--paper); padding-block: clamp(36px, 7vw, 84px) 0; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(24px, 5vw, 64px); align-items: center; }
.eyebrow { font: 600 .82rem var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--teal); margin-bottom: 14px; }
html[lang="ar"] .eyebrow { letter-spacing: 0; font-size: .95rem; }
h1 { display: flex; flex-direction: column; gap: 6px; }
.h1-en { font: 700 clamp(2rem, 5vw, 3.6rem)/1.08 var(--font-display); letter-spacing: .02em; color: var(--navy); }
.h1-ar { font: 700 clamp(1.5rem, 3.4vw, 2.3rem)/1.3 var(--font-ar); color: var(--teal); }
.tagline { margin-top: 18px; font-size: clamp(1.15rem, 2.2vw, 1.4rem); font-weight: 500; color: var(--ink); padding-inline-start: 14px; border-inline-start: 4px solid var(--gold); }
.lead { margin-top: 14px; max-width: 34em; color: var(--muted); font-size: 1.12rem; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hero-art { position: relative; display: grid; place-items: center; aspect-ratio: 1; max-width: 400px; width: 100%; margin-inline: auto; }
.hero-art img { position: relative; width: 72%; z-index: 2; }
.ring { position: absolute; border-radius: 50%; }
.ring-a { inset: 0; background: radial-gradient(circle at 35% 30%, #fff, var(--tint)); box-shadow: 0 30px 60px -30px rgba(10,42,74,.35); }
.ring-b { inset: 6%; border: 2px solid var(--gold); opacity: .85; }
.facts { list-style: none; margin: clamp(32px, 6vw, 64px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 3px solid var(--gold); }
.facts li { padding: 18px 18px 22px; font-size: .98rem; color: var(--muted); border-inline-start: 1px solid var(--line); }
.facts li:first-child { border-inline-start: 0; padding-inline-start: 0; }
.facts strong { display: block; color: var(--navy); font-size: 1.05rem; margin-bottom: 2px; }

/* Sections */
.section { padding-block: clamp(48px, 8vw, 96px); }
.section.tint { background: var(--wash); }
.section-head { max-width: 40rem; margin-bottom: clamp(24px, 4vw, 40px); }
.section-head h2 { font: 600 clamp(1.6rem, 3.4vw, 2.2rem)/1.2 var(--font-display); letter-spacing: .03em; padding-bottom: 14px; position: relative; }
html[lang="ar"] .section-head h2, html[lang="ar"] h3 { font-family: var(--font-ar); letter-spacing: 0; font-weight: 700; }
.section-head h2::after { content: ""; position: absolute; inset-inline-start: 0; bottom: 0; width: 56px; height: 3px; background: var(--gold); border-radius: 2px; }
.section-head p { margin-top: 10px; color: var(--muted); }
.section-head.left { margin-bottom: 20px; }

.groups { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.group { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 24px 24px 20px; min-width: 0; }
.g-icon { width: 46px; height: 46px; border-radius: 12px; background: var(--tint); display: grid; place-items: center; margin-bottom: 14px; }
.g-icon svg { width: 24px; height: 24px; fill: none; stroke: var(--teal); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.group h3 { font-size: 1.2rem; margin-bottom: 10px; }
.group ul { margin: 0; padding: 0; list-style: none; }
.group li { position: relative; padding: 8px 0; padding-inline-start: 18px; border-top: 1px solid var(--line); }
.group li:first-child { border-top: 0; }
.group li::before { content: ""; position: absolute; inset-inline-start: 0; top: 1.05em; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.note { margin-top: 20px; color: var(--muted); font-size: .95rem; }

/* Booking */
.book-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 40px); align-items: start; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; min-width: 0; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field.wide, .wide { grid-column: 1 / -1; }
label { font-weight: 600; font-size: .95rem; color: var(--navy); }
input, select, textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; border: 1.5px solid #C5D3DA; border-radius: 10px;
  font: 400 1rem var(--font-body); color: var(--ink); background: #fff;
}
textarea { resize: vertical; min-height: 84px; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(212,170,78,.55); border-color: var(--teal); }
input[aria-invalid="true"] { border-color: #B5473F; }
.err { color: #B5473F; font-size: .9rem; font-weight: 500; }
.actions { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.ok { background: #E8F5EE; color: #1F6B45; border-radius: 10px; padding: 10px 14px; font-weight: 500; }
.side { display: flex; flex-direction: column; gap: 16px; }
.hours-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.hours h3, .alert h3, .now h3 { font-size: 1.15rem; }
.hours dl { margin: 6px 0 12px; }
.hours dl > div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.hours dt { color: var(--muted); font-weight: 500; }
.hours dd { margin: 0; font-weight: 600; color: var(--navy); text-align: end; font-variant-numeric: tabular-nums; }
.pill { display: inline-block; padding: 3px 11px; border-radius: 999px; background: var(--tint); color: var(--teal-dark); font: 600 .78rem var(--font-body); letter-spacing: .02em; white-space: nowrap; }
.pill.warn { background: var(--gold-soft); color: var(--gold-ink); }
.alert { background: var(--danger-bg); border-color: #EBCFC9; }
.alert h3 { color: var(--danger-ink); }
.alert p { margin: 6px 0 14px; }
.now p { margin-top: 6px; color: var(--muted); }

/* Coming soon */
.soon-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.soon { border: 2px dashed #BFD0D6; border-radius: var(--r); padding: 20px 22px 22px; background: linear-gradient(180deg, #fff, var(--wash)); min-width: 0; }
.soon .pill { background: var(--gold-soft); color: var(--gold-ink); }
.soon h3 { font-size: 1.1rem; margin: 12px 0 6px; }
.soon p { color: var(--muted); font-size: .98rem; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.doctor { display: flex; gap: 16px; align-items: flex-start; }
.avatar { flex: none; width: 56px; height: 56px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font: 700 1.3rem var(--font-display); }
.doctor h3 { font-size: 1.15rem; }
.role { color: var(--muted); font-size: .95rem; }
.phone { margin: 10px 0 14px; font-size: 1.25rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.phone a { color: var(--navy); text-decoration: none; }
.row { display: flex; flex-wrap: wrap; gap: 10px; }
.place h3 { font-size: 1.15rem; }
.city { font-size: 1.35rem; font-weight: 700; color: var(--navy); margin: 8px 0 6px; }
.sign { margin: clamp(28px, 5vw, 48px) 0 0; }
.sign figcaption { font: 600 .85rem var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--teal); margin-bottom: 12px; }
html[lang="ar"] .sign figcaption { letter-spacing: 0; font-size: 1rem; }
.sign img { width: 100%; border-radius: var(--r); border: 1px solid var(--line); box-shadow: 0 18px 40px -26px rgba(10,42,74,.45); }

/* Footer */
.site-footer { background: var(--navy); color: #D7E3EC; padding-block: 36px; }
.foot { display: grid; gap: 10px; }
.foot-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.foot-brand img { width: 36px; background: #fff; border-radius: 50%; padding: 3px; }
.foot-brand b { display: block; font: 700 1rem var(--font-display); letter-spacing: .05em; color: #fff; }
.foot-brand span { color: var(--gold); font: 600 .95rem var(--font-ar); }
.site-footer .small { color: #AFC2D1; }
.site-footer a { color: #fff; }

/* Narrow screens */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { max-width: 260px; order: -1; margin-bottom: 4px; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .facts li:nth-child(3) { border-inline-start: 0; padding-inline-start: 0; }
  .facts li:nth-child(n+3) { border-top: 1px solid var(--line); }
  .groups, .book-grid { grid-template-columns: 1fr; }
  .soon-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .menu-btn { display: inline-flex; }
  .nav { display: none; position: absolute; inset-inline: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line); flex-direction: column; padding: 10px var(--gutter) 16px; box-shadow: 0 20px 30px -24px rgba(10,42,74,.4); }
  .site-header.open .nav { display: flex; }
  .nav a { padding: 12px 8px; font-size: 1.05rem; }
}
@media (max-width: 560px) {
  .form { grid-template-columns: 1fr; }
  .soon-grid { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; }
  .facts li { border-inline-start: 0; padding-inline-start: 0; border-top: 1px solid var(--line); }
  .facts li:first-child { border-top: 0; }
  .bar { gap: 10px; }
  .brand { gap: 9px; min-width: 0; }
  .brand img { width: 38px; }
  .brand-text b { font-size: .92rem; letter-spacing: .04em; white-space: nowrap; }
  .brand-text i { display: none; }
  .lang button { padding: 6px 9px; min-width: 40px; }
  .doctor { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}

/* ───────── Design pass 2: signboard look (navy and teal, gold arch) ───────── */
.hero {
  position: relative; color: #fff; overflow: hidden; padding-block: clamp(40px, 7vw, 88px) clamp(72px, 9vw, 120px);
  background:
    radial-gradient(900px 480px at 85% 10%, rgba(12,100,105,.55), transparent 70%),
    radial-gradient(600px 400px at 0% 100%, rgba(212,170,78,.16), transparent 70%),
    linear-gradient(160deg, #0A2A4A 0%, #0B3558 55%, #0C4C5E 100%);
}
.hero::before, .hero::after { content: ""; position: absolute; inset-block: 0; width: clamp(40px, 7vw, 110px); pointer-events: none; }
.hero::before { inset-inline-start: 0; background: linear-gradient(90deg, rgba(212,170,78,.55), rgba(212,170,78,0) 70%); clip-path: polygon(0 0, 100% 0, 40% 50%, 100% 100%, 0 100%); opacity: .55; }
.hero::after { inset-inline-end: 0; background: linear-gradient(270deg, rgba(212,170,78,.55), rgba(212,170,78,0) 70%); clip-path: polygon(100% 0, 0 0, 60% 50%, 0 100%, 100% 100%); opacity: .55; }
html[dir="rtl"] .hero::before { transform: scaleX(-1); }
html[dir="rtl"] .hero::after { transform: scaleX(-1); }
.hero .eyebrow { color: var(--gold); }
.hero h1 { color: #fff; }
.hero .h1-en { color: #fff; }
.hero .h1-ar { color: var(--gold); }
.hero .tagline { color: #fff; border-inline-start-color: var(--gold); }
.hero .lead { color: #C9D8E4; }
.hero .btn.primary { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.hero .btn.primary:hover { background: #E3BC63; border-color: #E3BC63; }
.hero .btn.ghost { color: #fff; border-color: rgba(255,255,255,.7); }
.hero .btn.ghost:hover { background: rgba(255,255,255,.12); }
.hero-art { aspect-ratio: 4 / 5; max-width: 360px; background: #fff; border: 6px solid var(--gold); border-radius: 999px 999px 28px 28px; box-shadow: 0 34px 70px -28px rgba(0,0,0,.6), inset 0 0 0 10px #fff, inset 0 0 0 11px rgba(12,100,105,.25); }
.hero-art .ring { display: none; }
.hero-art img { width: 78%; margin-top: 6%; }
.facts { position: relative; z-index: 2; margin-top: clamp(-90px, -7vw, -56px); background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--gold); border-radius: 18px; box-shadow: 0 26px 50px -30px rgba(10,42,74,.5); padding-inline: clamp(8px, 2vw, 20px); }
.hero + .wrap .facts, .hero .facts { margin-top: 0; }
.hero-wrap-facts { position: relative; z-index: 3; margin-top: clamp(-84px, -7vw, -52px); }
.group { border-top: 4px solid var(--teal); box-shadow: 0 18px 36px -30px rgba(10,42,74,.45); }
.group:nth-child(2n) { border-top-color: var(--gold); }
.group h3 { color: var(--teal-dark); }
.section-head h2 { color: var(--navy); }
.soon { border-color: #B9CBD3; }
.sign img { border: 4px solid var(--navy); }

/* phone: a big booking button that stays on screen */
.sticky-cta { display: none; }
@media (max-width: 900px) {
  .hero-art { max-width: 220px; }
  .hero { padding-block-end: 84px; }
  body { padding-bottom: 76px; }
  .sticky-cta { display: flex; position: fixed; inset-inline: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 40;
    align-items: center; justify-content: center; min-height: 54px; border-radius: 999px; background: var(--gold); color: var(--navy);
    font: 700 1.05rem var(--font-body); text-decoration: none; box-shadow: 0 16px 30px -10px rgba(10,42,74,.6); border: 2px solid #fff; }
  html[lang="ar"] .sticky-cta { font-family: var(--font-ar); }
}


/* ───────── Phone pass: shorter page, easier to scan ───────── */
.group summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 14px; }
.group summary::-webkit-details-marker { display: none; }
.group summary .g-icon { margin: 0; flex: none; }
.group summary h3 { flex: 1; margin: 0; }
.group .chev { display: none; width: 12px; height: 12px; border-inline-end: 2.5px solid var(--teal); border-block-end: 2.5px solid var(--teal); transform: rotate(45deg); transition: transform .2s; margin-inline-end: 4px; }
.group[open] .chev { transform: rotate(-135deg); }
.group ul { margin-top: 12px; }
@media (min-width: 901px) {
  .group summary { pointer-events: none; cursor: default; flex-direction: column; align-items: flex-start; gap: 0; }
  .group summary .g-icon { margin-bottom: 14px; }
  .group ul { margin-top: 0; }
}
@media (max-width: 900px) {
  .group .chev { display: block; }
  .group { padding: 16px 18px; }
  .group summary { min-height: 52px; }
  .group[open] summary { margin-bottom: 4px; }
  .phone-hide { display: none; }
  .note { margin-top: 14px; }

  /* hero: smaller emblem so the headline and the Book button sit higher */
  .hero { padding-block: 22px 70px; }
  .hero-art { max-width: 150px; margin-bottom: 0; border-width: 4px; }
  .hero-grid { gap: 20px; }
  .tagline { margin-top: 12px; font-size: 1.1rem; }
  .lead { margin-top: 8px; font-size: 1rem; }
  .cta { margin-top: 18px; }

  /* facts bar: 2 x 2 instead of four tall rows */
  .facts { grid-template-columns: 1fr 1fr; padding: 4px 6px; }
  .facts li { padding: 12px 10px; font-size: .85rem; line-height: 1.35; border-top: 0 !important; border-inline-start: 0 !important; }
  .facts li:nth-child(n+3) { border-top: 1px solid var(--line) !important; }
  .facts li:nth-child(even) { border-inline-start: 1px solid var(--line) !important; }
  .facts strong { font-size: .95rem; }
  .hero-wrap-facts { margin-top: -50px; }

  .section { padding-block: 40px; }
  .section-head { margin-bottom: 20px; }

  /* coming soon: compact two-column tiles, the section title already says "coming soon" */
  .soon-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .soon { padding: 14px 14px 16px; border-width: 1.5px; }
  .soon .pill { display: none; }
  .soon h3 { margin: 0 0 4px; font-size: 1rem; }
  .soon p { font-size: .85rem; line-height: 1.4; }
}
@media (max-width: 380px) { .soon-grid { grid-template-columns: 1fr; } }
@media (max-width: 900px) and (min-width: 381px) { .soon:last-child:nth-child(odd) { grid-column: 1 / -1; } }
