/* ============================================================
   Ordination Dr. Ewald Steffal
   Farbschema: Salbei & Sand
   ============================================================ */

:root {
  --sage-dark:  #4A6B5A;   /* Primaer */
  --sage:       #7D9D8C;   /* Akzent  */
  --sage-light: #C9D6CC;   /* helle Flaeche */
  --sand:       #F3EFE7;   /* Hintergrund */
  --ink:        #2B332E;   /* Text */
  --ink-soft:   #5A655D;   /* Sekundaertext */
  --white:      #ffffff;
  --border:     #E3DED2;
  --shadow:     0 2px 14px rgba(74, 107, 90, 0.08);
  --radius:     10px;
  --maxw:       1080px;
  --font-sans:  'Inter', system-ui, -apple-system, sans-serif;
  --font-serif: 'Source Serif 4', Georgia, serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--sand);
  line-height: 1.65;
  font-size: 17px;
  overflow-x: hidden;
}

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

h1, h2, h3, h4 { font-family: var(--font-serif); color: var(--sage-dark); line-height: 1.25; font-weight: 600; }
h1 { font-size: 2.4rem; margin: 0 0 .5rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.25rem; }

a { color: var(--sage-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.btn {
  display: inline-block;
  background: var(--sage-dark);
  color: var(--white);
  padding: 12px 26px;
  border-radius: var(--radius);
  border: none;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background .2s;
}
.btn:hover { background: #3c5849; text-decoration: none; }
.btn-outline {
  background: transparent;
  color: var(--sage-dark);
  border: 1.5px solid var(--sage-dark);
}
.btn-outline:hover { background: var(--sage-dark); color: var(--white); }

/* ---------- Top-Info-Leiste (nur Desktop) ---------- */
.topbar {
  background: var(--sage-dark);
  color: #DDE6E0;
  font-size: .85rem;
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 22px;
}
.topbar a { color: #DDE6E0; }
.topbar a:hover { color: var(--white); text-decoration: none; }
.topbar .sep { margin: 0 10px; color: var(--sage); }

/* ---------- Lebenslauf-Intro (Bild + Text nebeneinander) ---------- */
.cv-intro { display: grid; grid-template-columns: 240px 1fr; gap: 30px; align-items: start; margin-bottom: 2rem; }
.cv-intro img { width: 100%; border-radius: var(--radius); margin: 0; aspect-ratio: 1; object-fit: cover; }
.cv-intro .cv-intro-text p { margin-top: 0; }

/* ---------- Header ---------- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 22px; }
.brand { display: flex; align-items: center; }
.brand-logo { height: 58px; width: auto; display: block; }
.brand-name { font-family: var(--font-serif); font-weight: 600; font-size: 1.25rem; color: var(--sage-dark); }
.brand-sub  { font-size: .8rem; color: var(--ink-soft); letter-spacing: .02em; }
.site-nav { display: flex; gap: 26px; }
.site-nav a { color: var(--ink); font-weight: 500; padding: 6px 0; border-bottom: 2px solid transparent; }
.site-nav a:hover, .site-nav a.active { color: var(--sage-dark); border-bottom-color: var(--sage); text-decoration: none; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--sage-dark); display: block; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 72px 0;
  /* Basis: weicher Creme-zu-Salbei-Verlauf, links heller (ruhig fuer Text),
     rechts etwas mehr Farbe (Tiefe hinter der weissen Karte) */
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(125,157,140,.20) 0%, rgba(125,157,140,0) 55%),
    linear-gradient(115deg, var(--sand) 0%, var(--sand) 38%, #EAEDE6 70%, var(--sage-light) 130%);
}
/* Weiche organische Glow-Flaechen fuer Tiefe – ::before traegt zwei,
   ::after eine weitere; alle stark weichgezeichnet, ohne harte Kanten. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(38% 60% at 82% 28%, rgba(74,107,90,.22) 0%, rgba(74,107,90,0) 70%),
    radial-gradient(45% 55% at 96% 88%, rgba(125,157,140,.28) 0%, rgba(125,157,140,0) 72%);
  filter: blur(20px);
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(30% 45% at 12% 92%, rgba(201,214,204,.45) 0%, rgba(201,214,204,0) 70%);
  filter: blur(24px);
}
.hero .container { position: relative; z-index: 1; display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: center; }
.hero-text h1 { font-size: 2.8rem; }
.hero-text .lead { font-size: 1.2rem; color: var(--ink-soft); margin: 1rem 0 1.8rem; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-card {
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 26px;
}
.hero-card h3 { margin-top: 0; }

/* ---------- Sections ---------- */
section.block { padding: 64px 0; }
section.block.alt { background: var(--white); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 44px; }
.section-head p { color: var(--ink-soft); }

/* ---------- Karten-Raster ---------- */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow);
}
.card h3 { margin-top: 0; }

/* Leistungs-Kacheln */
.leistung-card { display: flex; flex-direction: column; gap: 10px; }
.leistung-card .icon {
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--sage-light); color: var(--sage-dark);
  display: flex; align-items: center; justify-content: center; font-size: 1.4rem;
  font-family: var(--font-serif); font-weight: 600;
}

