/* ===================================================================
   WagenWahl Deutschland – style.css
   Design style: gradient_modern (modern gradients, smooth transitions)
   Brand: Primary #0F2747, Secondary #236E4A, Accent #F5F7FA
   Fonts: Trebuchet MS (display), Verdana (body)
   Mobile-first, Flexbox-only layouts
   =================================================================== */

/* ---------------------------
   0) CSS Reset & Base Normalize
   --------------------------- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: Verdana, Geneva, Tahoma, sans-serif; color: #12243d; background-color: #F5F7FA; line-height: 1.6; }
img, picture, svg { max-width: 100%; height: auto; display: block; }
a { color: #0F2747; text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { margin: 0; padding-left: 20px; }
p { margin: 0 0 16px 0; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
:focus { outline: none; }
:focus-visible { outline: 2px solid #236E4A; outline-offset: 2px; }

/* ---------------------------
   1) CSS Variables (with fallbacks)
   --------------------------- */
:root {
  --color-primary: #0F2747;
  --color-secondary: #236E4A;
  --color-accent: #F5F7FA;
  --color-text: #12243d;
  --color-muted: #6d7a8a;
  --color-white: #ffffff;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --shadow-sm: 0 2px 10px rgba(15,39,71,0.08);
  --shadow-md: 0 10px 30px rgba(15,39,71,0.12);
  --shadow-lg: 0 20px 50px rgba(15,39,71,0.18);
  --transition: all 0.25s ease;
}

/* ---------------------------
   2) Typography Scale
   --------------------------- */
