/* ============================================
   WEIDENBORNpraxis — Mobile-optimized style.css
   ============================================ */

/* --- CSS Custom Properties (Theme) --- */
:root {
  --bg: #F2E5DC;
  --paper: #F6F3EC;
  --ink: #3a2c1e;
  --brand: #1F4396;
  --brand-dark: #16306b;
  --muted: #777;
  --radius: 0px;
  --shadow-sm: 0 2px 5px rgba(0,0,0,0.05);
  --shadow: 0 4px 8px rgba(0,0,0,0.08);
  --container-max: 1200px;
  --header-pad-y: 0.75rem;
}

/* --- Base / Reset --- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Work Sans', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background-color: var(--bg);
  color: var(--ink);
  font-size: clamp(15px, 1.4vw, 18px);
  line-height: 1.6;
}

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

.container {
  width: min(90%, var(--container-max));
  margin-inline: auto;
}

/* --- Header / Navigation --- */
.site-header {
  background-color: var(--paper);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-flex {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: var(--header-pad-y) 0;
}

.logo-block { flex: 1; text-align: center; }

.logo {
  font-size: clamp(1.75rem, 4.2vw, 3rem);
  font-weight: 300;
  color: #000;
  margin: 0;
  letter-spacing: 0.5px;
}

.subtitle {
  font-size: 0.95rem;
  color: #000;
  margin: 0.15rem 0 0;
  font-weight: 400;
  text-align: center;
}

/* Primary nav (desktop default) */
.main-nav {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  align-items: center;
  padding: 0 0 0.3rem;
  font-size: 0.95rem;
}

.main-nav a {
  color: var(--brand);
  text-decoration: none;
  font-weight: 400;
  padding: 0.5rem 0.6rem;
  border-radius: 6px;
}
.main-nav a:hover { text-decoration: underline; }

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.8rem;
  line-height: 1;
  color: var(--brand);
  cursor: pointer;
  padding: 0.5rem 0.6rem;
  margin-left: auto;
}

/* --- Hero --- */
.hero { max-width: var(--container-max); margin: 0 auto; padding: 0 1rem; }
.hero img { margin-top: 2rem; width: 100%; height: auto; display: block; }

/* --- Sections --- */
.intro, .services, .about-us { padding: 3rem 1rem 2.5rem; }
.intro h2, .services h2, .about-us h2 { color: var(--brand); font-size: clamp(1.5rem, 3.5vw, 2rem); text-align: center; }
h2, h3 { color: var(--brand); }

/* --- Cards / Grids --- */
.services { background-color: var(--bg); }
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}
.service-card {
  background-color: var(--paper);
  border-radius: var(--radius);
  overflow: hidden;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.service-card:hover { transform: translateY(-4px); }
.service-card img { width: 100%; height: 180px; object-fit: cover; }
.service-card h3 { margin: 1rem 0; font-weight: 400; color: var(--brand); font-size: 1.2rem; text-align: center; }

/* --- Footer --- */
.site-footer {
  background-color: var(--paper);
  text-align: center;
  padding: 2rem 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}
.footer-logo { height: 40px; margin-bottom: 0.75rem; }

/* --- Global links & buttons --- */
button {
  background-color: var(--brand);
  color: white;
  border: none;
  padding: 0.8rem 1.2rem;
  font-size: 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.25s ease;
}
button:hover { background-color: var(--brand-dark); }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* --- Divider --- */
.hero-divider {
  height: 1px;
  background: linear-gradient(to right, transparent, #ccc, transparent);
  margin: 2rem auto;
  width: 80%;
}

/* --- Forms --- */
input[type="text"], input[type="email"], textarea {
  width: 100%;
  padding: 0.8rem;
  margin-top: 0.25rem;
  margin-bottom: 1rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  background-color: #fff;
}
label { font-weight: 500; color: var(--ink); display: block; }

/* --- Accessibility: focus styles --- */
:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand) 55%, white);
  outline-offset: 2px;
  border-radius: 6px;
}

/* --- Responsive Enhancements --- */
@media (max-width: 1024px) { .container { width: 94%; } }

