/* =====================================================================
   BORÅS DIAGNOSTIK – STILMALL
   Färger och mått samlas i variablerna nedan.
   ===================================================================== */

:root {
  /* Grafisk profil */
  --ink: #344f75;          /* mörkblå – rubriker, text */
  --sky: #298cce;          /* klarblå – knappar, detaljer */
  --sky-hover: #2079b5;
  --sky-text: #1f72aa;     /* klarblå mörkad för länktext (WCAG AA) */
  --mist: #cacad6;         /* ljus blågrå – avdelare */

  /* Kompletterande ljusa toner */
  --white: #ffffff;
  --tint: #f4f6f9;
  --tint-2: #eaeef4;
  --line: #dde2ea;
  --muted: #56688a;

  --radius-lg: 20px;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(52, 79, 117, .05), 0 8px 24px -12px rgba(52, 79, 117, .18);

  --header-h: 84px;
  --container: 1160px;
  --font: "Manrope", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;

  color-scheme: light;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px));
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.125rem;          /* 18 px – lättläst för alla åldrar */
  line-height: 1.65;
  font-feature-settings: "kern", "liga";
  -webkit-font-smoothing: antialiased;
}

body::before {   /* fyller ytan bakom mobilens statusfält */
  content: ""; position: fixed; inset: 0 0 auto; z-index: 60;
  height: env(safe-area-inset-top, 0px);
  background: var(--white);
}

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

h1, h2, h3 { margin: 0; color: var(--ink); line-height: 1.15; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.6rem, 5.6vw, 4.25rem); font-weight: 800; letter-spacing: -0.035em; }
h2 { font-size: clamp(2rem, 3.4vw, 2.75rem); font-weight: 800; letter-spacing: -0.03em; }
h3 { font-size: 1.375rem; font-weight: 700; }
p  { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--sky-text); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }

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

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--ink); color: var(--white); padding: 12px 18px; border-radius: var(--radius-sm);
  font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: calc(12px + env(safe-area-inset-top, 0px)); color: var(--white); }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: max(24px, env(safe-area-inset-left, 0px));
  padding-right: max(24px, env(safe-area-inset-right, 0px));
}
.container-narrow { max-width: 880px; }

/* ---------- Knappar ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 56px;
  padding: 0 28px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 1.1875rem;  /* 19 px fet = stor text enligt WCAG */
  font-weight: 700;
  letter-spacing: -0.005em;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn-primary { background: var(--sky); color: var(--white); }
.btn-primary:hover { background: var(--sky-hover); color: var(--white); }
.btn-secondary { background: var(--white); color: var(--ink); border-color: var(--mist); }
.btn-secondary:hover { border-color: var(--ink); color: var(--ink); }
.btn-small { min-height: 48px; padding: 0 22px; font-size: 1.1875rem; }

.text-link { font-weight: 700; }

/* =====================================================================
   HEADER
   ===================================================================== */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand { display: block; flex: none; border-radius: 6px; }
.brand-logo { height: 66px; width: auto; }

.main-nav { display: flex; align-items: center; gap: 28px; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.main-nav ul a {
  display: block;
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--ink);
  font-weight: 600;
  font-size: 1.0625rem;
  text-decoration: none;
  transition: background-color .15s ease;
}
.main-nav ul a:hover { background: var(--tint-2); color: var(--ink); }
.main-nav ul a[aria-current="true"] { background: var(--tint-2); }

.nav-phone {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--mist);
  color: var(--ink);
  font-weight: 700;
  font-size: 1.0625rem;
  text-decoration: none;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.nav-phone:hover { border-color: var(--ink); color: var(--ink); }
.nav-phone svg { width: 18px; height: 18px; fill: none; stroke: var(--sky); stroke-width: 1.8; stroke-linejoin: round; }

