/* ==========================================================================
   Hausarztpraxis am Stadtgarten - Stylesheet
   Struktur: 1 Design-Tokens - 2 Basis - 3 Layout - 4 Header/Nav - 5 Komponenten
             6 Sektionen - 7 Footer - 8 Utilities - 9 Responsive - 10 Druck
   ========================================================================== */

/* 1 - Design-Tokens ------------------------------------------------------ */
:root {
  --c-primary:        #0f7d8c;
  --c-primary-dark:   #0a5a66;
  --c-primary-light:  #e6f3f5;
  --c-accent:         #6cbfae;

  --c-text:           #1e2b31;
  --c-text-muted:     #5b6b72;
  --c-bg:             #ffffff;
  --c-bg-soft:        #f4f9fa;
  --c-border:         #dfe8ea;

  --c-alert-bg:       #fdf3e7;
  --c-alert-border:   #e8c89a;
  --c-alert-text:     #7a4f16;

  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --radius-sm: 6px;
  --radius:    12px;
  --radius-lg: 20px;

  --shadow-sm: 0 1px 3px rgba(16, 42, 48, .06);
  --shadow:    0 4px 16px rgba(16, 42, 48, .08);
  --shadow-lg: 0 12px 40px rgba(16, 42, 48, .10);

  --wrap:      1120px;
  --gap:       clamp(1.25rem, 3vw, 2.5rem);
  --section-y: clamp(3.5rem, 7vw, 6rem);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px; /* Platz fuer den sticky Header bei Ankersprüngen */
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  line-height: 1.2;
  color: var(--c-primary-dark);
  margin: 0 0 .6em;
  font-weight: 700;
  letter-spacing: -.01em;
}
h1 { font-size: clamp(2rem, 4.5vw, 3rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.25rem); }
h3 { font-size: 1.25rem; }

p  { margin: 0 0 1.1em; }
p:last-child, ul:last-child { margin-bottom: 0; }

a { color: var(--c-primary); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--c-primary-dark); }

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

/* 3 - Layout ------------------------------------------------------------- */
.wrap {
  width: min(100% - 2.5rem, var(--wrap));
  margin-inline: auto;
}

section { padding-block: var(--section-y); }
.section--soft { background: var(--c-bg-soft); }

.section-head { max-width: 62ch; margin-bottom: 2.5rem; }
.section-head--center { margin-inline: auto; text-align: center; }

.eyebrow {
  display: inline-block;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--c-primary);
  margin-bottom: .75rem;
}

.lead { font-size: 1.15rem; color: var(--c-text-muted); }

.grid { display: grid; gap: var(--gap); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

/* Skip-Link fuer Tastatur- und Screenreader-Nutzung */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--c-primary-dark);
  color: #fff;
  padding: .75rem 1.25rem;
  z-index: 200;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

/* 4 - Notfall-Leiste, Header und Navigation ------------------------------ */
.topbar {
  background: var(--c-primary-dark);
  color: #dff1f4;
  font-size: .875rem;
}
.topbar__inner {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem 1.5rem;
  align-items: center;
  justify-content: space-between;
  padding-block: .5rem;
}
.topbar a { color: #fff; font-weight: 600; }
.topbar strong { color: #fff; }

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--c-border);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 76px;
}

.logo {
  display: flex;
  align-items: center;
  gap: .7rem;
  text-decoration: none;
  color: var(--c-primary-dark);
}
.logo__mark {
  flex: none;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  background: var(--c-primary);
  color: #fff;
  border-radius: 12px;
}
.logo__text { display: flex; flex-direction: column; line-height: 1.15; }
.logo__name { font-weight: 700; font-size: 1.05rem; }
.logo__sub  { font-size: .78rem; color: var(--c-text-muted); letter-spacing: .04em; }

.nav { display: flex; align-items: center; gap: 1.75rem; }
.nav__list {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
  margin: 0; padding: 0;
}
.nav__link {
  position: relative;
  text-decoration: none;
  color: var(--c-text);
  font-weight: 500;
  padding-block: .35rem;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--c-primary);
  transform: scaleX(0);
  transition: transform .2s ease;
}
.nav__link:hover::after,
.nav__link[aria-current="page"]::after { transform: scaleX(1); }
.nav__link[aria-current="page"] { color: var(--c-primary-dark); font-weight: 600; }

.nav__toggle {
  display: none;
  width: 46px; height: 46px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: pointer;
  padding: 0;
  place-items: center;
}
.nav__toggle span,
.nav__toggle span::before,
.nav__toggle span::after {
  display: block;
  width: 20px; height: 2px;
  background: var(--c-text);
  border-radius: 2px;
  transition: transform .25s ease, opacity .2s ease;
}
.nav__toggle span::before,
.nav__toggle span::after { content: ""; position: absolute; }
.nav__toggle span::before { transform: translateY(-6px); }
.nav__toggle span::after  { transform: translateY(6px); }
.nav__toggle[aria-expanded="true"] span { background: transparent; }
.nav__toggle[aria-expanded="true"] span::before { transform: rotate(45deg); }
.nav__toggle[aria-expanded="true"] span::after  { transform: rotate(-45deg); }

