/* =========================================================
   AutoExpert Köln – Vintage Retro Flexbox CSS Theme
   ---------------------------------------------------------
   Brand: AutoExpert Köln
   Style: Vintage Retro (retro colors, vintage fonts, classic patterns)
   Layout: Flexbox only (NO grid/columns)
   Responsive: Mobile-first
   ========================================================= */

/* --------------------
   1. CSS Variables
--------------------- */
:root {
  /* Brand Colors (Retro Palette) */
  --primary: #133965;
  --primary-dark: #0e2947;
  --secondary: #F2F6FA;
  --secondary-dark: #e5e1d8;
  --accent: #E89B08;
  --accent-dark: #b97a06;
  --retro-red: #c1440e;
  --retro-green: #3e885b;
  --retro-blue: #5d8aa8;
  --retro-cream: #f8ecd4;
  --retro-brown: #7c5c36;
  --retro-shadow: rgba(44, 36, 24, 0.12);
  --text-dark: #2d2418;
  --text-light: #fff;
  --border-radius: 12px;
  --border-radius-lg: 24px;
  --shadow: 0 4px 24px var(--retro-shadow);
  --shadow-sm: 0 2px 8px var(--retro-shadow);
  --pattern-url: url('data:image/svg+xml;utf8,<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="40" height="40" fill="%23f8ecd4"/><circle cx="20" cy="20" r="2" fill="%23e89b08"/><circle cx="0" cy="0" r="2" fill="%23e89b08"/><circle cx="40" cy="40" r="2" fill="%23e89b08"/><circle cx="0" cy="40" r="2" fill="%23e89b08"/><circle cx="40" cy="0" r="2" fill="%23e89b08"/></svg>');
  /* Typography */
  --font-display: 'Montserrat', 'Arial Rounded MT Bold', 'Arial', sans-serif;
  --font-body: 'Roboto', 'Arial', sans-serif;
  --font-vintage: 'Montserrat', 'Roboto', 'Arial', sans-serif;
  --font-size-base: 1.1rem;
  --font-size-lg: 2.2rem;
  --font-size-md: 1.4rem;
  --font-size-sm: 0.98rem;
  --line-height: 1.6;
  --letter-spacing: 0.02em;
  --transition: all 0.25s cubic-bezier(.4,0,.2,1);
}

/* --------------------
   2. Reset & Base
--------------------- */
html {
  box-sizing: border-box;
  font-size: 16px;
  scroll-behavior: smooth;
}
*, *:before, *:after {
  box-sizing: inherit;
}
body {
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  color: var(--text-dark);
  background: var(--retro-cream) var(--pattern-url) repeat;
  margin: 0;
  min-height: 100vh;
  line-height: var(--line-height);
  letter-spacing: var(--letter-spacing);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover, a:focus {
  color: var(--accent);
  text-decoration: underline;
}

/* --------------------
   3. Typography
--------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--primary);
  margin-top: 0;
  margin-bottom: 0.7em;
  font-weight: 700;
  letter-spacing: 0.03em;
}
h1 {
  font-size: 2.4rem;
  text-shadow: 1px 2px 0 var(--accent), 0 2px 8px var(--retro-shadow);
  margin-bottom: 0.6em;
}
h2 {
  font-size: 1.7rem;
  margin-bottom: 0.5em;
}
h3 {
  font-size: 1.25rem;
  margin-bottom: 0.4em;
}
p, ul, ol {
  margin-top: 0;
  margin-bottom: 1.1em;
}
strong {
  font-weight: 700;
  color: var(--retro-brown);
}

/* Retro underline for section titles */
h2, h1.section-title {
  position: relative;
  display: inline-block;
}
h2:after, h1.section-title:after {
  content: '';
  display: block;
  width: 60%;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--retro-red));
  border-radius: 2px;
  margin-top: 0.3em;
}

/* --------------------
   4. Layout Containers
--------------------- */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 18px;
}
.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: var(--secondary);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-sm);
}

