/* Public website for hospitals and the SaaS homepage. Colour comes from settings via --brand. */
:root {
  --brand: #0B6E99;
  --ink: #14212B;
  --ink-soft: #4A5A66;
  --paper: #FFFFFF;
  --mist: #F2F6F8;
  --line: #DCE3E8;
  --brand-wash: color-mix(in srgb, var(--brand) 9%, white);
  --radius: 10px;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); color: var(--ink); background: var(--paper); font-size: var(--base-size, 17px); line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, white); outline-offset: 2px; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: var(--heading-weight, 600); line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; max-width: 68ch; }
.wrap { width: min(var(--container, 1120px), 100% - 2.5rem); margin-inline: auto; }
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section + .section { border-top: 1px solid var(--line); }
.section.tinted { background: var(--mist); border-top: 0; }
.muted { color: var(--ink-soft); }

/* Emergency strip: the one thing a patient may need in a hurry */
.emergency { background: var(--dark, var(--ink)); color: #fff; font-size: .95rem; }
.emergency .wrap { display: flex; gap: 1.5rem; justify-content: space-between; align-items: center; padding: .5rem 0; flex-wrap: wrap; }
.emergency a { color: #fff; font-weight: 700; text-decoration: none; }

header.top { border-bottom: 1px solid var(--line); background: var(--paper); position: relative; top: 0; z-index: 50; transition: background .25s, box-shadow .25s; }
header.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 0; }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--ink); }
.brand img { height: 44px; width: auto; }
.brand strong { font-family: var(--serif); font-size: 1.3rem; }
nav.menu { display: flex; gap: 1.4rem; align-items: center; flex-wrap: wrap; }
nav.menu a { color: var(--ink); text-decoration: none; font-weight: 500; }
nav.menu a:hover { color: var(--brand); }
.btn { display: inline-block; background: var(--brand); color: #fff; border: 0; border-radius: var(--radius); padding: .8rem 1.3rem; font: 600 1rem var(--sans); text-decoration: none; cursor: pointer; }
.btn:hover { filter: brightness(1.08); }
/* Header button keeps white text on hover (the menu link hover colour must not turn it brand-on-brand). */
nav.menu a.btn, nav.menu a.btn:hover, a.btn:hover { color: #fff; }
nav.menu a.btn.ghost, a.btn.ghost:hover { color: var(--brand); }
.btn.ghost { background: transparent; color: var(--brand); box-shadow: inset 0 0 0 2px var(--brand); }

/* Hero */
.hero { padding: clamp(3rem, 8vw, 6rem) 0; background: linear-gradient(180deg, var(--brand-wash), var(--paper)); }
.hero .grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 3rem; align-items: center; }
.hero p.lead { font-size: 1.2rem; color: var(--ink-soft); }
.hero img { border-radius: 18px; aspect-ratio: 4 / 3.4; object-fit: cover; width: 100%; }
.hero .actions { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.5rem; }

/* Lists instead of identical cards */
.rows { display: grid; gap: 0; border-top: 1px solid var(--line); }
.rows > * { border-bottom: 1px solid var(--line); padding: 1.2rem 0; }
.cols-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 3rem; }
.cols-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.stat { font-family: var(--serif); font-size: clamp(2.2rem, 5vw, 3.2rem); color: var(--brand); line-height: 1; }

.doctor { display: grid; grid-template-columns: 88px 1fr; gap: 1.1rem; align-items: center; text-decoration: none; color: var(--ink); }
.doctor img, .doctor .initials { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; background: var(--brand-wash); display: grid; place-items: center; font: 600 1.6rem var(--serif); color: var(--brand); }
.doctor .spec { color: var(--brand); font-weight: 600; font-size: .95rem; }

.dept { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.dept a { font-weight: 600; text-decoration: none; }

details { border-bottom: 1px solid var(--line); padding: 1rem 0; }
details summary { cursor: pointer; font-weight: 600; font-size: 1.05rem; }

blockquote { margin: 0; padding-left: 1.2rem; border-left: 3px solid var(--brand); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .8rem; }
.gallery img { border-radius: var(--radius); aspect-ratio: 4/3; object-fit: cover; width: 100%; }

/* Forms */
form.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: clamp(1.2rem, 3vw, 2rem); }
.field { display: grid; gap: .35rem; margin-bottom: 1rem; }
.field label { font-weight: 600; font-size: .95rem; }
.field input, .field select, .field textarea { font: inherit; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; width: 100%; }
.field .error, .error { color: #B42318; font-size: .9rem; }
.notice { background: var(--brand-wash); border-radius: var(--radius); padding: 1rem 1.2rem; margin-bottom: 1rem; }
.hp { position: absolute; left: -9999px; }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.2rem; align-items: start; }
.plan { border: 1px solid var(--line); border-radius: 16px; padding: 1.6rem; }
.plan.featured { border: 2px solid var(--brand); }
.plan .price { font-family: var(--serif); font-size: 2.3rem; }
.plan ul { padding-left: 1.1rem; }

