/* =========================================================
   Dr. Alexander Huber – Lungenfacharzt Amstetten
   Gestaltung nach dem Vorbild der bisherigen Website:
   blauer Kopfbalken mit Logo, zentrierte Navigation,
   weißer Inhaltskasten mit Seitenleiste auf hellgrauem Grund.
   Keine externen Ressourcen (Datenschutz).
   ========================================================= */

/* ---------- Farben und Maße ---------- */
:root {
  --blau:#005ca9;          /* Logo, Kastenüberschriften, Links */
  --blau-dunkel:#004a8a;   /* Hover-Zustand */
  --blau-nav:#000687;      /* Menüschrift */
  --blau-hell:#e8f1f9;     /* zarte Hervorhebungen */
  --grund:#ecf0f5;         /* Seitenhintergrund */
  --weiss:#ffffff;
  --text:#1d1d1d;
  --text-leise:#5a6570;
  --rand:#dfe5ec;
  --rot:#b3261e;
  --gruen:#1e7b4b;

  --schatten:0 1px 3px rgba(0,0,0,.1);
  --radius:4px;
  --breite:1280px;
  --seitenleiste:300px;
  --raum:clamp(.9rem, .5rem + 1.5vw, 1.5rem);

  --font:"Open Sans", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Grundlagen ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--grund);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

h1, h2, h3, h4 {
  margin: 0 0 .6em;
  line-height: 1.25;
  font-weight: 600;
  color: #000;
  letter-spacing: .5px;
}
h1 { font-size: 1.625rem; text-transform: uppercase; }
h2 { font-size: 1.375rem; }
h3 { font-size: 1.125rem; text-transform: uppercase; }
h4 { font-size: 1.0625rem; }
* + h2 { margin-top: 2rem; }
* + h3 { margin-top: 1.6rem; }

p { margin: 0 0 1.1em; }
ul, ol { margin: 0 0 1.1em; padding-left: 1.4em; }
li { margin-bottom: .3em; }
p:last-child, ul:last-child, ol:last-child { margin-bottom: 0; }

a { color: var(--blau); font-weight: 600; text-decoration: none; }
a:hover, a:focus-visible { color: var(--blau-dunkel); text-decoration: underline; }

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

table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: .45em .6em; border-bottom: 1px solid var(--rand); vertical-align: top; }
th { font-weight: 600; }

hr { border: 0; border-top: 1px solid var(--rand); margin: 2rem 0; }

strong, b { font-weight: 700; }

:focus-visible { outline: 3px solid var(--blau); outline-offset: 2px; }

::selection { background: var(--blau); color: #fff; }

.sprung {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--blau); color: #fff; padding: .6rem 1rem;
}
.sprung:focus { left: .5rem; top: .5rem; }

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

.huelle { width: min(100% - 2 * var(--raum), var(--breite)); margin-inline: auto; }

.leise { color: var(--text-leise); }
.klein { font-size: .9rem; }

