/* ============================================================
   Orthopädie Gerstner Berlin — Main Stylesheet
   Pure CSS3, no frameworks. Mobile-first responsive.
   ============================================================ */

/* --- CSS Custom Properties (Design Tokens) --- */
:root {
  /* Colors — dunkleres Türkis */
  --color-primary: #0A5C5F;
  --color-primary-light: #0D7377;
  --color-primary-dark: #063D3F;
  --color-primary-bg: #e0eff0;
  --color-accent: #D4A853;
  --color-accent-light: #f0e0b8;
  --color-bg: #F8F9FA;
  --color-surface: #FFFFFF;
  --color-text: #1A1A2E;
  --color-text-secondary: #5B6270;
  --color-text-light: #9CA3AF;
  --color-border: #E5E7EB;
  --color-success: #059669;
  --color-error: #DC2626;

  /* Typography */
  --font-heading: 'Inter', 'Segoe UI', 'SF Pro Display', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', 'Segoe UI', 'SF Pro Text', system-ui, -apple-system, sans-serif;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  /* Layout */
  --max-width: 1200px;
  --nav-height: 80px;

  /* Effects */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 4px 16px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 20px rgba(13,115,119,0.1);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.12);
  --shadow-xl: 0 12px 48px rgba(0,0,0,0.16);
  --transition: 0.15s ease;
  --ease-out: cubic-bezier(.22,1,.36,1);
  --ease-spring: cubic-bezier(.34,1.56,.64,1);
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: clamp(0.95rem, 0.9rem + 0.25vw, 1.05rem);
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--color-primary-light);
}

ul, ol {
  list-style: none;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--color-text);
  line-height: 1.3;
  font-weight: 700;
}

h1 { font-size: clamp(1.4rem, 1.2rem + 1vw, 2rem); }
h2 { font-size: clamp(1.2rem, 1rem + 0.7vw, 1.6rem); margin-bottom: 16px; }
h3 { font-size: clamp(1rem, 0.9rem + 0.4vw, 1.2rem); }
h4 { font-size: clamp(1rem, 0.95rem + 0.25vw, 1.15rem); }

p {
  margin-bottom: var(--space-md);
}

/* --- Skip Link (Accessibility) --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-primary);
  color: #fff;
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-sm);
  z-index: 9999;
  font-weight: 600;
}

.skip-link:focus {
  top: var(--space-sm);
  color: #fff;
}

/* --- Container --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* --- Header & Navigation --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.98);
  z-index: 1000;
  transition: box-shadow var(--transition), height var(--transition);
  border-bottom: 1px solid transparent;
}

@media (min-width: 901px) {
  .header {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.97);
  }
}

.header.scrolled {
  box-shadow: var(--shadow-md);
  border-bottom-color: var(--color-border);
  height: 64px;
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--color-text);
  text-decoration: none;
  flex-shrink: 0;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: var(--color-primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition);
}

.logo:hover .logo-icon {
  transform: scale(1.05);
}

.logo-icon svg {
  width: 24px;
  height: 24px;
  fill: #fff;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

/* Navigation */
.nav {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

/* Support both header layouts: flat (.header > .container) and wrapped (.header-content) */
.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.nav .nav-link {
  display: block;
  padding: var(--space-sm) var(--space-md);
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
  white-space: nowrap;
}

.nav .nav-link:hover,
.nav .nav-link.active {
  color: var(--color-primary);
  background: var(--color-primary-bg);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.6rem 1.2rem;
  background: var(--color-primary);
  color: #fff !important;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  white-space: nowrap;
  text-decoration: none;
}

.nav-cta:hover {
  background: var(--color-primary-light);
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(13, 115, 119, 0.3);
}

.nav-cta svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 48px;
  height: 48px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
  position: relative;
  z-index: 1002;
}

