/* ==========================================================================
   Betriebsarztzentrum West – Stylesheet
   Keine externen Ressourcen: Fonts werden lokal gehostet (DSGVO-konform).
   ========================================================================== */

/* ---------- Lokale Schriften (Variable Fonts, latin) ---------- */
@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url('../fonts/opensans-var.woff2') format('woff2');
}
@font-face {
  font-family: 'Open Sans';
  font-style: italic;
  font-weight: 300 800;
  font-display: swap;
  src: url('../fonts/opensans-italic-var.woff2') format('woff2');
}
@font-face {
  font-family: 'Raleway';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/raleway-var.woff2') format('woff2');
}

/* ---------- Design-Token ---------- */
:root {
  --navy: #1d3349;
  --navy-dark: #14253a;
  --ice: #aee3f0;
  --ice-light: #e4f5fa;
  --teal: #1f7a96;
  --teal-dark: #16607a;
  --text: #2b3742;
  --text-muted: #5a6873;
  --bg: #ffffff;
  --bg-alt: #f4f9fb;
  --border: #d9e4ea;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(20, 37, 58, .08);
  --shadow-lg: 0 8px 30px rgba(20, 37, 58, .14);
  --maxw: 1140px;
  --font-body: 'Open Sans', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-head: 'Raleway', 'Open Sans', -apple-system, 'Segoe UI', Arial, sans-serif;
}

/* ---------- Reset / Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); }
a:hover { color: var(--teal-dark); }
h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--navy);
  line-height: 1.25;
  margin: 0 0 .6em;
  text-wrap: balance;
}
h1 { font-size: clamp(1.75rem, 4vw, 2.6rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.4em; margin: 0 0 1em; }
li { margin-bottom: .35em; }

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

.container { max-width: var(--maxw); margin-inline: auto; padding-inline: 20px; }

/* ---------- Skip-Link ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy);
  color: #fff;
  padding: .7em 1.2em;
  z-index: 200;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; color: #fff; }

/* ---------- Header / Navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}
.brand { display: inline-flex; align-items: center; }
.brand img { width: 240px; height: auto; }

.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--navy);
  border-radius: 10px;
  padding: 9px 12px;
  cursor: pointer;
  color: var(--navy);
}
.nav-toggle svg { display: block; }

.site-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
}
.site-nav a {
  display: block;
  padding: 10px 14px;
  border-radius: 9px;
  color: var(--navy);
  text-decoration: none;
  font-weight: 600;
  font-size: .98rem;
}
.site-nav a:hover { background: var(--ice-light); color: var(--navy-dark); }
.site-nav a[aria-current="page"] { background: var(--ice-light); color: var(--teal-dark); }

/* Dropdown Leistungen */
.has-sub { position: relative; }
.has-sub > button {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border: 0;
  background: none;
  border-radius: 9px;
  color: var(--navy);
  font: inherit;
  font-weight: 600;
  font-size: .98rem;
  cursor: pointer;
}
.has-sub > button:hover { background: var(--ice-light); }
.has-sub > button .chev { transition: transform .2s; }
.has-sub[data-open="true"] > button .chev { transform: rotate(180deg); }
.site-nav .has-sub .sub-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 290px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 8px !important;
  flex-direction: column;
  align-items: stretch !important;
  gap: 0 !important;
}
.site-nav .has-sub[data-open="true"] .sub-menu { display: flex; }
.sub-menu a { font-weight: 400; padding: 9px 12px; }

.nav-cta {
  margin-left: 8px;
  background: var(--navy);
  color: #fff !important;
  font-weight: 700 !important;
}
.nav-cta:hover { background: var(--teal-dark) !important; }

@media (max-width: 920px) {
  .brand img { width: 190px; }
  .nav-toggle { display: inline-flex; align-items: center; gap: 8px; }
  .site-nav {
    display: none;
    position: absolute;
    inset: 100% 0 auto 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    max-height: calc(100vh - 72px);
    overflow-y: auto;
  }
  .site-nav[data-open="true"] { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; padding: 12px 16px 20px; }
  .site-nav a, .has-sub > button { width: 100%; padding: 13px 14px; font-size: 1.05rem; }
  .has-sub > button { justify-content: space-between; }
  .sub-menu {
    position: static;
    border: 0;
    box-shadow: none;
    background: var(--bg-alt);
    border-radius: 10px;
    min-width: 0;
  }
  .nav-cta { margin: 10px 0 0; text-align: center; }
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, #235072 60%, var(--teal) 100%);
  color: #fff;
  overflow: hidden;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 40px;
  align-items: center;
  padding-block: 64px;
}
.hero h1 { color: #fff; margin-bottom: .4em; }
.hero .lead { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--ice-light); max-width: 56ch; }
.hero-img img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 100%;
  object-fit: cover;
  aspect-ratio: 16 / 10;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }
@media (max-width: 820px) {
  .hero-inner { grid-template-columns: 1fr; padding-block: 44px; }
}