/* ---------- Kopfbalken ---------- */
.kopfbalken {
  background: var(--blau);
  color: #fff;
}
.kopfbalken .huelle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: clamp(6.5rem, 4rem + 8vw, 11rem);
  padding-block: 1rem;
}
.marke {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  line-height: 1.25;
  flex: none;
}
.marke:hover, .marke:focus-visible { color: #fff; text-decoration: none; }
.marke-name {
  display: block;
  font-size: clamp(1.1rem, .8rem + 1.4vw, 1.75rem);
  text-transform: uppercase;
  letter-spacing: .02em;
}
.marke-claim {
  display: block;
  font-size: clamp(.95rem, .75rem + .9vw, 1.35rem);
  font-weight: 600;
}
.marke-lunge {
  width: clamp(5.5rem, 3.5rem + 9vw, 12rem);
  flex: none;
  margin-right: clamp(0rem, 4vw, 4rem);
}

/* ---------- Navigation ---------- */
.navleiste {
  background: var(--weiss);
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
  position: sticky;
  top: 0;
  z-index: 50;
}
.navleiste .huelle {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.nav {
  display: flex;
  justify-content: center;
  align-items: stretch;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: .25rem;
}
.nav li { position: relative; margin: 0; }
.nav a {
  display: block;
  padding: 1.1rem 1.1rem;
  color: var(--blau-nav);
  font-size: .9375rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .02em;
  text-decoration: none;
  border-bottom: 3px solid transparent;
}
.nav a:hover, .nav a:focus-visible { color: var(--blau); text-decoration: none; }
.nav > li > a[aria-current="page"],
.nav > li.aktiv > a { border-bottom-color: var(--blau); }
.nav .hat-kinder > a::after {
  content: "";
  display: inline-block;
  width: .45em; height: .45em;
  margin-left: .45em;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  transform: translateY(-.2em) rotate(45deg);
  opacity: .7;
}

/* Ausklappmenü: reines CSS, öffnet beim Überfahren und per Tastatur */
.untermenue {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 15rem;
  margin: 0;
  padding: .4rem 0;
  list-style: none;
  background: var(--weiss);
  border-top: 3px solid var(--blau);
  box-shadow: 0 6px 18px rgba(0,0,0,.14);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity .15s ease, transform .15s ease, visibility 0s linear .15s;
}
.nav li:hover > .untermenue,
.nav li:focus-within > .untermenue {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 0s;
}
.untermenue a {
  padding: .6rem 1.25rem;
  font-size: .875rem;
  text-transform: none;
  letter-spacing: 0;
  border: 0;
}
.untermenue a:hover, .untermenue a:focus-visible { background: var(--blau-hell); }
.untermenue a[aria-current="page"] { color: var(--blau); }

.menue-knopf {
  display: none;
  align-items: center;
  gap: .6rem;
  margin: 0;
  padding: .9rem .25rem;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .02em;
  color: var(--blau-nav);
  cursor: pointer;
}
.menue-knopf span {
  display: block;
  width: 1.4rem;
  height: 2px;
  background: currentColor;
  box-shadow: 0 -.4rem 0 currentColor, 0 .4rem 0 currentColor;
}

/* ---------- Inhalt und Seitenleiste ---------- */
.inhalt {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--seitenleiste);
  gap: 1.5rem;
  align-items: start;
  padding-block: 1.5rem 3rem;
}
.inhalt-breit { grid-template-columns: minmax(0, 1fr); }

.kasten {
  background: var(--weiss);
  border-radius: var(--radius);
  box-shadow: var(--schatten);
  margin-bottom: 1.5rem;
}
.kasten:last-child { margin-bottom: 0; }
.kasten-haupt {
  --kasten-rand: clamp(1.25rem, .9rem + 1.8vw, 2.5rem);
  border-top: 5px solid var(--blau);
  padding: var(--kasten-rand);
}
.kasten-haupt > h1:first-child { margin-bottom: 1.25rem; }
.kasten-titel {
  margin: 0;
  padding: .85rem 1.25rem;
  background: var(--blau);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  border-radius: var(--radius) var(--radius) 0 0;
}
.kasten-inhalt { padding: 1.1rem 1.25rem; font-size: .95rem; }
.kasten-inhalt p { margin-bottom: .8em; }

.seitenleiste a { overflow-wrap: anywhere; }

.zeiten { list-style: none; margin: 0; padding: 0; }
.zeiten li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .35rem 0;
  border-bottom: 1px solid var(--rand);
}
.zeiten li:last-child { border-bottom: 0; }
.zeiten .tag { font-weight: 600; }
.zeiten .heute .tag::after { content: " (heute)"; font-weight: 400; color: var(--text-leise); font-size: .85em; }
.zeiten .zu { color: var(--text-leise); }

/* Fließtext aus dem Altbestand */
.fliesstext img { margin: 1rem 0; border-radius: var(--radius); }
.fliesstext iframe { max-width: 100%; }
.fliesstext table { margin-bottom: 1.1em; }
.fliesstext h2, .fliesstext h3 { text-transform: none; }

