/* === audi100-online.de (Reborn) – Base Styles === */
:root {
  --maxw: 1000px;
  --pad: 16px;

  --fg: #0a0a0a;
  --bg: #ffffff;
  --muted: #6b7280;
  --accent: #bb0a30; /* Audi-Rot Akzent */
  --overlay: rgba(0,0,0,.50); /* Hero-Overlay Intensität */
  --overlay-strong: rgba(0,0,0,.65);

  --radius: 12px;
  --shadow: 0 8px 24px rgba(0,0,0,.18);
}

@media (prefers-color-scheme: dark) {
  :root {
    --fg: #e7e7e7;
    --bg: #0b0b0b; 
    --muted: #9aa0aa;
    --overlay: rgba(0,0,0,.55);
    --overlay-strong: rgba(0,0,0,.7);
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Tahoma, Verdana, Arial, sans-serif;
  line-height: 1.5;
  color: var(--fg);
  background: var(--bg);
  text-rendering: optimizeLegibility;
}

/* ===== Header / Branding ===== */
.site-header .brand-bar {
  display: grid;
  place-items: center;
  padding: 10px var(--pad) 0;
}

.brand-image {
  width: min(950px, 100%);
  height: auto;
}

/* Hinweis Box fuer veralteten Content aus wayback */
.archiv-hinweis {
  background: #222;
  color: #ddd;
  font-size: 0.9em;
  padding: 8px 12px;
  border-left: 4px solid #c33;
  margin: 12px 0 20px 0;
  border-radius: 6px;
  opacity: 0.9;
}
.archiv-hinweis a { color: #fff; text-decoration: underline; }


/* ===== Navigation ===== */
.primary-nav {
  border-block: 1px solid #00000020;
  background: #fff;
}
@media (prefers-color-scheme: dark) {
  .primary-nav {
    background: #111;
    border-color: #ffffff20;
  }
}

.primary-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-auto-flow: column;
  gap: 6px;
  justify-content: center;
  overflow-x: auto;
  overflow-y: visible;
}

/* Für enhanced Navigation: kein Overflow, damit Submenüs sichtbar sind */
.primary-nav.enhanced ul {
  overflow: visible;
}

.primary-nav a {
  display: inline-block;
  padding: 10px 14px;
  font-size: 14px;
  text-decoration: none;
  color: #444;
  background: #fff;
  border: 1px solid #00000020;
  border-radius: 6px;
  transition: transform .08s ease, background .15s ease, border-color .15s ease, color .15s ease;
}

.primary-nav a:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
  color: var(--accent);
}

@media (prefers-color-scheme: dark) {
  .primary-nav a {
    color: #f2f2f2;
    background: #151515;
    border-color: #ffffff20;
  }
  .primary-nav a:hover {
    color: #ffffff;
  }
}

/* ===== Hero Section ===== */
.hero {
  position: relative;
  min-height: 52vh;
  display: grid;
  place-items: center;
  overflow: clip;
}

.hero-media {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to bottom, transparent 0%, var(--overlay) 10%, var(--overlay-strong) 100%),
    var(--hero-image);
  background-size: cover;
  background-position: center 40%;
  filter: saturate(0.9) contrast(0.95);
  transform: scale(1.02);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(var(--maxw), 100%);
  padding: 40px var(--pad) 56px;
  color: #fff;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0,0,0,.35);
}

.hero h1 {
  margin: 0 0 6px 0;
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: .2px;
}

.subtitle {
  margin: 0 0 18px 0;
  font-size: clamp(14px, 2vw, 18px);
  color: #e5e7eb;
}

/* ===== Tribute Block ===== */
.tribute {
  margin: 0 auto;
  width: min(900px, 100%);
  background: rgba(0,0,0,.35);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(14px, 3vw, 22px);
  backdrop-filter: blur(4px);
}

.tribute p {
  margin: 0 0 10px 0;
  font-size: clamp(14px, 1.8vw, 17px);
}

.tribute em { font-style: italic; }
.tribute strong { font-weight: 700; }

.tribute blockquote {
  margin: 14px auto;
  padding: 10px 14px;
  border-left: 4px solid var(--accent);
  background: rgba(0,0,0,.35);
  border-radius: 6px;
  font-size: clamp(14px, 2vw, 18px);
  max-width: 50ch;
}

.signoff {
  margin-top: 14px;
  font-size: 14px;
  color: #444;
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 10px 14px;
  margin: 6px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  transition: filter .15s ease, transform .08s ease;
}
.btn:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,.45);
}
.btn-ghost:hover { border-color: #fff; }

/* ===== Content Placeholder ===== */
.content {
  width: min(var(--maxw), 100%);
  margin: 24px auto;
  padding: 0 var(--pad);
}

/* ===== Content Box (für Content-Seiten ohne Hero) - Gestaltung wie .tribute ===== */
.content-box {
  margin: 0 auto;
  width: min(900px, 100%);
  background: rgba(0,0,0,.35);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(14px, 3vw, 22px);
  backdrop-filter: blur(4px);
  color: #fff;
}

.content-box h1 {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: clamp(24px, 4vw, 32px);
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,.35);
}

.content-box h2 {
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,.35);
  margin-top: 24px;
  margin-bottom: 12px;
}

.content-box p {
  margin: 0 0 12px 0;
  line-height: 1.6;
  color: #fff;
  font-size: clamp(14px, 1.8vw, 17px);
}

.content-box em { 
  font-style: italic; 
}

.content-box strong { 
  font-weight: 700; 
}

.content-box img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 16px 0;
  border-radius: 6px;
}

.content-box figure {
  margin: 20px 0;
}

.content-box figure img {
  margin: 0;
}