.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  background: var(--retro-cream);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
  position: relative;
  padding: 24px 20px;
  min-width: 260px;
  flex: 1 1 260px;
  transition: box-shadow 0.2s, transform 0.2s;
}
.card:hover {
  box-shadow: 0 8px 32px var(--retro-shadow);
  transform: translateY(-4px) scale(1.02);
}

.content-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
}
.text-image-section {
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}
.testimonial-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background: var(--secondary-dark);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
  border-left: 6px solid var(--accent);
  color: var(--text-dark);
  font-style: italic;
  position: relative;
}
.testimonial-card p {
  margin: 0 0 0.5em 0;
  font-size: 1.1rem;
}
.testimonial-card span {
  font-size: 0.98rem;
  color: var(--retro-brown);
  font-style: normal;
}
.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
  background: var(--retro-cream);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  padding: 18px 16px;
  margin-bottom: 20px;
}

/* Feature grid for index/leistungen */
.feature-grid, .service-grid, .team, .gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: flex-start;
}
.feature-grid > div, .service-grid > div, .team-member, .gallery > div {
  background: var(--retro-cream);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  padding: 20px 16px;
  flex: 1 1 220px;
  min-width: 220px;
  margin-bottom: 20px;
  font-family: var(--font-vintage);
}

.team {
  gap: 24px;
}
.team-member {
  text-align: left;
  font-size: 1.05rem;
  color: var(--primary);
  border-left: 4px solid var(--accent);
}
.gallery {
  gap: 20px;
}
.gallery > div {
  font-style: italic;
  color: var(--retro-brown);
  background: var(--secondary-dark);
}

.stars {
  font-size: 1.5rem;
  color: var(--accent);
  margin-top: 10px;
  letter-spacing: 0.1em;
}

.faq-accordion > div {
  background: var(--secondary-dark);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
  padding: 18px 16px;
  transition: box-shadow 0.2s;
}
.faq-accordion > div:hover {
  box-shadow: 0 6px 24px var(--retro-shadow);
}

.map {
  background: var(--retro-blue);
  color: var(--text-light);
  border-radius: var(--border-radius);
  padding: 18px 16px;
  margin-top: 10px;
  font-style: italic;
  box-shadow: var(--shadow-sm);
}

/* --------------------
   5. Header & Navigation
--------------------- */
header {
  background: var(--primary);
  color: var(--text-light);
  box-shadow: 0 2px 12px var(--retro-shadow);
  position: relative;
  z-index: 100;
}
header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  padding-bottom: 12px;
}
nav {
  display: flex;
  align-items: center;
  gap: 24px;
}
nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}
nav ul li {
  margin: 0;
}
nav a {
  color: var(--text-light);
  font-family: var(--font-display);
  font-size: 1.05rem;
  padding: 6px 10px;
  border-radius: 6px;
  transition: background 0.18s, color 0.18s;
}
nav a:hover, nav a:focus {
  background: var(--accent);
  color: var(--primary);
  text-decoration: none;
}
nav img {
  height: 38px;
  margin-right: 18px;
  border-radius: 8px;
  box-shadow: 0 2px 8px var(--retro-shadow);
}

.cta-btn {
  background: linear-gradient(90deg, var(--accent), var(--retro-red));
  color: var(--text-light);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.08rem;
  padding: 10px 28px;
  border: none;
  border-radius: 24px;
  box-shadow: 0 2px 8px var(--retro-shadow);
  cursor: pointer;
  margin-left: 18px;
  transition: var(--transition);
  letter-spacing: 0.04em;
  text-shadow: 0 1px 2px rgba(0,0,0,0.08);
  outline: none;
  position: relative;
  z-index: 1;
}
.cta-btn:hover, .cta-btn:focus {
  background: linear-gradient(90deg, var(--retro-red), var(--accent));
  color: var(--primary);
  box-shadow: 0 4px 16px var(--retro-shadow);
  transform: translateY(-2px) scale(1.03);
}

