/*
 * Grundlegendes Styling für die Beispiel‑Website.
 *
 * Diese CSS‑Datei definiert Layout, Farben und responsive
 * Verhaltensweisen für Navigation, Inhaltsbereiche und Footer.
 */

/* Farbvariablen für einfache Anpassung */
:root {
  --primary: #0070c0;
  --primary-dark: #004b8d;
  --secondary: #e67e22;
  --light-bg: #f5f7fa;
  --dark-text: #2d3436;
  --light-text: #ffffff;
  --card-bg: #ffffff;
  --shadow: rgba(0, 0, 0, 0.1);
}

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

body {
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
  color: var(--dark-text);
  background-color: var(--light-bg);
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: var(--card-bg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1.5rem;
  box-shadow: 0 2px 8px var(--shadow);
  z-index: 1000;
}

.logo {
  font-size: 1.6rem;
  font-weight: bold;
  color: var(--primary);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1rem;
}

.nav-links li a {
  color: var(--dark-text);
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  transition: background 0.3s, color 0.3s;
  font-weight: 500;
}

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

/* Markierung für aktive Links (optional) */
.nav-links li a.active {
  color: var(--primary);
  font-weight: 600;
}

/* Hamburger Icon */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 4px;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: var(--dark-text);
  transition: all 0.3s;
}

/* Transformation für das Hamburger‑Icon im geöffneten Zustand */
.hamburger.open span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Hero Section */
.hero {
  position: relative;
  height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--light-text);
  text-align: center;
  padding-top: 80px; /* space for fixed nav */
}

.hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

/* Overlay to darken the hero image for readability */
.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.45);
  z-index: -1;
}

.hero-content h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 1rem;
}

.hero-content p {
  max-width: 600px;
  margin: 0 auto 1.5rem;
  font-size: 1.1rem;
  line-height: 1.5;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.3s;
}

.btn-primary {
  background: var(--primary);
  color: var(--light-text);
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-secondary {
  background: var(--secondary);
  color: var(--light-text);
}

/* Hover‑Farbe für sekundäre Buttons – statische dunklere Farbe, da CSS
   keine darken()-Funktion unterstützt */
.btn-secondary:hover {
  background: #cf711c;
}

/* Section base */
section {
  padding: 4rem 1.5rem;
}

section h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--primary);
}

.section-desc {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 3rem;
  color: #555;
}

/* Products */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.product-card {
  background: var(--card-bg);
  border-radius: 8px;
  box-shadow: 0 2px 8px var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

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

.product-content {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.product-content h3 {
  margin-bottom: 0.5rem;
  color: var(--primary);
  font-size: 1.25rem;
}

.product-content p {
  flex: 1;
  margin-bottom: 1rem;
  color: #555;
}

/* Features */
.features {
  background: #fff;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.feature-card {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px var(--shadow);
  text-align: center;
}

.feature-card i {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--primary);
}

.feature-card h3 {
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
  color: var(--primary);
}

.feature-card p {
  color: #555;
  font-size: 0.95rem;
  line-height: 1.4;
}

/* CTA */
.cta {
  background: var(--primary);
  color: var(--light-text);
  text-align: center;
}

.cta .btn-secondary {
  margin-top: 1rem;
  background: var(--secondary);
}

.cta .btn-secondary:hover {
  background: #cf711c; /* darken secondary */
}

/* Page Header für Unterseiten */
.page-header {
  padding: 6rem 1.5rem 3rem;
  margin-top: 80px; /* Abstand für fixe Navigationsleiste */
  text-align: center;
  background: var(--primary);
  color: var(--light-text);
}

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

.page-header p {
  max-width: 700px;
  margin: 0 auto;
  font-size: 1.1rem;
  line-height: 1.5;
}

/* Cars Listing */
.cars {
  background: var(--light-bg);
  padding: 3rem 1.5rem;
}

.car-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
}

.car-card {
  background: var(--card-bg);
  border-radius: 8px;
  box-shadow: 0 2px 8px var(--shadow);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.car-card i {
  font-size: 3rem;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.car-card h3 {
  font-size: 1.2rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.car-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  color: #555;
  font-size: 0.95rem;
}

.car-card ul li {
  margin-bottom: 0.3rem;
}

.car-card .price {
  font-weight: bold;
  margin-top: 0.5rem;
  color: var(--primary-dark);
  font-size: 1.1rem;
}

.car-card .button {
  margin-top: 1rem;
  display: inline-block;
  background: var(--secondary);
  color: var(--light-text);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.3s;
  font-size: 0.95rem;
}

.car-card .button:hover {
  background: #cf711c;
}

/* AGB Section */
.agb-section {
  background: var(--light-bg);
  padding: 3rem 1.5rem;
  color: #555;
}

.agb-section h2 {
  font-size: 1.6rem;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.agb-section p {
  margin-bottom: 1rem;
  line-height: 1.6;
}


/* Footer */
footer {
  background: #0c2542;
  color: var(--light-text);
  padding-top: 3rem;
}

.footer-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  padding: 0 1.5rem;
}

.footer-col h3 {
  margin-bottom: 0.75rem;
  color: var(--secondary);
}

.footer-col p,
.footer-col li,
.footer-col a {
  color: #d3d8e0;
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer-col ul {
  list-style: none;
  padding: 0;
}

.footer-col a {
  text-decoration: none;
  transition: color 0.3s;
}

.footer-col a:hover {
  color: var(--secondary);
}

.social-icons a {
  font-size: 1.25rem;
  margin-right: 0.75rem;
  color: #d3d8e0;
  transition: color 0.3s;
}

.social-icons a:hover {
  color: var(--secondary);
}

.footer-bottom {
  text-align: center;
  margin-top: 2rem;
  padding: 1rem 1.5rem;
  background: #071a2f;
  font-size: 0.85rem;
}

/* Responsive Behaviour */
@media (max-width: 768px) {
  .nav-links {
    position: absolute;
    top: 60px;
    right: 0;
    background: var(--card-bg);
    flex-direction: column;
    width: 200px;
    border-radius: 4px;
    box-shadow: 0 2px 8px var(--shadow);
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    overflow: hidden;
  }

  .nav-links.active {
    transform: translateX(0);
  }

  .nav-links li {
    border-bottom: 1px solid #f0f0f0;
  }

  .nav-links li a {
    display: block;
    padding: 1rem;
  }

  .hamburger {
    display: flex;
  }
}