/* ==========================================================
   Arztpraxis Dr. Monika Lenzi — Stylesheet
   Farben aus dem Logo: Navy #002F6B, Rot #9B1B21
   ========================================================== */

:root {
  --navy: #002F6B;
  --navy-dark: #001E45;
  --red: #9B1B21;
  --red-dark: #7A1519;
  --bg: #FBFBFA;
  --bg-alt: #F3F5F7;
  --text: #232A33;
  --text-muted: #5C6A7D;
  --border: #E1E5EA;
  --radius: 8px;
  --radius-lg: 14px;
  --max-width: 1080px;
  --font-body: "Inter", "Segoe UI", Arial, Helvetica, sans-serif;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --shadow-sm: 0 1px 2px rgba(0, 30, 69, 0.05), 0 1px 3px rgba(0, 30, 69, 0.04);
  --shadow-md: 0 4px 10px rgba(0, 30, 69, 0.06), 0 10px 24px rgba(0, 30, 69, 0.05);
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
}

a { color: var(--navy); text-decoration: none; transition: color 0.15s var(--ease); }
a:hover { text-decoration: underline; }

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Topbar (Telefonnummer) ---------- */
.topbar {
  background: var(--navy-dark);
  color: #D9E2EC;
  font-size: 13px;
  padding: 6px 0;
}
.topbar .container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
}
.topbar .icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.topbar .icon path {
  stroke: #D9E2EC;
}
.topbar a { color: #D9E2EC; }

/* ---------- Header ---------- */
header.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 200;
  transition: box-shadow 0.2s var(--ease);
}
header.site-header.is-scrolled {
  box-shadow: var(--shadow-md);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  gap: 24px;
  flex-wrap: wrap;
}
.logo img {
  height: 52px;
  width: auto;
}
nav.main-nav ul {
  list-style: none;
  display: flex;
  gap: 14px;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
nav.main-nav a {
  position: relative;
  display: inline-block;
  color: var(--navy);
  font-weight: 600;
  font-size: 15px;
  padding: 8px 4px;
}
nav.main-nav a::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 4px;
  height: 2px;
  background: var(--red);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s var(--ease);
}
nav.main-nav a:hover {
  text-decoration: none;
}
nav.main-nav a:hover::after {
  transform: scaleX(1);
}
nav.main-nav a.active {
  color: var(--red);
}
nav.main-nav a.active::after {
  transform: scaleX(1);
}
.btn-termin {
  display: inline-block;
  background: var(--navy);
  color: #fff !important;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  transition: background 0.15s var(--ease), transform 0.15s var(--ease), box-shadow 0.15s var(--ease);
  box-shadow: var(--shadow-sm);
}
.btn-termin:hover {
  background: var(--navy-dark);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-termin:active {
  transform: translateY(0);
}

/* mobile nav toggle */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1.5px solid var(--navy);
  border-radius: var(--radius);
  padding: 10px 16px;
  font-size: 16px;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
}
.nav-toggle .icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--navy);
}
.nav-toggle .icon-close { display: none; }
.nav-toggle.open .icon-menu { display: none; }
.nav-toggle.open .icon-close { display: block; }
.nav-mobile-cta { display: none; }

/* ---------- EKG signature divider ---------- */
.ekg-divider {
  width: 100%;
  height: 26px;
  display: block;
}
.ekg-divider polyline {
  fill: none;
  stroke: var(--red);
  stroke-width: 2;
  stroke-dasharray: 1400;
  stroke-dashoffset: 1400;
  animation: ekg-draw 1.4s var(--ease) 0.15s forwards;
}
@keyframes ekg-draw {
  to { stroke-dashoffset: 0; }
}
.ekg-divider.thin { height: 16px; }
.ekg-divider.thin polyline { stroke-width: 1.5; }