.menu-toggle {
  display: none;
  align-items: center; gap: 10px;
  min-height: 48px; padding: 0 16px;
  border: 1.5px solid var(--mist); border-radius: 999px;
  background: var(--white); color: var(--ink);
  font: 700 1.0625rem/1 var(--font);
  cursor: pointer;
}
.menu-toggle-bars, .menu-toggle-bars::before, .menu-toggle-bars::after {
  display: block; width: 20px; height: 2px; background: var(--ink); border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.menu-toggle-bars { position: relative; }
.menu-toggle-bars::before, .menu-toggle-bars::after { content: ""; position: absolute; left: 0; }
.menu-toggle-bars::before { top: -6px; }
.menu-toggle-bars::after  { top: 6px; }
.menu-toggle[aria-expanded="true"] .menu-toggle-bars { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle-bars::after  { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 960px) {
  :root { --header-h: 72px; }
  .brand-logo { height: 56px; }
  .menu-toggle { display: inline-flex; }
  .main-nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 16px;
    padding: 12px max(24px, env(safe-area-inset-right, 0px)) 24px max(24px, env(safe-area-inset-left, 0px));
    background: var(--white);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 32px -20px rgba(52, 79, 117, .35);
  }
  .main-nav.is-open { display: flex; }
  .main-nav ul { flex-direction: column; gap: 0; }
  .main-nav ul li + li { border-top: 1px solid var(--line); }
  .main-nav ul a { padding: 16px 4px; border-radius: 0; font-size: 1.1875rem; }
  .main-nav ul a:hover, .main-nav ul a[aria-current="true"] { background: none; color: var(--sky-text); }
  .nav-phone { justify-content: center; min-height: 56px; font-size: 1.1875rem; }
}

/* =====================================================================
   HERO
   ===================================================================== */
.hero {
  background: var(--tint);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  align-items: center;
  gap: 48px;
  padding-top: clamp(56px, 9vw, 112px);
  padding-bottom: clamp(56px, 9vw, 112px);
}
.hero-sub {
  margin: 18px 0 0;
  font-size: clamp(1.3rem, 2.2vw, 1.625rem);
  font-weight: 600;
  line-height: 1.3;
  color: var(--sky-text);
  letter-spacing: -0.01em;
}
.hero-intro {
  margin: 24px 0 0;
  max-width: 34em;
  font-size: 1.1875rem;
  color: var(--ink);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }

.hero-facts {
  display: flex; flex-wrap: wrap; gap: 12px 40px;
  margin: 44px 0 0; padding: 22px 0 0;
  border-top: 1px solid var(--mist);
}
.hero-facts dt { font-size: .9375rem; color: var(--muted); font-weight: 600; }
.hero-facts dd { margin: 2px 0 0; font-weight: 700; }
.hero-facts a { color: var(--ink); text-decoration-color: var(--mist); text-decoration-thickness: 2px; }
.hero-facts a:hover { text-decoration-color: var(--sky); }

.hero-visual {
  position: relative;
  aspect-ratio: 1;
  width: 100%;
  max-width: 500px;
  justify-self: end;
  display: grid; place-items: center;
}
.echo { position: absolute; inset: 0; width: 100%; height: 100%; }
.ring { stroke: var(--mist); stroke-width: 1.25; }
.ring.r1 { stroke: #b9c6d8; }
.ring.r3, .ring.r4 { stroke-dasharray: 2 7; }
.arc { stroke: var(--sky); stroke-width: 3; opacity: .55; }
.arc.a2 { opacity: .3; }
.arc.a3 { stroke: var(--ink); opacity: .18; stroke-width: 2; }
.hero-logo-plate {
  position: relative;
  width: 44%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--white);
  box-shadow: var(--shadow), 0 0 0 10px rgba(255, 255, 255, .6);
  display: grid; place-items: center;
}
.hero-logo-plate img { width: 64%; }

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
}
@media (max-width: 480px) {
  .hero-actions .btn { width: 100%; }
}

/* =====================================================================
   SEKTIONER
   ===================================================================== */
.section { padding: clamp(72px, 10vw, 128px) 0; }
.section-white { background: var(--white); }
.section-tint  { background: var(--tint); }