/* 5 - Komponenten -------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .8rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid transparent;
  transition: background-color .2s ease, color .2s ease, transform .15s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--c-primary); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--c-primary-dark); color: #fff; box-shadow: var(--shadow); }
.btn--ghost { border-color: var(--c-border); color: var(--c-primary-dark); background: #fff; }
.btn--ghost:hover { border-color: var(--c-primary); color: var(--c-primary-dark); }
.btn--light { background: #fff; color: var(--c-primary-dark); }
.btn--light:hover { background: var(--c-primary-light); color: var(--c-primary-dark); }

.card {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card--hover:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--c-accent);
}
.card h3 { margin-bottom: .4rem; }
.card p  { color: var(--c-text-muted); margin-bottom: 0; }

.icon-badge {
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: var(--c-primary-light);
  color: var(--c-primary);
  margin-bottom: 1.1rem;
}

.list-check { list-style: none; margin: 0; padding: 0; }
.list-check li {
  position: relative;
  padding-left: 1.9rem;
  margin-bottom: .6rem;
  color: var(--c-text-muted);
}
.list-check li::before {
  content: "";
  position: absolute;
  left: 0; top: .55em;
  width: 1.05rem; height: .55rem;
  border-left: 2px solid var(--c-accent);
  border-bottom: 2px solid var(--c-accent);
  transform: rotate(-45deg);
}

/* Hervorgehobener Hinweis, z. B. fuer die Blutabnahme-Zeiten */
.highlight {
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  background: var(--c-primary-light);
  border: 1px solid var(--c-accent);
}
.highlight__icon {
  flex: none;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: #fff;
  color: var(--c-primary);
}
.highlight strong {
  display: block;
  color: var(--c-primary-dark);
  line-height: 1.3;
}
.highlight__time {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--c-primary-dark);
  font-variant-numeric: tabular-nums;
}

.note {
  border-left: 4px solid var(--c-alert-border);
  background: var(--c-alert-bg);
  color: var(--c-alert-text);
  padding: 1.1rem 1.35rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.note strong { color: inherit; }

/* Akkordeon (natives details-Element) */
.accordion { border-top: 1px solid var(--c-border); }
.accordion details { border-bottom: 1px solid var(--c-border); }
.accordion summary {
  cursor: pointer;
  list-style: none;
  padding: 1.15rem .5rem 1.15rem 0;
  font-weight: 600;
  color: var(--c-primary-dark);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after {
  content: "+";
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--c-primary);
  transition: transform .2s ease;
}
.accordion details[open] summary::after { transform: rotate(45deg); }
.accordion details > div { padding: 0 0 1.35rem; color: var(--c-text-muted); }

/* Sprechzeiten-Tabelle */
.hours { width: 100%; border-collapse: collapse; }
.hours caption { text-align: left; font-weight: 600; padding-bottom: .75rem; color: var(--c-primary-dark); }
.hours th, .hours td { padding: .8rem .5rem; border-bottom: 1px solid var(--c-border); text-align: left; }
.hours th { font-weight: 600; width: 40%; }
.hours td { color: var(--c-text-muted); font-variant-numeric: tabular-nums; }
.hours tr[data-today] th,
.hours tr[data-today] td { background: var(--c-primary-light); color: var(--c-primary-dark); font-weight: 600; }

/* Team */
.person { text-align: center; }
.person__photo {
  width: 132px; height: 132px;
  margin: 0 auto 1.1rem;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--c-primary-light);
  color: var(--c-primary);
  font-size: 2.1rem;
  font-weight: 700;
  letter-spacing: .02em;
  overflow: hidden;
  border: 4px solid #fff;
  box-shadow: var(--shadow-sm);
}
.person__photo img { width: 100%; height: 100%; object-fit: cover; }
.person__role { color: var(--c-primary); font-weight: 600; font-size: .95rem; margin-bottom: .6rem; }

/* Kontakt-Zeile */
.contact-item { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 1.5rem; }
.contact-item .icon-badge { margin-bottom: 0; width: 42px; height: 42px; border-radius: 11px; flex: none; }
.contact-item h3 { font-size: 1.05rem; margin-bottom: .15rem; }
.contact-item p  { color: var(--c-text-muted); margin: 0; }

/* 6 - Sektionen ---------------------------------------------------------- */
.hero {
  background:
    radial-gradient(90rem 40rem at 78% -10%, var(--c-primary-light) 0%, transparent 60%),
    var(--c-bg);
  padding-block: clamp(3rem, 7vw, 5.5rem);
}
.hero__inner {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: var(--gap);
  align-items: center;
}
.hero h1 { margin-bottom: .5rem; }
.hero .lead { margin-bottom: 2rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .85rem; margin-bottom: 1.75rem; }
.hero__facts { display: flex; flex-wrap: wrap; gap: 1.75rem; padding-top: 1.5rem; border-top: 1px solid var(--c-border); }
.hero__fact strong { display: block; font-size: 1.5rem; color: var(--c-primary-dark); }
.hero__fact span { font-size: .9rem; color: var(--c-text-muted); }

