/*
 * Wetterstation Neustadt v2 – style.css
 * Flat Apple-Design · Spalten-Vorhersage
 */

/* ── CSS-Variablen ──────────────────────────────────────────── */
:root {
  --blue:     #0071E3;
  --dark:     #1D1D1F;
  --mid:      #6E6E73;
  --bg:       #F2F2F7;
  --card-bg:  #fff;
  --border:   #E5E5EA;
  --radius:   16px;
}

/* ── Reset / Base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
* { font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif; }
html  { scroll-behavior: smooth; }
body  { background: var(--bg); color: var(--dark); margin: 0; padding: 0; }
a     { text-decoration: none; color: inherit; }
img   { display: block; }
h1,h2,h3,p { margin: 0; }

/* ── Flat Card ──────────────────────────────────────────────── */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* ── Navigation ─────────────────────────────────────────────── */
.nav-wrap {
  position: fixed; top: 0; left: 0; right: 0; z-index: 9999;
  background: rgba(255,255,255,.95);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
}
.nav-inner {
  max-width: 1100px; margin: 0 auto; padding: 0 20px;
  height: 50px; display: flex; align-items: center; justify-content: space-between;
}
.nav-brand {
  display: flex; align-items: center; gap: 8px;
  font-size: .88rem; font-weight: 600; color: var(--dark);
}
.nav-links {
  display: flex; align-items: center; gap: 1px;
  list-style: none; margin: 0; padding: 0;
}
.nav-link {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 11px; border-radius: 10px;
  font-size: .84rem; color: var(--mid);
  transition: background .12s, color .12s;
}
.nav-link:hover  { background: rgba(0,0,0,.05); color: var(--dark); }
.nav-link.active { color: var(--blue); font-weight: 600; }
.nav-hd {
  font-size: 9px; background: var(--blue); color: #fff;
  padding: 2px 5px; border-radius: 4px; font-weight: 700; line-height: 1.3;
}
.nav-mobile-btn {
  display: none; padding: 8px; border-radius: 10px;
  background: none; border: none; cursor: pointer; color: var(--dark); font-size: 1rem;
}
/* ── Nav Dropdown (Desktop) ──────────────────────────────────── */
.nav-has-sub { position: relative; }
.nav-sub-arrow { font-size: .55rem; margin-left: 3px; opacity: .5; transition: transform .2s; }
.nav-has-sub:hover .nav-sub-arrow { transform: rotate(180deg); }
.nav-sub-dropdown {
  display: none; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,.12); padding: 6px 0; min-width: 190px; z-index: 100;
}
.nav-has-sub:hover .nav-sub-dropdown { display: block; }
.nav-sub-dropdown::before {
  content: ''; position: absolute; top: -5px; left: 50%; transform: translateX(-50%) rotate(45deg);
  width: 10px; height: 10px; background: var(--card-bg); border-left: 1px solid var(--border); border-top: 1px solid var(--border);
}
.nav-sub-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 16px; font-size: .82rem; color: var(--mid);
  transition: background .12s, color .12s; white-space: nowrap;
}
.nav-sub-item:hover { background: rgba(0,113,227,.05); color: var(--dark); }
.nav-sub-item.active { color: var(--blue); font-weight: 600; }
.nav-sub-item i { font-size: .75rem; opacity: .6; width: 16px; text-align: center; }
/* ── Nav Mobile Sub ──────────────────────────────────────────── */
.nav-mob-sub { display: none; }
.nav-mob-group.open .nav-mob-sub { display: block; }
.nav-mob-group.open .nav-mob-toggle i { transform: rotate(180deg); }

/* ── Hero / Header ──────────────────────────────────────────── */
.hero-wrap {
  position: relative; overflow: hidden; min-height: 230px;
  padding-top: 50px;
  background: #1D1D1F;
}
.hero-bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center 40%;
  filter: blur(3px) brightness(.50) saturate(.85);
  transform: scale(1.12);
}
.hero-fade {
  position: absolute; bottom: 0; left: 0; right: 0; height: 120px;
  background: linear-gradient(to bottom, transparent, var(--bg));
  pointer-events: none;
}
.hero-content {
  position: relative; z-index: 2;
  max-width: 1100px; margin: 0 auto; padding: 24px 20px 48px;
}
.hero-eyebrow {
  font-size: .67rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .1em; color: rgba(255,255,255,.68); margin: 0 0 4px;
}
.hero-title {
  font-size: clamp(1.75rem, 5vw, 2.6rem); font-weight: 700; color: #fff;
  letter-spacing: -.02em; text-shadow: 0 1px 12px rgba(0,0,0,.4); margin: 0 0 5px;
}
.hero-sub { font-size: .875rem; color: rgba(255,255,255,.8); margin: 0 0 16px; }

/* ── Hero-Status-Chips (DWD-Warnung, Gewitter-Naehe etc.) ─────────
   Kompakte Pill-Buttons, nebeneinander im Hero. IDs (#alertBanner /
   #stormBanner) bleiben als Wrapper erhalten, damit existierendes JS
   weiter funktioniert – sie werden nur als Flex-Items gestylt. */