.hamburger:hover {
  background: var(--color-primary-bg);
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Logo text variants */
.logo-text .logo-title {
  font-size: 1.1rem;
  color: var(--color-text);
  font-weight: 700;
}

.logo-text .logo-subtitle {
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--color-text-secondary);
  letter-spacing: 0.02em;
}

/* Mobile Nav */
@media (max-width: 900px) {
  .hamburger {
    display: flex;
  }

  /* Nav overlay — moved to body via JS to escape header stacking context */
  .nav {
    display: none;
  }

  .nav.open {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    flex-direction: column;
    justify-content: flex-start;
    padding: 0;
    gap: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 1001;
  }

  /* Spacer so links don't hide under header */
  .nav::before {
    content: '';
    display: block;
    min-height: 64px;
    flex-shrink: 0;
  }

  .nav .nav-link {
    display: flex;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 500;
    padding: 16px 24px;
    width: 100%;
    color: var(--color-text);
    border-bottom: 1px solid var(--color-border);
    border-radius: 0;
    min-height: 56px;
    transition: background 0.15s ease, color 0.15s ease;
  }

  .nav .nav-link:first-of-type {
    border-top: 1px solid var(--color-border);
  }

  .nav .nav-link:hover,
  .nav .nav-link.active {
    background: var(--color-primary-bg);
    color: var(--color-primary);
  }

  /* Doctolib CTA inside mobile nav */
  .nav .mobile-nav-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 24px;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 16px rgba(10, 92, 95, 0.3);
    text-decoration: none;
    min-height: 52px;
    flex-shrink: 0;
  }

  .nav .mobile-nav-cta:hover {
    color: #fff;
    opacity: 0.9;
  }

  /* Phone link in mobile nav */
  .nav .mobile-nav-phone {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0 24px 24px;
    padding: 14px 24px;
    background: var(--color-primary-bg);
    color: var(--color-primary);
    font-weight: 600;
    font-size: 1rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    min-height: 52px;
    flex-shrink: 0;
  }

  .header-actions .btn {
    width: 100%;
    justify-content: center;
    padding: 16px 24px;
    font-size: 1rem;
  }

  .header-actions {
    flex-direction: row-reverse;
  }

  .header-actions .btn {
    display: none;
  }

  /* Logo text: hide subtitle on small screens */
  .logo-text .logo-subtitle,
  .logo-text .logo-sub {
    display: none;
  }
}

/* --- Main Content Offset --- */
main {
  padding-top: var(--nav-height);
}

/* When page-header is first child, it handles its own offset */
main > .page-header:first-child {
  margin-top: calc(var(--nav-height) * -1);
}

/* --- Hero Section --- */
.hero {
  position: relative;
  min-height: auto;
  display: flex;
  align-items: center;
  background: linear-gradient(160deg, #031E1F 0%, #063D3F 30%, #0A5C5F 60%, #0D7377 100%);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.2;
}

.hero-pattern {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(ellipse at 20% 80%, rgba(13,115,119,0.25) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(255,255,255,0.06) 0%, transparent 40%),
    radial-gradient(ellipse at 50% 0%, rgba(6,61,63,0.4) 0%, transparent 60%);
}

.hero .container {
  position: relative;
  z-index: 2;
  padding-top: 100px;
  padding-bottom: 28px;
}

.hero-content {
  max-width: 650px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.4rem 1rem;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: var(--space-sm);
  backdrop-filter: blur(5px);
}

.hero-badge svg {
  width: 14px;
  height: 14px;
  fill: var(--color-accent);
}

.hero h1 {
  color: #fff;
  margin-bottom: var(--space-md);
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: clamp(1.3rem, 1.1rem + 0.9vw, 1.8rem);
}

/* Typing text — contained to prevent layout reflow */
.typing-line {
  display: block;
  min-height: 1.4em;
  will-change: contents;
  contain: layout style;
}

#typing-text {
  color: var(--color-accent);
}

