/* Al Quddus Medical Centre — palette lifted from the logo mark.
   Green carries the brand, blue carries structure, red is reserved for
   emergencies and nothing else. */

:root {
  --leaf: #14a03a;
  --leaf-deep: #0a6b27;
  --leaf-wash: #eaf6ec;
  --sky: #1e6fd9;
  --navy: #0b3e96;
  --cross: #e31b23;

  --ink: #12241a;
  --muted: #5b6b60;
  --line: #dde6df;
  --mist: #f4f8f4;
  --paper: #ffffff;

  --shell: min(1180px, 92vw);
  --radius: 14px;
  --shadow: 0 2px 4px rgba(18, 36, 26, .04), 0 12px 32px rgba(18, 36, 26, .07);

  --display: "Archivo", system-ui, sans-serif;
  --body: "Inter", system-ui, sans-serif;
}

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

body {
  margin: 0;
  font-family: var(--body);
  color: var(--ink);
  background: var(--paper);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -.02em;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.35rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1rem; }
a { color: var(--navy); }

img { max-width: 100%; display: block; }

.shell { width: var(--shell); margin-inline: auto; }
.section { padding: 76px 0; }
.section--mist { background: var(--mist); }

:focus-visible {
  outline: 3px solid var(--sky);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- eyebrow: the arc device from the logo's cradling hand ---------- */
.eyebrow {
  display: flex;
  align-items: center;
  gap: .7rem;
  font-family: var(--display);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--leaf-deep);
  margin-bottom: .9rem;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 13px;
  border: 2.5px solid var(--leaf);
  border-top: none;
  border-radius: 0 0 26px 26px;
  flex: none;
}

