/* F1 Website - Modernes Dark Theme */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #1a1a2e;
  --bg-card: #16213e;
  --accent: #ff1744;
  --accent-hover: #ff456a;
  --text-primary: #ffffff;
  --text-secondary: #b0b0c0;
  --border: #2a2a4a;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
}

/* Header */
.header {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
  padding: 2rem 0;
  border-bottom: 2px solid var(--accent);
  text-align: center;
}

.header h1 {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: 2px;
}

.header h1 span {
  color: var(--accent);
}

.header p {
  color: var(--text-secondary);
  margin-top: 0.5rem;
  font-size: 1.1rem;
}

/* Navigation */
.nav {
  display: flex;
  justify-content: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-secondary);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav a {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.5rem 1.5rem;
  border-radius: 25px;
  transition: all 0.3s;
}

.nav a:hover {
  color: var(--text-primary);
  background: var(--accent);
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 3rem 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.hero h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.hero p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.6;
}

/* Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.grid-section {
  margin: 2rem 0;
}

/* Sektions-Überschriften (Autos / Strecken) */
.grid-section {
  margin: 3rem 0;
  padding-top: 1rem;
}

.grid-section > h2 {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 2rem;
  padding: 0 0.5rem;
  position: relative;
  display: inline-block;
}

.grid-section > h2::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.35rem;
  width: 3.5rem;
  height: 4px;
  border-radius: 2px;
  background: var(--accent);
}

/* Cards */
.card {
  background: var(--bg-card);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  cursor: pointer;
  border: 1px solid var(--border);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(255, 23, 68, 0.3);
  border-color: var(--accent);
}

.card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.card-body {
  padding: 1.5rem;
}

.card-body h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.card-body p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Detail Page */
.detail-header {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
  padding: 3rem 2rem;
  text-align: center;
  border-bottom: 2px solid var(--accent);
}

.detail-header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.detail-header .subtitle {
  color: var(--accent);
  font-size: 1.2rem;
}

.detail-hero {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
}

.detail-hero img {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.5);
}

.detail-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
}

.detail-section {
  margin-bottom: 2rem;
}

.detail-section h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--accent);
}

.detail-section p {
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 1.05rem;
}

/* Info Grid */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.info-item {
  background: var(--bg-card);
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.info-item .label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.3rem;
}

.info-item .value {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* Back Button */
.back-btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: var(--accent);
  color: white;
  text-decoration: none;
  border-radius: 25px;
  font-weight: 600;
  transition: background 0.3s;
  margin: 1rem 0;
}

.back-btn:hover {
  background: var(--accent-hover);
}

/* Footer */
.footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-secondary);
  border-top: 1px solid var(--border);
  margin-top: 3rem;
}

/* Responsive */
@media (max-width: 768px) {
  .header h1 {
    font-size: 2rem;
  }
  
  .grid {
    grid-template-columns: 1fr;
    padding: 1rem;
  }
  
  .card img {
    height: 180px;
  }
}