.typing-cursor {
  display: inline;
  animation: blink 0.8s step-end infinite;
  color: var(--color-accent);
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.hero-subtitle {
  color: rgba(255, 255, 255, 0.85);
  font-size: clamp(0.9rem, 0.85rem + 0.25vw, 1rem);
  line-height: 1.6;
  margin-bottom: var(--space-lg);
  max-width: 550px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

.hero-stats {
  display: flex;
  gap: var(--space-xl);
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(255,255,255,0.15);
}

.hero-stat {
  text-align: left;
}

.hero-stat .number {
  display: block;
  font-family: var(--font-heading);
  font-size: clamp(1.2rem, 1rem + 0.6vw, 1.5rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
}

.hero-stat .label {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.65);
  margin-top: 2px;
}

@media (max-width: 600px) {
  .hero-stats {
    gap: var(--space-lg);
  }
}

/* --- Buttons (Doc-Mallorca style) --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.3;
  -webkit-user-select: none;
  user-select: none;
}

.btn:active {
  transform: scale(.96);
  opacity: .88;
}

.btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.btn-primary {
  background: linear-gradient(135deg, #fff, var(--color-accent-light));
  color: var(--color-primary-dark);
  box-shadow: 0 4px 16px rgba(13,115,119,0.2);
}

@media (hover: hover) {
  .btn-primary:hover {
    background: #fff;
    box-shadow: 0 6px 24px rgba(13,115,119,0.3);
    transform: translateY(-2px);
  }
}

.btn-outline {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.22);
}

@media (hover: hover) {
  .btn-outline:hover {
    background: rgba(255,255,255,0.18);
  }
}

.btn-solid {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: #fff;
  box-shadow: 0 4px 16px rgba(13,115,119,0.35);
}

@media (hover: hover) {
  .btn-solid:hover {
    background: var(--color-primary-dark);
    box-shadow: 0 6px 20px rgba(13,115,119,0.4);
    transform: translateY(-2px);
  }
}

.btn-accent {
  background: linear-gradient(135deg, var(--color-accent), #c99a3f);
  color: var(--color-text);
  box-shadow: 0 4px 16px rgba(212,168,83,0.3);
}

@media (hover: hover) {
  .btn-accent:hover {
    box-shadow: 0 6px 20px rgba(212,168,83,0.4);
    transform: translateY(-2px);
  }
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 16px;
}

/* --- Sections --- */
.section {
  padding: 36px 0;
}

.section-alt {
  background: var(--color-surface);
}

.section-header {
  text-align: center;
  max-width: 650px;
  margin: 0 auto 24px;
}

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-primary);
  margin-bottom: var(--space-sm);
}

.section-header h2 {
  margin-bottom: 8px;
}

.section-header p {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
}

/* --- Trust Badges --- */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-lg);
}

.trust-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}

.trust-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.trust-card-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: var(--color-primary-bg);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.trust-card-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--color-primary);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.trust-card h4 {
  margin-bottom: var(--space-xs);
  font-size: 0.95rem;
}

.trust-card p {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  margin-bottom: 0;
}

/* --- Service Cards --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-lg);
}

.service-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--color-primary);
  transform: scaleX(0);
  transition: transform var(--transition);
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-primary-bg);
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-icon {
  width: 46px;
  height: 46px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-lg);
  color: #fff;
}

.service-icon svg {
  width: 28px;
  height: 28px;
  stroke: var(--color-primary);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.service-card h3 {
  margin-bottom: 4px;
  font-size: 1rem;
}

.service-card p {
  color: var(--color-text-secondary);
  font-size: 0.875rem;
  margin-bottom: var(--space-sm);
}

.service-card .learn-more {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-primary);
}

.service-card .learn-more svg {
  width: 16px;
  height: 16px;
  transition: transform var(--transition);
}

.service-card:hover .learn-more svg {
  transform: translateX(3px);
}

/* --- CTA Band --- */
.cta-band {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
  padding: 36px 0;
  text-align: center;
}

.cta-band h2 {
  color: #fff;
  margin-bottom: var(--space-sm);
}

