/* ==========================================================================
   Hausärzte am Tannenhof – Design-Tokens & Basisstile
   ========================================================================== */

:root {
  /* Marken- und Oberflächenfarben (siehe phase2_markenanalyse.md) */
  --brand-primary: #16580d;      /* Tannengrün – Headlines, Navigation, Marke */
  --brand-accent: #2f7d4a;       /* Modernes Praxisgrün – Buttons, Icons */
  --brand-accent-dark: #1f5c35;  /* Hover-Zustand */
  --surface-sage: #e7f1e9;       /* ruhige Sektionshintergründe */
  --emergency: #c92a35;          /* medizinisches Rot – nur sparsame Akzente */
  --emergency-dark: #a11f28;
  --bg-page: #fafbf8;            /* Warmweiß */
  --bg-card: #ffffff;
  --text-body: #26312b;          /* Graphit */
  --text-muted: #52605a;
  --line: #dce4de;               /* Liniengrau */
  --focus-ring: #0b63ce;

  --font-sans: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;

  --radius-s: 6px;
  --radius-m: 12px;
  --radius-l: 20px;
  --shadow-card: 0 1px 2px rgba(22, 88, 13, 0.06), 0 8px 24px -12px rgba(22, 88, 13, 0.18);
  --max-width: 1180px;
  --space-section: clamp(3.5rem, 6vw, 6rem);
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.2;
  margin: 0 0 0.6em;
  color: var(--brand-primary);
  font-weight: 600;
}

h1 { font-size: clamp(2rem, 4vw + 1rem, 3.25rem); }
h2 { font-size: clamp(1.5rem, 2vw + 1rem, 2.25rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }

a {
  color: var(--brand-accent);
  text-decoration-thickness: from-font;
}

a:hover { color: var(--brand-accent-dark); }

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: 4px;
}

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

.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  background: var(--brand-primary);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-s);
  z-index: 1000;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 1rem; }

/* ---------- Notfall-Leiste ---------- */
.emergency-bar {
  background: var(--emergency);
  color: #fff;
  font-size: 0.92rem;
  text-align: center;
  padding: 0.5rem 1rem;
}
.emergency-bar a { color: #fff; font-weight: 600; text-underline-offset: 2px; }
.emergency-bar .container { display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; justify-content: center; align-items: center; }

/* ---------- Header ---------- */
.site-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 0.75rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  flex-shrink: 0;
  margin-right: auto;
}
.brand img { height: 48px; width: auto; }
.brand-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--brand-primary);
  line-height: 1.15;
  white-space: nowrap;
}
.brand-text small {
  display: block;
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.main-nav {
  display: flex;
  align-items: center;
}
.main-nav ul {
  list-style: none;
  display: flex;
  gap: clamp(0.9rem, 1.6vw, 1.6rem);
  margin: 0;
  padding: 0;
}
.main-nav a {
  display: inline-block;
  color: var(--text-body);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  padding: 0.4rem 0.1rem;
  border-bottom: 2px solid transparent;
}
.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--brand-primary);
  border-bottom-color: var(--brand-accent);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.15rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brand-accent); color: #fff; }
.btn-primary:hover { background: var(--brand-accent-dark); color: #fff; }
.btn-outline { background: transparent; border-color: var(--brand-primary); color: var(--brand-primary); }
.btn-outline:hover { background: var(--surface-sage); color: var(--brand-primary); }
.btn-call { background: var(--brand-primary); color: #fff; }
.btn-call:hover { background: #0f3d09; color: #fff; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  padding: 0.5rem 0.65rem;
  cursor: pointer;
}
.nav-toggle svg { display: block; }

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--line);
    padding: 1rem clamp(1.25rem, 4vw, 2.5rem) 1.5rem;
    display: none;
  }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; gap: 0.25rem; }
  .main-nav a { display: block; padding: 0.6rem 0.2rem; border-bottom: 1px solid var(--line); }
  .header-actions .btn-outline { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  color: #fff;
  overflow: hidden;
  min-height: min(78vh, 720px);
  display: flex;
  align-items: center;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  transform: translateY(var(--hero-parallax, 0px)) scale(1.06);
  will-change: transform;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(115deg, rgba(9, 41, 6, 0.86) 0%, rgba(11, 46, 12, 0.72) 42%, rgba(11, 46, 12, 0.42) 75%);
}