.content-box figcaption {
  margin-top: 8px;
  font-size: 0.9em;
  color: #e5e7eb;
  font-style: italic;
  text-shadow: 0 1px 2px rgba(0,0,0,.35);
}

.content-box .image-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin: 24px 0;
}

/* Komponententabelle */
.content-box .component-table {
  width: 100%;
  margin: 20px 0;
  border-collapse: collapse;
  background: rgba(0, 0, 0, .2);
  border-radius: 6px;
  overflow: hidden;
}

.content-box .component-table thead {
  background: rgba(0, 0, 0, .4);
}

.content-box .component-table th {
  padding: 12px 8px;
  text-align: left;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,.35);
  border-bottom: 2px solid rgba(255,255,255,.2);
  font-size: 0.95em;
}

.content-box .component-table th:first-child {
  text-align: left;
  width: 3em;
}

.content-box .component-table td {
  padding: 10px 8px;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.1);
  font-size: clamp(13px, 1.6vw, 15px);
  line-height: 1.5;
}

.content-box .component-table tbody tr:hover {
  background: rgba(255, 255, 255, .1);
}

.content-box .component-table td:first-child {
  text-align: left;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,.35);
}

.content-box .component-table td:nth-child(2) {
  min-width: 200px;
}

.content-box .component-table td:nth-child(3),
.content-box .component-table td:nth-child(4) {
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
  white-space: nowrap;
  min-width: 120px;
}

/* Mobile Ansicht: horizontale Scrollbar */
@media (max-width: 768px) {
  .content-box .component-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
  }
  
  .content-box .component-table thead,
  .content-box .component-table tbody,
  .content-box .component-table tr {
    display: table;
    width: 100%;
    table-layout: fixed;
  }
  
  .content-box .component-table th,
  .content-box .component-table td {
    padding: 8px 6px;
    font-size: 0.85em;
  }
  
  .content-box .component-table td:nth-child(2) {
    min-width: 150px;
  }
  
  .content-box .component-table td:nth-child(3),
  .content-box .component-table td:nth-child(4) {
    min-width: 100px;
  }
}

/* ===== Footer ===== */
.site-footer {
  text-align: center;
  color: var(--muted);
  padding: 24px var(--pad) 40px;
}
.footer-line {
  width: 100%;
  height: 8px;
  background: url("https://www.audi100-online.de/index-Dateien/Audi100-online-bottom-line-2009.png") center/contain no-repeat;
  opacity: .7;
  margin: 0 auto 10px;
}

/* ===== Global Link Styling (kein Blau) ===== */
a {
  color: #444;                /* dezentes Grau im Light Mode */
  text-decoration: none;
  transition: color .15s ease, border-color .15s ease;
}
a:hover,
a:focus {
  color: #000;                /* dunkler auf Hover im Light Mode */
  text-decoration: underline;
}
a:visited {
  color: #555;                /* kein Blau/Lila */
}

@media (prefers-color-scheme: dark) {
  a {
    color: #f7f7f7;
  }
  a:hover,
  a:focus {
    color: #fff;
  }
  a:visited {
    color: #f0f0f0;
  }
}

/* Links in dunklen Bereichen (Hero, Footer, Tribute, Content-Box) */
.hero a,
.site-footer a,
.tribute a,
.content-box a {
  color: #f2f2f2;             /* gedecktes Weiß */
}
.hero a:hover,
.site-footer a:hover,
.tribute a:hover,
.content-box a:hover {
  color: #ffffff;
  text-decoration: underline;
}
.hero a:visited,
.site-footer a:visited,
.tribute a:visited,
.content-box a:visited {
  color: #e0e0e0;
}

/* ===== Accessibility / Focus ===== */
a:focus-visible,
button:focus-visible,
.btn:focus-visible {
  outline: 3px solid #ffffffcc;
  outline-offset: 2px;
}

@media (prefers-color-scheme: light) {
  a:focus-visible,
  button:focus-visible,
  .btn:focus-visible {
    outline-color: var(--accent);
  }
}

/* ===== Responsive Tweaks ===== */
@media (max-width: 480px) {
  .tribute { padding: 12px; }
}

/* === Legacy Content Fixes (Wayback → responsive) === */
.legacy-content {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.legacy-content img, 
.legacy-content video,
.legacy-content iframe,
.content-box img,
.content-box video,
.content-box iframe {
  max-width: 100% !important;
  height: auto !important;
  display: block;
}

.legacy-content table,
.content-box table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  margin: 1em 0;
}

.legacy-content td, 
.legacy-content th,
.content-box td,
.content-box th {
  padding: 6px;
  border: 1px solid #00000020;
}

/* Neutralisiere feste 950px Breiten und ähnliche */
.legacy-content [style*="width:950px"],
.legacy-content [style*="width: 950px"],
.legacy-content [width="950"],
.legacy-content table[width],
.legacy-content img[width],
.content-box [style*="width:950px"],
.content-box [style*="width: 950px"],
.content-box [width="950"],
.content-box table[width],
.content-box img[width] {
  width: auto !important;
  max-width: 100% !important;
}

/* Responsive für alle Legacy-Tabellen */
.legacy-content table[width],
.content-box table[width] {
  width: 100% !important;
}

/* Responsive für Legacy-Bilder mit festen Breiten */
.legacy-content img[width],
.content-box img[width] {
  max-width: 100% !important;
  height: auto !important;
}

/* Scrollbar für zu breite Tabellen */
.legacy-content table,
.content-box table {
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
  .legacy-content {
    padding: 0 var(--pad);
  }
  
  .legacy-content table {
    font-size: 0.9em;
  }
  
  .legacy-content td,
  .legacy-content th {
    padding: 4px;
  }
}


