/* ── Reset / Base ────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  color: #212529;
  background-color: #f6f4f1;
}

h4 { color: #FF8C00; margin-top: 0; }
h5 { color: #FF8C00; }
p  { margin: 0 0 0.5rem; }

a { color: #0f193f; }
a:focus-visible {
  outline: 2px solid #FF8C00;
  outline-offset: 2px;
  border-radius: 2px;
}

/* ── Utilities ───────────────────────────────────────────────────────── */
.pt-4 { padding-top: 1.5rem; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ── Navigation ──────────────────────────────────────────────────────── */
#dmw_navbar {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  z-index: 1030;
  background: #f8f9fa;
  border-bottom: 1px solid rgba(0,0,0,0.1);
}

.nav-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 3.5rem;
  flex-wrap: wrap;
}

.nav-brand {
  font-size: 1.25rem;
  font-weight: 500;
  color: #0f193f;
  text-decoration: none;
}
.nav-brand:hover { color: #FF8C00; }

#nav-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(0,0,0,0.2);
  border-radius: 4px;
  padding: 9px 10px;
  cursor: pointer;
}

/* 3 Balken via 2 Pseudo-Elemente: ::before = oberer Balken + mittlerer via box-shadow */
.hamburger-icon {
  display: block;
  width: 22px;
  height: 14px;
  position: relative;
  background: transparent;
}
.hamburger-icon::before,
.hamburger-icon::after {
  content: '';
  display: block;
  width: 22px; height: 2px;
  background: #555;
  position: absolute;
  left: 0;
}
.hamburger-icon::before { top: 0; box-shadow: 0 6px 0 #555; }
.hamburger-icon::after  { bottom: 0; }

#nav-menu ul {
  display: flex;
  gap: 0.25rem;
  list-style: none;
  margin: 0; padding: 0;
}

#nav-menu a {
  display: block;
  padding: 0.5rem 0.75rem;
  color: #0f193f;
  text-decoration: none;
  border-radius: 4px;
}
#nav-menu a:hover,
#nav-menu a.active { color: #FF8C00; }

/* ── Layout ──────────────────────────────────────────────────────────── */
main { padding-top: 4rem; }

.content-box {
  background-color: rgba(150,150,220,0.1);
  box-shadow: 0 0 15px 2px #BBB;
  padding: 1.5rem 1rem 2.5rem;
}

/* ── Carousel – Cross-Fade ───────────────────────────────────────────── */
/*
 * Alle Items: absolute gestapelt, unsichtbar.
 * Das erste Kind bleibt position:relative → gibt dem Container die Höhe.
 * Das aktive Item bekommt opacity:1 und z-index:1 → blendet sich ein.
 * Beide Transitionen (ein + aus) laufen gleichzeitig → echtes Cross-Fade.
 */
.carousel {
  position: relative;
  overflow: hidden;
  margin: 0 -1rem;  /* bündig mit Containerrand */
}

.carousel-inner { position: relative; }

.carousel-item {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  opacity: 0;
  transition: opacity 0.85s ease;
  z-index: 0;
  pointer-events: none;
}

/* Höhen-Anker: erstes Kind ist immer im Fluss */
.carousel-inner > .carousel-item:first-child { position: relative; }

.carousel-item.active {
  opacity: 1;
  z-index: 1;
  pointer-events: auto;
}

.carousel-item picture { display: block; }
.carousel-item img     { display: block; width: 100%; height: auto; }

/* Punkte */
.carousel-indicators {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
  margin: 0; padding: 0;
}