.section-head { max-width: 46rem; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head-center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 + .lead { margin-top: 18px; }
.lead { font-size: 1.25rem; line-height: 1.6; color: var(--muted); max-width: 40em; }

/* ---------- Om oss ---------- */
.doctor {
  display: grid;
  grid-template-columns: minmax(220px, 360px) 1fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
.doctor-photo {
  margin: 0;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--tint);
  border: 1px solid var(--line);
}
.doctor-photo img { width: 100%; height: 100%; object-fit: cover; }
.photo-placeholder {
  height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  padding: 24px;
  text-align: center;
  color: var(--muted);
  font-size: 1rem; font-weight: 600;
  background:
    repeating-linear-gradient(135deg, transparent 0 14px, rgba(202, 202, 214, .28) 14px 15px),
    var(--tint);
}
.photo-placeholder svg { width: 56px; height: 56px; stroke: var(--mist); fill: none; stroke-width: 1.5; }

.doctor-name { font-size: clamp(1.75rem, 3vw, 2.25rem); font-weight: 800; letter-spacing: -0.025em; }
.doctor-title {
  margin: 8px 0 24px;
  font-size: 1.25rem; font-weight: 600; color: var(--sky-text);
}
.doctor-text { max-width: 32em; font-size: 1.1875rem; margin-bottom: 24px; }

.physiology {
  margin-top: clamp(56px, 8vw, 96px);
  padding: clamp(28px, 5vw, 56px);
  border-radius: var(--radius-lg);
  background: var(--tint);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  gap: 24px 56px;
  position: relative;
  overflow: hidden;
}
.physiology::before {           /* diskret ultraljudsvåg i hörnet */
  content: "";
  position: absolute; right: -90px; bottom: -90px;
  width: 260px; height: 260px; border-radius: 50%;
  border: 1.5px solid var(--mist);
  box-shadow: 0 0 0 28px var(--tint), 0 0 0 29.5px var(--mist), 0 0 0 56px var(--tint), 0 0 0 57.5px rgba(202, 202, 214, .6);
  pointer-events: none;
}
.physiology h3 { font-size: clamp(1.5rem, 2.4vw, 1.875rem); font-weight: 800; position: relative; }
.physiology-text { max-width: 36em; position: relative; }

@media (max-width: 800px) {
  .doctor { grid-template-columns: 1fr; }
  .doctor-photo { max-width: 360px; width: 100%; }
  .physiology { grid-template-columns: 1fr; }
}

/* ---------- Undersökningar ---------- */
.exam-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.exam-card {
  display: flex; flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 4vw, 40px);
  box-shadow: 0 1px 2px rgba(52, 79, 117, .04);
}
.exam-head { display: flex; align-items: center; gap: 18px; margin-bottom: 22px; }
.exam-icon {
  flex: none;
  width: 60px; height: 60px; border-radius: 50%;
  display: grid; place-items: center;
  background: #e8f2fa;
  box-shadow: 0 0 0 6px #f3f8fc;
}
.exam-icon svg { width: 30px; height: 30px; fill: none; stroke: var(--sky); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.exam-card h3 { font-size: clamp(1.3rem, 2vw, 1.5rem); }
.exam-body { flex: 1; }
.exam-body p { max-width: 36em; }
.exam-price {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  margin-top: 28px; padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 1.0625rem;
}
.exam-price span { color: var(--muted); font-weight: 600; }
.exam-price strong { font-size: 1.25rem; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }

@media (max-width: 820px) {
  .exam-grid { grid-template-columns: 1fr; }
}

/* ---------- Prislista ---------- */
.price-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 8px clamp(20px, 4vw, 44px);
}
.price-table { width: 100%; border-collapse: collapse; }
.price-table th {
  padding: 22px 0 16px;
  text-align: left;
  font-size: 1rem; font-weight: 700; color: var(--muted);
  border-bottom: 2px solid var(--ink);
}
.price-table th:last-child, .price-table td:last-child { text-align: right; }
.price-table td {
  padding: 22px 0;
  border-bottom: 1px solid var(--mist);
  vertical-align: baseline;
}
.price-table tbody tr:last-child td { border-bottom: 0; }
.price-name { font-weight: 600; font-size: 1.1875rem; padding-right: 24px !important; }
.price-value {
  font-weight: 800; font-size: 1.375rem; color: var(--ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.price-after { text-align: center; margin-top: 28px; color: var(--muted); }

@media (max-width: 480px) {
  .price-name { font-size: 1.0625rem; }
  .price-value { font-size: 1.1875rem; }
}

/* ---------- Kontakt ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: clamp(28px, 4vw, 48px);
  align-items: start;
}
.contact-list {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 8px clamp(24px, 3.5vw, 36px);
}
.contact-item {
  display: grid; grid-template-columns: 48px 1fr; gap: 18px;
  padding: 26px 0;
}
.contact-item + .contact-item { border-top: 1px solid var(--line); }
.contact-icon {
  width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center;
  background: #e8f2fa;
}
.contact-icon svg { width: 22px; height: 22px; fill: none; stroke: var(--sky); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.contact-item h3 { font-size: 1rem; font-weight: 700; color: var(--muted); letter-spacing: 0; margin-bottom: 4px; }
.contact-item a {
  font-size: 1.1875rem; font-weight: 700; color: var(--ink);
  text-decoration-color: var(--mist); text-decoration-thickness: 2px;
  overflow-wrap: anywhere;
}
.contact-item a:hover { text-decoration-color: var(--sky); }
.contact-item .contact-phone { font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.contact-item ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.contact-hint { margin-top: 6px; font-size: .9375rem; color: var(--muted); }

.map-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.map-frame { position: relative; aspect-ratio: 4 / 3; background: var(--tint-2); }
.map-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map-placeholder {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  padding: 24px; text-align: center;
  background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 44px 44px,
    var(--tint);
}
.map-pin {
  width: 64px; height: 64px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--white);
  box-shadow: 0 0 0 10px rgba(41, 140, 206, .12), 0 0 0 22px rgba(41, 140, 206, .07);
}
.map-pin svg { width: 28px; height: 28px; fill: none; stroke: var(--sky); stroke-width: 1.8; stroke-linejoin: round; }
.map-placeholder p { margin: 0; max-width: 26em; font-size: .9375rem; color: var(--muted); }
.map-footer {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px;
  padding: 22px clamp(20px, 3vw, 28px);
  border-top: 1px solid var(--line);
}
.map-address { font-style: normal; font-weight: 700; line-height: 1.45; }

@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .map-frame { aspect-ratio: 1; }
  .map-footer .btn { width: 100%; }
}

/* =====================================================================
   FOOTER
   ===================================================================== */
.site-footer {
  background: var(--ink);
  color: var(--white);
  padding: 64px 0 28px;
  font-size: 1.0625rem;
}
.site-footer a { color: var(--white); text-decoration-color: rgba(255, 255, 255, .45); }
.site-footer a:hover { color: var(--white); text-decoration-color: var(--white); }
.site-footer :focus-visible { outline-color: var(--white); }
.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 36px 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, .2);
}
.footer-brand { display: flex; align-items: center; gap: 20px; }
.footer-logo-plate {
  flex: none;
  display: grid; place-items: center;
  width: 96px; height: 96px; border-radius: 50%;
  background: var(--white);
}
.footer-logo-plate img { height: 72px; width: auto; }
.footer-name { font-size: 1.25rem; font-weight: 800; margin-bottom: 2px; }
.footer-brand p:not(.footer-name) { color: #dbe4f0; }
.footer-heading { font-size: 1rem; font-weight: 700; color: #dbe4f0; letter-spacing: 0; margin-bottom: 8px; }
.footer-col p { margin-bottom: 4px; }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  padding-top: 24px; font-size: .9375rem; color: #dbe4f0;
}
.footer-bottom p { margin: 0; }

@media (max-width: 860px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .footer-inner { grid-template-columns: 1fr; }
}