.hero-content {
  padding-block: clamp(3rem, 8vw, 5rem);
  max-width: 680px;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.35);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  backdrop-filter: blur(2px);
}
.hero h1 { color: #fff; margin-bottom: 0.5rem; }
.hero-sub { font-size: 1.15rem; color: #e7f1e9; max-width: 52ch; margin-bottom: 2rem; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-bottom: 2.5rem; }
.hero .btn-outline { border-color: #fff; color: #fff; }
.hero .btn-outline:hover { background: rgba(255,255,255,0.15); color: #fff; }

.hero-quickfacts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
  max-width: 640px;
}
.quickfact {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius-m);
  padding: 0.85rem 1rem;
  backdrop-filter: blur(3px);
}
.quickfact dt { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; color: #cfe4d3; }
.quickfact dd { margin: 0.15rem 0 0; font-weight: 700; font-size: 1rem; }

/* ---------- Layout-Sektionen ---------- */
section { padding-block: var(--space-section); }
.section-sage { background: var(--surface-sage); }
.section-head { max-width: 62ch; margin-bottom: 2.5rem; }
.section-head p { color: var(--text-muted); font-size: 1.05rem; }
.eyebrow {
  display: inline-block;
  color: var(--brand-accent);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

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

.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
}
.card h3 { margin-bottom: 0.5rem; }
.card p:last-child { margin-bottom: 0; }
.card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-m);
  background: var(--surface-sage);
  color: var(--brand-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}
/* Öffnungszeiten-Tabelle */
.hours-table { width: 100%; border-collapse: collapse; font-size: 0.98rem; }
.hours-table th, .hours-table td { text-align: left; padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--line); }
.hours-table tr.today { background: var(--surface-sage); }
.hours-table th { color: var(--text-muted); font-weight: 600; }

/* FAQ */
.faq-item {
  border-bottom: 1px solid var(--line);
}
.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  padding: 1.1rem 0.25rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 1.4rem;
  color: var(--brand-accent);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { padding: 0 0.25rem 1.1rem; color: var(--text-muted); }

/* Reviews */
.review-card { display: flex; flex-direction: column; gap: 0.75rem; }
.review-stars { color: var(--emergency); letter-spacing: 0.1em; font-size: 1.05rem; }
.review-meta { font-size: 0.85rem; color: var(--text-muted); }

/* Datenschutz-Hinweis */
.notice {
  border-left: 4px solid var(--brand-accent);
  background: var(--surface-sage);
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius-m) var(--radius-m) 0;
  font-size: 0.96rem;
}
.notice.notice-emergency { border-color: var(--emergency); background: #fbebec; }
.notice.notice-draft {
  border-color: var(--emergency);
  background: #fbebec;
  font-weight: 700;
}

/* Anfahrt / Map */
.map-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-l);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface-sage);
}
.map-embed iframe { width: 100%; height: 100%; border: 0; }
.map-consent {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  text-align: center;
  padding: 1.5rem;
  background: var(--surface-sage);
}

/* Calendly Platzhalter */
.calendly-placeholder {
  border: 2px dashed var(--line);
  border-radius: var(--radius-l);
  padding: 2rem;
  text-align: center;
  background: var(--bg-card);
}

/* Footer */
.site-footer {
  background: #ffffff;
  color: var(--text-body);
  border-top: 3px solid var(--brand-primary);
  padding-block: 3rem 2rem;
}
.site-footer a { color: var(--brand-accent); }
.site-footer a:hover { color: var(--brand-accent-dark); }
.footer-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  margin-bottom: 2rem;
}
.footer-grid h3 { color: var(--brand-primary); font-size: 1rem; margin-bottom: 0.75rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; font-size: 0.92rem; }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Sichtbar nur für Screenreader */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Seiten-Intro (Unterseiten) */
.page-intro {
  background: var(--surface-sage);
  padding-block: clamp(2.5rem, 5vw, 4rem);
}
.breadcrumb { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.75rem; }
.breadcrumb a { color: var(--text-muted); }

/* Team */
.team-card { text-align: left; }
.team-card .role { color: var(--brand-accent); font-weight: 700; font-size: 0.9rem; margin-bottom: 0.5rem; display: block; }

/* Utility */
.stack { display: flex; flex-direction: column; gap: 1rem; }
.flow > * + * { margin-top: 1rem; }
.text-muted { color: var(--text-muted); }
.mt-0 { margin-top: 0; }
table.legal-table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
table.legal-table td, table.legal-table th { padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--line); vertical-align: top; text-align: left; }
