/* Luftqualitäts-Seite – Apotheke Aktuell
   Angeglichen an das Portal-Design der Startseite (assets/css/home.css) und
   der Pollenflug-Seite: gleiche Farben, gleicher Header/Footer, gleiche
   Card- und Button-Optik. Mobile-first, ohne externe Abhängigkeiten. */

:root {
  --petrol: #0d6e6e;
  --petrol-dark: #0a5757;
  --petrol-light: #e3f0ef;
  --green: #2f7d54;
  --red-cross: #c41e3a;
  --ink: #1f2a2a;
  --ink-soft: #4a5757;
  --bg: #ffffff;
  --bg-muted: #f4f6f7;
  --border: #e2e8e8;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(15, 42, 42, 0.06), 0 4px 16px rgba(15, 42, 42, 0.04);
  --maxw: 1120px;

  /* LQI-Stufen des Umweltbundesamtes (0 sehr gut ... 4 sehr schlecht).
     Ruhige Farbgebung, Text steht immer zusätzlich daneben. */
  --lqi-0-bg: #dcefe4; --lqi-0-bd: #b7dcc7; --lqi-0-fg: #1d5a3a;
  --lqi-1-bg: #e7f0d9; --lqi-1-bd: #cbdfab; --lqi-1-fg: #40591b;
  --lqi-2-bg: #f8efd4; --lqi-2-bd: #ead9ac; --lqi-2-fg: #6d5518;
  --lqi-3-bg: #f7e0cf; --lqi-3-bd: #e7bd9f; --lqi-3-fg: #7a4217;
  --lqi-4-bg: #ecccbd; --lqi-4-bd: #d3a48e; --lqi-4-fg: #5a2c1c;
  --lqi-na-bg: #eef1f1; --lqi-na-bd: #dbe2e2; --lqi-na-fg: #4a5757;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 17px;
}

a { color: var(--petrol-dark); }

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--petrol);
  outline-offset: 2px;
}

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

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--petrol);
  color: #fff;
  padding: 10px 14px;
  border-radius: 0 0 8px 0;
  z-index: 100;
  text-decoration: none;
}
.skip-link:focus { left: 0; }

/* ---------- Header (wie Startseite) ---------- */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.8rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 2rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  color: inherit;
  margin-right: auto;
}

.brand__mark { flex-shrink: 0; line-height: 0; }

.brand__text { display: flex; flex-direction: column; gap: 0.05rem; }

.brand__name {
  display: flex;
  flex-direction: column;
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--petrol-dark);
  line-height: 1.08;
  letter-spacing: -0.01em;
}

.brand__name-line--accent { color: var(--petrol); }

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.5rem;
}

.site-nav a {
  display: inline-block;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
  color: var(--petrol-dark);
}

.site-nav a:hover {
  color: var(--petrol);
  border-bottom-color: var(--petrol-light);
}

.site-nav a[aria-current="page"] {
  color: var(--petrol);
  font-weight: 600;
  border-bottom-color: var(--petrol);
}

.btn-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--petrol);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  white-space: nowrap;
}

.btn-pill:hover { background: var(--petrol-dark); }

/* ---------- Layout ---------- */
.page {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.75rem 1.25rem 3rem;
}

/* ---------- Hero (Band über volle Breite, wie Startseite) ---------- */
.hero {
  background:
    radial-gradient(ellipse 60% 90% at 78% 10%, rgba(255, 255, 255, 0.75) 0%, transparent 60%),
    linear-gradient(170deg, #dcecea 0%, #e9f3f2 45%, #f4f9f8 100%);
  border-bottom: 1px solid var(--border);
}

.hero__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(1.75rem, 4.5vw, 3rem) 1.25rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 820px) {
  .hero__inner {
    grid-template-columns: 1.25fr 0.75fr;
    gap: 3rem;
  }
}

.hero h1 {
  margin: 0 0 0.9rem;
  font-size: clamp(1.6rem, 4.2vw, 2.3rem);
  line-height: 1.15;
  color: var(--petrol-dark);
  letter-spacing: -0.02em;
}

