/* ── GOOGLE FONTS ──
   DM Sans is loaded via <link rel="preconnect"> + <link rel="stylesheet"> in each
   page's <head> (not @import here) so it isn't render-blocked behind this CSS file. */

/* ── RESET ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── CSS VARIABLES ── */
:root {
  --red: #ee4239;
  --red-dark: #d93c34;
  /* Button fill: a touch darker than brand --red so white text on it meets WCAG
     AA (4.5:1). --red stays the brand colour for decorative use (borders, chips,
     icons) where contrast rules don't apply. */
  --red-btn: #d6342b;
  --red-btn-dark: #c12d24;
  --red-light: #fdeceb;
  --red-mid: #fac4c2;
  --red-text: #a92f28;
  --ink: #1a1a1a;
  --ink-soft: #555;
  /* #717171 = 4.88:1 on white (passes AA); was #999 (2.84:1, failed). */
  --ink-mute: #717171;
  --border: #e8e8e8;
  --font: "DM Sans", sans-serif;
}

/* ── BASE ── */
html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: #fff;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  /* guard against incidental horizontal scroll (full-bleed marquees, wide tracks) */
  overflow-x: hidden;
  /* Sticky footer: fill at least the viewport so a short page still pushes the
     footer to the bottom (the footer uses margin-top:auto below). */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── NAV ── */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 48px;
  border-bottom: 1px solid var(--border);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.nav-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.15s;
}
.nav-back:hover {
  color: var(--ink);
}
.nav-back svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  padding: 9px 20px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--red-btn);
  color: #fff;
  border: 1px solid var(--red-btn);
}
.btn-primary:hover {
  background: var(--red-btn-dark);
  border-color: var(--red-btn-dark);
}
.btn-outline {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--border);
}
.btn-outline:hover {
  border-color: #ccc;
  background: #fafafa;
}
.btn svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.btn-primary svg {
  stroke: #fff;
}
/* Filled store glyphs (Google Play / Apple) in a button, overriding the
   stroked-icon style above. */
.btn svg.store-icon {
  fill: currentColor;
  stroke: none;
}
/* The browser's own [hidden] rule only covers HTML elements, not <svg>. */
.btn svg[hidden] {
  display: none;
}

/* ── FOOTER ──
   The bar (border + background) spans full width; an inner wrapper caps and
   centres the content so the logo and contact line up with the page content
   instead of being stranded at the viewport edges on the narrower
   doctor/clinic/category pages. */
.footer {
  border-top: 1px solid var(--border);
  padding: 28px 48px;
  background: #fff;
  display: flex;
  justify-content: center;
  margin-top: auto; /* push to viewport bottom when content is short */
}
.footer-inner {
  width: 100%;
  max-width: 1100px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px 24px;
}
.footer-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.footer-tagline {
  font-size: 10px;
  color: var(--ink-mute);
  letter-spacing: 0.14em;
  margin-top: 4px;
}
.footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.footer-contact {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.footer-link {
  font-size: 13px;
  color: var(--ink-soft);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
}
.footer-link:hover {
  color: var(--red);
}
.footer-link svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.footer-copy {
  font-size: 12px;
  color: var(--ink-mute);
}
/* Registered legal entity, under the logo in the LEFT column - the brand mark
   and the company that owns it belong together, and it fills space that was
   empty rather than dangling a third line off the copyright. .footer-left is
   already a column flex, so this block cannot reflow the contact/copy lines
   opposite it. Two tiers so it reads as an attribution, not a caption: a small
   uppercase eyebrow (same letter-spaced idiom as .footer-tagline) over the
   entity name in stronger ink. The hairline rule ties the block to the logo. */
.footer-legal {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  /* Match the logo's width so the rule reads as underlining the mark rather
     than running the full column; the name sets the floor if it is wider. */
  min-width: 100px;
  align-self: flex-start;
}
.footer-legal-eyebrow {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-mute);
}
.footer-legal-name {
  font-size: 12px;
  color: var(--ink-soft);
  line-height: 1.35;
}
/* Legal links sit on their OWN line above the copyright (.footer-right is a
   column flex, so these are two separate rows). The middot separators are
   rendered as CSS pseudo-elements rather than &middot; in the markup, so a
   wrapped line never starts or ends with a stranded dot on a narrow screen. */
.footer-legal-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 8px;
  font-size: 12px;
}
.footer-legal-links a + a::before {
  content: "\00b7";
  margin-right: 8px;
  color: var(--ink-mute);
}
.footer-copy-link {
  color: var(--ink-mute);
  text-decoration: none;
}
.footer-copy-link:hover {
  color: var(--red);
}

/* ── SHARED RESPONSIVE (nav + footer) ──
   These live here, not in a page CSS, so the shared {{nav}}/{{footer}} adapt on
   every page - programmatic pages included. */

@media (max-width: 768px) {
  .nav {
    padding: 14px 20px;
  }
  .nav-actions {
    gap: 8px;
  }
  /* Smaller, tighter buttons so logo + actions fit a phone width. */
  .nav-actions .btn {
    padding: 8px 14px;
    font-size: 12.5px;
  }
  /* Footer stacks: logo above the contact/copy, left-aligned. */
  .footer {
    padding: 24px 20px;
  }
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }
  .footer-contact {
    justify-content: flex-start;
  }
}

@media (max-width: 540px) {
  /* On a phone the logo + "Get the app" are the priority; drop the two outline
     buttons (Find Doctors / List your clinic) - both reachable from the page. */
  .nav-actions .btn-outline {
    display: none;
  }
}

@media (max-width: 420px) {
  /* Narrow phones: 16px side margins, matching the page content (related.css). */
  .nav {
    padding-left: 16px;
    padding-right: 16px;
  }
  .footer {
    padding-left: 16px;
    padding-right: 16px;
  }
}
