:root{
  --bg:#ffffff;
  --fg:#1f2937;
  --muted:#6b7280;
  --brand:#0ea5a3;    /* Praxis-Türkis */
  --line:#e5e7eb;
  --panel:#f6f7f9;
  --max:1200px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font:16px/1.65 system-ui,-apple-system,"Segoe UI",Roboto,Ubuntu,Cantarell,Helvetica,Arial,sans-serif;
  color:var(--fg); background:var(--bg);
  -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;
}
.site-bg{
  background:
    radial-gradient(1200px 520px at 50% -220px, #f3f4f6 40%, transparent 70%) no-repeat,
    linear-gradient(#fafafa, #fff 240px) no-repeat;
}

img{max-width:100%;height:auto;display:block}
a{color:inherit;text-decoration:none}
.container{width:min(92%, var(--max));margin-inline:auto}

/* Typo */
h1{font-size:clamp(1.6rem,2vw,2rem);margin:.2rem 0 1rem}
h2{font-size:clamp(1.25rem,1.6vw,1.5rem);margin:1.4rem 0 .8rem}
h3{font-size:clamp(1.05rem,1.3vw,1.2rem);margin:1rem 0 .6rem}
p{margin:.5rem 0}

/* Header */
.site-header{position:sticky;top:0;z-index:50;background:#fff;border-bottom:1px solid var(--line);box-shadow:0 2px 10px rgba(0,0,0,.03)}
.site-header .container{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.6rem 0}
.logo{display:flex;align-items:center}
.logo img{
  display:block;
  height:48px;          /* feste Höhe */
  width:auto;           /* Seitenverhältnis bewahren */
  max-width:220px;
  object-fit:contain;   /* iOS-sicher */
}
.main-nav ul{list-style:none;display:flex;gap:.8rem;margin:0;padding:0;flex-wrap:wrap}
.main-nav a{padding:.35rem .6rem;border-radius:.5rem;font-size:.95rem;color:#374151;white-space:nowrap}
.main-nav a:hover{background:#f3f4f6}

/* Intro */
.intro-section{display:grid;gap:1.25rem;padding:1.3rem 0;grid-template-columns:1.3fr 1fr}
@media (min-width:1100px){ .intro-section{grid-template-columns:1fr 1fr} }
@media (max-width: 900px){ .intro-section{grid-template-columns:1fr} }

/* Slider */
.intro-slider{display:flex;gap:.75rem;overflow-x:auto;scroll-snap-type:x mandatory;padding-bottom:.25rem;-ms-overflow-style:none;scrollbar-width:none}
.intro-slider::-webkit-scrollbar{display:none}
.slide{min-width:100%;scroll-snap-align:start;border-radius:14px;overflow:hidden;box-shadow:0 10px 24px rgba(0,0,0,.06)}
.slide img{width:100%;height: clamp(220px, 45vw, 460px);object-fit:cover}

/* Icon-Boxen */
.intro-cards{display:flex;flex-direction:column;gap:1.05rem}
.feature{
  display:grid;grid-template-columns:72px 1fr;gap:1rem;align-items:start;
  background:#fff;border:1px solid var(--line);
  padding:1.15rem;border-radius:16px;box-shadow:0 8px 24px rgba(0,0,0,.05)
}
.feature-body p{margin:0;font-size:1rem}
.feature-icon{
  width:72px;height:72px;border-radius:999px;border:2px solid #d1d5db;
  display:grid;place-items:center;background:#fff
}
.feature-icon svg{width:38px;height:38px;fill:none;stroke:var(--brand);stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
@media (max-width:480px){
  .feature{grid-template-columns:60px 1fr;padding:1rem}
  .feature-icon{width:60px;height:60px}
  .feature-icon svg{width:32px;height:32px}
}

/* NEWS */
.news{background:#fff}
.news-inner{padding:1rem 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.news-eyebrow{
  margin:.6rem 0 .5rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;
  color:var(--brand);font-size:clamp(1.4rem,3.2vw,2.4rem);
}
.news-title{margin:.2rem 0 .8rem;font-weight:700;color:#4b5563}
.news-lead{color:#4b5563;font-size:1.05rem;line-height:1.6}
.news-times{list-style:none;margin:.8rem 0 1rem;padding:0}
.news-times li{padding:.15rem 0}
.news-phone{font-size:1.4rem;font-weight:700;margin:0 0 .4rem}
.news-phone a{text-decoration:none}

/* Galerie – 3 Spalten auf groß (6 Bilder ⇒ 2 Reihen) */
#praxis{padding:1rem 0}
#praxis h2{margin:1.2rem 0 .8rem}
.gallery{display:grid;gap:1rem;grid-template-columns:repeat(auto-fill,minmax(220px,1fr))}
@media (min-width:1100px){ .gallery{grid-template-columns:repeat(3,1fr)} }
.gallery img{
  border-radius:12px;aspect-ratio:4/3;object-fit:cover;
  box-shadow:0 6px 16px rgba(0,0,0,.05);
  transition:transform .2s ease, box-shadow .2s ease; cursor:zoom-in;
}
.gallery img:hover{transform:translateY(-2px);box-shadow:0 10px 22px rgba(0,0,0,.08)}

/* Lightbox */
.lightbox{position:fixed;inset:0;background:rgba(0,0,0,.85);display:none;align-items:center;justify-content:center;z-index:200;padding:2rem}
.lightbox.open{display:flex}
.lightbox img{max-width:92vw;max-height:92vh;border-radius:12px;box-shadow:0 20px 60px rgba(0,0,0,.5)}

/* Philosophie */
#philosophie{padding:.5rem 0 1.2rem}
#philosophie h2{margin:1.2rem 0 .6rem}
#philosophie p{margin:.6rem 0;hyphens:auto}

/* Info-Grid unten */
.info-grid{background:var(--panel);border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:1.4rem 0}
.info-grid .grid{display:grid;grid-template-columns:repeat(3,1fr);gap:1.4rem}
@media (max-width: 900px){.info-grid .grid{grid-template-columns:1fr}}
.info-grid h3{margin:.4rem 0 1rem}
.list,.contact{list-style:none;margin:0;padding:0}
.list li,.contact li{padding:.35rem 0;color:var(--fg)}
.chevrons li{position:relative;padding-left:1.1rem}
.chevrons li::before{content:"›";position:absolute;left:0;top:.35rem;color:#9aa0a6}
.map-thumb{border:1px solid var(--line);border-radius:12px;cursor:zoom-in;box-shadow:0 6px 16px rgba(0,0,0,.05)}

/* Footer */
.site-footer{border-top:1px solid var(--line);padding:1rem 0;background:#fff}
.site-footer .legal{list-style:none;display:flex;gap:1rem;justify-content:center;margin:0;padding:0;flex-wrap:wrap}
.site-footer .legal a{color:var(--muted)}

/* Cookie Banner */
.cookie-banner{
  position:fixed;left:0;right:0;bottom:0;z-index:9999;
  background:#111827;color:#fff;text-align:center;
  padding:.85rem 1rem calc(.85rem + env(safe-area-inset-bottom)); /* iPhone safe-area */
  box-shadow:0 -8px 24px rgba(0,0,0,.18);
}
.cookie-banner.hidden{display:none}
.cookie-banner button{
  margin-left:.5rem;padding:.45rem .75rem;border:0;border-radius:8px;background:#fff;color:#111827;cursor:pointer
}
.cookie-banner button:focus-visible{outline:2px solid #fff;outline-offset:2px}

@media (max-width:480px){
  .main-nav a{padding:.3rem .45rem;font-size:.9rem}
  .news-lead{font-size:1rem}
}
/* ===== Legacy-Firefox/Old-Browser Fallbacks ===== */

/* 0) Basis-Safety */
*, *::before, *::after { box-sizing: border-box; }
img, svg { max-width: 100%; height: auto; display: block; }

/* 1) Kein flex-gap vorhanden -> benutze Margins */
@supports not (gap: 1rem) {
  /* Icon-Karten oben */
  .intro-cards { 
    display: flex; 
    flex-wrap: wrap; 
    margin: -8px;               /* „künstliches gap“ */
  }
  .intro-cards .feature {
    flex: 1 1 320px;
    margin: 8px;
  }
}

/* 2) Falls Grid fehlt -> Galerie auf flex-Fallback umstellen */
@supports not (display: grid) {
  .gallery {
    display: flex;
    flex-wrap: wrap;
    margin: -8px;
  }
  .gallery > * {
    width: calc(50% - 16px);
    margin: 8px;
  }
  @media (min-width: 900px) {
    .gallery > * { width: calc(33.333% - 16px); }
  }
}

/* 3) Falls ein Browser kein aspect-ratio kann, Slider sicher anzeigen */
@supports not (aspect-ratio: 1 / 1) {
  .intro-slider .slide { position: relative; }
  .intro-slider .slide::before {
    content: "";
    display: block;
    padding-top: 56.25%; /* 16:9 Platzhalter */
  }
  .intro-slider .slide > img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
  }
}