footer.bottom { background: var(--dark, var(--ink)); color: #D5DEE5; padding: 3.5rem 0 1.5rem; margin-top: 0; }
footer.bottom a { color: #fff; }
footer.bottom .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 2rem; }
footer.bottom .grid > div:first-child { grid-column: span 2; }

.map iframe { width: 100%; height: 340px; border: 0; border-radius: var(--radius); }

/* Theme: header styles */
.hdr-sticky header.top { position: sticky; }
.hdr-dark header.top { background: var(--dark); border-color: transparent; }
.hdr-brand header.top { background: var(--brand); border-color: transparent; }
.hdr-dark header.top .brand, .hdr-dark nav.menu a:not(.btn), .hdr-brand header.top .brand, .hdr-brand nav.menu a:not(.btn) { color: #fff; }
.hdr-dark nav.menu a:not(.btn):hover, .hdr-brand nav.menu a:not(.btn):hover { color: #fff; opacity: .8; }
.hdr-brand nav.menu a.btn { background: #fff; color: var(--brand) !important; }
.hdr-transparent header.top { position: absolute; left: 0; right: 0; background: transparent; border-color: transparent; }
.hdr-transparent.hdr-sticky header.top { position: fixed; }
.hdr-transparent header.top .brand, .hdr-transparent nav.menu a:not(.btn) { color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.25); }
.hdr-transparent header.top.scrolled { background: var(--paper); box-shadow: 0 4px 20px rgba(0,0,0,.08); }
.hdr-transparent header.top.scrolled .brand, .hdr-transparent header.top.scrolled nav.menu a:not(.btn) { color: var(--ink); text-shadow: none; }
.hdr-sticky header.top.scrolled { box-shadow: 0 4px 20px rgba(0,0,0,.08); }
header.top.hdr-layout-centered .wrap { flex-direction: column; gap: .6rem; }
.gp-menu-toggle, .gp-burger { display: none; }

/* Theme: footer styles */
.ftr-name { font-family: var(--serif); font-size: 1.3rem; color: #fff; display: block; margin-bottom: .6rem; }
.ftr-title { display: block; color: #fff; margin-bottom: .7rem; font-size: .95rem; letter-spacing: .04em; text-transform: uppercase; }
footer.bottom p { margin: 0 0 .5rem; }
footer.bottom a { text-decoration: none; }
footer.bottom a:hover { text-decoration: underline; }
.ftr-copy { border-top: 1px solid rgba(255,255,255,.12); margin-top: 2.5rem; padding-top: 1.2rem; font-size: .9rem; opacity: .8; }
footer.ftr-light { background: var(--mist); color: var(--ink-soft); }
footer.ftr-light a, footer.ftr-light .ftr-name, footer.ftr-light .ftr-title { color: var(--ink); }
footer.ftr-light .ftr-copy { border-color: var(--line); }
footer.ftr-brand { background: var(--brand); color: rgba(255,255,255,.85); }

@media (max-width: 860px) {
  .hero .grid, .cols-2, .cols-3, footer.bottom .grid { grid-template-columns: 1fr; }
  footer.bottom .grid > div:first-child { grid-column: auto; }
  header.top .wrap { flex-wrap: wrap; }
  .gp-burger { display: flex; flex-direction: column; gap: 5px; cursor: pointer; padding: .4rem; margin-left: auto; }
  .gp-burger span { width: 24px; height: 2px; background: currentColor; display: block; }
  .hdr-dark .gp-burger, .hdr-brand .gp-burger, .hdr-transparent .gp-burger { color: #fff; }
  nav.menu { display: none; width: 100%; flex-direction: column; align-items: flex-start; gap: .2rem; padding: .5rem 0 1rem; }
  nav.menu a { padding: .5rem 0; }
  .gp-menu-toggle:checked ~ nav.menu { display: flex; }
  .hdr-transparent .gp-menu-toggle:checked ~ nav.menu { background: var(--dark); margin: 0 -1.25rem; padding: .5rem 1.25rem 1rem; width: calc(100% + 2.5rem); }
  header.top.hdr-layout-centered .wrap { flex-direction: row; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