/* Info-Zeilen */
.info-row { display: flex; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.info-row:last-child { border-bottom: none; }
.info-row .label { color: var(--ink-soft); min-width: 120px; flex-shrink: 0; }
.info-row span:not(.label) { min-width: 0; overflow-wrap: break-word; word-break: break-word; }

/* ---------- Inhalt / Prosa ---------- */
.prose { max-width: 760px; margin: 0 auto; }
.prose p { margin: 0 0 1.1rem; }
.prose h2 { margin: 2rem 0 .8rem; }
.prose h3 { margin: 1.6rem 0 .6rem; }
.prose ul { padding-left: 1.3rem; }
.prose li { margin: .3rem 0; }
.prose img { border-radius: var(--radius); margin: 1.4rem 0; }

.page-head { background: var(--sage-light); padding: 48px 0; text-align: center; }
.page-head h1 { margin: 0; }
.page-head p { color: var(--ink-soft); margin: .4rem 0 0; }

/* ---------- Blog ---------- */
.post-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }
.post-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  display: flex; flex-direction: column;
}
.post-card .thumb { aspect-ratio: 16/9; background: var(--sage-light); overflow: hidden; }
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-card .body { padding: 20px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.post-card .date { font-size: .85rem; color: var(--sage); font-weight: 500; }
.post-card h3 { margin: 0; }
.post-card .excerpt { color: var(--ink-soft); font-size: .95rem; }
.post-card .more { margin-top: auto; font-weight: 500; }

.post-single { max-width: 760px; margin: 0 auto; }
.post-single .meta { color: var(--sage); font-weight: 500; margin-bottom: 1rem; }
.post-single .cover { border-radius: var(--radius); margin-bottom: 1.6rem; }

.empty-state { text-align: center; color: var(--ink-soft); padding: 60px 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--sage-dark); color: #DDE6E0; margin-top: 64px; }
.footer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; padding: 50px 22px; }
.site-footer h3 { color: var(--white); font-size: 1.05rem; margin: 0 0 .8rem; }
.site-footer a { color: #C9D6CC; }
.site-footer a:hover { color: var(--white); }
.oz-table { width: auto; font-size: .92rem; border-collapse: collapse; }
.oz-table td { padding: 3px 0; white-space: nowrap; vertical-align: top; }
.oz-table td:first-child { padding-right: 20px; }
.oz-hinweis { font-size: .82rem; color: #A9BDB0; margin-top: .8rem; }
.footer-nav { display: flex; flex-direction: column; gap: 6px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); font-size: .85rem; color: #A9BDB0; }
.footer-bottom .container { display: flex; justify-content: space-between; padding: 16px 22px; flex-wrap: wrap; gap: 8px; }

/* ---------- Popup ---------- */
.popup-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(43, 51, 46, .55);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.popup-overlay[hidden] { display: none; }
.popup-box {
  background: var(--white); border-radius: var(--radius);
  max-width: 460px; width: 100%; padding: 34px; position: relative;
  box-shadow: 0 10px 40px rgba(0,0,0,.25); text-align: center;
}
.popup-box h2 { margin-top: 18px; }
.popup-zeitraum { font-size: 1.15rem; color: var(--sage-dark); }
.popup-close {
  position: absolute; top: 10px; right: 14px; background: none; border: none;
  font-size: 1.8rem; line-height: 1; color: var(--ink-soft); cursor: pointer;
  z-index: 2;
}
.popup-ok { margin-top: 1rem; }

/* ---------- Formular ---------- */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 500; margin-bottom: 6px; }
input[type=text], input[type=email], input[type=tel], input[type=date],
input[type=password], textarea, select {
  width: 100%; padding: 11px 13px; border: 1px solid var(--border);
  border-radius: 8px; font-family: inherit; font-size: 1rem; background: var(--white);
}
textarea { resize: vertical; min-height: 120px; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--sage); outline-offset: 1px; }

