/* ==========================================================================
   ASMC — LAYOUT & COMPONENTS
   No raw colour values here. Everything comes from theme.css tokens.
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-ink-soft);
  font-family: var(--font-body);
  font-size: var(--t-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  /* room for the mobile action bar so it never sits on top of content */
  padding-bottom: calc(var(--actionbar-h) + env(safe-area-inset-bottom));
}
@media (min-width: 900px) { body { padding-bottom: 0; } }

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--c-ink);
  line-height: var(--lh-head);
  font-weight: 600;
  margin: 0 0 var(--s-4);
}
p { margin: 0 0 var(--s-4); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--c-brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }

:focus-visible {
  outline: 3px solid var(--c-accent);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

.skip {
  position: absolute; left: -9999px;
  background: var(--c-ink); color: #fff; padding: var(--s-3) var(--s-4); z-index: 200;
}
.skip:focus { left: var(--s-4); top: var(--s-4); }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

.section { padding-block: var(--section-y); }
.section--tint { background: var(--c-surface); }

.eyebrow {
  font-size: var(--t-micro); font-weight: 700; letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase; color: var(--c-brand); margin-bottom: var(--s-3);
  display: block;
}
.lede { font-size: 1.125rem; max-width: var(--maxw-text); color: var(--c-ink-soft); }


/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  font-family: var(--font-body); font-weight: 600; font-size: var(--t-small);
  padding: var(--s-3) var(--s-5);
  border-radius: var(--r-pill); border: 1.5px solid transparent;
  cursor: pointer; text-decoration: none;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
              border-color var(--dur) var(--ease), transform var(--dur-fast) var(--ease);
  min-height: 46px;                     /* comfortable touch target */
}
.btn:active { transform: translateY(1px); }
.btn--solid { background: var(--c-brand); color: #fff; }
.btn--solid:hover { background: var(--c-brand-deep); }
.btn--ghost { background: transparent; color: var(--c-ink); border-color: var(--c-line); }
.btn--ghost:hover { border-color: var(--c-brand); color: var(--c-brand); }
.btn--wa { background: var(--c-whatsapp); color: #06301A; }
.btn--wa:hover { filter: brightness(.94); }
.btn--sm { padding: var(--s-2) var(--s-4); min-height: 40px; }
.btn--block { width: 100%; }
.btn__ico { width: 19px; height: 19px; fill: currentColor; }


/* ---------- Header ---------- */

.hdr {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--c-surface) 88%, transparent);
  backdrop-filter: saturate(1.6) blur(12px);
  border-bottom: 1px solid var(--c-line);
}
.hdr__in {
  display: flex; align-items: center; gap: var(--s-4);
  min-height: var(--header-h);
}
.brand { display: flex; align-items: center; gap: var(--s-3); text-decoration: none; margin-right: auto; }
.brand__mark { width: 40px; height: 40px; object-fit: contain; }
.brand__txt { display: flex; flex-direction: column; line-height: 1.15; }
.brand__name { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; color: var(--c-ink); letter-spacing: .01em; }
.brand__sub { font-size: var(--t-micro); color: var(--c-ink-muted); }

.nav__list { display: flex; gap: var(--s-5); list-style: none; margin: 0; padding: 0; }
.nav__link {
  color: var(--c-ink-soft); text-decoration: none; font-size: var(--t-small); font-weight: 500;
  padding-block: var(--s-2); position: relative;
}
.nav__link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--c-brand); transform: scaleX(0); transform-origin: left;
  transition: transform var(--dur) var(--ease);
}
.nav__link:hover::after, .nav__link.is-current::after { transform: scaleX(1); }
.nav__link.is-current { color: var(--c-ink); font-weight: 600; }

.hdr__cta { display: flex; gap: var(--s-2); }

.burger {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px; background: none; border: 0; cursor: pointer; padding: 0;
}
.burger span {
  display: block; height: 2px; width: 22px; margin-inline: auto;
  background: var(--c-ink); border-radius: 2px;
  transition: transform var(--dur) var(--ease), opacity var(--dur-fast) var(--ease);
}
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav__scrim {
  position: fixed; inset: 0; background: rgba(20,38,31,.4); z-index: 98;
  opacity: 0; transition: opacity var(--dur) var(--ease);
}
.nav__scrim.is-open { opacity: 1; }

@media (max-width: 899px) {
  .burger { display: flex; }
  .hdr__cta { display: none; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    background: var(--c-surface); border-bottom: 1px solid var(--c-line);
    transform: translateY(-102%); transition: transform var(--dur) var(--ease);
    z-index: 99; box-shadow: var(--shadow-md);
  }
  .nav.is-open { transform: translateY(0); }
  .nav__list { flex-direction: column; gap: 0; padding: var(--s-2) var(--gutter) var(--s-5); }
  .nav__link { display: block; padding: var(--s-4) 0; border-bottom: 1px solid var(--c-line); font-size: 1.0625rem; }
  .nav__link::after { display: none; }
}


