/* --- Basis-Styles --- */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #2e2e2e;
  color: #eee;  
}

header {
  background-color: #1f1f1f;
  color: #f58220;
  padding: 1em;
  text-align: center;
}

h1 {
  color: #f58220; 
  margin: 0;
}

main {
  padding: 2em;
  max-width: 3000px;
  margin: 0 auto;
}

.fahrzeug-kategorie {
  margin-bottom: 4em;
}

.fahrzeug-kategorie h2 {
  font-size: 1.8em;
  margin-bottom: 1em;
  border-bottom: 2px solid #ccc;
  padding-bottom: 0.3em;
  color: #fff;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5em;
}

.card {
  background-color: #3a3a3a;
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 2px 8px rgba(0,0,0,0.7);
  transition: transform 0.2s ease;
}

.card:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 15px rgba(245,130,32,0.7);
}

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

.card h3 {
  margin: 0;
  padding: 0.8em;
  font-size: 1.1em;
  background-color: #2e2e2e;
  text-align: center;
}

/* --- Detailseiten-Styles --- */
body.detail-page {
  background: #1f1f1f;
}

.container {
  max-width: 1200px;
  margin: 2em auto 4em;
  padding: 1em 2em;
  background: #2e2e2e;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header {
  text-align: center;
}

h1.detail-title {
  margin-bottom: 0.2em;
}

h2.section-title {
  border-bottom: 2px solid #eee;
  padding-bottom: 0.3em;
  color: #888;
  margin-top: 2em;
}

.specs table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.5em;
}

.specs td {
  padding: 0.5em;
  border-bottom: 1px solid #ddd;
  vertical-align: top;
}

ul.maintenance-list, ul.torque-list {
  list-style-type: disc;
  padding-left: 1.5em;
  margin-top: 0.3em;
}

.back-link {
  display: inline-block;
  margin: 2em 0 0 0;
  text-decoration: none;
  color: #333;
  font-weight: bold;
  font-size: 1.1em;
  background: #f58220;
  padding: 0.5em 1em;
  border-radius: 5px;
  transition: transform 0.2s ease;
}

.back-link:hover {
  background: #f58220;
  transform: scale(1.03);
}

/* --- Galerie-Styles --- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1em;
  margin-bottom: 2em;
}

.gallery img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery img:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.gallery img:active {
  transform: scale(1.1);
}

.gallery-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.gallery-overlay img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.gallery-overlay.active {
  display: flex;
}

/* --- TÜV-Plakette & Titelbild --- */
.titelbild-wrapper {
  position: relative;
  width: 100%;
}

.titelbild-wrapper img:not(.plakette) {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
}

.titelbild-wrapper img.plakette {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 80px;
  height: auto;
  opacity: 0.8;
  transform: rotate(calc((12 - var(--tuev-monat)) * -30deg));
  z-index: 5;
}

/* --- Footer --- */
footer {
  background-color: #333;
  color: white;
  text-align: center;
  padding: 1em 0;
  margin-top: 3em;
  font-size: 0.9em;
}

footer nav {
  margin-bottom: 0.5em;
}

footer nav a {
  color: #ddd;
  text-decoration: none;
  margin: 0 0.5em;
  transition: color 0.3s ease;
}

footer nav a:hover {
  color: white;
  text-decoration: underline;
}