.hero__panel {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
}
.hero__panel h2 { font-size: 1.3rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

/* Kompakter Seitenkopf fuer Unterseiten */
.pagehead {
  background:
    radial-gradient(60rem 26rem at 85% 0%, var(--c-primary-light) 0%, transparent 65%),
    var(--c-bg-soft);
  padding-block: clamp(2.75rem, 6vw, 4.25rem);
  border-bottom: 1px solid var(--c-border);
}
.pagehead h1 { margin-bottom: .35rem; }
.pagehead p  { max-width: 60ch; color: var(--c-text-muted); margin: 0; }

.breadcrumb { font-size: .875rem; color: var(--c-text-muted); margin-bottom: .9rem; }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

.cta {
  background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-primary-dark) 100%);
  color: #fff;
  text-align: center;
  border-radius: var(--radius-lg);
  padding: clamp(2.5rem, 5vw, 3.5rem) 2rem;
}
.cta h2 { color: #fff; }
.cta p  { color: #dcf0f3; max-width: 52ch; margin-inline: auto; margin-bottom: 1.75rem; }
.cta__actions { display: flex; flex-wrap: wrap; gap: .85rem; justify-content: center; }

/* Rechtstexte */
.legal { max-width: 75ch; }
.legal h2 { font-size: 1.4rem; margin-top: 2.5rem; }
.legal h3 { font-size: 1.1rem; margin-top: 1.75rem; }
.legal ul { color: var(--c-text-muted); padding-left: 1.25rem; }
.legal li { margin-bottom: .4rem; }

/* 7 - Footer ------------------------------------------------------------- */
.footer {
  background: var(--c-primary-dark);
  color: #cfe6ea;
  padding-block: 3.5rem 2rem;
  margin-top: var(--section-y);
}
.footer h3 { color: #fff; font-size: 1rem; margin-bottom: 1rem; }
.footer a { color: #cfe6ea; text-decoration: none; }
.footer a:hover { color: #fff; text-decoration: underline; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: .5rem; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: var(--gap); }
.footer__bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, .15);
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1.5rem;
  justify-content: space-between;
  font-size: .875rem;
}

/* 7b - Cookie-Hinweis ---------------------------------------------------- */
.cookie {
  position: fixed;
  left: 1rem; right: 1rem; bottom: 1rem;
  z-index: 300;
  max-width: 640px;
  margin-inline: auto;
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 1.5rem;
}
.cookie[hidden] { display: none; }
.cookie h2 {
  font-size: 1.15rem;
  margin-bottom: .5rem;
}
.cookie p {
  font-size: .95rem;
  color: var(--c-text-muted);
  margin-bottom: 1.25rem;
}
.cookie__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: center;
}
/* Beide Schaltflaechen sind gleich gross und gleich gut erreichbar -
   die Ablehnung darf nicht schwerer zu treffen sein als die Zustimmung. */
.cookie__actions .btn { flex: 1 1 auto; justify-content: center; }
.cookie__link {
  flex: 1 1 100%;
  font-size: .9rem;
  margin-top: .25rem;
}

@media (max-width: 480px) {
  .cookie { padding: 1.25rem; }
  .cookie__actions .btn { flex-basis: 100%; }
}

/* 8 - Utilities ---------------------------------------------------------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: 2rem; }
.text-muted { color: var(--c-text-muted); }

/* Sanftes Einblenden beim Scrollen - wird per JS aktiviert */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* 9 - Responsive --------------------------------------------------------- */
/* Ab hier klappt die Navigation ins Menue, Hero und Footer brechen um */
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: repeat(2, 1fr); }

  .nav__toggle { display: grid; position: relative; }

  .nav__list {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--c-border);
    box-shadow: var(--shadow);
    padding: .5rem 1.25rem 1.25rem;
    display: none;
  }
  .nav__list.is-open { display: flex; }
  .nav__link { padding: .9rem 0; border-bottom: 1px solid var(--c-border); }
  .nav__link::after { display: none; }
  .nav .btn { margin-top: .9rem; justify-content: center; }
}

/* Schmale Bildschirme: alles einspaltig */
@media (max-width: 620px) {
  .topbar__inner { justify-content: center; text-align: center; }
  .footer__grid { grid-template-columns: 1fr; }
  .hero__facts { gap: 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* 10 - Druck ------------------------------------------------------------- */
@media print {
  .topbar, .header, .footer, .cta, .btn { display: none !important; }
  body { font-size: 11pt; color: #000; }
  a::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; }
}
