/* ============================================================
   Gesundheitszentrum Zwiesel – Custom Stylesheet
   Hauptfarbe: #0b599b
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Source+Sans+3:wght@300;400;500;600&display=swap');

/* ── CSS-Variablen ── */
:root {
  --primary:        #0b599b;
  --primary-dark:   #084278;
  --primary-light:  #e8f1fa;
  --accent:         #2ea3d4;
  --accent-light:   #d6f0fb;
  --text-dark:      #000000;
  --text-mid:       #000000;
  --text-light:     #718096;
  --border:         #dbe6f0;
  --white:          #ffffff;
  --bg-section:     #f4f8fd;
  --hellgruen:      rgba(75, 172, 87, 0.2);
  --shadow-sm:      0 2px 8px rgba(11,89,155,.10);
  --shadow-md:      0 6px 24px rgba(11,89,155,.15);
  --shadow-lg:      0 16px 48px rgba(11,89,155,.20);
  --radius:         10px;
  --radius-lg:      18px;
  --transition:     .25s ease;
  --font-display:   'Playfair Display', Georgia, serif;
  --font-body:      'Source Sans 3', 'Segoe UI', sans-serif;
  --nav-h:          80px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-dark);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

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

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

ul { list-style: none; }

/* ── Hilfklassen ── */
.rahmen {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px;
}

.text-center { text-align: center; }
.text-right  { text-align: right; }

/* ============================================================
   NAVIGATION
   ============================================================ */
#oben {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  height: var(--nav-h);
}

#oben > .rahmen {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
}

/* Logo */
.logo .image a { display: flex; align-items: center; }
.logo img { height: 52px; width: auto; }

/* Navigationslinks */
.navi { display: flex; align-items: center; }

ul.onepagenavi {
  display: flex;
  gap: 8px;
}

ul.onepagenavi li a {
  display: flex;
  align-items: center;
  padding: 8px 18px;
  border-radius: 50px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-dark);
  letter-spacing: .02em;
  transition: background var(--transition), color var(--transition);
}

ul.onepagenavi li a:hover,
ul.onepagenavi li a.aktiv {
  background: var(--primary-light);
  color: var(--primary);
}

/* Progressbar */
.progressbox {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: var(--border);
}

.progressbar {
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  width: 0%;
  transition: width .1s linear;
}

/* Mobile-Burger */
.mob_button {
  display: none;
  width: 36px;
  height: 36px;
  cursor: pointer;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  gap: 0;
  padding: 4px;
  border-radius: 999px;
  background: var(--primary-light);
  transition: background var(--transition), transform var(--transition);
}

.mob_button span,
.mob_button span::before,
.mob_button span::after {
  content: '';
  display: block;
  width: 20px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition), background var(--transition);
}

.mob_button span {
  position: relative;
}

.mob_button span::before,
.mob_button span::after {
  position: absolute;
  left: 0;
}

.mob_button span::before {
  top: -6px;
}

.mob_button span::after {
  top: 6px;
}

.mob_button:hover {
  background: var(--accent-light);
}

.mob_button.is-active {
  background: var(--primary);
}

.mob_button.is-active span {
  background: transparent;
}

.mob_button.is-active span::before,
.mob_button.is-active span::after {
  top: 0;
  background: var(--white);
}

.mob_button.is-active span::before {
  transform: rotate(45deg);
}

.mob_button.is-active span::after {
  transform: rotate(-45deg);
}

/* ============================================================
   INHALTSBEREICH – Seitenabstand wegen fixed Nav
   ============================================================ */
#inhaltsbereich {
  padding-top: var(--nav-h);
}

#c4 > .rahmen {
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}

/* ============================================================
   HERO – #startseite
   ============================================================ */
#startseite {
  position: relative;
  overflow: hidden;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
}

#startseite .frame-layout-20 { padding: 0; }
#startseite .rahmen { padding: 0; max-width: 100%; }
#startseite .ce-textpic,
#startseite .ce-gallery,
#startseite .ce-row,
#startseite .ce-column,
#startseite figure.image,
#startseite picture {
  width: 100%;
  max-width: none;
}

#startseite .ce-gallery figure.image {
  position: relative;
  width: 100%;
  height: clamp(420px, 56vw, 720px);
}

#startseite .ce-gallery figure.image picture,
#startseite .ce-gallery figure.image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
}