.cta-band p {
  color: rgba(255,255,255,0.8);
  margin-bottom: var(--space-xl);
  font-size: 1.05rem;
}

.cta-band .btn-primary {
  font-size: 1.05rem;
  padding: 0.9rem 2rem;
}

/* --- Quick Info Bar --- */
.info-bar {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-lg) 0;
}

.info-bar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-lg);
  text-align: center;
}

.info-bar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
}

.info-bar-item svg {
  width: 20px;
  height: 20px;
  stroke: var(--color-primary);
  fill: none;
  stroke-width: 2;
}

.info-bar-item .info-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-secondary);
  font-weight: 600;
}

.info-bar-item .info-value {
  font-weight: 600;
  color: var(--color-text);
  font-size: 0.9rem;
}

.info-bar-item a {
  color: var(--color-primary);
  font-weight: 600;
}

/* --- Team Section --- */
.team-profile {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: var(--space-3xl);
  align-items: start;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
}

.team-photo {
  width: 100%;
  aspect-ratio: 1;
  background: var(--color-primary-bg);
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.team-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-info h2 {
  margin-bottom: var(--space-xs);
}

.team-title {
  color: var(--color-primary);
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: var(--space-lg);
}

.qualification-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
}

.qualification-tag {
  display: inline-block;
  padding: var(--space-sm) var(--space-md);
  background: var(--color-accent-light);
  color: var(--color-text);
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--radius-md);
}

.team-bio {
  color: var(--color-text-secondary);
  line-height: 1.8;
}

.team-bio p {
  margin-bottom: var(--space-md);
}

@media (max-width: 768px) {
  .team-profile {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .team-photo {
    max-width: 130px;
    margin: 0 auto;
  }
}

/* Additional team members */
.team-members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-3xl);
}

.team-member-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
}

.team-member-card .avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(--color-primary-bg);
  margin: 0 auto var(--space-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.team-member-card .avatar svg {
  width: 40px;
  height: 40px;
  stroke: var(--color-primary);
  fill: none;
  stroke-width: 1.5;
}

.team-member-card h4 {
  margin-bottom: var(--space-xs);
}

.team-member-card .role {
  color: var(--color-text-secondary);
  font-size: 0.85rem;
}

/* --- Opening Hours --- */
.hours-container {
  max-width: 700px;
  margin: 0 auto;
}

.hours-table {
  width: 100%;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
}

.hours-table table {
  width: 100%;
  border-collapse: collapse;
}

.hours-table th {
  padding: var(--space-md) var(--space-xl);
  background: var(--color-primary);
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: left;
}

.hours-table td {
  padding: var(--space-md) var(--space-xl);
  border-bottom: 1px solid var(--color-border);
  font-size: 0.95rem;
}

.hours-table tr:last-child td {
  border-bottom: none;
}

.hours-table tr:hover td {
  background: var(--color-primary-bg);
}

.hours-table .day {
  font-weight: 600;
  color: var(--color-text);
}

.hours-table .time {
  color: var(--color-primary);
  font-weight: 500;
}

.hours-table .closed {
  color: var(--color-text-light);
  font-style: italic;
}

.hours-note {
  margin-top: var(--space-xl);
  padding: var(--space-lg);
  background: var(--color-accent-light);
  border-radius: var(--radius-md);
  text-align: center;
  font-size: 0.9rem;
}

.hours-note strong {
  color: var(--color-text);
}

/* --- Contact Page --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
}

@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

.contact-info-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
}

.contact-item-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  background: var(--color-primary-bg);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-item-icon svg {
  width: 20px;
  height: 20px;
  stroke: var(--color-primary);
  fill: none;
  stroke-width: 2;
}

.contact-item h4 {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  font-weight: 600;
  margin-bottom: 2px;
}

.contact-item p, .contact-item a {
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 0;
}

/* Contact Form */
.contact-form {
  background: var(--color-surface);
  padding: var(--space-2xl);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
}

.contact-form h3 {
  margin-bottom: var(--space-xl);
}

.form-group {
  margin-bottom: var(--space-lg);
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-sm);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-text);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(13, 115, 119, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

/* Map */
.map-container {
  margin-top: var(--space-3xl);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
}

.map-placeholder {
  width: 100%;
  height: 350px;
  background: var(--color-primary-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  cursor: pointer;
  transition: background var(--transition);
}

.map-placeholder:hover {
  background: #d4ecee;
}

.map-placeholder svg {
  width: 40px;
  height: 40px;
  stroke: var(--color-primary);
  fill: none;
  stroke-width: 2;
}

.map-placeholder span {
  font-weight: 600;
  color: var(--color-primary);
}

.map-placeholder small {
  font-size: 0.75rem;
  color: var(--color-text-secondary);
}

.map-container iframe {
  width: 100%;
  height: 350px;
  border: none;
}

/* --- Impressum / Legal --- */
.legal-content {
  max-width: 800px;
  margin: 0 auto;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl) var(--space-3xl);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
}

.legal-content h2 {
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--color-primary-bg);
  font-size: 1.3rem;
}

