/* Alles schaalt mee met de schermgrootte: ontworpen op 1920x1080 (1rem = 16px). */
:root {
  --primary: #0b6e75;
  --primary-soft: rgba(11, 110, 117, .13);
  --primary-strong: rgba(11, 110, 117, .6);
  --accent: #f2a541;
  --bg: #e9f0f1;
  --bg2: #dbe7e9;
  --card: #ffffff;
  --text: #15282d;
  --muted: #5b6f74;
  --line: rgba(0, 0, 0, .08);
  --shadow: 0 .4rem 1.6rem rgba(10, 40, 45, .08);
}
html { font-size: min(calc(100vw / 120), calc(100vh / 67.5)); }
@media (orientation: portrait) {
  html { font-size: min(calc(100vw / 67.5), calc(100vh / 120)); }
}
body.theme-donker {
  --bg: #0d1a1e;
  --bg2: #132428;
  --card: #182c31;
  --text: #eef5f6;
  --muted: #9db1b5;
  --line: rgba(255, 255, 255, .08);
  --shadow: 0 .4rem 1.6rem rgba(0, 0, 0, .3);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body {
  font-family: "Segoe UI", "Helvetica Neue", Arial, system-ui, sans-serif;
  background: linear-gradient(160deg, var(--bg) 0%, var(--bg2) 100%);
  color: var(--text);
  display: flex;
  flex-direction: column;
  cursor: none;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin: 0; }

/* ---------- Urgente balk ---------- */
.urgent {
  background: #c62828;
  color: #fff;
  font-size: 1.9rem;
  font-weight: 600;
  padding: .9rem 3rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  animation: pulse 2.5s ease-in-out infinite;
}
.urgent-label {
  background: #fff;
  color: #c62828;
  border-radius: .5rem;
  padding: .2rem .9rem;
  font-size: 1.3rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  flex: none;
}
@keyframes pulse { 50% { background: #a31f1f; } }

/* ---------- Kop ---------- */
.top {
  min-height: 9.6rem;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 3rem;
  padding: 2rem 3rem 1.4rem;
}
.brand { display: flex; align-items: center; gap: 1.6rem; min-width: 0; }
.brand img { height: 5.5rem; max-width: 18rem; object-fit: contain; }
.brand h1 { font-size: 2.9rem; font-weight: 700; color: var(--primary); line-height: 1.1; }
body.theme-donker .brand h1 { color: #fff; }
.brand p { font-size: 1.6rem; color: var(--muted); margin-top: .3rem; }

.now-weather { display: flex; align-items: center; gap: 1rem; }
.now-weather svg { width: 5.2rem; height: 5.2rem; }
.now-weather .temp { font-size: 3.6rem; font-weight: 300; line-height: 1; }
.now-weather .desc { font-size: 1.3rem; color: var(--muted); }
.now-weather .credit { font-size: .95rem; color: var(--muted); opacity: .75; margin-top: .2rem; }

.clock { text-align: right; padding-left: 3rem; border-left: .2rem solid var(--line); }
#time { font-size: 5rem; font-weight: 300; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
#date { font-size: 1.6rem; color: var(--muted); margin-top: .4rem; }

/* ---------- Hoofdgedeelte ---------- */
.main {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 34rem;
  gap: 2rem;
  padding: 0 3rem 1.8rem;
}
.main.no-side { grid-template-columns: 1fr; }
.main.tips-side { grid-template-columns: 1.45fr 1fr; }
.main.no-side .side { display: none; }
@media (orientation: portrait) {
  .top { grid-template-columns: 1fr auto; }
  .top .now-weather { display: none !important; }
  .main { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .side { flex-direction: row !important; }
  .side .card { flex: 1; }
}

.card, .stage {
  background: var(--card);
  border-radius: 1.6rem;
  box-shadow: var(--shadow);
}

/* ---------- Slides ---------- */
.stage { position: relative; overflow: hidden; display: flex; flex-direction: column; }
.slides { position: relative; flex: 1; min-height: 0; }
.slide {
  position: absolute;
  inset: 0;
  display: flex;
  opacity: 0;
  transform: translateY(1.2rem);
  overflow: hidden;
  transition: opacity .9s ease, transform .9s ease;
}
.slide.active { opacity: 1; transform: none; }
.slide-content {
  flex: 1;
  min-width: 0;
  padding: 3.4rem 4rem 2rem;
  display: flex;
  flex-direction: column;
}
.chip {
  align-self: flex-start;
  font-size: 1.3rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  padding: .45rem 1.1rem;
  border-radius: 99rem;
  background: var(--primary-soft);
  color: var(--primary);
  margin-bottom: 1.6rem;
}
body.theme-donker .chip { color: #fff; background: var(--primary-strong); }
.slide h2 { font-size: 4rem; line-height: 1.15; font-weight: 700; margin-bottom: 1.6rem; }
.slide-body {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  font-size: 2.3rem;
  line-height: 1.5;
  color: var(--text);
  white-space: pre-line;
}
.slide-media {
  flex: 0 0 42%;
  background-size: cover;
  background-position: center;
}
.slide.no-text .slide-media { flex: 1; background-size: contain; background-repeat: no-repeat; }

.slide.style-belangrijk { border-left: 1rem solid var(--accent); }
.slide.style-belangrijk .chip { background: var(--accent); color: #1d1405; }
.slide.style-urgent { border-left: 1rem solid #c62828; }
.slide.style-urgent .chip { background: #c62828; color: #fff; }

/* Gezondheidstip */
.slide.tip .chip, .tip-slide .chip { background: rgba(46, 125, 50, .14); color: #2e7d32; }
body.theme-donker .slide.tip .chip, body.theme-donker .tip-slide .chip { background: #2e7d32; color: #fff; }
.tip-more {
  display: flex;
  align-items: center;
  gap: 1.8rem;
  margin-top: 1.6rem;
  padding-top: 1.6rem;
  border-top: .15rem solid var(--line);
  font-size: 1.6rem;
  color: var(--muted);
}
.tip-more .qr { width: 9rem; height: 9rem; background: #fff; border-radius: .8rem; padding: .4rem; flex: none; }
.tip-more .qr svg { width: 100%; height: 100%; display: block; }
.tip-more strong { color: var(--text); display: block; font-size: 1.8rem; margin-bottom: .2rem; }

/* Praktijkinformatie */
.info-grid { display: grid; grid-template-columns: 1.1fr 1fr; align-items: start; gap: 3rem; flex: 1; min-height: 0; overflow: hidden; font-size: 2rem; }
.hours { width: 100%; border-collapse: collapse; font-size: 1em; }
.hours td { padding: .25em .4em; border-bottom: .12rem solid var(--line); }
.hours td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.hours tr.today td { background: var(--primary-soft); font-weight: 700; }
.hours tr.today td:first-child { border-radius: .6rem 0 0 .6rem; }
.hours tr.today td:last-child { border-radius: 0 .6rem .6rem 0; }
.info-side { font-size: 1em; line-height: 1.45; white-space: pre-line; }
.info-side .big { font-size: 1.4em; font-weight: 700; color: var(--primary); }
body.theme-donker .info-side .big { color: #fff; }
.info-side .label { font-size: .65em; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-top: 1.1em; }
.info-side .label:first-child { margin-top: 0; }

.stage-footer { display: flex; align-items: center; gap: 2rem; padding: 0 4rem 2rem; }
.dots { display: flex; gap: .6rem; flex: none; }
.dots span { width: .9rem; height: .9rem; border-radius: 50%; background: var(--line); transition: all .4s; }
.dots span.on { background: var(--primary); width: 2.4rem; border-radius: 1rem; }
.progress { flex: 1; height: .35rem; background: var(--line); border-radius: 1rem; overflow: hidden; }
#progressBar { height: 100%; width: 0; background: var(--primary); }

/* ---------- Zijkolom ---------- */
.side { display: flex; flex-direction: column; gap: 2rem; min-height: 0; }
.card { padding: 2rem 2.2rem; overflow: hidden; }
.card h2 {
  font-size: 1.4rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
  margin-bottom: 1.2rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
.card h2 span:not(.source) { white-space: nowrap; }

.forecast { display: grid; grid-template-columns: repeat(4, 1fr); gap: .6rem; text-align: center; }
.forecast .day { font-size: 1.4rem; font-weight: 600; text-transform: capitalize; }
.forecast svg { width: 4.2rem; height: 4.2rem; margin: .3rem auto; display: block; }
.forecast .t { font-size: 1.6rem; font-weight: 600; }
.forecast .t small { color: var(--muted); font-weight: 400; }
.forecast .rain { font-size: 1.2rem; color: #1e6fb8; margin-top: .2rem; }
body.theme-donker .forecast .rain { color: #7fbdf2; }

.news-dots { display: flex; gap: .4rem; margin-top: 1rem; flex-wrap: wrap; }
.news-dots span { width: .6rem; height: .6rem; border-radius: 50%; background: var(--line); }
.news-dots span.on { background: var(--primary); }

/* ---------- Onderbalk ---------- */
.bottom { flex: none; }
.emergency {
  background: var(--primary);
  color: #fff;
  font-size: 1.6rem;
  font-weight: 600;
  padding: .8rem 3rem;
  text-align: center;
}
.ticker {
  background: #10252a;
  color: #fff;
  height: 4.4rem;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
}
.ticker-track {
  display: flex;
  white-space: nowrap;
  font-size: 1.8rem;
  will-change: transform;
  animation: ticker linear infinite;
}
.ticker-track span { padding: 0 1.4rem; }
.ticker-track .sep { color: var(--accent); padding: 0; }
.ticker-track .own { color: var(--accent); font-weight: 600; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.offline {
  position: fixed;
  right: 1.5rem;
  bottom: 6rem;
  background: rgba(0, 0, 0, .75);
  color: #fff;
  font-size: 1.1rem;
  padding: .5rem 1rem;
  border-radius: .5rem;
}

.empty {
  margin: auto;
  text-align: center;
  color: var(--muted);
  font-size: 2.4rem;
}

/* ---------- Gezondheidstips in de rechterkolom ---------- */
.tip-card { flex: 1; display: flex; flex-direction: column; min-height: 0; padding: 2.8rem 3rem 2rem; }
.tip-slides { position: relative; flex: 1; min-height: 0; }
.tip-slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(1rem);
  transition: opacity .9s ease, transform .9s ease;
}
.tip-slide.active { opacity: 1; transform: none; }
.tip-slide .chip { margin-bottom: 1.4rem; }
.card .tip-slide h2 {
  display: block;
  font-size: 3.1rem;
  line-height: 1.15;
  font-weight: 700;
  margin-bottom: 1.3rem;
  text-transform: none;
  letter-spacing: normal;
  color: var(--text);
}
.tip-slide .slide-body { flex: 1; min-height: 0; overflow: hidden; font-size: 2.1rem; line-height: 1.5; white-space: pre-line; }
.tip-slide .tip-img { height: 14rem; border-radius: 1rem; background: center / cover; margin-bottom: 1.6rem; flex: none; }
.tip-slide .tip-more { margin-top: 1.4rem; padding-top: 1.4rem; font-size: 1.5rem; }
.tip-slide .tip-more .qr { width: 10rem; height: 10rem; }
.tip-footer { display: flex; align-items: center; gap: 1.6rem; margin-top: 1.6rem; flex: none; }
.tip-footer .news-dots { margin: 0; flex: none; }
#tipProgress { height: 100%; width: 0; background: #2e7d32; }