/* Overlay */
#startseite .ce-gallery figure.image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(11,89,155,.72) 0%,
    rgba(8,66,120,.50) 50%,
    rgba(0,0,0,.30) 100%
  );
}

/* Hero-Text */
#startseite .ce-bodytext {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  z-index: 2;
  padding: 60px 64px 56px;
  color: var(--white);
}

#startseite .ce-bodytext p {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 52px);
  font-weight: 700;
  line-height: 1.25;
  text-shadow: 0 2px 12px rgba(0,0,0,.35);
  max-width: 700px;
}

#startseite .ce-bodytext p strong {
  display: block;
  font-size: clamp(14px, 1.5vw, 18px);
  font-family: var(--font-body);
  font-weight: 400;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.80);
  margin-bottom: 10px;
}

/* Figcaption ausblenden */
#startseite figcaption.image-caption { display: none; }

/* ============================================================
   LIGHTBOX
   ============================================================ */
body.lightbox-open {
  overflow: hidden;
}

.site-lightbox {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: none;
}

.site-lightbox.is-open {
  display: block;
}

.site-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 22, 38, 0.72);
  backdrop-filter: blur(4px);
}

.site-lightbox__dialog {
  position: relative;
  z-index: 1;
  width: min(1100px, calc(100vw - 32px));
  height: min(88vh, 900px);
  margin: 6vh auto;
  background: var(--white);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.site-lightbox__close {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--primary-dark);
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.site-lightbox__frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--white);
}

body[class^="page"] #lightbox {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 0;
}

body[class^="page"] #lightbox > .frame {
  width: auto;
}

body[class^="page"] #lightbox .rahmen {
  max-width: 960px;
  margin: 0 auto;
}

/* ============================================================
   SEKTION – DAS GESUNDHEITSZENTRUM
   ============================================================ */
#das-gesundheitszentrum {
  background: var(--white);
}

#das-gesundheitszentrum > div { padding: 80px 0; }

#das-gesundheitszentrum h1.ce-headline-center {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.2vw, 42px);
  font-weight: 700;
  color: var(--primary);
  text-align: center;
  margin-bottom: 52px;
  position: relative;
}

#das-gesundheitszentrum h1.ce-headline-center::after {
  content: '';
  display: block;
  width: 64px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 2px;
  margin: 16px auto 0;
}

/* 2-Spalten-Layout */
.tx_cn-columns[data-cols="2"] .row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

#das-gesundheitszentrum .ce-bodytext p { margin-bottom: 14px; color: var(--text-mid); }
#das-gesundheitszentrum .ce-bodytext p:last-child { margin-bottom: 0; }

#das-gesundheitszentrum .ce-bodytext ul {
  margin: 14px 0 14px 0;
  padding-left: 0;
}

#das-gesundheitszentrum .ce-bodytext ul li {
  position: relative;
  padding-left: 22px;
  color: var(--text-mid);
  margin-bottom: 6px;
}

#das-gesundheitszentrum .ce-bodytext ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

/* Anfahrt-Box */
#das-gesundheitszentrum h2 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 16px;
}

/* ============================================================
   ÄRZTE & FACHBEREICHE
   ============================================================ */
#aerzte-und-fachbereiche {
  background: var(--bg-section);
}

#aerzte-und-fachbereiche > div { padding: 80px 0; }

#aerzte-und-fachbereiche h2.ce-headline-center {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.2vw, 42px);
  font-weight: 700;
  color: var(--primary);
  text-align: center;
  margin-bottom: 48px;
  position: relative;
}

#aerzte-und-fachbereiche h2.ce-headline-center::after {
  content: '';
  display: block;
  width: 64px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 2px;
  margin: 16px auto 0;
}

/* ── Filterleiste (Balken) ── */
.balken {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 40px;
}

.balken > .rahmen {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px 28px;
  flex-wrap: wrap;
}

/* Suchfeld */
.filtersuche { flex: 1 1 280px; }

#live-search { width: 100%; }

#live-search fieldset {
  border: none;
  position: relative;
}

#filter {
  width: 100%;
  height: 48px;
  padding: 0 44px 0 18px;
  border: 1.5px solid var(--border);
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text-dark);
  background: var(--bg-section);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

#filter::placeholder { color: var(--text-light); }