.section-head { max-width: 620px; margin-bottom: 2.6rem; }
.section-head p { color: var(--muted); margin: 0; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .82rem 1.5rem;
  border-radius: 100px;
  font-family: var(--display);
  font-weight: 700;
  font-size: .95rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--leaf { background: var(--leaf); color: #fff; }
.btn--leaf:hover { background: var(--leaf-deep); }
.btn--navy { background: var(--navy); color: #fff; }
.btn--ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn--ghost:hover { border-color: var(--leaf); color: var(--leaf-deep); }
.btn--urgent { background: var(--cross); color: #fff; }
.btn--sm { padding: .5rem 1rem; font-size: .85rem; }

/* ---------- header ---------- */
.topbar {
  background: var(--navy);
  color: #cfe0ff;
  font-size: .82rem;
}
.topbar .shell {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: .55rem 0; flex-wrap: wrap;
}
.topbar a { color: #fff; text-decoration: none; }
.topbar .urgent { color: #ffd7d8; font-weight: 600; }

.masthead {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.masthead .shell {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: .7rem 0;
}
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: inherit; }
.brand img { height: 52px; width: auto; }
.brand strong {
  font-family: var(--display); font-weight: 800; font-size: 1.02rem;
  letter-spacing: -.01em; display: block; line-height: 1.15;
}
.brand span { font-size: .72rem; color: var(--muted); font-style: italic; }

.nav { display: flex; align-items: center; gap: 1.6rem; }
.nav a {
  text-decoration: none; color: var(--ink); font-weight: 500; font-size: .93rem;
  padding: .35rem 0; border-bottom: 2px solid transparent;
}
.nav a:hover, .nav a.is-active { border-bottom-color: var(--leaf); color: var(--leaf-deep); }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--line);
  border-radius: 8px; padding: .5rem .7rem; font-size: 1.1rem; cursor: pointer;
}

/* ---------- hero ---------- */
.hero { position: relative; background: var(--leaf-wash); overflow: hidden; }
.hero .shell {
  display: grid; grid-template-columns: 1.05fr .95fr;
  gap: 3rem; align-items: center; padding: 72px 0 110px;
}
.hero h1 { color: var(--ink); }
.hero h1 em { font-style: normal; color: var(--leaf-deep); }
.hero .lede { font-size: 1.09rem; color: var(--muted); max-width: 46ch; }
.hero .cta-row { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.6rem; }
.hero-figure {
  border-radius: 200px 200px var(--radius) var(--radius);
  overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 4/5;
}
.hero-figure img { width: 100%; height: 100%; object-fit: cover; }

/* the cradle: an arc echoing the hand beneath the logo bowl */
.cradle { display: block; width: 100%; height: 60px; margin-top: -60px; position: relative; }

.hero-stats {
  display: flex; gap: 2.2rem; margin-top: 2.4rem; flex-wrap: wrap;
  border-top: 1px solid rgba(10,107,39,.18); padding-top: 1.4rem;
}
.hero-stats div strong {
  display: block; font-family: var(--display); font-size: 1.6rem; color: var(--leaf-deep);
}
.hero-stats div span { font-size: .84rem; color: var(--muted); }

/* ---------- cards ---------- */
.grid { display: grid; gap: 1.5rem; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color .18s ease, transform .18s ease;
}
.card:hover { border-color: var(--leaf); transform: translateY(-3px); }
.card__media { aspect-ratio: 16/11; background: var(--mist); }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__body { padding: 1.2rem 1.3rem 1.4rem; flex: 1; }
.card__body h3 { margin-bottom: .35rem; }
.card__body p { color: var(--muted); font-size: .92rem; margin: 0; }
.card a.stretched { text-decoration: none; color: inherit; }

.facility {
  display: flex; gap: 1rem; padding: 1.2rem;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper);
}
.facility .mark {
  flex: none; width: 46px; height: 46px; border-radius: 12px;
  background: var(--leaf-wash); color: var(--leaf-deep);
  display: grid; place-items: center; font-size: 1.3rem;
}
.facility h3 { font-size: 1.02rem; margin-bottom: .2rem; }
.facility p { font-size: .89rem; color: var(--muted); margin: 0; }

.doctor__photo { aspect-ratio: 1; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; background: var(--mist); }
.doctor__photo img { width: 100%; height: 100%; object-fit: cover; }
.tag {
  display: inline-block; font-size: .72rem; font-weight: 600;
  background: var(--leaf-wash); color: var(--leaf-deep);
  padding: .2rem .6rem; border-radius: 100px; margin: .15rem .2rem 0 0;
}

/* ---------- gallery ---------- */
.tiles { columns: 3; column-gap: 1rem; }
.tiles figure { break-inside: avoid; margin: 0 0 1rem; border-radius: var(--radius); overflow: hidden; position: relative; }
.tiles img { width: 100%; }
.tiles figcaption {
  position: absolute; inset: auto 0 0 0; padding: .8rem;
  background: linear-gradient(transparent, rgba(11,62,150,.85));
  color: #fff; font-size: .84rem;
}

/* ---------- forms ---------- */
.field {
  width: 100%; padding: .72rem .9rem; font: inherit; font-size: .95rem;
  border: 1.5px solid var(--line); border-radius: 10px; background: var(--paper);
}
.field:focus { border-color: var(--leaf); outline: none; box-shadow: 0 0 0 3px rgba(20,160,58,.15); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.form-row { display: flex; flex-direction: column; gap: .35rem; }
.form-row label { font-size: .86rem; font-weight: 600; }
.form-row .help { font-size: .8rem; color: var(--muted); }
.form-row.full { grid-column: 1 / -1; }
.errorlist { color: var(--cross); font-size: .84rem; margin: .2rem 0 0; padding-left: 1rem; }
.check { display: flex; gap: .6rem; align-items: flex-start; font-size: .9rem; }
.check input { margin-top: .3rem; }

.panel {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.8rem; box-shadow: var(--shadow);
}

/* ---------- tables ---------- */
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th {
  text-align: left; font-family: var(--display); font-size: .76rem;
  letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
  padding: .7rem .8rem; border-bottom: 2px solid var(--line);
}
.table td { padding: .8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tbody tr:hover { background: var(--mist); }

.pill { font-size: .74rem; font-weight: 700; padding: .22rem .65rem; border-radius: 100px; }
.pill--PENDING { background: #fff4d6; color: #8a5b00; }
.pill--CONFIRMED { background: var(--leaf-wash); color: var(--leaf-deep); }
.pill--CANCELLED { background: #fde8e9; color: var(--cross); }
.pill--COMPLETED { background: #e6efff; color: var(--navy); }

/* ---------- messages ---------- */
.flash { padding: .85rem 1.1rem; border-radius: 10px; margin-bottom: 1rem; font-size: .93rem; }
.flash.success { background: var(--leaf-wash); color: var(--leaf-deep); }
.flash.error { background: #fde8e9; color: var(--cross); }
.flash.info { background: #e6efff; color: var(--navy); }

/* ---------- staff area ---------- */
.staffbar { background: var(--navy); color: #fff; }
.staffbar .shell { display: flex; gap: 1.4rem; padding: .6rem 0; flex-wrap: wrap; align-items: center; }
.staffbar a { color: #cfe0ff; text-decoration: none; font-size: .9rem; }
.staffbar a:hover, .staffbar a.is-active { color: #fff; }
.staffbar .spacer { margin-left: auto; }

.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; margin-bottom: 2rem; }
.stat { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem; }
.stat strong { display: block; font-family: var(--display); font-size: 2rem; color: var(--navy); }
.stat span { font-size: .85rem; color: var(--muted); }

/* ---------- whatsapp ---------- */
.whatsapp {
  position: fixed; right: 20px; bottom: 20px; z-index: 60;
  width: 58px; height: 58px; border-radius: 50%;
  background: #25d366; display: grid; place-items: center;
  box-shadow: 0 6px 20px rgba(0,0,0,.22);
}
.whatsapp svg { width: 30px; height: 30px; fill: #fff; }

/* ---------- footer ---------- */
.footer { background: var(--ink); color: #c3d2c7; padding: 60px 0 28px; font-size: .92rem; }
.footer h4 { color: #fff; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; }
.footer a { color: #c3d2c7; text-decoration: none; display: block; padding: .18rem 0; }
.footer a:hover { color: var(--leaf); }
.footer .cols { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 2.4rem; }
.footer .base {
  margin-top: 2.6rem; padding-top: 1.3rem; border-top: 1px solid rgba(255,255,255,.12);
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .84rem;
}

/* ---------- coming soon ---------- */
.soon {
  min-height: 100vh; display: grid; place-items: center; text-align: center;
  background: var(--leaf-wash); padding: 2rem;
}
.soon img { height: 130px; margin: 0 auto 1.6rem; }
.soon .panel { max-width: 540px; }
.soon .dots { display: flex; gap: .45rem; justify-content: center; margin-top: 1.6rem; }
.soon .dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--leaf); opacity: .3; animation: pulse 1.4s infinite; }
.soon .dots i:nth-child(2) { animation-delay: .2s; }
.soon .dots i:nth-child(3) { animation-delay: .4s; }
@keyframes pulse { 0%,100% { opacity: .25; } 50% { opacity: 1; } }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero .shell { grid-template-columns: 1fr; padding-bottom: 80px; }
  .hero-figure { aspect-ratio: 16/10; border-radius: var(--radius); }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .tiles { columns: 2; }
  .footer .cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; gap: 0; padding: .5rem 4vw 1rem;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: .7rem 0; border-bottom: 1px solid var(--line); }
  .nav-toggle { display: block; }
  .masthead .shell { position: relative; }
  .grid--3, .grid--4, .grid--2, .form-grid, .stat-row { grid-template-columns: 1fr; }
  .tiles { columns: 1; }
  .footer .cols { grid-template-columns: 1fr; }
  .section { padding: 52px 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
