:root {
  --blue: #0b4f8a;
  --blue-dark: #07375f;
  --blue-soft: #eaf3fa;
  --bg: #f4f6f8;
  --surface: #ffffff;
  --text: #18202a;
  --muted: #65717f;
  --border: #dce3e9;
  --warning: #fff4d9;
  --warning-border: #e0ad35;
  --green-soft: #edf7ef;
  --green: #2e6c3c;
  --shadow: 0 10px 28px rgba(17, 31, 45, .08);
  --radius: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  line-height: 1.5;
  background:
    linear-gradient(rgba(244,246,248,.74), rgba(244,246,248,.82)),
    url("images/seitenhintergrund-thw-duelmen.jpg") center / cover fixed no-repeat;
}
a { color: inherit; text-decoration: none; }

.header {
  background: rgba(255,255,255,.98);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}
.header-inner {
  width: min(1200px, calc(100% - 32px));
  min-height: 70px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
}
.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 11px;
  background: var(--blue);
  color: white;
  display: grid;
  place-items: center;
  font-size: 16px;
}
.brand-copy { display: flex; flex-direction: column; line-height: 1.1; }
.brand-copy strong { font-size: 18px; }
.brand-copy span { color: var(--muted); font-size: 12px; margin-top: 4px; }

.nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.nav a {
  padding: 9px 11px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 700;
  color: #354354;
}
.nav a:hover { background: #edf3f7; color: var(--blue); }

.hero {
  position: relative;
  color: white;
  background:
    linear-gradient(100deg, rgba(4,45,82,.94) 0%, rgba(7,61,107,.86) 45%, rgba(9,77,132,.66) 100%),
    url("images/hero-thw-duelmen.jpg") center 42% / cover no-repeat;
}
.hero-inner {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 66px 0 56px;
}
.hero-label {
  display: inline-block;
  padding: 6px 10px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.10);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 14px;
}
.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(38px, 6vw, 66px);
  line-height: 1.02;
}
.hero p {
  margin: 0;
  max-width: 780px;
  color: rgba(255,255,255,.9);
  font-size: 18px;
}
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}
.hero-button {
  min-height: 46px;
  padding: 0 17px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}
.hero-button.primary { background: white; color: var(--blue-dark); }
.hero-button.secondary {
  border: 1px solid rgba(255,255,255,.35);
  background: rgba(255,255,255,.08);
  color: white;
}

main {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

.notice {
  margin-top: 26px;
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow);
}
.notice.build {
  background: var(--blue-soft);
  border: 1px solid #bdd6e9;
  color: #244d6d;
}
.notice.warning {
  background: var(--warning);
  border: 2px solid var(--warning-border);
  color: #604700;
}
.notice strong { display: block; font-size: 18px; margin-bottom: 5px; }

.section { padding: 54px 0 0; }
.section-heading { margin-bottom: 20px; }
.section-heading h2 { margin: 0 0 7px; font-size: 30px; }
.section-heading p { margin: 0; color: var(--muted); max-width: 850px; }

.toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin: 24px 0 30px;
}
.search {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 0 14px;
  font: inherit;
  background: white;
}
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.filter {
  border: 1px solid var(--border);
  background: white;
  border-radius: 999px;
  padding: 9px 12px;
  font-weight: 800;
  cursor: pointer;
  color: #465464;
}
.filter.active {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
}

.category-section { margin-bottom: 44px; }
.category-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 14px;
  padding-bottom: 9px;
  border-bottom: 2px solid #dce7ef;
}
.category-head h3 { margin: 0; font-size: 23px; color: var(--blue-dark); }
.category-count { color: var(--muted); font-size: 13px; font-weight: 700; }

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.card-top {
  min-height: 92px;
  padding: 18px 20px;
  background: linear-gradient(145deg, #eef5fa, #e0edf6);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.card-symbol {
  font-size: 28px;
  line-height: 1;
}
.badge {
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.8);
  border: 1px solid rgba(11,79,138,.15);
  color: var(--blue);
  font-size: 11px;
  font-weight: 900;
}
.card-body {
  padding: 19px 20px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.card h4 { margin: 0 0 8px; font-size: 19px; }
.card p { margin: 0 0 17px; color: var(--muted); font-size: 14px; }
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}
.action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 39px;
  padding: 0 11px;
  border-radius: 9px;
  border: 1px solid #cfe0ee;
  background: #edf5fb;
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
}
.action.steps {
  background: var(--green-soft);
  color: var(--green);
  border-color: #cae4d1;
}
.action.parts {
  background: #f6f1e8;
  color: #775a1d;
  border-color: #eadfbe;
}
.missing {
  margin-top: 10px;
  font-size: 12px;
  color: #8b949c;
}

.info-box {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 25px;
  box-shadow: var(--shadow);
}
.info-box h3 { margin-top: 0; }
.info-box p { color: var(--muted); }

.contact {
  margin-top: 24px;
  background: linear-gradient(135deg, var(--blue-dark), var(--blue));
  color: white;
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}
.contact h3 { margin: 0 0 10px; }
.contact p { margin: 6px 0; color: rgba(255,255,255,.9); }