.hero__lead {
  margin: 0 0 1.5rem;
  color: var(--ink-soft);
  max-width: 60ch;
}

.hero__visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-air {
  width: min(100%, 260px);
  height: auto;
  overflow: visible;
}

.hero-air__ring {
  fill: none;
  stroke: rgba(13, 110, 110, 0.16);
  stroke-width: 1.5;
  stroke-dasharray: 7 6;
}

.hero-air__disc {
  fill: rgba(255, 255, 255, 0.75);
  stroke: rgba(13, 110, 110, 0.12);
  stroke-width: 1;
}

.hero-air__sat-bg {
  fill: #fff;
  stroke: rgba(15, 42, 42, 0.1);
  stroke-width: 1.5;
}

.breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0;
  margin: 0 0 0.9rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.breadcrumb li + li::before { content: "›"; margin-right: 6px; color: #9aa7a7; }

.btn {
  display: inline-block;
  background: var(--petrol);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  transition: background 0.15s ease;
}
.btn:hover, .btn:focus { background: var(--petrol-dark); }

/* ---------- Cards ---------- */
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem 1.4rem;
  margin-bottom: 1.25rem;
}
.card h2 {
  margin-top: 0;
  color: var(--ink);
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}

.section-intro {
  margin-top: 0;
  color: var(--ink-soft);
  max-width: 70ch;
}

/* ---------- Städtekarten ---------- */
.city-grid {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}

.city-card {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  box-shadow: 0 1px 4px rgba(15, 42, 42, 0.04);
}

.city-card--empty {
  display: block;
  color: var(--ink-soft);
  background: var(--bg-muted);
  border-style: dashed;
}

.city-card__dot {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  margin-top: 0.4rem;
  border-radius: 50%;
  border: 1px solid transparent;
  font-size: 0;
}