/* ---------- Hero ---------- */
.hero {
  padding: 32px 0 40px;
  position: relative;
  background: radial-gradient(ellipse 900px 400px at 15% 0%, #EEF2F7 0%, transparent 65%);
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -10px;
  width: 340px;
  height: 90px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 340 90'%3E%3Cpolyline points='0,45 120,45 138,15 158,75 178,45 340,45' fill='none' stroke='%239B1B21' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
  opacity: 0.08;
  pointer-events: none;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: 40px;
  color: var(--navy);
  margin: 0 0 14px;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.01em;
  position: relative;
}
.hero h1 .accent { color: var(--red); }
.hero p.lead {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 0 24px;
  position: relative;
}
.hero p.intro {
  font-size: 15px;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 0 28px;
  position: relative;
}
.hero p.intro strong {
  display: block;
  color: var(--navy);
  font-size: 16px;
  margin-bottom: 4px;
}

/* ---------- Hinweise (Schließzeiten) ---------- */
.hinweise {
  margin: 0 0 40px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.hinweis-box {
  background: #FBEEEE;
  border-left: 4px solid var(--red);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 14px 18px;
  box-shadow: var(--shadow-sm);
}
.hinweis-box .hinweis-titel {
  font-weight: 700;
  color: var(--red-dark);
  margin: 0 0 4px;
  font-size: 15px;
}
.hinweis-box .hinweis-text {
  margin: 0;
  font-size: 14.5px;
  color: var(--text);
}

/* ---------- Terminanfragen ---------- */
.termin-info {
  background: #fff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--navy);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  padding: 20px 22px;
  margin: 0 0 32px;
  box-shadow: var(--shadow-sm);
}
.termin-info h3 {
  color: var(--navy);
  font-size: 16px;
  margin: 0 0 8px;
}
.termin-info p {
  font-size: 14.5px;
  margin: 0 0 10px;
}
.termin-info p:last-child { margin-bottom: 0; }
.termin-info ul {
  margin: 8px 0 12px;
  padding-left: 20px;
  font-size: 14.5px;
}
.termin-info li { margin-bottom: 4px; }

/* ---------- Info cards (Öffnungszeiten / Bereitschaft / Kassen) ---------- */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
  margin: 24px 0 56px;
}
.info-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
}
.info-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* ---------- Medflex-Karte ---------- */
.medflex-card {
  background: #EAF2FC;
  border: 1px solid #CFE0F5;
  border-radius: var(--radius-lg);
  padding: 22px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.medflex-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.medflex-card .icon-badge {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}
.medflex-card .icon-badge svg,
.medflex-card .icon-badge img {
  width: 24px;
  height: 24px;
  display: block;
}
.medflex-card h3 {
  color: var(--navy);
  font-size: 16px;
  margin: 0 0 6px;
}
.medflex-card p {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 16px;
}
.medflex-card .btn-medflex {
  display: inline-block;
  background: #2B6CB0;
  color: #fff !important;
  padding: 10px 22px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  transition: background 0.15s var(--ease), transform 0.15s var(--ease);
}
.medflex-card .btn-medflex:hover {
  background: #1E4E80;
  text-decoration: none;
  transform: translateY(-1px);
}
.info-card h3 {
  color: var(--navy);
  font-size: 16px;
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.info-card .icon-badge {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #FBEEEE;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.info-card .icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.info-card .icon path,
.info-card .icon circle,
.info-card .icon polyline {
  stroke: var(--red);
}
.info-card table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.info-card table td {
  padding: 4px 0;
  vertical-align: top;
}
.info-card table td:first-child {
  color: var(--text-muted);
  width: 45%;
}
.info-card p {
  font-size: 14px;
  margin: 0;
  color: var(--text);
}

/* ---------- Generic page sections ---------- */
.section {
  padding: 40px 0;
}
.section h2 {
  font-family: var(--font-display);
  color: var(--navy);
  font-size: 28px;
  font-weight: 600;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}
.section .eyebrow {
  color: var(--red);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin: 0 0 6px;
}

/* ---------- Team ---------- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  margin-top: 28px;
}
.team-card {
  text-align: center;
}
.team-photo {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
}
.team-card:hover .team-photo {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.team-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center top; transition: transform 0.35s var(--ease); }
.team-card:hover .team-photo img { transform: scale(1.03); }
.team-photo .initials {
  font-size: 32px;
  font-weight: 700;
  color: var(--navy);
  opacity: .4;
}
.team-card h3 {
  margin: 0 0 2px;
  font-size: 16px;
  color: var(--navy);
}
.team-card p {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-muted);
}

/* ---------- Leistungen ---------- */
.leistungen-list {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}
.leistungen-list li {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
}
.leistungen-list li:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.leistungen-list li::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
  flex-shrink: 0;
}

/* ---------- Kontakt ---------- */
.kontakt-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 24px;
}
.kontakt-grid h3 {
  color: var(--navy);
  font-size: 16px;
  margin: 20px 0 6px;
}
.kontakt-grid h3:first-child { margin-top: 0; }
.kontakt-grid p { margin: 0 0 4px; font-size: 14.5px; }
.map-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  min-height: 320px;
  box-shadow: var(--shadow-sm);
}
.map-wrap iframe { width: 100%; height: 100%; min-height: 320px; border: 0; }