.carousel-indicator {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.55);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s;
}
.carousel-indicator.active,
.carousel-indicator:hover { background: #fff; }

/* Prev/Next-Buttons */
.carousel-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  background: rgba(0,0,0,0.3);
  border: none;
  border-radius: 50%;
  width: 2.5rem; height: 2.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.carousel-control:hover { background: rgba(0,0,0,0.55); }

.carousel-prev { left: 0.75rem; }
.carousel-next { right: 0.75rem; }

.carousel-arrow {
  display: block;
  width: 10px; height: 10px;
  border: 2px solid #fff;
  border-top: none;
  border-right: none;
  margin-left: 3px;
  transform: rotate(45deg);
}
.carousel-next .carousel-arrow {
  margin-left: -3px;
  transform: rotate(-135deg);
}

/* ── Kontakt / Sprechzeit / Adresse ──────────────────────────────────── */
div.kontakt_etc {
  background-color: #0f193f;
  color: rgb(230,230,230);
  margin: 0 -1rem;  /* volle Breite, bündig mit Carousel */
}

div.kontakt_etc a {
  color: rgb(200,215,255);
  text-decoration: none;
}
div.kontakt_etc a:hover {
  color: #FF8C00;
  text-decoration: underline;
}

div.sprechzeit th { font-weight: normal; }

/* ── Inhalt ──────────────────────────────────────────────────────────── */
.album { padding: 2.5rem 0; }

span.hervorgehoben {
  color: #0f193f;
  font-weight: bold;
}

/* Abschnitts-Überschrift mit orangem Akzent-Strich */
.section-heading {
  display: inline-block;
  margin-bottom: 0.2rem;
}
.section-heading::after {
  content: '';
  display: block;
  height: 3px;
  width: 2.5rem;
  background: #FF8C00;
  border-radius: 2px;
  margin-top: 0.35rem;
}

/* Einleitungstext */
.praxis-intro {
  color: #444;
  margin: 1rem 0 0.25rem;
}

/* Schwerpunkt-Karten */
.specialty-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin: 1.25rem 0 1.75rem;
}

.specialty-card {
  background: #fff;
  border-radius: 8px;
  border-top: 3px solid #FF8C00;
  padding: 1.5rem 1.25rem 1.25rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.07);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.specialty-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.13);
  transform: translateY(-4px);
}

.specialty-icon {
  width: 52px;
  height: 52px;
  color: #FF8C00;
  margin-bottom: 1rem;
}
.specialty-icon svg {
  width: 100%;
  height: 100%;
}

.specialty-card h5 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}
.specialty-card p {
  margin: 0;
  font-size: 0.92rem;
  color: #555;
  line-height: 1.55;
}

/* Kooperations-Hinweis */
.praxis-cooperation {
  color: #555;
  font-size: 0.95rem;
  margin: 0 0 1.25rem;
  padding-left: 1rem;
  border-left: 2px solid #dee2e6;
}

/* Patienten-Leitbild */
.praxis-quote {
  margin: 0;
  padding: 1rem 1.25rem;
  border-left: 4px solid #FF8C00;
  background: rgba(255,140,0,0.05);
  border-radius: 0 6px 6px 0;
  font-style: italic;
  color: #333;
  line-height: 1.65;
}

/* ── Feature-Grid (Röntgen / Hygiene) ───────────────────────────────── */
.feature-grid {
  margin: 1.5rem -1rem 2.5rem;
}

.feature-row {
  display: grid;
  grid-template-columns: 35% 65%;
  grid-template-areas: "img txt";
  overflow: hidden;
}

.feature-row + .feature-row { margin-top: 4px; }

.feature-row--flip {
  grid-template-columns: 65% 35%;
  grid-template-areas: "txt img";
}