/* ---------- Bausteine ---------- */
.knopf {
  display: inline-block;
  padding: .6rem 1.4rem;
  background: var(--blau);
  color: #fff;
  font-weight: 600;
  border: 0;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.knopf:hover, .knopf:focus-visible { background: var(--blau-dunkel); color: #fff; text-decoration: none; }

.hinweis {
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--blau);
  background: var(--blau-hell);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.5rem 0;
}
.hinweis-fehler { border-left-color: var(--rot); background: #fbeae9; }
.hinweis-erfolg { border-left-color: var(--gruen); background: #e6f4ec; }

.liste-sauber { list-style: none; padding: 0; }
.liste-sauber li { padding: .35rem 0; border-bottom: 1px solid var(--rand); }
.liste-sauber li:last-child { border-bottom: 0; }

.bild-rechts {
  float: right;
  width: min(38%, 16rem);
  margin: .25rem 0 1rem 1.75rem;
  border-radius: var(--radius);
}
.abstand-oben { margin-top: 2rem; }
.kasten-haupt::after { content: ""; display: block; clear: both; }
.zweispaltig {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: 1.25rem 2rem;
}

/* Beiträge in Übersichten */
.beitraege {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
  gap: 1.5rem;
}
.beitrag-karte {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  background: var(--weiss);
  color: inherit;
  font-weight: 400;
  text-decoration: none;
  overflow: hidden;
  transition: box-shadow .15s ease;
}
.beitrag-karte:hover, .beitrag-karte:focus-visible { box-shadow: 0 4px 14px rgba(0,0,0,.12); text-decoration: none; color: inherit; }
.beitrag-karte img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.beitrag-karte .beitrag-text { padding: 1rem 1.1rem 1.2rem; }
.beitrag-karte h3 { font-size: 1rem; margin: 0 0 .5rem; letter-spacing: .5px; }
.beitrag-karte:hover h3 { color: var(--blau); }
.beitrag-karte p { font-size: .9rem; color: var(--text-leise); margin: 0; }
.beitrag-kategorie { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--blau); margin-bottom: .4rem; }

.beitrag-meta { font-size: .875rem; color: var(--text-leise); margin-bottom: 1.25rem; }
.beitrag-meta a { margin-right: .5rem; }

/* Personen (Team, Partner) */
.personen {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 12rem), 1fr));
  gap: 1.75rem 1.5rem;
}
.person { text-align: center; }
.person img {
  width: 100%;
  max-width: 12rem;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  margin: 0 auto .75rem;
  border-radius: var(--radius);
  box-shadow: var(--schatten);
}
.person h4 { margin-bottom: .15rem; }
.person p { margin: 0; font-size: .9rem; color: var(--text-leise); }
.person > a { display: block; color: inherit; text-decoration: none; }
.person > a:hover h4 { color: var(--blau); }

/* Leistungsliste */
.leistungen { list-style: none; padding: 0; margin: 0; }
.leistungen li {
  padding: .7rem 0;
  border-bottom: 1px solid var(--rand);
  font-weight: 600;
}
.leistungen li:last-child { border-bottom: 0; }
.leistungen li::before { content: "• "; color: var(--blau); }
.leistungen span { display: block; font-weight: 400; font-size: .9rem; color: var(--text-leise); margin-left: 1em; }

/* Leistungen auf der Startseite: hellblaue Fläche mit Häkchenliste */
.leistungs-feld {
  margin: 2.25rem calc(-1 * var(--kasten-rand)) 0;
  padding: 1.75rem var(--kasten-rand) 2rem;
  background: var(--blau-hell);
  border-top: 1px solid #d3e2f0;
  border-bottom: 1px solid #d3e2f0;
}
.leistungs-feld > h2 { margin-top: 0; }
.leistungs-feld > p:last-child { margin: 1.5rem 0 0; }
.leistungs-liste {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
  gap: 1rem 2.5rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}
.leistungs-liste li {
  position: relative;
  margin: 0;
  padding-left: 2rem;
}
.leistungs-liste li::before {
  content: "";
  position: absolute;
  left: .15rem;
  top: .45rem;
  width: .55rem;
  height: .95rem;
  border: solid var(--blau);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}
.leistungs-liste a {
  display: block;
  color: #000;
  font-weight: 600;
  font-size: 1.0625rem;
  line-height: 1.35;
}
.leistungs-liste a:hover, .leistungs-liste a:focus-visible { color: var(--blau); text-decoration: underline; }
.leistungs-liste span {
  display: block;
  margin-top: .15rem;
  font-size: .9rem;
  line-height: 1.5;
  color: var(--text-leise);
}

