/* =============================================
   PollenAlert.nl — Stylesheet
   ============================================= */

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

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

:root {
  --green:   #2d6a4f;
  --green-lt:#52b788;
  --yellow:  #f4a623;
  --orange:  #e07b39;
  --red:     #c0392b;
  --gray-50: #f7f8f8;
  --gray-100:#eef0f1;
  --gray-300:#d1d5d8;
  --gray-600:#666e76;
  --gray-800:#2c3135;
  --text:    #181c1f;
  --white:   #ffffff;
  --radius:  2px;
  --shadow:  0 1px 6px rgba(0,0,0,.07);
  --font: 'DM Sans', system-ui, sans-serif;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--gray-50);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  font-weight: 400;
}

img { max-width: 100%; display: block; }
a  { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Layout ── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }

/* ── Header / Nav ── */
header {
  background: var(--white);
  border-bottom: 2px solid var(--green);
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 1px 8px rgba(0,0,0,.06);
}

.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: .85rem 1.5rem;
  max-width: 1100px; margin: 0 auto;
}

.logo { display: flex; align-items: center; gap: .55rem; }
.logo-icon { font-size: 1.3rem; line-height: 1; color: var(--green); }
.logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--green);
}
.logo-text em { font-style: normal; color: #c8305a; }

nav { display: flex; gap: 1.75rem; }
nav a {
  font-size: .88rem; font-weight: 500;
  color: var(--gray-800);
  letter-spacing: .01em;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  transition: border-color .15s, color .15s;
}
nav a:hover, nav a.active {
  color: var(--green);
  border-color: var(--green);
  text-decoration: none;
}

/* ── Language switcher ── */
.lang-switcher {
  display: flex;
  gap: .1rem;
  align-items: center;
  margin-left: .6rem;
  flex-shrink: 0;
}
.lang-switcher a {
  font-size: .72rem;
  font-weight: 600;
  padding: .15rem .26rem;
  border-radius: 3px;
  color: var(--gray-600);
  border: 1px solid transparent;
  text-decoration: none;
  transition: color .15s, border-color .15s;
}
.lang-switcher a:hover  { color: var(--green); border-color: var(--green); }
.lang-switcher a.active { color: var(--green); border-color: var(--green); }
[data-theme="dark"] .lang-switcher a { color: var(--gray-600); }
[data-theme="dark"] .lang-switcher a.active,
[data-theme="dark"] .lang-switcher a:hover { color: #fff; border-color: var(--green); }

/* ── Theme toggle button ── */
.theme-btn {
  background: none;
  border: 1px solid var(--gray-300);
  color: var(--gray-600);
  padding: .32rem .65rem;
  cursor: pointer;
  font-size: 1rem;
  display: flex; align-items: center;
  transition: color .15s, border-color .15s;
  margin-left: 1rem;
  flex-shrink: 0;
}
.theme-btn:hover { color: var(--green); border-color: var(--green); }

/* ── Hero ── */
.hero {
  background: #2d6a4f;
  color: var(--white);
  padding: 1.6rem 0;
}

.hero-inner {
  max-width: 1100px; margin: 0 auto; padding: 0 1.5rem;
  display: flex; flex-direction: column;
  align-items: flex-start;
  gap: .55rem;
}

.hero-inner h1 {
  font-size: clamp(1.4rem, 2.6vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.15;
  white-space: nowrap;
}
.hero-inner h1 em { font-style: normal; color: #95d5b2; }

.hero-inner > p {
  font-size: .95rem;
  font-weight: 300;
  opacity: .85;
  margin: 0;
  line-height: 1.65;
  max-width: 600px;
}

.hero-meta {
  display: flex; flex-direction: row; gap: .5rem; flex-wrap: wrap;
  margin-top: .2rem;
}

.badge {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.25);
  padding: .3rem .85rem;
  font-size: .82rem; font-weight: 500;
  letter-spacing: .02em;
  display: inline-flex; align-items: center; gap: .4rem;
  white-space: nowrap;
}

/* ── Today's visual summary ── */
.today-section { padding: 1.8rem 0 0; }

.today-card {
  display: grid;
  grid-template-columns: 170px 1fr;
  background: var(--white);
  border: 1px solid var(--gray-300);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.today-panel {
  background: linear-gradient(160deg, #e07b39 0%, #c0392b 100%);
  color: #fff;
  padding: 1.6rem 1.2rem;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  gap: .25rem;
}
.today-panel-icon { font-size: 2rem; opacity: .9; line-height: 1; }
.today-panel-level { font-size: 2rem; font-weight: 700; letter-spacing: -.03em; line-height: 1; }
.today-panel-sub   { font-size: .72rem; opacity: .8; font-weight: 400; margin-top: .1rem; }
.today-panel-date  { font-size: .72rem; opacity: .65; margin-top: .6rem;
                     display: flex; align-items: center; gap: .3rem; }

.today-meters {
  padding: 1.1rem 1.6rem;
  display: flex; flex-direction: column;
  gap: .55rem; justify-content: center;
}

.pm-row {
  display: grid;
  grid-template-columns: 1.2rem 10rem 1fr 4rem;
  align-items: center;
  gap: .6rem;
}
.pm-icon  { color: var(--green); font-size: .82rem; text-align: center; }
.pm-name  { font-size: .85rem; font-weight: 500; white-space: nowrap; }

.pm-track {
  height: 7px;
  background: var(--gray-100);
  border-radius: 2px;
  overflow: hidden;
}
.pm-fill  { height: 100%; border-radius: 2px; }

/* widths map level to visual fill */
.pm-none   { width: 0%;   background: var(--gray-300); }
.pm-low    { width: 25%;  background: #a8d97f; }
.pm-medium { width: 50%;  background: #f4a623; }
.pm-high   { width: 75%;  background: #c0392b; }
.pm-vhigh  { width: 100%; background: #8b1a1a; }

.pm-label {
  font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em;
  text-align: right; white-space: nowrap;
}
.pm-label.cl-none   { color: #2d6a4f; }
.pm-label.cl-low    { color: #7a6200; }
.pm-label.cl-medium { color: #8a4800; }
.pm-label.cl-high   { color: #a81c1c; }
.pm-label.cl-vhigh  { color: #6b0f0f; }

/* ── Section titles ── */
.section { padding: 3rem 0; }

.section-title {
  font-size: 1.6rem; font-weight: 700;
  letter-spacing: -.025em;
  color: var(--text);
  margin-bottom: .45rem;
}
.section-sub {
  font-size: .95rem; color: var(--gray-600);
  margin-bottom: 2rem;
  font-weight: 400;
}

/* ── Pollen types grid ── */
.pollen-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--gray-300);
  border: 1px solid var(--gray-300);
}

.pollen-card {
  background: var(--white);
  padding: 1.3rem 1.1rem;
  text-align: center;
  transition: background .15s;
}
.pollen-card:hover { background: var(--gray-50); }

.pollen-card .pollen-icon {
  font-size: 1.6rem; margin-bottom: .6rem;
  color: var(--green);
  display: block;
}
.pollen-card h3 { font-size: .95rem; font-weight: 600; margin-bottom: .3rem; letter-spacing: -.01em; }
.pollen-card p  { font-size: .8rem; color: var(--gray-600); margin-bottom: .7rem; line-height: 1.5; }

.level-pill {
  display: inline-block;
  padding: .18rem .6rem;
  font-size: .75rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .05em;
  border: 1px solid transparent;
}
.level-none   { background: #e6f4eb; color: #2d6a4f; border-color: #b7dfc9; }
.level-low    { background: #fef9e2; color: #7a6200; border-color: #f0dd80; }
.level-medium { background: #fff0e0; color: #8a4800; border-color: #f5c48a; }
.level-high   { background: #fde8e8; color: #a81c1c; border-color: #f0a0a0; }
.level-very-high { background: #a81c1c; color: #fff; border-color: #a81c1c; }

/* ── Map section ── */
.map-section { background: var(--white); padding: 3rem 0; }

.map-wrapper {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2.5rem; align-items: start;
}

@media (max-width: 700px) {
  .map-wrapper { grid-template-columns: 1fr; }
}

.nl-map-container {
  position: relative;
  max-width: 380px;
  background: #fff;
  border: 1px solid #8ab0c8;
  overflow: hidden;
}

/* PNG is the base map — accurate Netherlands outline with province lines */
.nl-map-png {
  width: 100%; height: auto;
  display: block;
  position: relative;
  z-index: 10;
}

/* Heat overlay — background is set dynamically by JS from pollen-data.json */
.heat-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: .68;
  pointer-events: none;
}

.map-legend {
  min-width: 165px;
  background: var(--gray-50);
  border: 1px solid var(--gray-300);
  padding: 1.2rem;
}

.map-legend h4 {
  font-size: .8rem; font-weight: 700;
  margin-bottom: .9rem;
  text-transform: uppercase; letter-spacing: .07em;
  color: var(--gray-600);
}

.legend-item {
  display: flex; align-items: center; gap: .65rem;
  font-size: .86rem;
  margin-bottom: .5rem;
}
.legend-swatch {
  width: 16px; height: 16px;
  flex-shrink: 0;
  border: 1px solid rgba(0,0,0,.08);
}

/* province base fills */
.prov-base { fill: #d4e8c8; stroke: #fff; stroke-width: 1; }

/* tooltip */
.map-tooltip {
  position: absolute;
  background: var(--gray-800);
  color: var(--white);
  font-size: .8rem; font-weight: 500;
  padding: .38rem .7rem;
  pointer-events: none;
  display: none;
  white-space: nowrap;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}

/* ── Tips / info boxes ── */
.tips-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--gray-300);
  border: 1px solid var(--gray-300);
}

.tip-card {
  background: var(--white);
  padding: 1.4rem 1.3rem;
  border-top: 3px solid var(--green-lt);
}

.tip-card .tip-icon {
  font-size: 1.5rem; margin-bottom: .6rem;
  color: var(--green);
  display: block;
}
.tip-card h3 { font-size: .95rem; font-weight: 600; margin-bottom: .4rem; letter-spacing: -.01em; }
.tip-card p  { font-size: .86rem; color: var(--gray-600); line-height: 1.65; }

/* ── FAQ / Article ── */
.article-section { background: var(--white); padding: 3rem 0; }

.article-body { max-width: 720px; }
.article-body h2 {
  font-size: 1.25rem; font-weight: 700;
  letter-spacing: -.02em;
  margin: 2rem 0 .55rem;
  color: var(--green);
}
.article-body p  { font-size: .96rem; margin-bottom: 1rem; line-height: 1.78; }
.article-body ul { margin: .4rem 0 1rem 1.3rem; }
.article-body li { font-size: .94rem; margin-bottom: .35rem; }

/* ── FAQ accordion ── */
.faq-list { max-width: 720px; }

details {
  border-bottom: 1px solid var(--gray-300);
  padding: .85rem 0;
}
summary {
  font-weight: 600; font-size: .95rem;
  cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: center;
  letter-spacing: -.01em;
}
summary::after { content: '+'; font-size: 1.2rem; color: var(--green); font-weight: 300; }
details[open] summary::after { content: '−'; }
details p { font-size: .9rem; color: var(--gray-600); margin-top: .65rem; line-height: 1.75; }

/* ── Footer ── */
footer {
  background: var(--gray-800);
  color: #9aa0a6;
  padding: 2.5rem 1.5rem;
  margin-top: 3rem;
  font-size: .86rem;
}
.footer-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
}
footer a { color: #9aa0a6; }
footer a:hover { color: var(--white); }
.footer-copy { opacity: .55; font-size: .78rem; margin-top: .35rem; }

/* ── Hamburger button (hidden on desktop) ── */
.menu-btn {
  display: none;
  background: none;
  border: 1px solid var(--gray-300);
  color: var(--gray-600);
  padding: .32rem .65rem;
  cursor: pointer;
  font-size: 1rem;
  align-items: center;
  margin-left: .5rem;
  flex-shrink: 0;
}
.menu-btn:hover { color: var(--green); border-color: var(--green); }

/* Mobile nav drawer */
.mobile-nav {
  display: none;
  flex-direction: column;
  background: var(--white);
  border-top: 1px solid var(--gray-300);
  padding: .5rem 1.5rem 1rem;
}
.mobile-nav a {
  font-size: .95rem; font-weight: 500;
  color: var(--gray-800);
  padding: .65rem 0;
  border-bottom: 1px solid var(--gray-100);
  letter-spacing: .01em;
}
.mobile-nav a:last-child { border-bottom: none; }
.mobile-nav a:hover, .mobile-nav a.active { color: var(--green); text-decoration: none; }
.mobile-nav.open { display: flex; }

[data-theme="dark"] .mobile-nav {
  background: #22272b;
  border-color: var(--gray-300);
}
[data-theme="dark"] .mobile-nav a { border-color: var(--gray-300); }
[data-theme="dark"] .menu-btn { border-color: var(--gray-300); color: var(--gray-600); }

/* ── Responsive ── */
@media (max-width: 780px) {
  .pollen-grid, .tips-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  nav { display: none; }
  .theme-btn { display: none; }
  .menu-btn { display: flex; }
  .hero-inner h1 { white-space: normal; }
  .today-card { grid-template-columns: 1fr; }
  .today-panel { flex-direction: row; padding: 1rem 1.2rem; gap: 1rem; justify-content: flex-start; text-align: left; }
  .today-panel-date { margin-top: 0; }
  .pm-row { grid-template-columns: 1.2rem 1fr 1fr 3.5rem; }
}

/* ── Mobile nav extras ── */
.mobile-divider { border: none; border-top: 1px solid var(--gray-100); margin: .3rem 0; }
.mobile-lang-row {
  display: flex; gap: .25rem; flex-wrap: wrap;
  padding: .55rem 0;
  border-bottom: 1px solid var(--gray-100);
}
.mobile-lang-row a {
  font-size: .75rem; font-weight: 600;
  padding: .18rem .38rem;
  border-radius: 3px;
  color: var(--gray-600);
  border: 1px solid transparent;
  text-decoration: none;
  transition: color .15s, border-color .15s;
}
.mobile-lang-row a:hover  { color: var(--green); border-color: var(--green); }
.mobile-lang-row a.active { color: var(--green); border-color: var(--green); }
.mobile-theme-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: .6rem 0;
  font-size: .92rem; font-weight: 500;
  color: var(--gray-800);
}
.mobile-theme-row button {
  background: none; border: 1px solid var(--gray-300);
  color: var(--gray-600); padding: .3rem .65rem;
  cursor: pointer; font-size: .95rem; border-radius: 3px;
  transition: color .15s, border-color .15s;
}
.mobile-theme-row button:hover { color: var(--green); border-color: var(--green); }
[data-theme="dark"] .mobile-divider { border-color: var(--gray-300); }
[data-theme="dark"] .mobile-lang-row { border-color: var(--gray-300); }
[data-theme="dark"] .mobile-lang-row a { color: var(--gray-600); }
[data-theme="dark"] .mobile-lang-row a.active { color: #fff; border-color: var(--green); }
[data-theme="dark"] .mobile-theme-row { color: var(--gray-600); }
[data-theme="dark"] .mobile-theme-row button { border-color: var(--gray-300); color: var(--gray-600); }
@media (max-width: 480px) {
  .pollen-grid, .tips-grid { grid-template-columns: 1fr; }
}

/* ── Pollen trend charts ── */
.charts-section { background: var(--gray-50); padding: 3rem 0; }

.charts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}

.chart-card {
  background: var(--white);
  border: 1px solid var(--gray-300);
  padding: 1.2rem 1.2rem .9rem;
  box-shadow: var(--shadow);
}

.chart-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: .9rem;
  flex-wrap: wrap; gap: .3rem;
}

.chart-header h3 {
  font-size: .95rem; font-weight: 600;
  letter-spacing: -.01em; margin: 0;
}

.chart-meta {
  font-size: .75rem; color: var(--gray-600);
  margin-top: .55rem;
  display: flex; justify-content: space-between;
}

@media (max-width: 780px) {
  .charts-grid { grid-template-columns: 1fr; }
}

/* ── Dark mode ── */
[data-theme="dark"] {
  --green:   #52b788;
  --green-lt:#40916c;
  --gray-50: #181c1f;
  --gray-100:#22272b;
  --gray-300:#3a4045;
  --gray-600:#9aa0a6;
  --gray-800:#d8dcdf;
  --text:    #e8eaed;
  --white:   #242a2f;
  --shadow:  0 1px 6px rgba(0,0,0,.35);
}
[data-theme="dark"] body { background: var(--gray-50); }
[data-theme="dark"] header { background: #22272b; border-color: var(--green); }
[data-theme="dark"] .hero {
  background: #163d29;
  color: #fff;
}
[data-theme="dark"] .map-section,
[data-theme="dark"] .article-section { background: #22272b; }
[data-theme="dark"] section#tips { background: #1d2226 !important; }
[data-theme="dark"] .level-banner { background: #22272b; border-color: var(--yellow); }
[data-theme="dark"] .pollen-card,
[data-theme="dark"] .tip-card,
[data-theme="dark"] .chart-card,
[data-theme="dark"] .today-card { background: #22272b; }
[data-theme="dark"] .pm-track { background: #3a4045; }
[data-theme="dark"] .pollen-card:hover { background: #2c3135; }
[data-theme="dark"] .map-legend { background: #22272b; border-color: var(--gray-300); }
[data-theme="dark"] details { border-color: var(--gray-300); }
[data-theme="dark"] footer { background: #111518; }
[data-theme="dark"] .pollen-grid,
[data-theme="dark"] .tips-grid { background: var(--gray-300); border-color: var(--gray-300); }
[data-theme="dark"] nav a { color: var(--gray-800); }
[data-theme="dark"] .theme-btn { border-color: var(--gray-300); color: var(--gray-600); }
[data-theme="dark"] .article-body h2 { color: var(--green); }