/* --------------------
   6. Hero Section
--------------------- */
.hero {
  background: linear-gradient(120deg, var(--retro-cream) 70%, var(--accent) 100%);
  padding: 60px 0 40px 0;
  margin-bottom: 60px;
  border-bottom: 8px solid var(--accent);
  box-shadow: 0 6px 32px var(--retro-shadow);
}
.hero .container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}
.hero .content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: flex-start;
}
.hero h1 {
  color: var(--primary);
  font-family: var(--font-display);
  font-size: 2.5rem;
  text-shadow: 2px 2px 0 var(--accent), 0 2px 8px var(--retro-shadow);
}
.hero p {
  font-size: 1.2rem;
  color: var(--retro-brown);
  margin-bottom: 0.8em;
}

/* --------------------
   7. Footer
--------------------- */
footer {
  background: var(--primary-dark);
  color: var(--retro-cream);
  padding: 32px 0 18px 0;
  border-top: 8px solid var(--accent);
  box-shadow: 0 -2px 12px var(--retro-shadow);
}
footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 1rem;
}
footer nav a {
  color: var(--retro-cream);
  padding: 4px 8px;
  border-radius: 4px;
  transition: background 0.18s, color 0.18s;
}
footer nav a:hover, footer nav a:focus {
  background: var(--accent);
  color: var(--primary-dark);
}
footer p {
  font-size: 0.98rem;
  color: var(--retro-cream);
  margin: 0;
}

/* --------------------
   8. Mobile Navigation
--------------------- */
.mobile-menu-toggle {
  display: none;
  background: var(--accent);
  color: var(--primary);
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 2rem;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px var(--retro-shadow);
  transition: background 0.18s, color 0.18s, transform 0.18s;
  position: relative;
  z-index: 120;
}
.mobile-menu-toggle:active {
  background: var(--retro-red);
  color: var(--text-light);
  transform: scale(0.96);
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(19, 57, 101, 0.98);
  z-index: 2000;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 0;
  transition: transform 0.35s cubic-bezier(.4,0,.2,1), opacity 0.25s;
  transform: translateX(-100%);
  opacity: 0;
}
.mobile-menu.open {
  display: flex;
  transform: translateX(0);
  opacity: 1;
}
.mobile-menu-close {
  background: var(--accent);
  color: var(--primary);
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 2rem;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin: 24px 0 0 24px;
  box-shadow: 0 2px 8px var(--retro-shadow);
  transition: background 0.18s, color 0.18s, transform 0.18s;
  z-index: 2100;
}
.mobile-menu-close:active {
  background: var(--retro-red);
  color: var(--text-light);
  transform: scale(0.96);
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin: 48px 0 0 36px;
}
.mobile-nav a {
  color: var(--retro-cream);
  font-family: var(--font-display);
  font-size: 1.35rem;
  padding: 8px 0;
  border-radius: 6px;
  transition: background 0.18s, color 0.18s;
  font-weight: 600;
}
.mobile-nav a:hover, .mobile-nav a:focus {
  background: var(--accent);
  color: var(--primary);
  text-decoration: none;
}

/* --------------------
   9. Cookie Consent Banner
--------------------- */
.cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: var(--retro-cream);
  color: var(--primary);
  box-shadow: 0 -2px 16px var(--retro-shadow);
  padding: 24px 18px 18px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  z-index: 3000;
  animation: slideUp 0.6s cubic-bezier(.4,0,.2,1);
}
@keyframes slideUp {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.cookie-banner p {
  margin: 0;
  font-size: 1.05rem;
  color: var(--primary);
}
.cookie-banner .cookie-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 8px;
}
.cookie-btn {
  background: var(--accent);
  color: var(--text-light);
  border: none;
  border-radius: 18px;
  padding: 8px 22px;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px var(--retro-shadow);
  transition: background 0.18s, color 0.18s, transform 0.18s;
}
.cookie-btn:hover, .cookie-btn:focus {
  background: var(--retro-red);
  color: var(--text-light);
  transform: translateY(-2px) scale(1.03);
}
.cookie-btn.reject {
  background: var(--retro-brown);
  color: var(--retro-cream);
}
.cookie-btn.reject:hover, .cookie-btn.reject:focus {
  background: var(--primary);
  color: var(--accent);
}
.cookie-btn.settings {
  background: var(--retro-blue);
  color: var(--retro-cream);
}
.cookie-btn.settings:hover, .cookie-btn.settings:focus {
  background: var(--accent);
  color: var(--primary);
}