.hero-chips {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 14px; max-width: 560px;
}
.hero-chips:empty,
.hero-chips.is-empty { display: none; }
.status-chip {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 5px 14px 5px 5px;
  border-radius: 999px;
  /* Ruhiges dunkles Glas - Severity kommt nur via Border + Icon rein, damit
     Farben farbtreu bleiben (Gelb = Gelb, nicht Olive) und mehrere Chips
     nebeneinander nicht als Farbwand wirken. */
  border: 2px solid rgba(255,255,255,.28);
  background: rgba(0,0,0,.5);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  font-family: inherit; font-size: .78rem; font-weight: 600;
  color: #fff; cursor: pointer; text-align: left;
  max-width: 280px; line-height: 1.2;
  transition: transform .18s ease, border-color .15s, box-shadow .18s;
}
.status-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0,0,0,.22);
}
.status-chip .chip-icon {
  width: 26px; height: 26px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,.14);
  flex-shrink: 0; font-size: .82rem;
  position: relative;
}
.status-chip .chip-text {
  display: flex; flex-direction: column; min-width: 0; padding-right: 4px;
}
.status-chip .chip-title {
  font-weight: 700;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  /* Feiner Textschatten hilft gegen helle Hero-BGs, wahrt das elegante Design */
  text-shadow: 0 1px 2px rgba(0,0,0,.45);
}
.status-chip .chip-sub {
  font-size: .68rem; font-weight: 500;
  color: rgba(255,255,255,.88);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  margin-top: 1px;
  text-shadow: 0 1px 2px rgba(0,0,0,.4);
}
/* Dezenter Live-Puls – nur fuer KONRAD3D-Chip (storm-chip) */
.status-chip.storm-chip .chip-icon::before {
  content: '';
  position: absolute; inset: -3px;
  border-radius: 50%;
  border: 2px solid currentColor;
  opacity: 0;
  animation: chipPulse 2.2s ease-out infinite;
}
@keyframes chipPulse {
  0%   { transform: scale(.9);  opacity: .75; }
  80%  { transform: scale(1.6); opacity: 0; }
  100% { opacity: 0; }
}

/* ── Chip-Feinschliff mobil: volle Breite, groessere Tap-Targets, Chevron ─── */
@media (max-width: 540px) {
  .hero-chips { width: 100%; max-width: 100%; gap: 8px; }
  .hero-chips > div { width: 100%; }
  .status-chip {
    max-width: 100%; width: 100%;
    padding: 7px 14px 7px 6px;
    font-size: .82rem;
  }
  .status-chip .chip-icon { width: 30px; height: 30px; font-size: .9rem; }
  .status-chip .chip-title { font-size: .88rem; }
  .status-chip .chip-sub   { font-size: .72rem; margin-top: 2px; }
  /* Dezenter Caret rechts, signalisiert "tappbar" */
  .status-chip::after {
    content: '';
    width: 7px; height: 7px;
    border-right: 2px solid rgba(255,255,255,.45);
    border-top:   2px solid rgba(255,255,255,.45);
    transform: rotate(45deg);
    margin-left: auto; margin-right: 4px;
    flex-shrink: 0;
    transition: transform .15s;
  }
  .status-chip:active::after { transform: rotate(45deg) translate(1px,-1px); }
}

/* ── Main ───────────────────────────────────────────────────── */
.main-wrap {
  max-width: 1100px; margin: -18px auto 0; padding: 0 20px 100px;
  position: relative; z-index: 1;
}

/* ── Shared Section Styles ──────────────────────────────────── */
.section-title {
  font-size: 1rem; font-weight: 600; color: var(--dark); letter-spacing: -.01em;
}

/* ══════════════════════════════════════════════════════════════
   STUNDENVORHERSAGE – Spalten-Layout
   ══════════════════════════════════════════════════════════════ */
.fc-section { margin-bottom: 12px; }
.fc-card    { padding: 16px 16px 12px; }