/* ---------- Hero ---------- */

.hero { position: relative; overflow: hidden; background: var(--c-surface); }
.hero__in {
  display: grid; gap: var(--s-7);
  padding-block: clamp(2.5rem, 1.5rem + 5vw, 5.5rem);
}
@media (min-width: 900px) {
  .hero__in { grid-template-columns: 1.05fr .95fr; align-items: center; gap: var(--s-8); }
}
.hero__title { font-size: var(--t-hero); line-height: var(--lh-tight); letter-spacing: -.02em; margin-bottom: var(--s-4); }
.hero__title em { font-style: normal; color: var(--c-brand); }
.hero__sub { font-size: 1.125rem; max-width: 46ch; margin-bottom: var(--s-6); }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-bottom: var(--s-6); }

/* Signature: the falaj rule — a channel line with a node, echoing Al Ain's
   irrigation channels. Used once per page as the hero's closing mark. */
.falaj { display: flex; align-items: center; gap: var(--s-3); margin-bottom: var(--s-5); }
.falaj__line { height: 1px; flex: 1; background: linear-gradient(90deg, var(--c-accent), transparent); }
.falaj__node { width: 7px; height: 7px; border-radius: 50%; background: var(--c-accent); flex: none; }
.falaj__txt { font-size: var(--t-micro); letter-spacing: var(--ls-eyebrow); text-transform: uppercase; color: var(--c-ink-muted); font-weight: 600; }

.trust { display: flex; flex-wrap: wrap; gap: var(--s-5); list-style: none; margin: 0; padding: 0; }
.trust__item { display: flex; flex-direction: column; }
.trust__n { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; color: var(--c-ink); line-height: 1; }
.trust__l { font-size: var(--t-micro); color: var(--c-ink-muted); margin-top: 4px; }

.hero__card {
  background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: var(--r-lg); padding: var(--s-5); box-shadow: var(--shadow-lift);
}
.hero__card h2 { font-size: var(--t-h3); margin-bottom: var(--s-2); }
.hero__card .bookform__note { margin-bottom: 0; }


/* ---------- Cards grid ---------- */

.grid { display: grid; gap: var(--s-5); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

.card {
  background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: var(--r-md); overflow: hidden; text-decoration: none; color: inherit;
  display: flex; flex-direction: column;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
              border-color var(--dur) var(--ease);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--c-brand); }
.card__media { aspect-ratio: 4 / 3; background: var(--c-brand-wash); overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__body { padding: var(--s-4) var(--s-5) var(--s-5); flex: 1; }
.card__title { font-size: var(--t-h3); margin-bottom: var(--s-2); }
.card__txt { font-size: var(--t-small); color: var(--c-ink-muted); margin: 0; }

.doc__media { aspect-ratio: 1 / 1; }
.doc__spec { font-size: var(--t-micro); letter-spacing: .06em; text-transform: uppercase; color: var(--c-brand); font-weight: 700; margin-bottom: var(--s-1); display: block; }


/* ---------- Insurance strip ---------- */

.ins { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--s-6); }
.ins img { height: 34px; width: auto; opacity: .62; filter: grayscale(1); transition: opacity var(--dur) var(--ease), filter var(--dur) var(--ease); }
.ins img:hover { opacity: 1; filter: none; }


/* ---------- Booking form ---------- */

.bookform__row { display: grid; gap: var(--s-4); margin-bottom: var(--s-4); }
@media (min-width: 620px) { .bookform__row { grid-template-columns: 1fr 1fr; } }