.city-card__body { display: flex; flex-direction: column; min-width: 0; }
.city-card__city { font-size: 1rem; }
.city-card__label { font-weight: 600; font-size: 0.9rem; }
.city-card__station {
  font-size: 0.78rem;
  color: var(--ink-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* LQI-Punktfarben */
.city-card__dot.lqi-0 { background: #3f9d68; border-color: #2f7d54; }
.city-card__dot.lqi-1 { background: #93b944; border-color: #7a9c34; }
.city-card__dot.lqi-2 { background: #e5c04b; border-color: #c9a232; }
.city-card__dot.lqi-3 { background: #dd8a4e; border-color: #c26f34; }
.city-card__dot.lqi-4 { background: #c4674d; border-color: #a54c34; }
.city-card__dot.lqi-na { background: #cfd8d8; border-color: #b7c3c3; }

.lqi-text-0 { color: var(--lqi-0-fg); }
.lqi-text-1 { color: var(--lqi-1-fg); }
.lqi-text-2 { color: var(--lqi-2-fg); }
.lqi-text-3 { color: var(--lqi-3-fg); }
.lqi-text-4 { color: var(--lqi-4-fg); }
.lqi-text-na { color: var(--lqi-na-fg); }

/* ---------- Tabelle ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.air-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.98rem;
  min-width: 640px;
}

.air-table th, .air-table td {
  text-align: left;
  padding: 0.7rem 0.8rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.air-table thead th {
  background: var(--petrol);
  color: #fff;
  font-weight: 600;
  white-space: nowrap;
  line-height: 1.25;
}
.air-table thead th:first-child { border-top-left-radius: 8px; }
.air-table thead th:last-child { border-top-right-radius: 8px; }
.air-table .th-unit { font-weight: 400; font-size: 0.75rem; opacity: 0.85; }

.air-table th[scope="row"] { font-weight: 600; }
.air-table .station-name {
  display: block;
  font-weight: 400;
  font-size: 0.78rem;
  color: var(--ink-soft);
}
.air-table tbody tr:nth-child(even) td,
.air-table tbody tr:nth-child(even) th { background: #fafcfc; }
.air-table td.num {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.lqi-badge {
  display: inline-block;
  font-weight: 700;
  border-radius: 6px;
  padding: 2px 9px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.lqi-badge.lqi-0 { background: var(--lqi-0-bg); border-color: var(--lqi-0-bd); color: var(--lqi-0-fg); }
.lqi-badge.lqi-1 { background: var(--lqi-1-bg); border-color: var(--lqi-1-bd); color: var(--lqi-1-fg); }
.lqi-badge.lqi-2 { background: var(--lqi-2-bg); border-color: var(--lqi-2-bd); color: var(--lqi-2-fg); }
.lqi-badge.lqi-3 { background: var(--lqi-3-bg); border-color: var(--lqi-3-bd); color: var(--lqi-3-fg); }
.lqi-badge.lqi-4 { background: var(--lqi-4-bg); border-color: var(--lqi-4-bd); color: var(--lqi-4-fg); }
.lqi-badge.lqi-na { background: var(--lqi-na-bg); border-color: var(--lqi-na-bd); color: var(--lqi-na-fg); }

/* ---------- Legende ---------- */
.legend__list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: grid;
  gap: 10px;
}
.legend__list li { display: flex; align-items: baseline; gap: 12px; }
.legend .lqi {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  font-weight: 700;
  border-radius: 6px;
  border: 1px solid transparent;
}
.legend .lqi-0 { background: var(--lqi-0-bg); border-color: var(--lqi-0-bd); color: var(--lqi-0-fg); }
.legend .lqi-1 { background: var(--lqi-1-bg); border-color: var(--lqi-1-bd); color: var(--lqi-1-fg); }
.legend .lqi-2 { background: var(--lqi-2-bg); border-color: var(--lqi-2-bd); color: var(--lqi-2-fg); }
.legend .lqi-3 { background: var(--lqi-3-bg); border-color: var(--lqi-3-bd); color: var(--lqi-3-fg); }
.legend .lqi-4 { background: var(--lqi-4-bg); border-color: var(--lqi-4-bd); color: var(--lqi-4-fg); }

/* ---------- Quellen-/Stand-Hinweis ---------- */
.source {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--border);
  font-size: 0.88rem;
  color: var(--ink-soft);
}
.source p { margin: 4px 0; }
.source__note { font-style: italic; }

/* ---------- Prosa / SEO-Text ---------- */
.prose { padding: 0.25rem 0.15rem; }
.prose h2 { color: var(--ink); font-size: 1.25rem; letter-spacing: -0.01em; }
.prose h3 { color: var(--petrol-dark); margin-top: 1.6em; font-size: 1.02rem; }
.prose p { max-width: 70ch; color: var(--ink-soft); }

/* ---------- Trust / E-E-A-T ---------- */
.trust { border-left: 4px solid var(--green); }
.trust__list { margin: 8px 0 0; padding-left: 1.2em; }
.trust__list li { margin-bottom: 6px; color: var(--ink-soft); }

/* ---------- Medizinischer Hinweis ---------- */
.medical-notice {
  background: var(--petrol-light);
  border: 1px solid #cfe2e1;
  border-left: 4px solid var(--petrol);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
  margin-bottom: 1.25rem;
}
.medical-notice p { margin: 0; color: #29413f; font-size: 0.95rem; }

.page__note {
  margin-top: 0.5rem;
  font-size: 0.82rem;
  color: #8a9797;
  text-align: center;
}

/* ---------- Footer (kompakt, wie Startseite) ---------- */
.site-footer {
  background: var(--ink);
  color: #dce3e3;
  margin-top: 2.5rem;
}

.site-footer__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.75rem 1.25rem;
}

.site-footer--compact .site-footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  text-align: center;
}

.site-footer__nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 1.25rem;
}

.site-footer__nav a {
  color: #a8d4d4;
  font-size: 0.9rem;
  text-decoration: none;
}

.site-footer__nav a:hover {
  color: #fff;
  text-decoration: underline;
}

.site-footer__copy {
  margin: 0;
  font-size: 0.88rem;
  color: #b8c5c5;
}

/* ---------- Responsive ---------- */
@media (min-width: 620px) {
  .legend__list { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .site-header__inner { gap: 0.75rem 1.25rem; }
  .btn-pill { order: 2; }
  .site-nav { order: 3; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