@media (max-width: 768px) {
  body { font-size: clamp(15px, 4.2vw, 17px); }
  .intro, .services, .about-us { padding: 2rem 1rem; }
  h2 { font-size: clamp(1.35rem, 4.5vw, 1.6rem); }
  h3 { font-size: clamp(1.1rem, 4vw, 1.25rem); }
  .hero img { margin-top: 0.5rem; }
  .service-grid { grid-template-columns: 1fr; }
  .service-card img { height: auto; }
  .menu-toggle { display: block; }
  .main-nav {
    position: fixed;
    left: 0; right: 0;
    top: calc(var(--header-pad-y) * 2 + 52px);
    background-color: var(--paper);
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    padding: 0.75rem 0.75rem 1rem;
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
    border-bottom-left-radius: 14px;
    border-bottom-right-radius: 14px;
    transform-origin: top center;
    transform: translateY(-10px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s ease, opacity 0.25s ease;
  }
  body.menu-open .main-nav { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .main-nav a { padding: 0.8rem 0.9rem; border-radius: 8px; }
}

@media (max-width: 480px) {
  p { font-size: 0.95rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}



/* Hausärztliche Versorgung – Layout-Ergänzungen */
.lead { font-size: 1.125rem; line-height: 1.6; margin: 0 0 1rem; }
.section { margin: 1.25rem 0 1.75rem; }
.feature-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); gap: 1rem; }
.feature { background: var(--paper, #F6F3EC); padding: 1rem; border-radius: 14px; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.callout { background: #fff; border: 1px solid rgba(0,0,0,.08); padding: 1rem; border-radius: 14px; display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.callout .button { padding: .55rem 1rem; border-radius: 999px; border: 1px solid rgba(0,0,0,.1); text-decoration: none; font-weight: 600; }
.callout .muted { opacity: .8; }
.checklist { padding-left: 1.2rem; }
.checklist li { margin: .35rem 0; }
.faq details { background: #fff; border: 1px solid rgba(0,0,0,.08); border-radius: 12px; padding: .75rem 1rem; margin: .5rem 0; }
.faq summary { cursor: pointer; font-weight: 600; }


.numbered { counter-reset: it; padding-left: 1.2rem; }
.numbered > li { margin:.35rem 0; }



/* Inhaltsverzeichnis für Hausarzt-Seite */
.page-toc { background: #fff; border:1px solid rgba(0,0,0,.08); padding:1rem; border-radius:12px; margin:1rem 0 2rem; }
.page-toc strong { display:block; margin-bottom: .5rem; }
.page-toc ul { list-style: none; margin:0; padding:0; display:grid; grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); gap:.25rem .75rem; }
.page-toc li { margin:0; }
.page-toc a { text-decoration:none; color: var(--brand, #1F4396); font-size:.95rem; }
.page-toc a:hover { text-decoration:underline; }

.page-toc a.active { font-weight: 700; color: var(--ink,#3A2C1E); }



.back-to-top { margin: .5rem 0 1.25rem; font-size: .9rem; }
.back-to-top a { text-decoration: none; opacity: .8; }
.back-to-top a:hover { text-decoration: underline; opacity: 1; }





/* Sticky-TOC am Desktop-Rand */
@media (min-width: 1200px) {
  .page-toc.page-toc--sticky {
    position: sticky;
    top: 110px;
    float: right;
    width: 280px;
    z-index: 10;
    max-height: calc(100vh - 140px);
    overflow: auto;
    margin-left: 1.25rem;
  }
  /* Platz für die Sidebar schaffen */
  
}



/* Zwei-Spalten-Layout für Seiten mit linkem TOC */
@media (min-width: 1200px) {
  main .container.has-toc-left {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    align-items: start;
  }
  .page-toc.page-toc--left {
    position: sticky;
    top: 110px;
    max-height: calc(100vh - 140px);
    overflow: auto;
  }
  /* Alle anderen Elemente (außer TOC) in Spalte 2 */
  .container.has-toc-left > :not(.page-toc) {
    grid-column: 2;
  }
}
/* Mobile/Tablet: TOC normal im Fluss über dem Inhalt */
@media (max-width: 1199px) {
  .page-toc.page-toc--left { position: static; max-height: none; overflow: visible; }
  main .container.has-toc-left { display: block; }
}