h1, h2, h3 { font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif; color: var(--color-primary, #0F2747); margin: 0 0 16px 0; line-height: 1.2; }
h1 { font-size: 32px; }
h2 { font-size: 24px; margin-top: 8px; }
h3 { font-size: 18px; color: #15345f; }
small, .small { font-size: 12px; color: var(--color-muted, #6d7a8a); }
strong { font-weight: 700; color: #0F2747; }

/* ---------------------------
   3) Layout Primitives (Flex-only)
   --------------------------- */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; display: flex; flex-direction: column; gap: 20px; }
.content-wrapper { display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }

/* Mandatory Spacing & Alignment Patterns */
.section { margin-bottom: 60px; padding: 40px 20px; }
.card-container { display: flex; flex-wrap: wrap; gap: 24px; }
.card { margin-bottom: 20px; position: relative; background: var(--color-white, #ffffff); border: 1px solid #e6ecf2; border-radius: var(--radius-md); box-shadow: var(--shadow-sm); padding: 20px; transition: var(--transition); }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.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; border-radius: var(--radius-md); background: #ffffff; color: #0F2747; border: 1px solid #e6ecf2; box-shadow: var(--shadow-sm); }
.feature-item { display: flex; flex-direction: column; align-items: flex-start; gap: 15px; }

/* Ensure default section breathing room even without .section class */
section { padding: 40px 0; }

/* ---------------------------
   4) Header & Navigation
   --------------------------- */
.topbar { background-color: var(--color-primary, #0F2747); background-image: linear-gradient(135deg, rgba(15,39,71,1) 0%, rgba(35,110,74,0.9) 100%); color: #ffffff; position: relative; z-index: 50; }
.topbar .container { padding-top: 14px; padding-bottom: 14px; }
.topbar .content-wrapper { flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.logo { display: flex; align-items: center; }
.logo img { height: 36px; width: auto; filter: drop-shadow(0 2px 6px rgba(0,0,0,0.2)); }
.brand-tagline { color: #e6eef7; font-size: 13px; flex: 1 1 100%; }

.main-nav { display: none; align-items: center; gap: 14px; }
.main-nav a { color: #eaf2ff; padding: 10px 12px; border-radius: 999px; transition: var(--transition); display: flex; align-items: center; }
.main-nav a:hover { background: rgba(255,255,255,0.12); text-decoration: none; }
.main-nav a[aria-current="page"] { background: rgba(255,255,255,0.18); font-weight: 700; }

/* Mobile menu toggle */
.mobile-menu-toggle { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 8px; background: rgba(255,255,255,0.12); color: #ffffff; transition: var(--transition); }
.mobile-menu-toggle:hover { background: rgba(255,255,255,0.2); }

/* Mobile Menu Overlay */
.mobile-menu { position: fixed; inset: 0; background: rgba(8, 16, 30, 0.55); display: flex; flex-direction: column; align-items: flex-end; justify-content: flex-start; padding: 20px; transform: translateX(0); opacity: 0; pointer-events: none; transition: opacity 0.3s ease; z-index: 1000; }
.mobile-menu .mobile-nav { width: 85%; max-width: 360px; background: #ffffff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 20px; display: flex; flex-direction: column; gap: 8px; transform: translateX(20px); transition: transform 0.35s ease; }
.mobile-menu.open, .mobile-menu.is-active { opacity: 1; pointer-events: auto; }
.mobile-menu.open .mobile-nav, .mobile-menu.is-active .mobile-nav { transform: translateX(0); }
.mobile-menu-close { align-self: flex-end; width: 40px; height: 40px; border-radius: 8px; background: #F5F7FA; color: #0F2747; display: flex; align-items: center; justify-content: center; margin-bottom: 8px; box-shadow: var(--shadow-sm); }
.mobile-nav a { display: flex; align-items: center; padding: 12px 14px; border-radius: 10px; color: #0F2747; transition: var(--transition); }
.mobile-nav a:hover { background: #F5F7FA; text-decoration: none; }
.mobile-nav a[aria-current="page"] { background: #e8eff7; font-weight: 700; }

/* ---------------------------
   5) Buttons & CTAs
   --------------------------- */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 18px; border-radius: 999px; background: #e8eff7; color: #0F2747; border: 1px solid #d4e1ef; box-shadow: var(--shadow-sm); transition: var(--transition); font-weight: 700; }
.button:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); text-decoration: none; }
.button.primary { color: #ffffff; background-color: var(--color-secondary, #236E4A); background-image: linear-gradient(135deg, rgba(35,110,74,1), rgba(21,88,57,1)); border: 1px solid rgba(0,0,0,0.05); }
.button.primary:hover { filter: brightness(1.05); }
.button:active { transform: translateY(0); }

.cta-group { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.cta-group p { margin: 0; display: flex; align-items: center; gap: 8px; }
.cta-group img { width: 18px; height: 18px; }

/* ---------------------------
   6) Hero Section (Gradient Modern)
   --------------------------- */
.hero { color: #ffffff; background-color: var(--color-primary, #0F2747); background-image: linear-gradient(135deg, rgba(15,39,71,1) 0%, rgba(35,110,74,0.95) 55%, rgba(15,39,71,0.98) 100%); position: relative; overflow: hidden; }
.hero .container { padding-top: 48px; padding-bottom: 48px; }
.hero .content-wrapper { align-items: flex-start; gap: 16px; }
.hero h1 { color: #ffffff; }
.hero p { color: #e8f1ff; max-width: 70ch; }
.hero nav[aria-label="Brotkrumen"] { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; color: #cfe0ff; font-size: 13px; }
.hero nav[aria-label="Brotkrumen"] a { color: #ffffff; opacity: 0.9; }
.hero nav[aria-label="Brotkrumen"] span[aria-hidden="true"] { opacity: 0.6; }

/* ---------------------------
   7) Content Blocks & Lists
   --------------------------- */
.text-section { background: #ffffff; border: 1px solid #e6ecf2; border-radius: var(--radius-md); padding: 20px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 10px; }
.text-section:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.feature-grid, .service-cards { display: flex; flex-wrap: wrap; gap: 20px; }
.feature-grid .text-section, .service-cards .text-section { flex: 1 1 260px; min-width: 260px; }

.statistics ul, .trust-badges ul, .key-usps ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 12px; }
.statistics li, .trust-badges li, .key-usps li { background: #ffffff; color: #0F2747; border: 1px solid #e6ecf2; border-radius: 999px; padding: 10px 14px; box-shadow: var(--shadow-sm); }
.key-usps h3 { margin-top: 8px; }

.rating-summary { display: inline-flex; align-items: center; background: #ffffff; color: #0F2747; border: 1px solid #e6ecf2; border-radius: 999px; padding: 10px 14px; box-shadow: var(--shadow-sm); font-weight: 700; }

/* Ensure readable testimonials (dark text on light bg) */
.testimonial-card p { margin: 0; }

/* Ordered & unordered lists inside content */
.content-wrapper > ul, .content-wrapper > ol { background: #ffffff; border: 1px solid #e6ecf2; border-radius: var(--radius-md); padding: 16px 18px; box-shadow: var(--shadow-sm); }

/* ---------------------------
   8) Footer
   --------------------------- */
footer section { background: #0F2747; background-image: linear-gradient(135deg, rgba(15,39,71,1), rgba(35,110,74,0.9)); color: #eaf2ff; }
footer .content-wrapper { flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: 20px; }
.footer-brand { display: flex; flex-direction: column; gap: 10px; flex: 1 1 220px; }
.footer-brand img { width: 140px; height: auto; filter: drop-shadow(0 2px 6px rgba(0,0,0,0.25)); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 10px; flex: 2 1 320px; }
.footer-nav a { color: #eaf2ff; background: rgba(255,255,255,0.1); padding: 8px 12px; border-radius: 999px; transition: var(--transition); }
.footer-nav a:hover { background: rgba(255,255,255,0.18); text-decoration: none; }
.contact-summary { display: flex; flex-direction: column; gap: 6px; flex: 1 1 220px; }

/* ---------------------------
   9) Utilities & Elements
   --------------------------- */
.hours { color: var(--color-muted, #6d7a8a); }
nav[aria-label="Hauptnavigation"] .button.primary { padding: 10px 14px; }

/* Links inside content blocks */
.content-wrapper a:not(.button):not(.logo) { color: var(--color-secondary, #236E4A); font-weight: 700; }
.content-wrapper a:not(.button):not(.logo):hover { color: #1e5f41; }

/* Icons inside paragraphs */
.text-section p img, .cta-group p img { width: 18px; height: 18px; margin-right: 6px; display: inline-block; vertical-align: middle; }

/* ---------------------------
   10) Cookie Consent (Banner + Modal)
   --------------------------- */
.cookie-banner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 999; background: #ffffff; border-top: 1px solid #e6ecf2; box-shadow: 0 -8px 20px rgba(15,39,71,0.08); display: flex; flex-direction: column; gap: 12px; padding: 14px 16px; }
.cookie-banner .cookie-inner { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.cookie-banner .cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-button { padding: 10px 14px; border-radius: 999px; border: 1px solid #d4e1ef; background: #e8eff7; color: #0F2747; font-weight: 700; box-shadow: var(--shadow-sm); }
.cookie-button.primary { background: var(--color-secondary, #236E4A); color: #ffffff; border-color: rgba(0,0,0,0.05); }
.cookie-button.danger { background: #fff3f3; color: #8b1e1e; border-color: #f0d1d1; }

/* Cookie Preferences Modal */
.cookie-modal { position: fixed; inset: 0; background: rgba(8, 16, 30, 0.55); display: none; align-items: center; justify-content: center; padding: 20px; z-index: 1001; }
.cookie-modal.open { display: flex; }
.cookie-modal .cookie-modal-content { width: 100%; max-width: 720px; background: #ffffff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.cookie-options { display: flex; flex-direction: column; gap: 12px; }
.cookie-option { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #F5F7FA; border: 1px solid #e6ecf2; border-radius: 12px; padding: 12px; }
/* Toggle Switch */
.toggle { width: 46px; height: 26px; background: #c9d5e3; border-radius: 999px; position: relative; display: flex; align-items: center; padding: 3px; transition: var(--transition); }
.toggle::after { content: ""; width: 20px; height: 20px; background: #ffffff; border-radius: 50%; box-shadow: var(--shadow-sm); transform: translateX(0); transition: var(--transition); }
.toggle.active { background: #236E4A; }
.toggle.active::after { transform: translateX(20px); }

/* ---------------------------
   11) Responsive (Mobile-first)
   --------------------------- */
@media (min-width: 576px) {
  h1 { font-size: 36px; }
  h2 { font-size: 28px; }
  h3 { font-size: 20px; }
}

@media (min-width: 768px) {
  .text-image-section { flex-direction: row; }
  .hero .container { padding-top: 64px; padding-bottom: 64px; }
  .brand-tagline { flex: 1 1 auto; order: 2; }
}

@media (min-width: 992px) {
  .main-nav { display: flex; }
  .mobile-menu-toggle { display: none; }
  .topbar .content-wrapper { gap: 18px; }
  .content-wrapper { gap: 24px; }
  h1 { font-size: 42px; }
  h2 { font-size: 32px; }
  h3 { font-size: 22px; }
}

/* ---------------------------
   12) Accessibility helpers
   --------------------------- */
[aria-current="page"] { position: relative; }
[aria-current="page"]::after { content: ""; display: block; height: 2px; background: rgba(255,255,255,0.6); margin-top: 2px; }

/* ---------------------------
   13) Page-specific refinements
   --------------------------- */
/* Breadcrumb spacing outside hero too (if present) */
nav[aria-label="Brotkrumen"] { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; color: #516480; }
nav[aria-label="Brotkrumen"] a { color: #0F2747; }

/* Lists that represent steps/faq get better spacing */
.content-wrapper ol li, .content-wrapper ul li { margin-bottom: 6px; }

/* Contact summary icons alignment */
.contact-summary p { margin: 0; }

/* Promote clarity in legal pages */
main section .text-section h3 { margin-top: 6px; }

/* ---------------------------
   14) Cards, Shadows, Micro-interactions
   --------------------------- */
.card .button, .text-section .button { align-self: flex-start; }
.card:hover .button { filter: brightness(1.03); }

/* ---------------------------
   15) Safety: spacing between blocks to prevent overlap
   --------------------------- */
.content-wrapper > * + * { margin-top: 0; }
section + section { margin-top: 20px; }

/* ---------------------------
   16) Print basics (optional lightweight)
   --------------------------- */
@media print {
  .topbar, .mobile-menu, .cookie-banner, .cookie-modal, footer { display: none !important; }
  body { background: #ffffff; }
}

/* NOTE: Flexbox-only layouts are used across all containers. No CSS Grid or Columns applied. */