.legal-content h2:first-child {
  margin-top: 0;
}

.legal-content h3 {
  margin-top: var(--space-xl);
  margin-bottom: var(--space-sm);
  font-size: 1.05rem;
}

.legal-content p {
  color: var(--color-text-secondary);
}

.legal-content a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-section {
  margin-bottom: var(--space-2xl);
}

.legal-section:first-child h2 {
  margin-top: 0;
}

.legal-content ul {
  margin: var(--space-md) 0 var(--space-md) var(--space-xl);
  color: var(--color-text-secondary);
}

.legal-content ul li {
  margin-bottom: var(--space-sm);
}

.legal-info-block {
  background: var(--color-bg);
  border-left: 3px solid var(--color-primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: var(--space-md) var(--space-lg);
  margin: var(--space-md) 0;
}

.legal-info-block p {
  margin: 0;
}

.main-content {
  padding: var(--space-3xl) 0;
}

@media (max-width: 768px) {
  .legal-content {
    padding: var(--space-xl);
  }

  .main-content {
    padding: var(--space-2xl) 0;
  }
}

/* --- Page Header (for subpages) — compact, not a hero --- */
.page-header {
  background: linear-gradient(160deg, #031E1F 0%, #063D3F 40%, #0A5C5F 100%);
  padding: calc(var(--nav-height) + var(--space-lg)) 0 var(--space-lg);
  text-align: center;
}

.page-header h1 {
  color: #fff;
  font-size: clamp(1.2rem, 1rem + 0.8vw, 1.6rem);
  margin-bottom: var(--space-xs);
}

.page-header p {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.85rem;
  max-width: 500px;
  margin: 0 auto;
}

.page-header .breadcrumb {
  margin-bottom: var(--space-md);
}

.breadcrumb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
  font-size: 0.85rem;
}

.breadcrumb a {
  color: rgba(255, 255, 255, 0.7);
}

.breadcrumb a:hover {
  color: #fff;
}

.breadcrumb span {
  color: rgba(255, 255, 255, 0.5);
}

.breadcrumb .current {
  color: rgba(255, 255, 255, 0.9);
}

/* --- Footer --- */
.footer {
  background: var(--color-text);
  color: rgba(255, 255, 255, 0.7);
  padding: var(--space-3xl) 0 var(--space-xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
  }
}

@media (max-width: 500px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

.footer-brand .logo {
  color: #fff;
  margin-bottom: var(--space-md);
}

.footer-brand .logo-icon {
  background: var(--color-primary);
}

.footer-brand p {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.7;
}

.footer h4 {
  color: #fff;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-md);
}

.footer-links li {
  margin-bottom: var(--space-sm);
}

.footer-links a {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: #fff;
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  word-break: break-word;
}

.footer-contact-item svg {
  width: 16px;
  height: 16px;
  stroke: var(--color-primary-light);
  fill: none;
  stroke-width: 2;
  flex-shrink: 0;
  margin-top: 3px;
}

.footer-contact-item a {
  color: rgba(255, 255, 255, 0.6);
}

.footer-contact-item a:hover {
  color: #fff;
}

.footer-bottom {
  padding-top: var(--space-xl);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-md);
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
}

.footer-bottom a {
  color: rgba(255, 255, 255, 0.4);
}

.footer-bottom a:hover {
  color: rgba(255, 255, 255, 0.8);
}

/* --- Utilities --- */
.text-center { text-align: center; }
.text-primary { color: var(--color-primary); }

/* --- Fade-up cascade animations (Doc-Mallorca style) --- */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.55s var(--ease-out), transform 0.55s var(--ease-out);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Hero cascade animation */
.au {
  opacity: 0;
  animation: fade-up 0.55s var(--ease-out) forwards;
}
.au.d1 { animation-delay: .08s; }
.au.d2 { animation-delay: .16s; }
.au.d3 { animation-delay: .24s; }
.au.d4 { animation-delay: .35s; }
.au.d5 { animation-delay: .46s; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .fade-in {
    opacity: 1;
    transform: none;
  }
}

/* Focus visible (accessibility) */
*:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Print styles */
@media print {
  .header, .hamburger, .cta-band, .footer, .map-container, .btn {
    display: none !important;
  }
  main {
    padding-top: 0;
  }
  body {
    color: #000;
    background: #fff;
  }
}

/* --- Leistungen Detail Page Extras --- */
.service-detail {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  margin-bottom: var(--space-xl);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
}

.service-detail h3 {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.service-detail h3 .service-icon {
  margin-bottom: 0;
  width: 44px;
  height: 44px;
}

.service-detail p {
  color: var(--color-text-secondary);
  line-height: 1.8;
}

.service-detail ul {
  margin: var(--space-md) 0;
  padding-left: var(--space-xl);
}

.service-detail ul li {
  position: relative;
  padding-left: var(--space-md);
  margin-bottom: var(--space-sm);
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.service-detail ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 6px;
  height: 6px;
  background: var(--color-primary);
  border-radius: 50%;
}

/* Transport / directions info */
.transport-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}

.transport-card {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: var(--color-primary-bg);
  border-radius: var(--radius-md);
}

.transport-card svg {
  width: 24px;
  height: 24px;
  stroke: var(--color-primary);
  fill: none;
  stroke-width: 2;
  flex-shrink: 0;
  margin-top: 2px;
}

.transport-card h4 {
  font-size: 0.9rem;
  margin-bottom: var(--space-xs);
}

.transport-card p {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  margin-bottom: 0;
}

/* --- Homepage Section Padding --- */
.trust-section,
.services-section,
.contact-section,
.map-section {
  padding: 36px 0;
}

/* --- Section Subtitles & Intros --- */
.section-intro {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  margin-top: -8px;
  margin-bottom: 16px;
}

/* --- Footer Legal Links --- */
.footer-legal {
  display: flex;
  gap: var(--space-lg);
}

/* ============================================================
   Mobile & Spacing Optimizations
   ============================================================ */

/* Reduce section padding on mobile */
@media (max-width: 768px) {
  .section {
    padding: 32px 0;
  }

  .trust-section,
  .services-section,
  .contact-section,
  .map-section {
    padding: 32px 0;
  }

  .cta-band {
    padding: 32px 0;
  }

  .map-placeholder {
    height: 220px;
  }

  .hero .container {
    padding-top: calc(64px + 16px);
    padding-bottom: 24px;
  }

  /* Buttons full-width on mobile */
  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  /* Reduce header height on mobile */
  .header {
    height: 64px;
  }

  .header.scrolled {
    height: 64px;
  }

  html {
    scroll-padding-top: 64px;
  }

  main {
    padding-top: 64px;
  }

  main > .page-header:first-child {
    margin-top: -64px;
  }

  .page-header {
    padding-top: calc(64px + var(--space-md));
    padding-bottom: var(--space-md);
  }
}

/* Stack two-column inline grids on tablet/phone */
@media (max-width: 768px) {
  [style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  [style*="grid-template-columns: 160px 1fr"] {
    grid-template-columns: 1fr !important;
  }

  [style*="margin-bottom: var(--space-4xl)"] {
    margin-bottom: var(--space-2xl) !important;
  }
}

/* Responsive opening hours table */
@media (max-width: 500px) {
  .hours-table table {
    font-size: 0.85rem;
  }

  .hours-table th,
  .hours-table td {
    padding: var(--space-sm) var(--space-xs);
  }
}

/* Service/Trust grids: explicit single column on small phones */
@media (max-width: 600px) {
  .services-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .trust-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }
}

/* Hero stats: stack on small phones */
@media (max-width: 500px) {
  .hero-stats {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-md);
  }

  .hero-stat {
    flex-direction: row;
    gap: var(--space-sm);
  }
}

