/* ============================================================
   GlintWheels Rentenberatung – Vintage/Retro Flexbox Theme
   Style: vintage_retro with brand colors & fonts
   Author: Senior CSS Developer & UI Designer
   Notes:
   - Mobile-first, ONLY Flexbox (NO grid/columns used)
   - Consistent spacing, typography, and retro accents
   - Includes Mobile Menu + Cookie Banner + Modal
   ============================================================ */

/* -----------------------------
   CSS Reset / Normalize
----------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; }
h1, h2, h3, h4, h5, h6, p, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { padding-left: 1.1rem; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { background: none; border: 0; font: inherit; color: inherit; cursor: pointer; }
:focus { outline: 2px dashed rgba(31,58,95,0.7); outline-offset: 2px; }

/* -----------------------------
   Theme Variables (with fallbacks)
----------------------------- */
:root {
  --primary: #1F3A5F;
  --secondary: #2E7D6D;
  --accent: #F5F7FA;
  /* Vintage/retro companions */
  --cream: #F5E6D3;
  --paper: #F8F1E7;
  --rust: #B26E63;
  --mustard: #C9A227;
  --ink: #2B2B2B;
  --coffee: #6B5B53;
  --shadow: rgba(31,58,95,0.15);
  --shadow-strong: rgba(31,58,95,0.25);
  --radius-s: 6px; --radius-m: 10px; --radius-l: 14px;
  --space-8: 8px; --space-12: 12px; --space-16: 16px; --space-20: 20px; --space-24: 24px; --space-32: 32px; --space-40: 40px; --space-60: 60px;
  --font-display: Georgia, "Times New Roman", Times, serif;
  --font-body: Verdana, Geneva, Tahoma, sans-serif;
  --maxw: 1160px;
  --transition: 200ms ease;
}

/* -----------------------------
   Base / Body / Typography
----------------------------- */
body {
  background: var(--paper, #F8F1E7);
  color: var(--ink, #2B2B2B);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
}

h1, h2, h3, h4 { font-family: var(--font-display); color: var(--primary); line-height: 1.25; }
h1 { font-size: 32px; margin-bottom: var(--space-16); letter-spacing: 0.2px; }
h2 { font-size: 24px; margin-bottom: var(--space-16); }
h3 { font-size: 18px; margin-bottom: var(--space-12); }

p { margin-bottom: var(--space-16); color: var(--coffee); }
strong { color: var(--ink); font-weight: 700; }

/* Retro-inspired separators */
hr { border: 0; height: 1px; background: repeating-linear-gradient(90deg, var(--rust), var(--rust) 8px, transparent 8px, transparent 16px); opacity: 0.4; }

/* -----------------------------
   Layout Containers (Flexbox only)
----------------------------- */
.container {
  display: flex;
  flex-direction: column;
  gap: var(--space-20);
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--space-20);
}

.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
  width: 100%;
}

section { padding: var(--space-32) 0; }

/* MANDATORY SPACING PATTERNS */
.section { margin-bottom: 60px; padding: 40px 20px; }
.card-container { display: flex; flex-wrap: wrap; gap: 24px; }
.card { margin-bottom: 20px; position: relative; }
.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; }
.feature-item { display: flex; flex-direction: column; align-items: flex-start; gap: 15px; }

/* Card styling (vintage edges) */
.card, .text-image-section, .testimonial-card {
  background: #fff;
  border: 1px solid rgba(107, 91, 83, 0.25);
  border-radius: var(--radius-m);
  box-shadow: 0 4px 10px var(--shadow);
}

/* Retro list bullets */
ul li, ol li { margin-bottom: 8px; }
ul li { list-style: none; position: relative; padding-left: 20px; }
ul li::before { content: "◆"; position: absolute; left: 0; top: 0; color: var(--mustard); font-size: 12px; line-height: 1.2; }

/* -----------------------------
   Header / Navigation
----------------------------- */
header {
  position: sticky; top: 0; z-index: 1000;
  background: #fff;
  border-bottom: 3px double rgba(31,58,95,0.15);
}

header .container {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-16);
  padding-top: var(--space-12); padding-bottom: var(--space-12);
}