.field { display: block; margin-bottom: var(--s-4); }
.field__lbl { display: block; font-size: var(--t-small); font-weight: 600; color: var(--c-ink); margin-bottom: var(--s-2); }
.field__opt { font-weight: 400; color: var(--c-ink-muted); font-size: var(--t-micro); }
.field__in {
  width: 100%; font-family: inherit; font-size: 1rem;   /* 16px stops iOS zoom-on-focus */
  padding: var(--s-3) var(--s-4);
  border: 1.5px solid var(--c-line); border-radius: var(--r-sm);
  background: var(--c-surface); color: var(--c-ink);
  min-height: 48px;
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.field__in:focus {
  outline: none; border-color: var(--c-brand);
  box-shadow: 0 0 0 3px var(--c-brand-wash);
}
textarea.field__in { min-height: 92px; resize: vertical; }
.bookform__note { font-size: var(--t-micro); color: var(--c-ink-muted); margin: var(--s-3) 0 0; text-align: center; }


/* ---------- Footer ---------- */

.ftr { background: var(--c-ink); color: rgba(255,255,255,.74); padding-block: var(--s-8) var(--s-5); margin-top: var(--section-y); }
.ftr__grid { display: grid; gap: var(--s-6); }
@media (min-width: 700px) { .ftr__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .ftr__grid { grid-template-columns: 1.3fr 1fr 1fr 1fr; } }
.ftr__logo { width: 52px; height: 52px; object-fit: contain; margin-bottom: var(--s-3); background: #fff; border-radius: var(--r-sm); padding: 4px; }
.ftr__name { font-family: var(--font-display); color: #fff; font-size: 1.05rem; margin-bottom: var(--s-1); }
.ftr__tag { font-size: var(--t-small); margin: 0; }
.ftr__h { font-size: var(--t-micro); letter-spacing: var(--ls-eyebrow); text-transform: uppercase; color: var(--c-accent); font-family: var(--font-body); font-weight: 700; margin-bottom: var(--s-3); }
.ftr__addr { font-size: var(--t-small); margin: 0; }
.ftr__hours { font-size: var(--t-small); margin-bottom: var(--s-3); display: flex; flex-direction: column; }
.ftr__days { color: #fff; font-weight: 600; }
.ftr__link { display: block; color: rgba(255,255,255,.74); text-decoration: none; font-size: var(--t-small); padding-block: var(--s-2); }
.ftr__link:hover { color: #fff; }
.ftr__link--wa { color: var(--c-whatsapp); font-weight: 600; }
.ftr__legal { border-top: 1px solid rgba(255,255,255,.13); margin-top: var(--s-7); padding-top: var(--s-5); display: flex; flex-wrap: wrap; gap: var(--s-3); justify-content: space-between; }
.ftr__lic { display: flex; flex-wrap: wrap; gap: var(--s-4); font-size: var(--t-micro); margin: 0; }
.ftr__copy { font-size: var(--t-micro); margin: 0; }


/* ---------- Mobile action bar (signature) ---------- */

.actionbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 95;
  display: grid; grid-template-columns: repeat(3, 1fr);
  background: color-mix(in srgb, var(--c-surface) 94%, transparent);
  backdrop-filter: blur(14px) saturate(1.5);
  border-top: 1px solid var(--c-line);
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -2px 16px rgba(20,38,31,.07);
}
.actionbar__btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-height: var(--actionbar-h); text-decoration: none;
  font-size: var(--t-micro); font-weight: 600; color: var(--c-ink-soft);
  position: relative;
}
.actionbar__btn + .actionbar__btn::before {
  content: ""; position: absolute; left: 0; top: 22%; bottom: 22%; width: 1px; background: var(--c-line);
}
.actionbar__btn svg { width: 21px; height: 21px; fill: currentColor; }
.actionbar__btn--wa { color: #128C5B; }
.actionbar__btn--book { color: var(--c-brand); }
.actionbar__btn:active { background: var(--c-brand-wash); }
@media (min-width: 900px) { .actionbar { display: none; } }


/* ---------- Desktop WhatsApp float ---------- */

.wafloat {
  position: fixed; right: 24px; bottom: 24px; z-index: 94;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--c-whatsapp); color: #fff;
  display: none; align-items: center; justify-content: center;
  box-shadow: var(--shadow-lift);
  transition: transform var(--dur) var(--ease);
}
.wafloat svg { width: 30px; height: 30px; fill: currentColor; }
.wafloat:hover { transform: scale(1.07); }
@media (min-width: 900px) { .wafloat { display: flex; } }


/* ---------- Scroll reveal ---------- */

.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }


/* ---------- Offer banner (set from the admin page) ---------- */

.offerbar {
  background: var(--c-ink);
  color: #fff;
  font-size: var(--t-small);
  font-weight: 600;
  text-align: center;
}
.offerbar p { margin: 0; padding-block: var(--s-3); }


/* ---------- Inner page hero ---------- */

.phero {
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-line);
  padding-block: clamp(2rem, 1.2rem + 3.5vw, 3.75rem);
}
.phero__t { font-size: var(--t-h1); letter-spacing: -.015em; margin-bottom: var(--s-3); }
.phero__s { font-size: 1.0625rem; color: var(--c-ink-muted); max-width: 56ch; margin: 0; }


/* ---------- Two-column page layout ---------- */

.booklayout { display: grid; gap: var(--s-6); }
@media (min-width: 900px) { .booklayout { grid-template-columns: 1.5fr 1fr; align-items: start; } }

.panel {
  background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: var(--r-lg); padding: var(--s-5); box-shadow: var(--shadow-sm);
}
.aside {
  background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: var(--r-lg); padding: var(--s-5);
}
.aside__h {
  font-family: var(--font-body); font-size: var(--t-micro); font-weight: 700;
  letter-spacing: var(--ls-eyebrow); text-transform: uppercase; color: var(--c-brand);
  margin: var(--s-5) 0 var(--s-2);
}
.aside__h:first-child { margin-top: 0; }
.aside__phone { display: block; font-size: 1.0625rem; font-weight: 600; color: var(--c-ink);
  text-decoration: none; padding-block: var(--s-2); }
.aside__phone:hover { color: var(--c-brand); }
.aside__hours { font-size: var(--t-small); margin-bottom: var(--s-3); }
.aside__addr { font-size: var(--t-small); margin-bottom: var(--s-4); }

.mapbox { border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--c-line); }