#filter:focus {
  border-color: var(--primary);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(11,89,155,.10);
}

/* Suchfeld-Icon */
#live-search fieldset::before {
  content: '🔍';
  font-size: 14px;
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  opacity: .55;
}

.filter-delete {
  position: absolute;
  right: 44px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  cursor: pointer;
  display: none;
}

/* Dropdown-Filter */
.dropdownfilter {
  flex-shrink: 0;
  position: relative;
}

.dropbtn {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 20px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition), box-shadow var(--transition);
  box-shadow: 0 2px 10px rgba(11,89,155,.25);
}

.dropbtn::after {
  content: '';
  width: 10px;
  height: 6px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath fill='white' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E") no-repeat center;
  flex-shrink: 0;
  transition: transform var(--transition);
}

.dropbtn:hover { background: var(--primary-dark); }

.dropdownfilter.open .dropbtn::after { transform: rotate(180deg); }

/* Dropdown-Liste */
.dropdown-content {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 260px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  z-index: 200;
  max-height: 340px;
  overflow-y: auto;
  padding: 8px 0;
}

.dropdownfilter.open .dropdown-content { display: block; }

.dropdown-content li {
  padding: 10px 20px;
  font-size: 14px;
  color: var(--text-mid);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.dropdown-content li:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.dropdown-content li[data-catuid="cat-0-end"] {
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
  color: var(--text-dark);
}

.dropdown-content li.aktiv {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}

/* Scrollbar im Dropdown */
.dropdown-content::-webkit-scrollbar { width: 5px; }
.dropdown-content::-webkit-scrollbar-track { background: transparent; }
.dropdown-content::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ── Logo-Galerie ── */
ol.livesearchlist.menu-mit-bildern {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  padding: 0;
  list-style: none;
}

ol.livesearchlist.menu-mit-bildern li {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

ol.livesearchlist.menu-mit-bildern li:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

ol.livesearchlist.menu-mit-bildern li[style*="display:none"],
ol.livesearchlist.menu-mit-bildern li.hidden {
  display: none !important;
}

/* Karten-Link */
ol.livesearchlist.menu-mit-bildern li > a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 28px 20px 22px;
  height: 100%;
  gap: 12px;
  color: inherit;
  text-decoration: none;
  text-align: center;
}

/* Logo-Bild in der Karte */
ol.livesearchlist.menu-mit-bildern li img {
  max-width: 300px;
  max-height: 100px;
  width: auto;
  height: auto;
  object-fit: contain;
  flex-shrink: 0;
}

/* Name (wenn kein Logo vorhanden) */
ol.livesearchlist.menu-mit-bildern li .name {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--primary-dark);
  line-height: 1.35;
  text-align: center;
}

/* Caption ausblenden */
ol.livesearchlist.menu-mit-bildern li .caption { display: none; }

/* Fachrichtungs-Badge */
ol.livesearchlist.menu-mit-bildern li .fach {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-dark);
  background: var(--primary-light);
  border-radius: 16px;
  padding: 7px 12px;
  line-height: 1.4;
  display: block;
  overflow: visible;
  white-space: normal;
  max-width: 100%;
  text-align: center;
  margin-top: auto;
}

/* Details-Button */
ol.livesearchlist.menu-mit-bildern li .detaillink {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--white);
  background: var(--primary);
  border-radius: 50px;
  padding: 6px 18px;
  margin-top: 4px;
  transition: var(--transition);
}

ol.livesearchlist.menu-mit-bildern li:hover .detaillink {
  background: var(--accent);
}

/* Keine Ergebnisse */
.keine-ergebnisse {
  text-align: center;
  padding: 48px 16px;
  color: var(--text-light);
  font-size: 16px;
  grid-column: 1 / -1;
  display: none;
}

/* ============================================================
   APOTHEKEN
   ============================================================ */
#apotheken {
  background: var(--hellgruen);
}

#apotheken .frame-schmal{
  border: 2px solid var(--bg-section);
  padding: 40px;
}


.frame-apo { padding: 80px 0 60px; }

.cn_multicontent_teaser {
  max-width: 780px;
  margin: 0 auto 48px;
}

.cn_multicontent_teaser img {
  margin: 0 auto 20px;
  max-height: 56px;
  width: auto;
}

