/* e-nema Kompatibilitätsliste – Styles */

:root {
  /* Farben aus dem e-nema Farb-Guide (Primär/Sekundär) */
  --nemagruen: #00923F;   /* nemagrün, RGB 0/146/63 */
  --nemagruen-dunkel: #00743A;
  --nemagruen-hell: #E8F5EC;
  --schwarz: #141414;
  --weiss: #FFFFFF;
  --grau-hell: #F4F4F4;
  --grau-linie: #D6D6D6;
  --grau-text: #555555;
  --nemaplus-rot: #C4231F;
  --dianem-gelb: #F8AC00;
  --nematop-dunkelblau: #00417F;

  /* Ampelsystem: 0 = Grün, 1 = Gelb, 2 = Orange, 3 = Rot */
  --ampel-0: #00743A;
  --ampel-1: #FFD400;
  --ampel-2: #F39200;
  --ampel-3: #C4231F;
  --ampel-na: #E4E4E4;

  --radius: 6px;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.07);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: 'Exo 2', 'Segoe UI', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--schwarz);
  background: var(--weiss);
}

h1,
h2 {
  font-weight: 700;
}

a {
  color: var(--nematop-dunkelblau);
}

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.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: 12px;
  top: -60px;
  z-index: 100;
  background: var(--schwarz);
  color: var(--weiss);
  padding: 8px 14px;
  border-radius: var(--radius);
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--weiss);
  border-bottom: 1px solid var(--grau-linie);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand img {
  display: block;
  height: 44px;
  width: auto;
}

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--schwarz);
  border-radius: 999px;
  overflow: hidden;
}

.lang-switch button {
  background: var(--weiss);
  color: var(--schwarz);
  border: 0;
  padding: 8px 18px;
  font: 600 14px 'Exo 2', Arial, sans-serif;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.lang-switch button[aria-pressed='true'] {
  background: var(--nemagruen);
  color: var(--weiss);
}

.lang-switch button:hover:not([aria-pressed='true']) {
  background: var(--grau-hell);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--nemagruen);
  color: var(--weiss);
  padding: 56px 0 84px;
}

/* Dezentes Oval als Anspielung auf das e-nema Logo */
.hero::after {
  content: '';
  position: absolute;
  right: -140px;
  top: -90px;
  width: 460px;
  height: 280px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  transform: rotate(-18deg);
  pointer-events: none;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.9;
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  max-width: 22ch;
}

.lead {
  margin: 0;
  max-width: 680px;
  font-size: 18px;
}

/* ---------- Filter-Panel ---------- */
main {
  position: relative;
}

.panel {
  position: relative;
  margin-top: -40px;
  background: var(--weiss);
  border: 1px solid var(--grau-linie);
  border-radius: 8px;
  padding: 22px;
  box-shadow: var(--shadow);
}

.filters {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 16px;
  align-items: end;
}

.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 600;
}

.field input[type='search'],
.field select {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #b5b5b5;
  border-radius: var(--radius);
  background: var(--weiss);
  color: var(--schwarz);
  font: 400 16px 'Exo 2', Arial, sans-serif;
}

.field input[type='search']:focus,
.field select:focus {
  outline: 3px solid rgba(0, 146, 63, 0.3);
  border-color: var(--nemagruen);
}

.btn-reset {
  height: 44px;
  padding: 0 18px;
  background: var(--weiss);
  color: var(--schwarz);
  border: 1px solid var(--schwarz);
  border-radius: var(--radius);
  font: 600 15px 'Exo 2', Arial, sans-serif;
  cursor: pointer;
  white-space: nowrap;
}

.btn-reset:hover {
  background: var(--schwarz);
  color: var(--weiss);
}

.toolbar-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--grau-linie);
}

.count {
  margin: 0;
  font-weight: 600;
  color: var(--grau-text);
}

.legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 14px;
}

.legend-title {
  font-weight: 700;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ---------- Ampel-Badges ---------- */
.dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 28px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.dot-0 {
  background: var(--ampel-0);
  color: var(--weiss);
}

.dot-1 {
  background: var(--ampel-1);
  color: var(--schwarz);
}

.dot-2 {
  background: var(--ampel-2);
  color: var(--schwarz);
}

.dot-3 {
  background: var(--ampel-3);
  color: var(--weiss);
}

.dot-na {
  background: var(--ampel-na);
  color: #555555;
}

/* ---------- Tabelle ---------- */
.table-section {
  margin: 24px 0 64px;
}

.table-wrap {
  max-height: 68vh;
  overflow: auto;
  border: 1px solid var(--grau-linie);
  border-radius: 8px;
  background: var(--weiss);
}

table {
  width: 100%;
  min-width: 860px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 15px;
}

thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 0;
  background: var(--schwarz);
  color: var(--weiss);
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
}

.sort-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  text-align: inherit;
  cursor: pointer;
}

.sort-btn:hover {
  background: #2b2b2b;
}

.sort-btn:focus-visible {
  outline: 3px solid #7fd19b;
  outline-offset: -3px;
}

.sort-ind {
  font-size: 11px;
  opacity: 0.85;
}

th.col-ampel,
td.col-ampel {
  text-align: center;
  width: 90px;
}

th.col-ampel .sort-btn {
  justify-content: center;
}

tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid #ececec;
  vertical-align: middle;
}

tbody tr:nth-child(even) {
  background: #fafafa;
}

tbody tr:hover {
  background: var(--nemagruen-hell);
}

td.muted {
  color: #8a8a8a;
}

td.name {
  font-weight: 600;
}

.empty {
  padding: 32px 16px;
  text-align: center;
  font-weight: 600;
  color: var(--grau-text);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--schwarz);
  color: var(--weiss);
  padding: 32px 0;
  font-size: 15px;
}

.site-footer a {
  color: var(--weiss);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-footer a:hover {
  color: #7fd19b;
}

.site-footer p {
  margin: 6px 0 0;
}

.footer-company {
  font-weight: 700;
  margin: 0 0 4px;
}

.disclaimer {
  opacity: 0.75;
  font-size: 13px;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .filters {
    grid-template-columns: 1fr 1fr;
  }

  .field-search,
  .btn-reset {
    grid-column: 1 / -1;
  }

  .btn-reset {
    justify-self: start;
  }
}

@media (max-width: 520px) {
  .container {
    padding: 0 14px;
  }

  .brand img {
    height: 36px;
  }

  .hero {
    padding: 40px 0 72px;
  }

  .lead {
    font-size: 16px;
  }

  .panel {
    padding: 16px;
  }

  .filters {
    grid-template-columns: 1fr;
  }

  .btn-reset {
    width: 100%;
    justify-self: stretch;
  }
}

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