/* Base variables */
:root{
  --bg: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --accent-physio: #00AFB5;
  --accent-logo: #91CC68;
  --accent-osteo: #F58A00;
  --max-width: 1100px;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(16,24,40,0.1);
  --transition: 400ms cubic-bezier(.2,.9,.2,1);
}

/* Bereichsfarben (used in Kontakt) */
.physio { background-color: var(--accent-physio) }
.logopaedie { background-color: var(--accent-logo) }
.osteo { background-color: var(--accent-osteo) }

/* Reset & base */
*{ box-sizing: border-box }
html, body{ height: 100% }
body{
  margin: 0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.45;
}

.muted{ color: var(--muted) }
a{ color: inherit; text-decoration: none }

.container{
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 20px;
}

/* Header (hero-style block above nav) */
.site-header{
  background: linear-gradient(to right, #0077b6, #00b4d8);
  color: #fff;
  text-align: center;
  padding: 3rem 1rem 2rem 1rem;
}
.header-content{ max-width: 600px; margin: 0 auto; }
.site-header h1{ margin: .5rem 0 .2rem; font-size: 2.5rem; font-weight: 700; }
.site-header p{ margin: .5rem 0 0; font-size: 1.1rem; }

/* Header logo */
.logo-large{ max-width: 320px; width: 100%; height: auto; display: block; margin: 0 auto 1rem; }
@media (max-width: 900px){ .logo-large{ max-width: 180px; } }

/* Sticky navigation bar */
.header-nav{
  position: -webkit-sticky; /* Safari */
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(255,255,255,0.85));
  border-bottom: 1px solid rgba(16,24,40,0.08);
  box-shadow: 0 2px 12px rgba(16,24,40,0.04);
}
.header-inner{ display: flex; align-items: center; justify-content: space-between; max-width: var(--max-width); margin: 0 auto; padding: 14px 20px; }
#mainnav{ display: flex; gap: 18px; align-items: center; }
#mainnav a{ padding: 8px 12px; border-radius: 10px; font-weight: 600; color: var(--muted); }
#mainnav a:hover{ color: var(--text); background: rgba(0,0,0,0.03); }

/* Navigation logo */
.nav-logo{ 
  display: flex; 
  align-items: center; 
  text-decoration: none;
  transition: opacity 0.3s ease;
}
.nav-logo:hover{ opacity: 0.8; }
.nav-logo img{ 
  height: 32px; 
  width: auto; 
  display: block;
}

/* Burger button */
.burger{ display:none; background:none; border:0; padding:8px; cursor:pointer; border-radius:10px; }
.burger:focus-visible{ outline:2px solid var(--accent-physio); outline-offset:2px; }
.burger-bar{ display:block; width:24px; height:2px; background: var(--text); margin:5px 0; transition: transform .2s ease, opacity .2s ease; }

/* Mobile nav layout */
@media (max-width: 900px){
  .burger{ display:block; }
  #mainnav{ position: absolute; left:0; right:0; top:100%; background: rgba(255,255,255,0.98); border-bottom:1px solid rgba(16,24,40,0.08); box-shadow: 0 8px 20px rgba(16,24,40,0.08); display:none; flex-direction: column; gap:0; padding:10px; }
  .header-inner{ position: relative; }
  #mainnav a{ padding:12px 10px; display:block; border-radius:8px; }
  #mainnav.open{ display:flex; }
  
  /* Mobile logo adjustments */
  .nav-logo img{ height: 28px; }
}

/* Hero */
.hero{ display: grid; align-items: center; height: 60vh; min-height: 400px; }
.hero-title{ font-size: clamp(28px,5vw,44px); line-height: 1.03; margin: 0; }
.hero-sub{ color: var(--muted); margin-top: 12px; }
.hero-cta{ margin-top: 18px; display: flex; gap: 12px; }