.cn_multicontent_teaser p {
  color: var(--text-mid);
  text-align: center;
  font-size: 15px;
}

.cn_multicontent_teaser img{
  height: 60px;
  max-height: 60px;
  width: auto;
}

/* Apotheken-Icons */
.tx_cn-columns[data-cols="1"] .row {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
}

.frame-apo .col- {
  text-align: center;
  flex: 0 0 140px;
}

.frame-apo .ce-gallery figure a{
  width: 80px;
  height: 80px;
  margin: 0 auto 12px;
  background: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), box-shadow var(--transition);
}

.frame-apo .ce-gallery figure a:hover {
  background: var(--primary);
  box-shadow: var(--shadow-sm);
}

.frame-apo .ce-gallery figure img {
  width: 40px;
  height: 40px;
  transition: filter var(--transition), transform var(--transition);
}

.frame-apo .ce-gallery figure:hover img {
  filter: brightness(0) invert(1);
}

.frame-apo .ce-bodytext p a {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-dark);
}

.frame-apo .ce-bodytext p a:hover { color: var(--accent); }

/* Apotheken-Adressen (3-Spalten) */
.tx_cn-columns[data-cols="3"] .row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 40px;
}

#apotheken .ce-bodytext p { color: var(--text-mid); font-size: 14px; margin-bottom: 10px; }

/* ============================================================
   FOOTER
   ============================================================ */
#footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,.70);
  padding: 32px 0;
}

#footer .rahmen { max-width: 1240px; }

#footer .tx_cn-columns[data-cols="2"] .row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 24px;
}

#footer .ce-bodytext p {
  font-size: 14px;
  color: rgba(255,255,255,.60);
}

#footer ul {
  display: flex;
  justify-content: flex-end;
  gap: 24px;
}

#footer ul li a {
  font-size: 14px;
  color: rgba(255,255,255,.70);
  transition: color var(--transition);
}

#footer ul li a:hover { color: var(--white); }

/* ============================================================
   FRAME-SCHMAL (Apotheken-Icons schmal)
   ============================================================ */
.frame-schmal { }
.frame-schmal .tx_cn-columns[data-cols="3"] .row { gap: 16px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Tablet */
@media (max-width: 991px) {
  .tx_cn-columns[data-cols="2"] .row {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .tx_cn-columns[data-cols="3"] .row {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  #das-gesundheitszentrum .col-50:last-child { display: none; }

  ol.livesearchlist.menu-mit-bildern {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }

  .balken > .rahmen { flex-direction: column; align-items: stretch; }
  .dropbtn { width: 100%; justify-content: center; }
  .dropdown-content { left: 0; right: 0; min-width: 100%; }
}

/* Mobil */
@media (max-width: 767px) {
  :root { --nav-h: 66px; }

  .rahmen { padding: 0 20px; }

  #oben > .rahmen {
    padding: 0 20px;
    position: relative;
  }

  .logo img { height: 40px; }

  .mob_button { display: flex; }

  .navi {
    display: none;
    position: absolute;
    top: 66px;
    left: 0; right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 16px 20px;
    box-shadow: var(--shadow-md);
  }

  .navi.open { display: block; }

  ul.onepagenavi { flex-direction: column; gap: 4px; }
  ul.onepagenavi li a { border-radius: var(--radius); }

  #startseite .ce-bodytext { padding: 32px 20px 28px; }
  #startseite .ce-gallery figure.image { height: clamp(300px, 70vw, 420px); }

  #das-gesundheitszentrum > div { padding: 52px 0; }
  #aerzte-und-fachbereiche > div { padding: 52px 0; }
  .frame-apo { padding: 52px 0 40px; }

  ol.livesearchlist.menu-mit-bildern {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  ol.livesearchlist.menu-mit-bildern li > a { padding: 20px 14px 16px; }

  #footer .tx_cn-columns[data-cols="2"] .row {
    grid-template-columns: 1fr;
  }

  #footer ul { justify-content: flex-start; }
}

/* ============================================================
   JAVASCRIPT-HOOK – Dropdown öffnen / schließen
   Wird via JS gesteuert, CSS-Klasse .open auf .dropdownfilter
   ============================================================ */

/* ============================================================
   SMOOTH SCROLL OFFSET für fixed Nav
   ============================================================ */
[id] { scroll-margin-top: calc(var(--nav-h) + 16px); }