.feature-img {
  grid-area: img;
  margin: 0;
  overflow: hidden;
}
.feature-img picture { display: block; width: 100%; height: 100%; }
.feature-img img {
  display: block; width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.feature-row:hover .feature-img img { transform: scale(1.04); }

.feature-text {
  grid-area: txt;
  padding: 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #0f193f;
  color: #cdd5e0;
  border-left: 4px solid #FF8C00;
}
.feature-row--flip .feature-text {
  border-left: none;
  border-right: 4px solid #FF8C00;
}

.feature-text h5 { color: #FF8C00; margin: 0 0 0.75rem; font-size: 1.2rem; }
.feature-text p  { color: #cdd5e0; font-size: 0.95rem; line-height: 1.65; margin: 0 0 0.5rem; }

.feature-tagline {
  font-style: italic;
  color: #8a9bb5;
  font-size: 0.92rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255,255,255,0.12);
}

/* ── Team-Karten ─────────────────────────────────────────────────────── */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
  padding: 1rem 0 0.5rem;
}

.card {
  background: transparent;
  border: none;
  display: flex;
  flex-direction: column;
}

.card picture { display: block; }

.card-body {
  flex: 1;
  padding: 0.75rem 0.5rem;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #FF8C00;
  margin: 0 0 0.4rem;
}

.roundprofile {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
  filter: grayscale(1);
  transition: filter 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.roundprofile:hover {
  filter: grayscale(0);
  box-shadow: 0 0 15px 2px #999;
  transform: scale(1.05);
}

/* ── Modal ───────────────────────────────────────────────────────────── */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1055;
  background: rgba(0,0,0,0.5);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 1rem;
  align-items: center;
  justify-content: center;
}
.modal.open { display: flex; }

.modal-dialog {
  max-width: 500px;
  width: 100%;
  max-height: calc(100vh - 2rem);
  display: flex;
  flex-direction: column;
}

.modal-content {
  background: #fff;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: calc(100vh - 2rem);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #dee2e6;
  flex-shrink: 0;
}

.modal-body {
  overflow-y: auto;
  padding: 0.5rem 1.5rem 1rem;
  flex: 1;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  padding: 0.75rem 1.5rem;
  border-top: 1px solid #dee2e6;
  flex-shrink: 0;
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
  color: #212529;
}

body.modal-open { overflow: hidden; }

/* ── Buttons ─────────────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 0.375rem 0.75rem;
  border-radius: 4px;
  border: 1px solid #dee2e6;
  background: #f8f9fa;
  color: #0f193f;
  cursor: pointer;
  font-size: 1rem;
  text-decoration: none;
  transition: background 0.15s;
}
.btn:hover { background: #e9ecef; }

.btn-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
  padding: 0.1rem 0.3rem;
  color: #666;
  opacity: 0.6;
}
.btn-close:hover { opacity: 1; }
.btn-close::before { content: '×'; }

/* ── Footer ──────────────────────────────────────────────────────────── */
footer {
  text-align: center;
  padding: 0.75rem 1rem 1.25rem;
  color: #6c757d;
  border-top: 1px solid #dee2e6;
  margin-top: 2rem;
}
footer a { color: inherit; }

/* ══ Responsive: Mobil (≤ 800 px) ═══════════════════════════════════════ */
@media screen and (max-width: 800px) {

  /* Hamburger-Menü */
  #nav-toggle { display: block; }

  #nav-menu {
    display: none;
    width: 100%;
    padding-bottom: 0.5rem;
  }
  #nav-menu.open { display: block; }
  #nav-menu ul   { flex-direction: column; }

  /* Größere Touch-Ziele für Carousel-Buttons */
  .carousel-control {
    width: 3rem; height: 3rem;
  }

  /* Kontakt-Block */
  div.kontakt_etc {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas: "kontakt" "sprechzeit" "adresse";
  }

  div.kontakt {
    grid-area: kontakt;
    text-align: center;
    padding-top: 10px;
  }
  div.kontakt a { color: rgb(200,215,255); }

  div.sprechzeit {
    grid-area: sprechzeit;
    text-align: center;
    padding-top: 10px;
  }
  div.sprechzeit table { text-align: left; margin: auto; color: white; }
  div.sprechzeit table a { color: white; }

  div.adresse {
    grid-area: adresse;
    text-align: center;
    padding: 10px 0 15px;
  }

  /* Feature-Grid: gestapelt */
  .feature-row,
  .feature-row--flip {
    grid-template-columns: 1fr;
    grid-template-areas: "img" "txt";
  }

  .feature-img { height: 75vh; min-height: auto; }

  .feature-row .feature-text,
  .feature-row--flip .feature-text {
    border: none;
    border-top: 4px solid #FF8C00;
    padding: 1.5rem 1rem;
  }

  /* Personalfotos auf Touch-Geräten farbig (kein Hover verfügbar) */
  .roundprofile { filter: none; }
}

/* ══ Responsive: Desktop (≥ 801 px) ═════════════════════════════════════ */
@media screen and (min-width: 801px) {

  /* Kontakt-Block */
  div.kontakt_etc {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    grid-template-areas: "kontakt sprechzeit adresse";
    padding: 20px 40px;
  }

  div.kontakt    { grid-area: kontakt;    text-align: left; }
  div.sprechzeit { grid-area: sprechzeit; text-align: center; }
  div.sprechzeit table { text-align: left; margin: auto; }
  div.sprechzeit table tr td,
  div.sprechzeit table tr th { padding: 2px 10px; }
  div.adresse    { grid-area: adresse;    text-align: right; }

}