/* ---------- Doctor detail ---------- */

.back-link { display: inline-block; font-size: var(--t-small); margin-bottom: var(--s-5); text-decoration: none; }
.docpage { display: grid; gap: var(--s-6); }
@media (min-width: 800px) { .docpage { grid-template-columns: 360px 1fr; align-items: start; gap: var(--s-8); } }
.docpage__img {
  width: 100%; aspect-ratio: 1/1; object-fit: cover;
  border-radius: var(--r-lg); background: var(--c-brand-wash); box-shadow: var(--shadow-md);
}
.meta { list-style: none; margin: 0 0 var(--s-5); padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-6); }
.meta li { display: flex; flex-direction: column; }
.meta span { font-size: var(--t-micro); color: var(--c-ink-muted); text-transform: uppercase; letter-spacing: .08em; }
.meta strong { color: var(--c-ink); font-size: 1.05rem; }

.certs { margin-top: var(--s-8); padding-top: var(--s-6); border-top: 1px solid var(--c-line); }
.certs__list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); }
@media (min-width: 760px) { .certs__list { grid-template-columns: 1fr 1fr; gap: var(--s-3) var(--s-6); } }
.certs__list li {
  position: relative; padding-left: var(--s-5); font-size: var(--t-small); color: var(--c-ink-soft);
}
.certs__list li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: 7px; height: 7px; border-radius: 50%; background: var(--c-accent);
}


/* ---------- About page ---------- */

.prose { max-width: var(--maxw-text); }
.stats { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-top: var(--s-8); }
.stat {
  background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: var(--r-md); padding: var(--s-5); text-align: center;
}
.stat__n { display: block; font-family: var(--font-display); font-size: 2.1rem; font-weight: 700; color: var(--c-brand); line-height: 1; }
.stat__l { display: block; font-size: var(--t-micro); color: var(--c-ink-muted); margin-top: var(--s-2); }

.licard {
  background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: var(--r-md); padding: var(--s-4) var(--s-5);
}
.licard__k { display: block; font-size: var(--t-micro); letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase; color: var(--c-brand); font-weight: 700; }
.licard__v { display: block; font-family: ui-monospace, monospace; color: var(--c-ink); margin-top: var(--s-1); }


/* ---------- Band CTA ---------- */

.band { display: flex; gap: var(--s-5); align-items: center; flex-wrap: wrap; }
.band > div { flex: 1; min-width: 260px; }
.band h2 { margin-bottom: var(--s-2); }
.band .lede { margin: 0; }


/* ---------- Gallery ---------- */

.filters { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-bottom: var(--s-6); }
.chip {
  font: inherit; font-size: var(--t-small); font-weight: 600;
  padding: var(--s-2) var(--s-4); min-height: 40px;
  border: 1.5px solid var(--c-line); border-radius: var(--r-pill);
  background: var(--c-surface); color: var(--c-ink-soft); cursor: pointer;
  transition: all var(--dur-fast) var(--ease);
}
.chip:hover { border-color: var(--c-brand); color: var(--c-brand); }
.chip.is-on { background: var(--c-brand); border-color: var(--c-brand); color: #fff; }

.gal { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.gal__i { margin: 0; border-radius: var(--r-md); overflow: hidden; background: var(--c-surface); border: 1px solid var(--c-line); }
.gal__i img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.gal__i figcaption { font-size: var(--t-micro); color: var(--c-ink-muted); padding: var(--s-3); }
.gal__i[hidden] { display: none; }

.empty-state {
  background: var(--c-surface); border: 1px dashed var(--c-line);
  border-radius: var(--r-lg); padding: var(--s-8) var(--s-5); text-align: center;
}
.empty-state p { max-width: 48ch; margin: 0 auto var(--s-5); color: var(--c-ink-muted); }