.footer {
  margin-top: 60px;
  background: white;
  border-top: 1px solid var(--border);
}
.footer-inner {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0;
  color: var(--muted);
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.empty {
  padding: 28px;
  background: white;
  border: 1px dashed #c7d0d7;
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

@media (max-width: 930px) {
  .grid { grid-template-columns: 1fr 1fr; }
  .toolbar { grid-template-columns: 1fr; }
  .header-inner { align-items: flex-start; flex-direction: column; padding: 13px 0; }
}
@media (max-width: 620px) {
  .grid { grid-template-columns: 1fr; }
  .hero-inner { padding: 54px 0 46px; }
  .hero p { font-size: 16px; }
  .section { padding-top: 42px; }
}


.card-preview {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #e8eef3;
  border-bottom: 1px solid var(--border);
}

.card-preview img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.preview-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 20px;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
  font-weight: 700;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ov-back-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 10px;
  background: var(--blue);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(11, 79, 138, .18);
}

.ov-back-button:hover {
  background: var(--blue-dark);
}

.offline-box {
  margin-top: 22px;
  padding: 20px;
  border: 1px solid #cfe0ee;
  border-radius: 12px;
  background: #f6fbff;
}

.offline-box h3 {
  margin: 0 0 8px;
  color: var(--blue-dark);
}

.offline-box p {
  margin: 8px 0;
}

.donation-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 10px;
  background: var(--blue);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}

.donation-button:hover {
  background: var(--blue-dark);
}

@media (max-width: 930px) {
  .header-actions {
    width: 100%;
    align-items: flex-start;
    flex-direction: column;
  }

  .ov-back-button {
    width: 100%;
  }
}

/* Hintergrundbilder v1.6 */
main {
  position: relative;
}

.notice,
.card,
.info-box {
  backdrop-filter: blur(2px);
}

.notice.build {
  background: rgba(234,243,250,.96);
}

.notice.warning {
  background: rgba(255,244,217,.97);
}

.card,
.info-box {
  background: rgba(255,255,255,.97);
}

.contact {
  background: linear-gradient(135deg, rgba(7,55,95,.97), rgba(11,79,138,.95));
}

.footer {
  background: rgba(255,255,255,.97);
}

@media (max-width: 620px) {
  body {
    background:
      linear-gradient(rgba(244,246,248,.60), rgba(244,246,248,.72)),
      url("images/seitenhintergrund-thw-duelmen.jpg") 57% 18% / cover scroll no-repeat;
  }

  .hero {
    background:
      linear-gradient(100deg, rgba(4,45,82,.88) 0%, rgba(7,61,107,.72) 55%, rgba(9,77,132,.48) 100%),
      url("images/hero-thw-duelmen.jpg") 52% 42% / cover no-repeat;
  }

  .card,
  .info-box {
    background: rgba(255,255,255,.94);
  }
}


@media (min-width: 621px) {
  body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: rgba(255,255,255,.02);
    z-index: -1;
  }
}

/* Integrierter Viewer v1.8 */
.availability {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 14px;
}

.availability-chip {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 0 8px;
  border-radius: 999px;
  background: #edf5fb;
  color: var(--blue);
  border: 1px solid #cfe0ee;
  font-size: 11px;
  font-weight: 800;
}

.steps-chip {
  background: #edf7ef;
  color: #2e6c3c;
  border-color: #cae4d1;
}

.parts-chip {
  background: #f6f1e8;
  color: #775a1d;
  border-color: #eadfbe;
}

.viewer-action {
  width: 100%;
  min-height: 43px;
  color: white;
  background: var(--blue);
  border-color: var(--blue);
}

.viewer-action:hover {
  background: var(--blue-dark);
}

/* Funktionsübersicht v1.9 */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.feature-card {
  background: rgba(255,255,255,.97);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}

.feature-card h3 {
  margin: 12px 0 7px;
  font-size: 18px;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.feature-icon {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border-radius: 11px;
  background: var(--blue);
  color: #fff;
  font-weight: 900;
  font-size: 13px;
}

.controls-guide {
  margin-top: 20px;
  padding: 24px;
  background: rgba(255,255,255,.97);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.controls-guide h3 {
  margin: 0 0 17px;
}

.controls-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.controls-columns h4 {
  margin: 0 0 8px;
  color: var(--blue-dark);
}

.controls-columns p {
  margin: 7px 0;
  color: var(--muted);
}

.controls-note {
  margin: 18px 0 0;
  padding-top: 15px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
}

/* Mobil: Hintergrund proportional, nicht gestreckt */
@media (max-width: 620px) {
  body {
    background:
      linear-gradient(rgba(244,246,248,.56), rgba(244,246,248,.68)),
      url("images/seitenhintergrund-thw-duelmen-mobile.jpg") center top / cover scroll no-repeat;
  }

  .feature-grid,
  .controls-columns {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 930px) and (min-width: 621px) {
  .feature-grid {
    grid-template-columns: 1fr 1fr;
  }
}