.logo img { height: 40px; width: auto; }

.main-nav {
  display: none;
  align-items: center;
  gap: var(--space-16);
}

.main-nav a {
  color: var(--primary);
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.5px;
  padding: 8px 10px;
  border-radius: var(--radius-s);
  transition: color var(--transition), background-color var(--transition), transform var(--transition);
}

.main-nav a:hover { background: var(--cream); color: var(--ink); }
.main-nav a[aria-current="page"] { background: var(--accent); border: 1px dashed rgba(31,58,95,0.25); }

/* Nav CTA badge */
.main-nav .cta {
  background: var(--mustard);
  color: #1b1b1b;
  border: 1px solid rgba(0,0,0,0.12);
  box-shadow: 0 2px 0 rgba(0,0,0,0.08);
}
.main-nav .cta:hover { background: #E0B73A; transform: translateY(-1px); }

/* Mobile menu button */
.mobile-menu-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--primary); color: #fff;
  box-shadow: 0 2px 8px var(--shadow);
  transition: background var(--transition), transform var(--transition);
}
.mobile-menu-toggle:hover { background: #264a7a; transform: translateY(-1px); }

/* Mobile Menu Overlay */
.mobile-menu {
  position: fixed; inset: 0; z-index: 1200;
  background: #fff;
  transform: translateX(100%);
  transition: transform 280ms ease;
  display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 0;
  padding: var(--space-20);
  border-left: 6px solid var(--primary);
}

/* Allow both attribute and class control */
.mobile-menu[aria-hidden="false"], .mobile-menu.open { transform: translateX(0); }

.mobile-menu-close {
  align-self: flex-end;
  width: 36px; height: 36px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--rust); color: #fff;
  margin-bottom: var(--space-16);
}