/* ---------- Legal pages ---------- */
.legal h2 { margin-top: 32px; font-size: 18px; }
.legal h3 { margin-top: 24px; font-size: 15.5px; color: var(--navy); }
.legal p, .legal li { font-size: 14.5px; color: var(--text); }
.legal { max-width: 760px; }

/* ---------- Footer ---------- */
footer.site-footer {
  background: var(--navy-dark);
  color: #B9C6D6;
  margin-top: 40px;
  padding: 28px 0;
  font-size: 13px;
  position: relative;
}
footer.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--red) 0%, var(--navy) 55%, var(--navy) 100%);
}
footer.site-footer a { color: #D9E2EC; }
.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Scroll reveal ---------- */
.reveal-hidden {
  opacity: 0;
  transform: translateY(14px);
}
.reveal-hidden.reveal-visible {
  opacity: 1;
  transform: none;
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), background 0.15s var(--ease);
  z-index: 150;
}
.back-to-top.visible {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.back-to-top:hover {
  background: var(--navy-dark);
}
.back-to-top svg {
  width: 20px;
  height: 20px;
}
/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .kontakt-grid { grid-template-columns: 1fr; }

  .header-inner {
    position: relative;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 0;
  }

  .header-inner > .logo {
    align-self: auto;
    min-width: 0;
    flex-shrink: 1;
  }
  .logo img {
    height: auto;
    max-height: 50px;
    width: auto;
    max-width: 100%;
  }

  .header-inner > .nav-toggle {
    position: static;
    flex-shrink: 0;
    display: inline-flex;
  }
  .nav-toggle {
    padding: 8px 12px;
    font-size: 14px;
  }

  .header-inner > .btn-termin {
    display: none;
  }

  nav.main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1.5px solid var(--navy);
    border-top: none;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    z-index: 100;
  }
  nav.main-nav.open {
    display: block;
  }

  nav.main-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 0;
    margin: 0;
  }

  nav.main-nav li {
    border-bottom: 1px solid var(--border);
  }
  nav.main-nav li:last-child { border-bottom: none; }

  nav.main-nav a {
    display: block;
    padding: 18px 20px;
    font-size: 16px;
    font-weight: 600;
    min-height: 24px;
  }
  nav.main-nav a.active {
    background: #FBEEEE;
  }

  .nav-mobile-cta {
    display: block;
    padding: 16px 20px;
  }
  .nav-mobile-cta .btn-termin {
    display: block;
    width: 100%;
    text-align: center;
    font-size: 15px;
    padding: 12px 18px;
  }

  .hero h1 { font-size: 26px; }
}

@media (max-width: 400px) {
  .logo img { max-height: 42px; }
  .topbar { font-size: 11px; }
  .topbar .icon { width: 12px; height: 12px; }
  .nav-toggle { font-size: 13px; padding: 7px 10px; }
}