/* Cookie Modal */
.cookie-modal {
  position: fixed;
  left: 0; right: 0; top: 0; bottom: 0;
  background: rgba(19, 57, 101, 0.85);
  z-index: 4000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.cookie-modal.open {
  opacity: 1;
  pointer-events: all;
}
.cookie-modal-content {
  background: var(--retro-cream);
  color: var(--primary);
  border-radius: var(--border-radius-lg);
  box-shadow: 0 8px 32px var(--retro-shadow);
  padding: 36px 28px 28px 28px;
  min-width: 320px;
  max-width: 95vw;
  display: flex;
  flex-direction: column;
  gap: 22px;
  animation: fadeIn 0.4s cubic-bezier(.4,0,.2,1);
}
@keyframes fadeIn {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.cookie-modal-content h3 {
  margin-bottom: 0.5em;
  color: var(--accent);
  font-family: var(--font-display);
}
.cookie-modal-content .cookie-category {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}
.cookie-modal-content .cookie-category label {
  font-size: 1.05rem;
  color: var(--primary);
  font-family: var(--font-body);
}
.cookie-modal-content .cookie-toggle {
  width: 38px;
  height: 22px;
  background: var(--secondary-dark);
  border-radius: 12px;
  position: relative;
  cursor: pointer;
  transition: background 0.18s;
  margin-left: 8px;
}
.cookie-modal-content .cookie-toggle input {
  display: none;
}
.cookie-modal-content .cookie-toggle span {
  position: absolute;
  left: 3px;
  top: 3px;
  width: 16px;
  height: 16px;
  background: var(--accent);
  border-radius: 50%;
  transition: left 0.18s, background 0.18s;
}
.cookie-modal-content .cookie-toggle input:checked + span {
  left: 19px;
  background: var(--retro-green);
}
.cookie-modal-content .cookie-category.essential label {
  color: var(--retro-brown);
  font-weight: 700;
}
.cookie-modal-content .cookie-category.essential .cookie-toggle {
  opacity: 0.5;
  pointer-events: none;
}
.cookie-modal-content .cookie-modal-actions {
  display: flex;
  gap: 16px;
  margin-top: 10px;
}
.cookie-modal-content .cookie-btn {
  min-width: 120px;
}
.cookie-modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  background: var(--accent);
  color: var(--primary);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 2px 8px var(--retro-shadow);
  transition: background 0.18s, color 0.18s, transform 0.18s;
}
.cookie-modal-close:active {
  background: var(--retro-red);
  color: var(--text-light);
  transform: scale(0.96);
}

/* --------------------
   10. Lists, Buttons, Forms
--------------------- */
ul, ol {
  padding-left: 1.3em;
}
ul li, ol li {
  margin-bottom: 0.5em;
}
button, input[type="submit"], input[type="button"] {
  font-family: var(--font-display);
  font-size: 1rem;
  border: none;
  border-radius: 18px;
  padding: 8px 22px;
  background: var(--accent);
  color: var(--text-light);
  cursor: pointer;
  box-shadow: 0 2px 8px var(--retro-shadow);
  transition: background 0.18s, color 0.18s, transform 0.18s;
}
button:hover, button:focus, input[type="submit"]:hover, input[type="submit"]:focus {
  background: var(--retro-red);
  color: var(--text-light);
  transform: translateY(-2px) scale(1.03);
}

/* --------------------
   11. Spacing & Alignment
--------------------- */
section {
  margin-bottom: 60px;
  padding: 40px 20px;
}
section:last-child {
  margin-bottom: 0;
}

/* Ensure minimum spacing between all cards/sections */
.card, .feature-item, .testimonial-card, .faq-accordion > div, .team-member, .gallery > div {
  margin-bottom: 20px;
}

/* Prevent overlap */
.card, .feature-item, .testimonial-card, .faq-accordion > div {
  z-index: 1;
}

/* --------------------
   12. Responsive Design
--------------------- */
@media (max-width: 1024px) {
  .container {
    max-width: 96vw;
  }
  .feature-grid, .service-grid, .team, .gallery {
    gap: 16px;
  }
}
@media (max-width: 900px) {
  .feature-grid > div, .service-grid > div, .team-member, .gallery > div {
    min-width: 180px;
    flex: 1 1 180px;
  }
}
@media (max-width: 768px) {
  .container {
    max-width: 100vw;
    padding: 0 8px;
  }
  .content-wrapper {
    gap: 16px;
  }
  .section {
    padding: 28px 8px;
    margin-bottom: 40px;
  }
  .hero {
    padding: 38px 0 24px 0;
    margin-bottom: 40px;
  }
  .hero h1 {
    font-size: 1.6rem;
  }
  nav ul {
    gap: 10px;
  }
  .feature-grid, .service-grid, .team, .gallery {
    flex-direction: column;
    gap: 12px;
  }
  .feature-grid > div, .service-grid > div, .team-member, .gallery > div {
    min-width: 0;
    width: 100%;
    flex: 1 1 100%;
  }
  .text-image-section {
    flex-direction: column;
    gap: 18px;
    align-items: flex-start;
  }
  .testimonial-card {
    flex-direction: column;
    gap: 10px;
    padding: 14px 10px;
  }
  .card-container, .content-grid {
    flex-direction: column;
    gap: 12px;
  }
  .card {
    min-width: 0;
    width: 100%;
    padding: 16px 10px;
  }
  .map {
    padding: 12px 8px;
  }
  .cta-btn {
    margin-left: 0;
    width: 100%;
    text-align: center;
    padding: 10px 0;
  }
  /* Mobile nav */
  nav ul, nav .cta-btn {
    display: none;
  }
  .mobile-menu-toggle {
    display: flex;
  }
}
@media (max-width: 480px) {
  h1 {
    font-size: 1.25rem;
  }
  h2 {
    font-size: 1.05rem;
  }
  .cookie-modal-content {
    padding: 18px 8px 18px 8px;
    min-width: 0;
  }
}

/* Show mobile menu overlay on open */
@media (max-width: 900px) {
  .mobile-menu {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(.4,0,.2,1), opacity 0.25s;
  }
  .mobile-menu.open {
    opacity: 1;
    pointer-events: all;
    transform: translateX(0);
  }
}

/* Hide desktop nav on mobile */
@media (max-width: 900px) {
  nav ul, nav .cta-btn {
    display: none !important;
  }
  .mobile-menu-toggle {
    display: flex !important;
  }
}

/* --------------------
   13. Micro-interactions & Effects
--------------------- */
.card, .feature-item, .testimonial-card, .faq-accordion > div, .team-member, .gallery > div {
  transition: box-shadow 0.18s, transform 0.18s;
}
.card:hover, .feature-item:hover, .testimonial-card:hover, .faq-accordion > div:hover, .team-member:hover, .gallery > div:hover {
  box-shadow: 0 8px 32px var(--retro-shadow);
  transform: translateY(-2px) scale(1.01);
}

.cta-btn:active, .cookie-btn:active {
  transform: scale(0.97);
}

/* --------------------
   14. Accessibility
--------------------- */
:focus {
  outline: 2px dashed var(--accent);
  outline-offset: 2px;
}

/* --------------------
   15. Utility Classes
--------------------- */
.text-center {
  text-align: center;
}
.text-right {
  text-align: right;
}
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.mt-2 { margin-top: 12px !important; }
.mb-2 { margin-bottom: 12px !important; }

/* --------------------
   16. Print Styles
--------------------- */
@media print {
  header, footer, .cookie-banner, .mobile-menu { display: none !important; }
  body { background: #fff !important; }
}

/* =========================================================
   END OF CSS
   ========================================================= */