.mobile-nav { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.mobile-nav a {
  display: flex; align-items: center; justify-content: flex-start;
  padding: 12px 10px; border-radius: var(--radius-s);
  color: var(--primary);
  border: 1px solid rgba(31,58,95,0.15);
  background: var(--accent);
}
.mobile-nav a:hover { background: var(--cream); }

/* -----------------------------
   Hero Section (vintage paper feel)
----------------------------- */
.hero { background: var(--paper); border-bottom: 1px dashed rgba(31,58,95,0.2); }
.hero .content-wrapper { padding: var(--space-20) 0; }
.hero h1 {
  position: relative;
  padding-bottom: 10px;
}
.hero h1::after {
  content: ""; display: block; width: 80px; height: 4px;
  background: var(--mustard);
  border-radius: 2px;
  margin-top: 10px;
}

/* Language Switcher */
.language-switcher { display: flex; align-items: center; gap: 10px; color: var(--coffee); font-size: 14px; }
.language-switcher a { text-decoration: underline; text-underline-offset: 3px; color: var(--secondary); }
.language-switcher span { font-weight: 700; color: var(--ink); }

/* Trust badges / metrics */
.trust-badges, .metrics { display: flex; flex-wrap: wrap; gap: var(--space-12); align-items: center; }
.trust-badges p, .metrics p { background: #fff; border: 1px solid rgba(107,91,83,0.25); border-radius: var(--radius-s); padding: 8px 12px; box-shadow: 0 2px 6px var(--shadow); }

/* -----------------------------
   Buttons & CTAs
----------------------------- */
.cta-group { display: flex; flex-wrap: wrap; gap: var(--space-12); align-items: center; }
.btn-primary, .btn-secondary {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 16px; border-radius: 999px;
  font-weight: 700; font-size: 15px;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition);
  border: 1px solid transparent;
}

.btn-primary { background: var(--secondary); color: #fff; box-shadow: 0 4px 10px var(--shadow); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 14px var(--shadow-strong); background: #2a6f62; }

.btn-secondary { background: var(--accent); color: var(--primary); border-color: rgba(31,58,95,0.25); }
.btn-secondary:hover { background: var(--cream); }

/* Links - retro underline feel */
a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
a:hover { color: #264a7a; }

/* -----------------------------
   Feature / Text-Image Sections
----------------------------- */
.text-image-section {
  padding: var(--space-20);
}
.text-image-section > * { flex: 1 1 320px; }
.text-image-section h3 { color: var(--rust); }

/* -----------------------------
   Testimonials (readable on light bg)
----------------------------- */
.testimonial-card {
  background: var(--accent);
  border: 1px solid rgba(31,58,95,0.2);
  box-shadow: 0 4px 10px var(--shadow);
  border-left: 6px solid var(--mustard);
}
.testimonial-card p { color: var(--ink); }
.testimonial-card strong { color: var(--primary); }

/* -----------------------------
   Footer
----------------------------- */
footer { background: #fff; border-top: 3px double rgba(31,58,95,0.15); }
footer .content-wrapper { display: flex; flex-direction: column; gap: var(--space-16); padding: var(--space-20) 0; }
.footer-nav, .legal-nav { display: flex; flex-wrap: wrap; gap: var(--space-12); }
.footer-nav a, .legal-nav a { color: var(--coffee); background: var(--accent); padding: 6px 10px; border-radius: var(--radius-s); border: 1px solid rgba(31,58,95,0.1); }
.footer-nav a:hover, .legal-nav a:hover { background: var(--cream); color: var(--ink); }
.footer-contact p { color: var(--coffee); font-size: 14px; }
.footer-brand p { color: var(--coffee); }

/* -----------------------------
   Privacy notes / small text
----------------------------- */
.privacy-note { font-size: 14px; color: var(--coffee); background: #fff; border-left: 4px solid var(--rust); padding: 10px 12px; border-radius: var(--radius-s); }

/* -----------------------------
   Breadcrumbs in hero
----------------------------- */
nav[aria-label="Brotkrumen"] { display: flex; flex-wrap: wrap; gap: 6px; font-size: 14px; color: var(--coffee); }
nav[aria-label="Brotkrumen"] a { color: var(--secondary); text-decoration: underline; }

/* -----------------------------
   Tables (fallback style if used later)
----------------------------- */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px; border-bottom: 1px solid rgba(0,0,0,0.08); }
th { background: var(--accent); }

/* -----------------------------
   Mobile Navigation Visibility
----------------------------- */
@media (min-width: 992px) {
  .mobile-menu-toggle { display: none; }
  .main-nav { display: flex; }
}

/* -----------------------------
   Responsive Layout Adjustments
----------------------------- */
@media (min-width: 768px) {
  h1 { font-size: 40px; }
  h2 { font-size: 28px; }
  .hero .content-wrapper { padding: var(--space-32) 0; }
  .content-wrapper { gap: var(--space-20); }
  .text-image-section { flex-direction: row; align-items: center; }
  footer .content-wrapper { flex-direction: row; flex-wrap: wrap; justify-content: space-between; }
  .footer-brand { flex: 1 1 260px; }
  .footer-nav { flex: 1 1 320px; }
  .legal-nav { flex: 1 1 320px; }
}

@media (min-width: 1100px) {
  h1 { font-size: 48px; }
}

/* -----------------------------
   Utilities
----------------------------- */
.hide { display: none !important; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }

/* -----------------------------
   Focus & Interaction Polish
----------------------------- */
button:focus, a:focus { box-shadow: 0 0 0 3px rgba(201,162,39,0.35); border-radius: 6px; }

/* -----------------------------
   Cookie Consent Banner & Modal
----------------------------- */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1300;
  display: flex; flex-direction: column; gap: var(--space-12);
  background: #fff;
  border-top: 3px double rgba(31,58,95,0.2);
  box-shadow: 0 -6px 18px rgba(0,0,0,0.12);
  padding: var(--space-16) var(--space-20);
  transform: translateY(100%);
  transition: transform 260ms ease;
}
.cookie-banner.show, .cookie-banner[aria-hidden="false"] { transform: translateY(0); }
.cookie-banner .cookie-text { color: var(--coffee); font-size: 14px; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: var(--space-12); align-items: center; }
.cookie-actions .btn { display: inline-flex; align-items: center; justify-content: center; padding: 10px 14px; border-radius: 999px; font-weight: 700; border: 1px solid transparent; }
.cookie-actions .btn-accept { background: var(--secondary); color: #fff; }
.cookie-actions .btn-accept:hover { background: #2a6f62; }
.cookie-actions .btn-reject { background: var(--accent); color: var(--primary); border-color: rgba(31,58,95,0.2); }
.cookie-actions .btn-reject:hover { background: var(--cream); }
.cookie-actions .btn-settings { background: var(--mustard); color: #1b1b1b; }
.cookie-actions .btn-settings:hover { background: #E0B73A; }

/* Cookie Modal */
.cookie-modal {
  position: fixed; inset: 0; z-index: 1400;
  display: none; /* toggled via .open */
  align-items: center; justify-content: center;
  background: rgba(0,0,0,0.45);
  padding: var(--space-20);
}
.cookie-modal.open { display: flex; }
.cookie-modal .modal-panel {
  background: #fff; width: 100%; max-width: 680px;
  border-radius: var(--radius-l);
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  border: 1px solid rgba(31,58,95,0.2);
  display: flex; flex-direction: column; gap: var(--space-16);
  padding: var(--space-20);
}
.cookie-modal h3 { color: var(--primary); }
.cookie-categories { display: flex; flex-direction: column; gap: var(--space-12); }
.cookie-category { display: flex; flex-wrap: wrap; gap: var(--space-12); align-items: center; justify-content: space-between; border: 1px dashed rgba(31,58,95,0.2); border-radius: var(--radius-s); padding: 10px 12px; }
.cookie-category .label { font-weight: 700; color: var(--ink); }
.cookie-category .desc { font-size: 14px; color: var(--coffee); }

/* Toggle (fake switch) */
.switch { position: relative; width: 44px; height: 24px; border-radius: 999px; background: var(--accent); border: 1px solid rgba(31,58,95,0.25); transition: background var(--transition); }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--primary); transition: transform var(--transition); }
.switch.on { background: #dff3ee; border-color: var(--secondary); }
.switch.on::after { transform: translateX(20px); background: var(--secondary); }

.cookie-modal .modal-actions { display: flex; flex-wrap: wrap; gap: var(--space-12); justify-content: flex-end; }
.cookie-modal .btn-close { background: var(--rust); color: #fff; padding: 8px 12px; border-radius: 8px; }
.cookie-modal .btn-save { background: var(--secondary); color: #fff; padding: 8px 12px; border-radius: 8px; }
.cookie-modal .btn-close:hover { background: #9e5f54; }
.cookie-modal .btn-save:hover { background: #2a6f62; }

/* -----------------------------
   Additional Retro Accents
----------------------------- */
/* Subtle border treatments and headings */
section .content-wrapper > h2 { position: relative; padding-left: 12px; }
section .content-wrapper > h2::before { content: ""; position: absolute; left: 0; top: 7px; width: 6px; height: 18px; background: var(--mustard); border-radius: 2px; }

/* Decorative corner for cards (pseudo, non-content) */
.card::after, .text-image-section::after, .testimonial-card::after {
  content: ""; position: absolute; right: 10px; bottom: 10px; width: 14px; height: 14px;
  border-right: 2px solid rgba(31,58,95,0.25); border-bottom: 2px solid rgba(31,58,95,0.25);
  border-radius: 0 0 4px 0;
}

/* Ensure spacing between stacked sections */
main > section + section { margin-top: var(--space-20); }

/* -----------------------------
   Accessibility: high-contrast in testimonials
----------------------------- */
.testimonial-card, .testimonial-card p, .testimonial-card strong { color: #1d2733; }

/* -----------------------------
   Ensure adequate gaps around groups
----------------------------- */
.content-wrapper > .testimonial-card + .testimonial-card,
.content-wrapper > .text-image-section + .text-image-section { margin-top: var(--space-20); }

/* -----------------------------
   Edge Cases & Misc
----------------------------- */
.hero .cta-group .btn-secondary { background: #fff; }
.hero .language-switcher { margin-top: 6px; }

/* -----------------------------
   Print adjustments (simple)
----------------------------- */
@media print {
  .mobile-menu, .mobile-menu-toggle, .cookie-banner, .cookie-modal { display: none !important; }
  a { text-decoration: underline; }
}