/* Extra-small screen optimizations */
@media (max-width: 375px) {
  .container {
    padding: 0 var(--space-md);
  }

  .btn-lg {
    padding: 0.75rem 1.25rem;
    font-size: 0.95rem;
  }

  .nav .nav-link {
    padding: 14px 20px;
    font-size: 1rem;
  }

  .nav .mobile-nav-cta,
  .nav .mobile-nav-phone {
    margin-left: 16px;
    margin-right: 16px;
  }
}

/* Form row: stack earlier on medium phones */
@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   Doctolib Booking Widget (DSGVO Click-to-Load)
   ============================================================ */
.doctolib-widget-container {
  max-width: 700px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
}

.doctolib-placeholder {
  width: 100%;
  min-height: 200px;
  background: var(--color-primary-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-2xl);
  cursor: pointer;
  transition: background var(--transition);
}

.doctolib-placeholder:hover {
  background: #d4ecee;
}

.doctolib-placeholder svg {
  color: var(--color-primary);
}

.doctolib-widget-container iframe {
  width: 100%;
  height: 600px;
  border: none;
}

@media (max-width: 768px) {
  .doctolib-widget-container iframe {
    height: 500px;
  }
}

/* ============================================================
   Mobile Bottom CTA Bar (Anrufen + Termin buchen)
   Critical for medical practice — patients need instant access
   ============================================================ */