.fc-header  {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 12px;
}
.fc-err  { font-size: .78rem; color: #FF3B30; }
.fc-empty{ text-align: center; padding: 36px; color: var(--mid); font-size: .875rem; }

/* Scroll */
.fc-scroll-wrap {
  overflow-x: auto; overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  /* extra padding-top so date badge above midnight columns isn't clipped */
  padding-top: 20px; margin-top: -8px;
}
.fc-scroll-wrap::-webkit-scrollbar { height: 3px; }
.fc-scroll-wrap::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* Spalten-Container */
.fc-cols { display: flex; gap: 2px; min-width: max-content; padding-bottom: 4px; }

/* Einzelne Spalte */
.fc-col {
  position: relative;
  flex: 0 0 62px; width: 62px;
  display: flex; flex-direction: column;
  border-radius: 10px; overflow: visible;
  background: #F9F9FB;
  border: 1px solid var(--border);
}
.fc-col-night    { background: #F0F0F5; }
.fc-col-midnight { }

/* Datum-Badge über Mitternacht-Spalte */
.fc-col-midnight::before {
  content: attr(data-date);
  position: absolute;
  top: -18px; left: 50%; transform: translateX(-50%);
  background: var(--blue); color: #fff;
  font-size: .58rem; font-weight: 700; letter-spacing: .02em;
  padding: 2px 7px; border-radius: 8px;
  white-space: nowrap; pointer-events: none;
}

/* Zeitbalken */
.fc-time-bar {
  background: #1C1C1E; color: #fff;
  font-size: .66rem; font-weight: 700;
  text-align: center; padding: 4px 2px;
  border-radius: 10px 10px 0 0;
  letter-spacing: .01em; line-height: 1.2;
}
.fc-col-night .fc-time-bar { background: #2C2C2E; }

/* Icon-Bereich */
.fc-icon-box {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  height: 56px; padding: 2px;
}
.fc-icon-box img { width: 46px; height: 46px; object-fit: contain; }

/* Sonnenauf-/-untergang Badge */
.fc-sun-badge {
  position: absolute; bottom: 2px; right: 2px;
  display: flex; align-items: center; gap: 2px;
  font-size: .55rem; font-weight: 700; line-height: 1;
  padding: 1px 3px; border-radius: 4px; white-space: nowrap;
}
.fc-sunrise-badge { color: #E6980A; background: rgba(230,152,10,.12); }
.fc-sunset-badge  { color: #E05800; background: rgba(224,88,0,.12); }

/* Datenzeilen */
.fc-temp { font-size: 1.05rem; font-weight: 700; letter-spacing: -.02em; text-align: center; padding: 2px 2px; line-height: 1; }
.fc-rain { font-size: .67rem; color: rgba(0,0,0,.28); text-align: center; padding: 2px; display: flex; align-items: center; justify-content: center; gap: 3px; }
.fc-rain-wet { color: var(--blue); font-weight: 600; }
.fc-press { font-size: .64rem; color: var(--mid); text-align: center; padding: 2px; display: flex; align-items: center; justify-content: center; gap: 3px; }
.fc-sun-on { color: #FF9500; font-weight: 600; }
.fc-wind { font-size: .67rem; color: var(--dark); font-weight: 600; text-align: center; padding: 2px; display: flex; align-items: center; justify-content: center; gap: 2px; }
.fc-dir { font-size: .58rem; font-weight: 400; color: var(--mid); }
.fc-wind-arrow { display: inline-block; transform: rotate(var(--wd, 0deg)); font-size: .72rem; opacity: .75; margin-left: 3px; line-height: 1; }
.fc-ico { font-size: .56rem; }
.gust-warn  { color: #FF9500 !important; }   /* compat Root-index.php */
.gust-alert { color: #FF2D55 !important; }   /* compat Root-index.php */
/* Wind-Böen 14 Stufen (Beaufort-Skala) */
.gust-1  { color: #00AAAA !important; }  /* Bft 1  1–5   km/h */
.gust-2  { color: #00BB77 !important; }  /* Bft 2  6–11  km/h */
.gust-3  { color: #00BB33 !important; }  /* Bft 3  12–19 km/h */
.gust-4  { color: #66BB00 !important; }  /* Bft 4  20–28 km/h */
.gust-5  { color: #AACC00 !important; }  /* Bft 5  29–38 km/h */
.gust-6  { color: #BBAA00 !important; }  /* Bft 6  39–49 km/h */
.gust-7  { color: #DD8800 !important; }  /* Bft 7  50–61 km/h */
.gust-8  { color: #EE5500 !important; }  /* Bft 8  62–74 km/h */
.gust-9  { color: #EE2200 !important; }  /* Bft 9  75–88 km/h */
.gust-10 { color: #CC0000 !important; }  /* Bft 10 89–102 km/h */
.gust-11 { color: #880000 !important; }  /* Bft 11 103–117 km/h */
.gust-12 { color: #880088 !important; }  /* Bft 12 ≥118 km/h */
.gust-13 { color: #440044 !important; }  /* ≥150 km/h */
.fc-humid { font-size: .64rem; text-align: center; padding: 2px; display: flex; align-items: center; justify-content: center; gap: 3px; }

/* Windsack */
.fc-sock, .fc-sock-empty { display: flex; align-items: center; justify-content: center; height: 20px; padding: 1px; }

/* CTA – Zur detaillierten Vorhersage */
.fc-cta {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .77rem; font-weight: 600; color: var(--blue);
  background: rgba(0,113,227,.07); border: 1px solid rgba(0,113,227,.2);
  padding: 5px 11px; border-radius: 20px;
  transition: background .15s, box-shadow .15s;
  white-space: nowrap; flex-shrink: 0;
}
.fc-cta:hover { background: rgba(0,113,227,.14); box-shadow: 0 2px 8px rgba(0,113,227,.15); }
.fc-cta .fa-arrow-right { font-size: .6rem; }

/* Legende */
.fc-legend {
  margin-top: 10px; padding-top: 8px;
  border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap; gap: 4px 14px;
  font-size: .66rem; color: var(--mid);
}

/* ══════════════════════════════════════════════════════════════
   WETTERDATEN – Tiles
   ══════════════════════════════════════════════════════════════ */
.wd-section { margin-bottom: 12px; }

.wd-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 10px;
}
.wd-update-info {
  font-size: .73rem; color: var(--mid); margin-top: 3px;
  display: flex; align-items: center; gap: 4px;
}

/* Grid */
.wd-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

/* Tile */
.wd-tile { padding: 16px 16px 14px; display: flex; flex-direction: column; }

/* Clickable tile */
.wd-tile-click {
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
  user-select: none;
}
.wd-tile-click:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 18px rgba(0,0,0,.09);
}
.wd-tile-click:active { transform: translateY(0); }

/* Tile header */
.wd-th {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 10px; margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.wd-th-title {
  display: flex; align-items: center; gap: 7px;
  font-size: .9rem; font-weight: 600; color: var(--dark);
}
.wd-th-more {
  font-size: .71rem; color: var(--blue); white-space: nowrap;
  display: flex; align-items: center; gap: 3px;
}
.wd-th-more .fas { font-size: .58rem; }

/* Tile body */
.wd-tb { display: flex; align-items: flex-start; flex: 1; }
.wd-tb-main {
  flex-shrink: 0; padding-right: 14px;
  border-right: 1px solid var(--border);
  min-width: 115px;
}
.wd-tb-stats {
  flex: 1; padding-left: 14px;
  display: flex; gap: 12px; flex-wrap: wrap; align-content: flex-start;
}

/* Current value block */
.wd-aktuell-lbl {
  font-size: .58rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--mid); margin-bottom: 5px;
}
.wd-current { display: flex; align-items: center; gap: 8px; }
.wd-val-big {
  font-size: 1.8rem; font-weight: 600; letter-spacing: -.03em; line-height: 1.1; color: var(--dark);
}
.wd-current .fas { font-size: .95rem; }

/* Stat columns */
.wd-stat-item { display: flex; flex-direction: column; gap: 2px; min-width: 58px; }
.wd-stat-lbl {
  font-size: .59rem; color: var(--mid); font-weight: 600;
  text-transform: uppercase; letter-spacing: .05em;
}
.wd-stat-val { font-size: .88rem; font-weight: 700; color: var(--dark); }
.wd-stat-sub { font-size: .62rem; color: var(--mid); }

/* Sonne wide tile */
.wd-tile-wide { grid-column: 1 / -1; }
.wd-tb-sonne { display: grid; grid-template-columns: 1fr 1.15fr 2.2fr; }
.wd-sonne-part { padding-right: 16px; }
.wd-sonne-mid {
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  padding: 0 16px;
}
.wd-sonne-last { padding: 0 0 0 16px; }
.wd-sonne-zeiten {
  display: flex; gap: 12px; font-size: .88rem; font-weight: 600; color: var(--dark); flex-wrap: wrap;
}

/* Sonnenhöhe-Zelle: Zahl links, Tagesbogen-Visualisierung rechts */
.wd-sonne-last-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: center;
}
.wd-sonne-last-val { min-width: 0; }
.wd-sonne-arc-wrap {
  min-width: 0;
  width: 100%;
  display: flex;
  justify-content: flex-end;
}
.wd-sonne-arc {
  width: 100%;
  max-width: 340px;
  height: auto;
  display: block;
  overflow: visible;
}
.wd-sonne-arc-time {
  font-size: 8.5px;
  font-weight: 700;
  fill: var(--dark);
  letter-spacing: .02em;
  font-family: inherit;
}
.wd-sonne-arc-lbl {
  font-size: 7px;
  font-weight: 600;
  fill: var(--mid);
  letter-spacing: .06em;
  text-transform: uppercase;
  font-family: inherit;
}

/* Shared legacy helpers (used in modals) */
.wd-ico  { font-size: .72rem; }
.wd-note { font-size: .68rem; color: var(--mid); font-weight: 400; }
.wd-sep  { border-top: 1px solid var(--border); margin: 7px 0; }

/* ══════════════════════════════════════════════════════════════
   WETTERDATEN-MODALS
   ══════════════════════════════════════════════════════════════ */
.wd-modal {
  display: none;
  position: fixed; inset: 0; z-index: 10000;
  align-items: flex-end; justify-content: center;
  /* Auf Mobile: Panel darf nie hinter die fixe Nav (50px) ragen */
  padding-top: 50px;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
@media (min-width: 600px) {
  .wd-modal { align-items: center; padding: 16px; }
}

.wd-modal-panel {
  width: 100%; max-width: 480px; max-height: calc(100vh - 50px);
  background: var(--card-bg);
  border-radius: 20px 20px 0 0;
  border: 1px solid var(--border);
  box-shadow: 0 -4px 40px rgba(0,0,0,.18);
  display: flex; flex-direction: column;
  animation: wdSlideUp .25s ease;
  overflow: hidden;
}
@media (min-width: 600px) {
  .wd-modal-panel {
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,.2);
    animation: wdFadeScale .22s ease;
  }
  .wd-modal-panel-wide { max-width: 560px; }
}
@keyframes wdSlideUp {
  from { transform: translateY(40px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
@keyframes stormPulse {
  0%   { transform: translate(-50%,-50%) scale(1); opacity: 0.7; }
  100% { transform: translate(-50%,-50%) scale(2.8); opacity: 0; }
}
@keyframes wdFadeScale {
  from { transform: scale(.96); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

.wd-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px 12px; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.wd-modal-htitle {
  display: flex; align-items: center; gap: 9px;
  font-size: .95rem; font-weight: 700; color: var(--dark);
}
.wd-modal-close {
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(0,0,0,.06); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--mid); font-size: .82rem; transition: background .12s;
}
.wd-modal-close:hover { background: rgba(0,0,0,.12); }

.wd-modal-body { overflow-y: auto; padding: 16px 18px 28px; flex: 1; }

.wd-modal-hero {
  display: flex; align-items: flex-end; gap: 7px; margin-bottom: 14px;
}
.wd-modal-big {
  font-size: 3rem; font-weight: 300; letter-spacing: -.04em; line-height: 1; color: var(--dark);
}
.wd-modal-unit { font-size: 1rem; color: var(--mid); margin-bottom: 5px; line-height: 1; }

/* 24h Chart in Modal */
.wd-modal-chart {
  margin: 8px 0 16px;
  border-radius: 10px;
  background: #F9F9FB;
  border: 1px solid var(--border);
  overflow: hidden;
  min-height: 130px;
}
.wd-chart-loading {
  display: flex; align-items: center; justify-content: center;
  height: 130px; color: var(--mid); font-size: .78rem; gap: 6px;
}

/* Next update info */
.wd-next-update { opacity: .68; }

.wd-modal-section {
  font-size: .64rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--mid);
  margin: 14px 0 6px; padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
}
.wd-modal-row {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 8px; padding: 5px 0;
  font-size: .84rem; border-bottom: 1px solid rgba(0,0,0,.04);
}
.wd-modal-key { color: var(--mid); flex: 1; }
.wd-modal-val { font-weight: 600; color: var(--dark); flex-shrink: 0; text-align: right; }
.wd-modal-sep { border-top: 1px solid var(--border); margin: 8px 0; }

/* Mini-Grid (3 Kacheln) für Veränderungswerte */
.wd-modal-grid3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 4px 0 6px;
}
.wd-modal-tile {
  background: rgba(0,0,0,.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 8px 11px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.wd-tile-key {
  font-size: .62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--mid);
}
.wd-tile-val {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--dark);
  line-height: 1.1;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 3px;
}
.wd-tile-unit {
  font-size: .68rem;
  font-weight: 500;
  color: var(--mid);
}

/* Info-Button & ausklappbarer Info-Text */
.wd-info-btn {
  background: none; border: none; padding: 0;
  margin-left: 4px; cursor: pointer;
  color: var(--mid); opacity: .55;
  font-size: .82rem; line-height: 1;
  transition: opacity .12s, color .12s;
  vertical-align: -1px;
}
.wd-info-btn:hover { opacity: 1; color: #0071E3; }
.wd-info-btn.is-active { opacity: 1; color: #0071E3; }

.wd-modal-info-text {
  font-size: .76rem; color: var(--mid); line-height: 1.5;
  background: rgba(0,113,227,.06);
  border-left: 2px solid #0071E3;
  border-radius: 0 8px 8px 0;
  padding: 8px 11px;
  margin: 2px 0 6px;
  animation: wdInfoSlide .18s ease;
}
@keyframes wdInfoSlide {
  from { opacity: 0; transform: translateY(-3px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Collapse-Button + Content (Vergleichszeiträume) */
.wd-collapse-btn {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; gap: 8px;
  background: rgba(0,0,0,.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
  margin: 6px 0 4px;
  cursor: pointer;
  font-size: .74rem; font-weight: 600;
  color: var(--mid);
  text-transform: uppercase;
  letter-spacing: .05em;
  transition: background .12s, color .12s;
}
.wd-collapse-btn:hover { background: rgba(0,0,0,.06); color: var(--dark); }
.wd-collapse-btn i {
  font-size: .72rem;
  transition: transform .2s ease;
}
.wd-collapse-btn.is-open i { transform: rotate(180deg); }
.wd-collapse-btn.is-open { color: var(--dark); }

.wd-collapse-content { animation: wdInfoSlide .2s ease; }
.wd-modal-hint {
  font-size: .82rem; color: var(--mid); line-height: 1.55;
  background: rgba(0,0,0,.03); border-radius: 10px; padding: 10px 12px; margin: 6px 0 0;
}

/* Range bar */
.wd-modal-range-bar { margin: 0 0 12px; }
.wd-modal-range-labels {
  display: flex; justify-content: space-between; font-size: .66rem; color: var(--mid); margin-bottom: 4px;
}
.wd-modal-range-bg {
  height: 6px; background: var(--border); border-radius: 3px; overflow: hidden;
}
.wd-modal-range-fill { height: 100%; border-radius: 3px; }

/* UV scale */
.wd-modal-uv-scale { margin: 4px 0 14px; }
.wd-modal-uv-bar {
  height: 10px; border-radius: 5px; overflow: hidden; position: relative;
  background: linear-gradient(to right, #34C759 0%, #FFD60A 27%, #FF9500 55%, #FF3B30 73%, #9933ff 100%);
  margin-bottom: 5px;
}
.wd-modal-uv-marker {
  position: absolute; top: 0; bottom: 0; width: 3px;
  background: #fff; border-radius: 2px; transform: translateX(-50%);
  box-shadow: 0 0 4px rgba(0,0,0,.4);
}
.wd-modal-uv-labels, .wd-modal-uv-nums {
  display: flex; justify-content: space-between; font-size: .62rem;
}
.wd-modal-uv-labels { font-weight: 600; margin-bottom: 1px; }
.wd-modal-uv-nums   { color: var(--mid); }

/* Sun arc (modal) */
.wd-modal-sun-arc { margin-bottom: 6px; }
.wd-modal-sun-times {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px;
}

/* Moon block (modal) */
.wd-modal-moon-block { display: flex; gap: 16px; align-items: flex-start; margin-top: 6px; }
.wd-modal-moon-img {
  display: flex; flex-direction: column; align-items: center; flex-shrink: 0; width: 92px;
}
.wd-modal-moon-img img { width: 80px; height: 80px; }

/* Comparison table in modals */
.wd-mc-table {
  width: 100%; border-collapse: collapse; font-size: .82rem; margin: 4px 0 2px;
}
.wd-mc-table th {
  font-size: .6rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--mid);
  padding: 4px 8px 5px; text-align: right; border-bottom: 2px solid var(--border);
}
.wd-mc-table th:first-child { text-align: left; }
.wd-mc-table td {
  padding: 6px 8px; border-bottom: 1px solid rgba(0,0,0,.04); text-align: right;
}
.wd-mc-table td:first-child { text-align: left; color: var(--mid); font-size: .8rem; }
.wd-mc-table .mc-min { color: #0071E3; font-weight: 700; }
.wd-mc-table .mc-max { color: #FF3B30; font-weight: 700; }
.wd-mc-table .mc-avg { font-weight: 600; color: var(--dark); }
.wd-mc-table tr:last-child td { border-bottom: none; }
.mc-sub { font-size: .6rem; color: var(--mid); font-weight: 400; margin-top: 1px; }

/* ── Quicklinks ─────────────────────────────────────────────── */
.ql-section { margin-bottom: 12px; }
.ql-card    { padding: 18px 20px; }
.ql-grid    { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ql-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; border-radius: 12px; color: var(--dark);
  transition: opacity .12s;
}
.ql-item:hover { opacity: .82; }
.ql-icon  { font-size: 1rem; width: 20px; text-align: center; flex-shrink: 0; }
.ql-title { font-size: .84rem; font-weight: 600; }
.ql-sub   { font-size: .69rem; color: var(--mid); margin-top: 1px; }

/* 3-spaltiges Raster (Desktop), 1-spaltig mobil */
.ql-grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 580px) { .ql-grid-3 { grid-template-columns: 1fr; } }

/* Vollbreites Archiv-Item */
.ql-item-wide {
  grid-column: 1 / -1;
  padding: 14px 16px;
  justify-content: flex-start;
  gap: 16px;
}
.ql-item-wide .ql-icon { font-size: 1.4rem; width: 26px; }
.ql-item-wide .ql-title { font-size: .92rem; }
.ql-item-wide .ql-sub   { font-size: .74rem; }

/* ── Radar-Grid (Thumbnail Cards) ──────────────────────────── */
.radar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
@media (max-width: 680px) {
  .radar-grid { grid-template-columns: 1fr; }
}
@media (min-width: 681px) and (max-width: 900px) {
  .radar-grid { grid-template-columns: repeat(2, 1fr); }
  .radar-grid-card:last-child { grid-column: span 2; }
}
.radar-grid-card {
  display: flex; flex-direction: column;
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  text-decoration: none; transition: transform .18s, box-shadow .18s;
  color: var(--dark);
  -webkit-tap-highlight-color: transparent;
}
.radar-grid-card:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(0,0,0,.13); }
.radar-grid-thumb {
  width: 100%; aspect-ratio: 16/9; min-height: 130px;
  overflow: hidden; background: #0d1117; position: relative;
}
.radar-grid-thumb iframe {
  position: absolute; inset: 0; width: 100%; height: 100%;
  border: none; display: block; pointer-events: none;
}

/* ── Thumbnail-Ladeindikator (gemeinsam) ─────────────────────────
   Greift auf zwei Container-Klassen:
   - .radar-grid-thumb (Radar-Karten auf Startseite/Vorhersage)
   - .thumb-loader     (generisch, z.B. Warnmap-Iframe im Modal)
   Spinner ist per ::after sichtbar, iframe startet opacity:0.
   Sobald onload=thumbReady(this) auf dem iframe feuert (oder das
   globale 10-Sekunden-Sicherheitsnetz), wird die Klasse
   .thumb-loaded gesetzt: Spinner fadet aus, iframe fadet ein. */
.radar-grid-thumb,
.thumb-loader { position: relative; background: #0d1117; }
.radar-grid-thumb iframe,
.thumb-loader iframe { opacity: 0; transition: opacity .4s ease; }
.radar-grid-thumb.thumb-loaded iframe,
.thumb-loader.thumb-loaded iframe { opacity: 1; }
.radar-grid-thumb::after,
.thumb-loader::after {
  content: '';
  position: absolute; top: 50%; left: 50%;
  width: 28px; height: 28px; margin: -14px 0 0 -14px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,.15);
  border-top-color: rgba(255,255,255,.7);
  animation: thumbSpin .9s linear infinite;
  pointer-events: none; z-index: 1;
  transition: opacity .25s ease;
}
.radar-grid-thumb.thumb-loaded::after,
.thumb-loader.thumb-loaded::after { opacity: 0; }
@keyframes thumbSpin { to { transform: rotate(360deg); } }
.radar-grid-info { padding: 10px 12px 12px; flex: 1; }
.radar-grid-label {
  display: flex; align-items: center; gap: 5px;
  font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .07em;
  color: var(--blue); margin-bottom: 5px;
}
.radar-grid-info p { font-size: .8rem; color: var(--mid); margin: 0; line-height: 1.45; }
.radar-grid-foot {
  display: flex; align-items: center; justify-content: flex-end;
  padding: 7px 12px; border-top: 1px solid var(--border);
  font-size: .74rem; color: var(--blue); font-weight: 500; gap: 5px;
}

/* ── SEO-Text ───────────────────────────────────────────────── */
.seo-section { margin-bottom: 12px; }
.seo-card {
  padding: 18px 20px;
  color: var(--mid);
}
.seo-card h2 {
  font-size: 1rem; font-weight: 700; color: var(--dark);
  margin-bottom: 6px;
}
.seo-lead {
  font-size: .82rem; line-height: 1.65; margin-bottom: 12px;
}
.seo-cols {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 14px;
}
.seo-h3 {
  font-size: .84rem; font-weight: 600; color: var(--dark); margin-bottom: 5px;
}
.seo-cols p {
  font-size: .78rem; line-height: 1.6; color: var(--mid);
}
.seo-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 6px;
}
.seo-list li {
  font-size: .78rem; color: var(--mid); display: flex; align-items: flex-start; gap: 7px;
}
.seo-list strong { color: var(--dark); }
.seo-facts {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 6px; font-size: .72rem; border-top: 1px solid var(--border); padding-top: 10px;
}
.seo-facts > div {
  display: flex; flex-direction: column; gap: 2px;
}
.seo-facts strong { color: var(--dark); font-weight: 600; font-size: .68rem; text-transform: uppercase; letter-spacing: .04em; }

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  border-radius: 980px; font-size: .84rem; font-weight: 500;
  cursor: pointer; border: none; padding: 7px 18px;
  transition: opacity .15s; text-decoration: none;
}
.btn-blue  { background: var(--blue); color: #fff; }
.btn-blue:hover { opacity: .88; }
.btn-ghost { background: transparent; border: 1px solid var(--blue); color: var(--blue); }
.btn-ghost:hover { background: var(--blue); color: #fff; }
.btn-sm { font-size: .76rem; padding: 5px 13px; }

/* ── Filter Pills ───────────────────────────────────────────── */
.filter-pill {
  font-size: .74rem; padding: 4px 13px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--card-bg);
  color: var(--mid); cursor: pointer; font-weight: 500; transition: all .12s;
}
.filter-pill.active          { background: var(--blue); color: #fff; border-color: var(--blue); }
.filter-pill:hover:not(.active) { border-color: var(--blue); color: var(--blue); }

/* ── Warnungs-Modal ─────────────────────────────────────────── */
.modal-wrap    { display: none; position: fixed; inset: 0; z-index: 300; }
.modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.45); backdrop-filter: blur(4px); }
.modal-box {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; padding: 16px;
}
.modal-inner {
  width: 100%; max-width: 520px; background: var(--card-bg);
  border-radius: 20px; border: 1px solid var(--border);
  box-shadow: 0 20px 60px rgba(0,0,0,.18);
  overflow: hidden; display: flex; flex-direction: column; max-height: 90vh;
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.modal-title {
  font-size: .92rem; font-weight: 600; color: var(--dark);
  margin: 0; display: flex; align-items: center; gap: 8px;
}
.modal-close-btn {
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(0,0,0,.06); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; color: var(--mid);
  font-size: .8rem;
}
.modal-filters {
  padding: 10px 14px; border-bottom: 1px solid var(--border);
  display: flex; flex-wrap: wrap; gap: 6px; flex-shrink: 0;
}
.wf-divider { width: 100%; height: 1px; background: var(--border); margin: 2px 0; }
/* Icon-Filter-Buttons im Warnungs-Modal – identisch mit /radar/index.php */
.icon-filter-btn {
  width: 34px; height: 34px; border-radius: 7px;
  border: 2px solid var(--border); background: var(--card-bg);
  color: var(--mid); display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; transition: .12s; flex-shrink: 0;
}
.icon-filter-btn i { font-size: .85rem; }
.icon-filter-btn:hover { background: rgba(0,0,0,.05); }
.icon-filter-btn.is-active               { background: rgba(253,216,53,.2); color: #b8920a; }
.icon-filter-btn.sev-1                   { border-color: #fdd835; border-width: 3px; }
.icon-filter-btn.sev-2                   { border-color: #f57c00; border-width: 3px; }
.icon-filter-btn.sev-3                   { border-color: #e53935; border-width: 3px; }
.icon-filter-btn.sev-4                   { border-color: #880e4f; border-width: 3px; }
.icon-filter-btn.is-active.sev-1         { background: rgba(253,216,53,.2); color: #b8920a; }
.icon-filter-btn.is-active.sev-2         { background: rgba(245,124,0,.15); color: #f57c00; }
.icon-filter-btn.is-active.sev-3         { background: rgba(229,57,53,.15); color: #e53935; }
.icon-filter-btn.is-active.sev-4         { background: rgba(136,14,79,.15); color: #880e4f; }
.modal-body { overflow-y: auto; padding: 12px 14px; flex: 1; }
.modal-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 18px; border-top: 1px solid var(--border);
  background: rgba(0,0,0,.015); flex-shrink: 0;
}

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--card-bg);
}
.footer-inner {
  max-width: 1100px; margin: 0 auto; padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 8px;
}
.footer-copy { font-size: .78rem; color: var(--mid); margin: 0; }
.footer-sub  { font-size: .68rem; color: rgba(110,110,115,.55); margin: 2px 0 0; }

/* ── Back-to-top ────────────────────────────────────────────── */
#b2t {
  position: fixed; bottom: 22px; right: 22px; z-index: 99;
  display: none; width: 42px; height: 42px; border-radius: 50%;
  background: var(--card-bg); border: 1px solid var(--border);
  cursor: pointer; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.1); transition: opacity .2s;
  color: var(--dark); font-size: .82rem;
}
#b2t:hover { opacity: .75; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .seo-cols { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .nav-links      { display: none; }
  .nav-mobile-btn { display: block; }
  .ql-grid        { grid-template-columns: repeat(2, 1fr); }
  .wd-grid        { grid-template-columns: repeat(2, 1fr); }
  .seo-facts      { grid-template-columns: repeat(2, 1fr); }
  .wd-modal-panel { max-width: 100%; }
  .wd-tb-sonne    { grid-template-columns: 1fr 1fr; }
  .wd-sonne-last  { border-top: 1px solid var(--border); padding: 12px 0 0; margin-top: 12px; grid-column: 1 / -1; border-left: none; border-right: none; }
  .wd-sonne-last.wd-sonne-last { padding-left: 0; }
  .wd-sonne-arc   { max-width: 420px; }
}
@media (max-width: 580px) {
  .wd-grid        { grid-template-columns: 1fr; }
  .ql-grid        { grid-template-columns: 1fr; }
  .fc-col         { flex: 0 0 60px; width: 60px; }
  .fc-icon-box img{ width: 44px; height: 44px; }
  .seo-facts      { grid-template-columns: repeat(2, 1fr); }
  .wd-tb-sonne    { grid-template-columns: 1fr; }
  .wd-sonne-mid, .wd-sonne-last { border-left: none; border-right: none; border-top: 1px solid var(--border); padding: 12px 0 0; margin-top: 12px; }
  .wd-sonne-part  { padding-right: 0; }
  .wd-sonne-last-grid { grid-template-columns: auto 1fr; gap: 14px; }
  .wd-sonne-arc   { max-width: 100%; }
  .wd-tb          { flex-direction: column; gap: 12px; }
  .wd-tb-main     { border-right: none; border-bottom: 1px solid var(--border); padding: 0 0 10px; min-width: unset; width: 100%; }
  .wd-tb-stats    { padding-left: 0; }
}
@media (max-width: 420px) {
  .hero-title  { font-size: 1.7rem; }
  .fc-card     { padding: 12px 10px 10px; }
  .wd-header   { flex-direction: column; align-items: flex-start; gap: 8px; }
  .seo-facts   { grid-template-columns: 1fr; }
  .wd-modal-moon-block { flex-direction: column; align-items: center; }
}