.notice { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; }
.notice.ok   { background: #E4F0E9; color: #2f5e44; }
.notice.err  { background: #F6E2DE; color: #8a3a26; }

/* Datenschutz-Checkbox deutlich sichtbar */
.ds-checkbox {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: var(--sage-dark);
  cursor: pointer;
}

/* ---------- Floating Call-Button (nur Mobile) ---------- */
.call-fab {
  display: none;
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 900;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--sage-dark);
  color: var(--white);
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(74, 107, 90, 0.45);
  text-decoration: none;
}
.call-fab:hover { background: #3c5849; text-decoration: none; }
.call-fab svg { display: block; pointer-events: none; }

/* Sicherheitsnetz: auf Desktop (>880px) niemals anzeigen */
@media (min-width: 881px) {
  .call-fab { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  .call-fab { animation: none !important; }
}

@keyframes fab-pulse {
  0%   { box-shadow: 0 6px 20px rgba(74,107,90,.45), 0 0 0 0 rgba(74,107,90,.45); }
  70%  { box-shadow: 0 6px 20px rgba(74,107,90,.45), 0 0 0 14px rgba(74,107,90,0); }
  100% { box-shadow: 0 6px 20px rgba(74,107,90,.45), 0 0 0 0 rgba(74,107,90,0); }
}

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  /* Call-FAB: erscheint erst beim Scrollen (per JS .visible) */
  .call-fab {
    display: flex;
    width: 52px;
    height: 52px;
    opacity: 0;
    transform: translateY(90px);
    pointer-events: none;
    transition: opacity .4s ease, transform .5s cubic-bezier(.22,1,.36,1);
  }
  .call-fab.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    animation: fab-pulse 2.4s ease-out .3s infinite;
  }

  /* Popup auf schmalen Bildschirmen kompakter */
  .popup-box { padding: 26px 20px; }
  .popup-zeitraum { font-size: 1.05rem; }

  /* Formular-Ende bekommt Luft, damit der schwebende Call-Button
     Checkbox und Absende-Button nicht verdeckt */
  .contact-form { padding-bottom: 76px; }

  /* Info-Zeilen: schmaleres Label + kleinerer Abstand, damit lange Werte
     (z. B. E-Mail) genug Platz haben, ohne die Karte zu sprengen */
  .contact-info .info-row { gap: 8px; }
  .contact-info .info-row .label { min-width: 78px; }
  .card a { overflow-wrap: break-word; word-break: break-word; }

  .hero .container, .grid-3, .grid-2, .post-list, .footer-grid { grid-template-columns: 1fr; }
  .cv-intro { grid-template-columns: 1fr; gap: 18px; }
  .cv-intro img { max-width: 260px; }
  .topbar { display: none !important; }
  .brand-logo { height: 44px; }
  .team-card { grid-template-columns: 1fr !important; direction: ltr !important; text-align: center; }
  .team-card img { max-width: 220px; margin: 0 auto; }
  .hero { padding: 48px 0; }
  /* Glow-Flaechen fuer gestapeltes Mobile-Layout neu verteilen:
     oben rechts und unten, statt nur rechts aussen */
  .hero { background:
    radial-gradient(140% 90% at 100% 0%, rgba(125,157,140,.22) 0%, rgba(125,157,140,0) 60%),
    linear-gradient(160deg, var(--sand) 0%, #EAEDE6 65%, var(--sage-light) 130%); }
  .hero::before { background:
    radial-gradient(60% 30% at 85% 8%, rgba(74,107,90,.20) 0%, rgba(74,107,90,0) 70%),
    radial-gradient(70% 35% at 50% 100%, rgba(125,157,140,.26) 0%, rgba(125,157,140,0) 72%); }
  .hero::after { background:
    radial-gradient(50% 28% at 8% 96%, rgba(201,214,204,.40) 0%, rgba(201,214,204,0) 70%); }

  /* Hero zentriert auf Mobile */
  .hero-text { text-align: center; }
  .hero-text h1 { font-size: 2rem; }
  .hero-text .lead { font-size: 1.05rem; }

  /* Buttons full-width und gleich lang */
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; text-align: center; }

  /* Sektionstitel: passen auf iPhone-Breite in eine Zeile */
  .section-head h2, .page-head h1 { font-size: 1.5rem; }

  /* Team-Fotos auf Startseite +20% (140 -> 168px) */
  .team-avatar { width: 168px !important; height: 168px !important; }

  .nav-toggle { display: flex; }
  .site-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--white); flex-direction: column; gap: 0;
    border-bottom: 1px solid var(--border); padding: 8px 22px;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px 0; border-bottom: 1px solid var(--border); }
  .footer-bottom .container { flex-direction: column; }
}