/* Buttons */
.btn{ display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 12px; font-weight: 700; cursor: pointer; transition: var(--transition); }
.btn-primary{ background: var(--accent-physio); color: #fff; box-shadow: var(--shadow); }
.btn-ghost{ background: transparent; border: 1px solid rgba(16,24,40,0.06); }

/* Sections */
section{ padding: 80px 0 }
.section-head{ display: flex; align-items: center; gap: 18px; margin-bottom: 28px; }
.section-head img{ height: 200px }
.card{ background: #fff; border-radius: 12px; padding: 18px; box-shadow: var(--shadow); }
aside.card{ margin: 12px; }

/* Parallax separators */
.parallax{ height: 42vh; background-position: center; background-size: cover; background-attachment: fixed; display: flex; align-items: center; justify-content: center; }
.parallax .overlay{ width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--text); }
.parallax h2{ font-size: clamp(24px,4vw,40px); margin: 0; }

/* Multi-layered Parallax separators with transparency */
.parallax-layered {
  height: 42vh;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.parallax-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 120%; /* Größer für Parallax-Bewegung */
  background-position: center;
  background-size: cover;
  background-repeat: repeat;
  will-change: transform; /* Performance-Optimierung für Animationen */
}

.parallax-layer.bg-layer {
  z-index: 1;
  transform: translateY(0);
  width: 110%; /* Breiter für seitliche Bewegung */
  height: 300%; /* Höher für vertikale Parallax-Bewegung */
  left: -5%; /* Zentriert trotz größerer Breite */
  top: -75%; /* Kompensiert die extra Höhe */
}

.parallax-layer.fg-layer {
  z-index: 2;
  /*opacity: 0.3;*/
  transform: translateY(-10px);
  background-blend-mode: multiply;
  background-size: auto; /* Für tileable Bilder */
  background-repeat: repeat;
  width: 110%; /* Breiter für seitliche Bewegung */
  height: 400%; /* Höher für vertikale Parallax-Bewegung */
  left: -5%; /* Zentriert trotz größerer Breite */
  top: -100%; /* Kompensiert die extra Höhe */
}

.parallax-layered .overlay {
  position: relative;
  z-index: 3;
  background: rgba(255, 255, 255, 0.95);
  padding: 20px 40px;
  border-radius: var(--radius);
  backdrop-filter: blur(5px);
  box-shadow: var(--shadow);
  text-align: center;
}

.parallax-layered .overlay h2 {
  font-size: clamp(24px,4vw,40px); 
  margin: 0;
  color: var(--text);
}

/* Team */
.team-grid{ display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.team-member{ display: flex; flex-direction: column; align-items: center; text-align: center; padding: 18px; }
.team-member img{ width: 160px; height: 160px; object-fit: cover; border-radius: 20px; box-shadow: var(--shadow); }
.team-member h4{ margin: 12px 0 6px; }
.team-member p{ color: var(--muted); font-size: 14px; }
.team-member:hover img{ transform: translateY(-6px); transition: var(--transition); }

/* Profile grid (content + aside card) */
.profile-grid{ display: grid; grid-template-columns: 1fr 500px; gap: 24px; align-items: start; margin-bottom: 32px; }
@media (max-width: 900px){
  .profile-grid{ grid-template-columns: 1fr; gap: 16px; margin-bottom: 24px; }
  .profile-grid aside.card{ margin-top: 0; }
  .profile-grid h3{ font-size: 1.15em; }
  .profile-grid p{ font-size: 1em; }
}

/* Praxis content grid */
.praxis-content-grid{ display: grid; grid-template-columns: 1fr 360px; gap: 28px; align-items: start; }
@media (max-width: 900px){
  .praxis-content-grid{ grid-template-columns: 1fr; gap: 20px; }
  .praxis-content-grid aside.card{ margin-top: 16px; }
}

/* Gallery */
.gallery{ display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); grid-gap: 15px; }
.gallery img{ width: 100%; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,0.2); transition: transform .3s ease; cursor: pointer; }
.gallery img:hover{ transform: scale(1.05); }

/* Contact */
.contact-cards{ display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.contact-card{ padding: 18px; border-radius: 12px; border: 1px solid rgba(16,24,40,0.04); display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.contact-card h4{ display: flex; align-items: center; margin: 0; }
.contact-card .circle{ width: 24px; height: 24px; border-radius: 50%; display: inline-block; margin-right: 8px; vertical-align: middle; }

/* Divider */
.section-divider{ border: none; border-top: 1px solid #e0e0e0; margin: 32px 0 0; }

/* Footer */
footer{ padding: 36px 20px; text-align: center; color: var(--muted); }

/* Animations */
.animate{ opacity: 0; transform: translateY(18px); transition: opacity var(--transition), transform var(--transition); }
.animate.in-view{ opacity: 1; transform: none; }

/* Lightbox */
.lightbox{ display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.9); justify-content: center; align-items: center; flex-direction: column; }
.lightbox.active{ display: flex; }
.lightbox img{ max-width: 90%; max-height: 70%; border-radius: 10px; box-shadow: 0 2px 15px rgba(255,255,255,0.3); }
.lightbox-caption{ margin-top: 15px; color: #fff; font-size: 1.1rem; text-align: center; max-width: 80%; }
.lightbox-controls{ position: absolute; top: 50%; width: 100%; display: flex; justify-content: space-between; transform: translateY(-50%); padding: 0 20px; }
.lightbox-prev, .lightbox-next{ color: #fff; font-size: 3rem; font-weight: bold; text-decoration: none; cursor: pointer; user-select: none; }
.lightbox-prev:hover, .lightbox-next:hover{ color: #00b4d8; }
.lightbox-close{ position: absolute; top: 20px; right: 30px; font-size: 2rem; color: #fff; cursor: pointer; }
.lightbox-close:hover{ color: #00b4d8; }

/* Sticky JS fallback */
.header-nav.is-fixed { position: fixed; top: 0; left: 0; right: 0; }
body.has-fixed-nav { padding-top: var(--nav-h); }

/* Responsive tweaks */
@media (max-width: 900px){
  body{ font-size: 15px; }
  .parallax{ background-attachment: scroll; }
}