/* Formulare */
.feld { margin-bottom: 1.1rem; }
.feld label { display: block; font-weight: 600; margin-bottom: .3rem; }
.feld input, .feld select, .feld textarea {
  width: 100%;
  padding: .6rem .75rem;
  font: inherit;
  color: inherit;
  background: #fff;
  border: 1px solid #b9c2cc;
  border-radius: var(--radius);
}
.feld input:focus, .feld select:focus, .feld textarea:focus { outline: 2px solid var(--blau); outline-offset: 0; border-color: var(--blau); }
.feld textarea { min-height: 9rem; resize: vertical; }
.feld-hinweis { display: block; font-size: .85rem; color: var(--text-leise); margin-top: .3rem; }
.feld-fehler { color: var(--rot); }
.pflicht { color: var(--rot); }
.feld-auswahl { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; }
.feld-auswahl input { width: auto; margin-top: .35rem; }

/* Newsletter-Anmeldung in der Seitenleiste */
.falle { position: absolute; left: -9999px; }
.newsletter-formular input[type="email"] {
  width: 100%;
  padding: .6rem .75rem;
  margin-bottom: .6rem;
  font: inherit;
  color: inherit;
  background: #fff;
  border: 1px solid #b9c2cc;
  border-radius: var(--radius);
}
.newsletter-formular input[type="email"]:focus { outline: 2px solid var(--blau); outline-offset: 0; border-color: var(--blau); }
.newsletter-formular .knopf { width: 100%; }
.newsletter-formular .klein { margin: .75rem 0 0; }

/* Karte (Lageplan) */
.karte-halter { position: relative; aspect-ratio: 16 / 10; background: var(--blau-hell); border-radius: var(--radius); overflow: hidden; }
.karte-halter iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.karte-hinweis { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 1.5rem; }

/* ---------- Fußzeile ---------- */
.fusszeile {
  background: var(--blau);
  color: #fff;
  padding-block: 2rem 1.5rem;
  margin-top: 1rem;
  font-size: .9375rem;
}
.fusszeile a { color: #fff; font-weight: 600; }
.fusszeile a:hover { color: #fff; text-decoration: underline; }
.fusszeile-gitter {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: 1.5rem 2.5rem;
}
.fusszeile h2 { color: #fff; font-size: .95rem; text-transform: uppercase; letter-spacing: 1.2px; margin-bottom: .6rem; }
.fusszeile p { margin: 0; }
.fusszeile ul { list-style: none; margin: 0; padding: 0; }
.fusszeile li { margin: 0 0 .25rem; }
.fuss-unten {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .5rem 1.5rem;
  margin-top: 1.75rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,.3);
  font-size: .875rem;
}
.fuss-unten nav a { margin-left: 1.25rem; }

/* ---------- Kleine Bildschirme ---------- */
@media (max-width: 900px) {
  .inhalt { grid-template-columns: minmax(0, 1fr); }
  .bild-rechts { float: none; width: 100%; max-width: 18rem; margin: 0 auto 1.25rem; }
}

@media (max-width: 1024px) {
  .navleiste .huelle { justify-content: flex-start; }
  .menue-knopf { display: flex; }
  .nav {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--weiss);
    box-shadow: 0 8px 16px rgba(0,0,0,.12);
    padding: .25rem 0 .5rem;
  }
  .nav.offen {
    display: flex;
    max-height: calc(100vh - 3.5rem);
    max-height: calc(100dvh - 3.5rem);
    overflow-y: auto;
  }
  .nav a { padding: .75rem var(--raum); border-bottom: 0; }
  .nav > li > a[aria-current="page"], .nav > li.aktiv > a { border-left: 3px solid var(--blau); }
  .nav .hat-kinder > a::after { display: none; }
  .untermenue {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    min-width: 0;
    padding: 0 0 .25rem;
    border: 0;
    box-shadow: none;
    transition: none;
  }
  .untermenue a { padding-left: calc(var(--raum) + 1.25rem); }
  .fuss-unten nav a { margin: 0 1.25rem 0 0; }
}

@media (max-width: 767px) {
  .fliesstext table { display: block; overflow-x: auto; }
}

@media (max-width: 480px) {
  .kopfbalken .huelle { gap: 1rem; }
  .marke-lunge { margin-right: 0; flex: 0 1 auto; min-width: 0; }
}

/* ---------- Druck ---------- */
@media print {
  body { background: #fff; }
  .navleiste, .menue-knopf, .seitenleiste, .fusszeile, .kein-druck { display: none !important; }
  .inhalt { grid-template-columns: 1fr; padding: 0; }
  .kasten { box-shadow: none; }
  a { color: inherit; }
}