.mobile-cta-bar {
  display: none;
}

@media (max-width: 900px) {
  /* Prevent content from hiding behind bottom bar (incl. iPhone safe-area) */
  body {
    padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  }

  .mobile-cta-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--color-border);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.08);
    padding: 8px;
    gap: 8px;
    padding-bottom: max(8px, env(safe-area-inset-bottom));
  }

  .mobile-cta-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 12px;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    min-height: 48px;
    transition: opacity 0.15s ease;
  }

  .mobile-cta-btn:active {
    opacity: 0.8;
    transform: scale(0.97);
  }

  .mobile-cta-btn svg {
    flex-shrink: 0;
  }

  .mobile-cta-call {
    background: var(--color-primary-bg);
    color: var(--color-primary);
  }

  .mobile-cta-book {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: #fff;
    box-shadow: 0 2px 12px rgba(10, 92, 95, 0.3);
  }

  /* Improve touch targets globally */
  a, button {
    touch-action: manipulation;
  }

  /* Hide desktop-only nav elements in mobile CTA bar context */

  /* Better spacing for contact items on mobile */
  .contact-item {
    padding: var(--space-md);
    background: var(--color-bg);
    border-radius: var(--radius-md);
  }

  /* Transport info single column on mobile */
  .transport-info {
    grid-template-columns: 1fr;
  }

  /* Checkbox group better touch target */
  .checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
  }

  .checkbox-group input[type="checkbox"] {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    margin-top: 2px;
  }
}
