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

body {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  background: #f0f0eb;
  color: #222;
  min-height: 100vh;
}

a { color: #c0392b; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Header ── */
header {
  background: #1c1c2e;
  color: #fff;
  border-bottom: 3px solid #c0392b;
  position: relative;
}

.header-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  flex-wrap: wrap;
  gap: 8px;
}

.logo { font-size: 20px; font-weight: bold; color: #fff; letter-spacing: 1px; flex-shrink: 0; }
.logo span { color: #c0392b; }

.header-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

nav { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
nav a { color: #ccc; padding: 4px 8px; font-size: 13px; border-radius: 3px; }
nav a:hover { color: #fff; text-decoration: none; background: #2a2a40; }
nav a.active { color: #fff; border-bottom: 2px solid #c0392b; }

.lang-switcher {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #888;
}
.lang-switcher a { color: #888; padding: 2px 5px; border-radius: 2px; }
.lang-switcher a:hover { color: #fff; text-decoration: none; }
.lang-switcher a.active { color: #fff; font-weight: bold; }

.nav-login { display: flex; align-items: center; gap: 6px; }
.nav-login a {
  background: #c0392b;
  color: #fff;
  padding: 5px 12px;
  border-radius: 3px;
  font-size: 12px;
}
.nav-login a:hover { background: #a93226; text-decoration: none; }
.nav-login span { color: #aaa; font-size: 12px; }

/* Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid #555;
  color: #ccc;
  font-size: 18px;
  padding: 4px 10px;
  border-radius: 3px;
  cursor: pointer;
  line-height: 1;
}
.nav-toggle:hover { border-color: #aaa; color: #fff; }

/* ── Hero ── */
.hero {
  background: #1c1c2e;
  color: #fff;
  text-align: center;
  padding: 32px 16px 28px;
  border-bottom: 1px solid #2a2a40;
}
.hero h1 { font-size: 26px; letter-spacing: 2px; margin-bottom: 6px; }
.hero h1 span { color: #c0392b; }
.hero p { color: #aaa; font-size: 13px; margin-bottom: 18px; }
.hero-stats { color: #e0e0e0; font-size: 13px; margin-bottom: 18px; }
.hero-stats strong { color: #c0392b; }
.hero-buttons { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

/* ── Buttons ── */
.btn {
  display: inline-block;
  padding: 8px 20px;
  border-radius: 3px;
  font-size: 13px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary { background: #c0392b; color: #fff; }
.btn-primary:hover { background: #a93226; text-decoration: none; }
.btn-secondary { background: #2a2a40; color: #ccc; }
.btn-secondary:hover { background: #3a3a55; text-decoration: none; color: #fff; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-danger { background: #7f1d1d; color: #fff; }

/* ── Layout ── */
.container { max-width: 1000px; margin: 0 auto; padding: 16px; }

/* ── Filter ── */
.filter-bar {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 3px;
  padding: 10px 14px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.filter-bar a {
  padding: 5px 12px;
  border-radius: 3px;
  font-size: 12px;
  color: #555;
  border: 1px solid #ddd;
  background: #f9f9f9;
}
.filter-bar a:hover { background: #eee; text-decoration: none; }
.filter-bar a.active { background: #c0392b; color: #fff; border-color: #c0392b; }

/* ── Listing-Tabelle (Desktop) ── */
.listing-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid #ddd; }
.listing-table th {
  background: #e8e8e2;
  padding: 7px 10px;
  text-align: left;
  font-size: 12px;
  font-weight: bold;
  color: #555;
  border-bottom: 1px solid #ccc;
}
.listing-table td { padding: 9px 10px; border-bottom: 1px solid #eee; vertical-align: middle; }
.listing-table tr:hover td { background: #fafaf8; }
.listing-table tr:last-child td { border-bottom: none; }

.listing-title { font-weight: bold; font-size: 14px; }
.listing-meta { font-size: 11px; color: #888; margin-top: 2px; }

/* ── Badges ── */
.badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: bold;
}
.badge-biete { background: #d4edda; color: #155724; }
.badge-suche { background: #fff3cd; color: #856404; }
.badge-live  { background: #c0392b; color: #fff; }

/* ── Einzelanzeige ── */
.listing-detail { background: #fff; border: 1px solid #ddd; border-radius: 3px; padding: 20px; }
.listing-detail h2 { font-size: 20px; margin-bottom: 6px; }
.listing-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.listing-price { text-align: right; white-space: nowrap; flex-shrink: 0; }
.listing-price-value { font-size: 22px; font-weight: bold; color: #c0392b; }
.listing-images { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; }
.listing-images img { width: 160px; height: 120px; object-fit: cover; border: 1px solid #ddd; border-radius: 2px; }

/* ── Forms ── */
.form-box {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 3px;
  padding: 24px;
  max-width: 500px;
  margin: 24px auto;
}
.form-box h2 { margin-bottom: 18px; font-size: 18px; }

.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 12px; font-weight: bold; color: #555; margin-bottom: 4px; }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid #ccc;
  border-radius: 3px;
  font-size: 14px;
  font-family: inherit;
}
.form-group textarea { resize: vertical; min-height: 100px; }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { outline: none; border-color: #c0392b; }

.form-hint { font-size: 11px; color: #888; margin-top: 3px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.alert { padding: 10px 14px; border-radius: 3px; margin-bottom: 14px; font-size: 13px; }
.alert-error { background: #fde8e8; border: 1px solid #f5c6cb; color: #7f1d1d; }
.alert-success { background: #d4edda; border: 1px solid #c3e6cb; color: #155724; }

/* ── Community ── */
.post-list { background: #fff; border: 1px solid #ddd; border-radius: 3px; }
.post-item {
  padding: 12px 14px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.post-item:last-child { border-bottom: none; }
.post-item:hover { background: #fafaf8; }
.post-title { font-weight: bold; font-size: 14px; }
.post-meta { font-size: 11px; color: #888; margin-top: 3px; }
.post-replies { font-size: 12px; color: #888; white-space: nowrap; }

.reply { padding: 12px 0; border-bottom: 1px solid #eee; }
.reply:last-child { border-bottom: none; }
.reply-author { font-size: 12px; font-weight: bold; color: #555; margin-bottom: 4px; }
.reply-content { font-size: 14px; line-height: 1.5; }

/* ── Drohnen ── */
.drone-card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 3px;
  padding: 14px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.drone-sn { font-family: monospace; font-size: 15px; font-weight: bold; }
.drone-primary { color: #c0392b; font-size: 11px; margin-left: 8px; }

/* ── Section Header ── */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.section-header h2 { font-size: 16px; }

/* ── Footer ── */
footer {
  background: #1c1c2e;
  color: #888;
  text-align: center;
  padding: 14px;
  font-size: 12px;
  margin-top: 32px;
  border-top: 2px solid #c0392b;
}
footer a { color: #888; }
footer a:hover { color: #ccc; }

.empty-state { text-align: center; padding: 40px; color: #888; font-size: 14px; }

/* ── Statische Seiten (Impressum, Datenschutz) ── */
.static-page {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 3px;
  padding: 32px;
  margin: 24px 0;
  max-width: 800px;
}
.static-page h1 { font-size: 22px; margin-bottom: 24px; border-bottom: 2px solid #c0392b; padding-bottom: 10px; }
.static-page h2 { font-size: 15px; margin: 24px 0 8px; color: #1c1c2e; }
.static-page p  { line-height: 1.7; margin-bottom: 10px; }
.static-page ul { margin: 8px 0 10px 20px; line-height: 1.8; }
.static-page code { background: #f0f0eb; padding: 1px 5px; border-radius: 2px; font-size: 12px; }

.data-table { width: 100%; border-collapse: collapse; margin: 10px 0 16px; font-size: 13px; }
.data-table th { background: #e8e8e2; padding: 7px 10px; text-align: left; border-bottom: 1px solid #ccc; }
.data-table td { padding: 8px 10px; border-bottom: 1px solid #eee; vertical-align: top; }

@media (max-width: 600px) {
  .static-page { padding: 16px; }
  .data-table thead { display: none; }
  .data-table td { display: block; padding: 4px 0; border: none; }
  .data-table tr { border-bottom: 1px solid #eee; padding: 8px 0; display: block; }
}

/* ════════════════════════════════════════
   RESPONSIVE — Tablet (≤ 768px)
   ════════════════════════════════════════ */
@media (max-width: 768px) {
  .listing-table thead { display: none; }
  .listing-table,
  .listing-table tbody,
  .listing-table tr,
  .listing-table td { display: block; width: 100%; }

  .listing-table tr {
    border: 1px solid #ddd;
    border-radius: 3px;
    margin-bottom: 8px;
    background: #fff;
    padding: 10px 12px;
  }
  .listing-table tr:hover { background: #fafaf8; }
  .listing-table td {
    border: none;
    padding: 3px 0;
  }
  .listing-table td:empty { display: none; }

  /* Preis-Zelle fett hervorheben */
  .listing-table td:last-child { font-weight: bold; color: #c0392b; margin-top: 4px; }

  .listing-images img { width: 100%; height: auto; max-height: 220px; }

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

/* ════════════════════════════════════════
   RESPONSIVE — Mobil (≤ 600px)
   ════════════════════════════════════════ */
@media (max-width: 600px) {
  /* Header: Hamburger-Menü */
  .nav-toggle { display: block; }

  .header-inner { flex-wrap: nowrap; align-items: center; }

  .header-right {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    padding: 12px 0 8px;
    border-top: 1px solid #2a2a40;
  }
  .header-right.open { display: flex; }

  nav { flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; }
  nav a { display: block; width: 100%; padding: 6px 4px; font-size: 14px; }

  .lang-switcher { padding: 4px 0; }
  .nav-login { flex-wrap: wrap; }
  .nav-login span { width: 100%; }

  /* Hero */
  .hero { padding: 24px 16px 20px; }
  .hero h1 { font-size: 20px; letter-spacing: 1px; }
  .hero-buttons .btn { width: 100%; text-align: center; }

  /* Container */
  .container { padding: 10px; }

  /* Filter */
  .filter-bar { padding: 8px 10px; }
  .filter-label { display: none; }

  /* Einzelanzeige */
  .listing-header { flex-direction: column; gap: 8px; }
  .listing-price { text-align: left; }
  .listing-detail { padding: 14px; }
  .listing-detail h2 { font-size: 17px; }

  /* Forms */
  .form-box { margin: 12px auto; padding: 16px; }

  /* Community */
  .post-item { flex-direction: column; align-items: flex-start; gap: 6px; }
  .post-replies { align-self: flex-end; }

  /* Drohnen */
  .drone-card { flex-direction: column; align-items: flex-start; gap: 10px; }
  .drone-card form { align-self: flex-end; }

  /* Section header */
  .section-header { flex-wrap: wrap; gap: 8px; }

  /* Buttons in Formularen */
  .btn-block-mobile { width: 100%; text-align: center; }
}