/* Schmaler Seitenkopf für Unterseiten */
.page-head {
  background: linear-gradient(135deg, var(--navy) 0%, #235072 70%, var(--teal) 100%);
  color: #fff;
  padding-block: 42px;
}
.page-head h1 { color: #fff; margin: 0; }
.page-head .crumb { color: var(--ice); font-size: .92rem; margin-bottom: .5em; }
.page-head .crumb a { color: var(--ice); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  font-size: 1rem;
  border: 2px solid transparent;
}
.btn-primary { background: #fff; color: var(--navy); }
.btn-primary:hover { background: var(--ice); color: var(--navy-dark); }
.btn-dark { background: var(--navy); color: #fff; }
.btn-dark:hover { background: var(--teal-dark); color: #fff; }
.btn-outline { border-color: #fff; color: #fff; }
.btn-outline:hover { background: rgba(255,255,255,.15); color: #fff; }

/* ---------- Sektionen ---------- */
.section { padding-block: 64px; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 760px; margin-bottom: 36px; }
.section-head .kicker {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: .85rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: .5em;
}

/* ---------- Karten ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.card-body { padding: 22px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { margin-bottom: .4em; }
.card-body p { color: var(--text-muted); flex: 1; }
.card-link {
  font-weight: 700;
  text-decoration: none;
  color: var(--teal);
}
.card-link::after { content: " →"; }

/* Karte als Ganzes klickbar, ohne A11y zu verlieren */
.card { position: relative; }
.card-link::before { content: ""; position: absolute; inset: 0; }
.card-link:focus-visible::before { outline: 3px solid var(--teal); outline-offset: -3px; border-radius: var(--radius); }

/* ---------- Inhaltslayout Unterseiten ---------- */
.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
  gap: 44px;
  align-items: start;
}
@media (max-width: 880px) { .content-grid { grid-template-columns: 1fr; } }
.prose { max-width: 72ch; }
.prose h2 { margin-top: 1.6em; }
.prose h2:first-child { margin-top: 0; }
.prose img { border-radius: var(--radius); margin-block: 1em; }

.aside-box {
  background: var(--ice-light);
  border: 1px solid var(--ice);
  border-radius: var(--radius);
  padding: 24px 26px;
  position: sticky;
  top: 96px;
}
.aside-box h3 { margin-top: 0; }
.aside-box .tel {
  font-size: 1.25rem;
  font-weight: 800;
  font-family: var(--font-head);
  color: var(--navy);
  text-decoration: none;
  display: inline-block;
  margin-bottom: .4em;
}
.aside-box ul { padding-left: 1.2em; }

/* Hinweis-/Infoboxen */
.notice {
  background: var(--ice-light);
  border-left: 5px solid var(--teal);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 18px 22px;
  margin-block: 1.4em;
}
.notice.warn { background: #fdf3e7; border-left-color: #d98324; }

/* Preistabellen */
.price-table { width: 100%; border-collapse: collapse; margin-block: 1.2em; }
.price-table caption { text-align: left; font-weight: 700; color: var(--navy); padding-bottom: .5em; font-family: var(--font-head); }
.price-table th, .price-table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.price-table th { background: var(--bg-alt); color: var(--navy); }
.price-table td:last-child, .price-table th:last-child { text-align: right; white-space: nowrap; }

/* Standort-Karten */
.loc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px; }
.loc {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow);
}
.loc h3 { margin-bottom: .3em; }
.loc p { margin-bottom: .4em; color: var(--text-muted); }
.loc .tel { font-weight: 700; color: var(--navy); text-decoration: none; font-size: 1.05rem; }
.loc .tag {
  display: inline-block;
  background: var(--ice-light);
  color: var(--teal-dark);
  font-size: .8rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 2px 12px;
  margin-bottom: .6em;
}

/* Checkliste */
.checklist { list-style: none; padding: 0; }
.checklist li { padding-left: 1.9em; position: relative; margin-bottom: .55em; }
.checklist li::before {
  content: "";
  position: absolute;
  left: 0; top: .32em;
  width: 1.05em; height: 1.05em;
  border-radius: 50%;
  background: var(--teal);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23000' d='M6.4 12.2 2.3 8.1l1.4-1.4 2.7 2.7 5.9-5.9 1.4 1.4z'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23000' d='M6.4 12.2 2.3 8.1l1.4-1.4 2.7 2.7 5.9-5.9 1.4 1.4z'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* CTA-Band */
.cta-band {
  background: linear-gradient(135deg, var(--navy), var(--teal));
  color: #fff;
  border-radius: var(--radius);
  padding: 44px 40px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}
.cta-band h2 { color: #fff; margin: 0; }
.cta-band p { margin: .35em 0 0; color: var(--ice-light); }

/* Details/Accordion (G-Listen etc.) */
details.fold {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 14px;
  background: #fff;
  overflow: hidden;
}
details.fold summary {
  cursor: pointer;
  padding: 16px 20px;
  font-weight: 700;
  font-family: var(--font-head);
  color: var(--navy);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
details.fold summary::-webkit-details-marker { display: none; }
details.fold summary::after { content: "+"; font-size: 1.4em; line-height: 1; color: var(--teal); }
details.fold[open] summary::after { content: "–"; }
details.fold .fold-body { padding: 0 20px 18px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-dark);
  color: #c7d3dd;
  margin-top: 64px;
  font-size: .95rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 36px;
  padding-block: 52px 40px;
}
.site-footer h2 {
  color: #fff;
  font-size: 1.02rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: .8em;
}
.site-footer a { color: var(--ice); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .5em; }
.site-footer address { font-style: normal; }
.footer-legal {
  border-top: 1px solid rgba(255,255,255,.14);
  padding-block: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  align-items: center;
  justify-content: space-between;
}
.footer-legal nav { display: flex; gap: 22px; }
.footer-legal a { font-weight: 600; }

/* ---------- Utility ---------- */
.mt-0 { margin-top: 0; }
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Druck ---------- */
@media print {
  .site-header, .site-footer, .hero-actions, .nav-toggle, .cta-band, .aside-box { display: none !important; }
  body { font-size: 11pt; }
  a::after { content: " (" attr(href) ")"; font-size: .85em; }
}
