/* ========================
   MainMobil Fahrzeugsuche – style.css
   Warm & friendly theme using only Flexbox
   ======================== */

/* ---------- CSS Reset & Base Normalize ---------- */
* { box-sizing: border-box; }
html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: Verdana, Geneva, Tahoma, sans-serif; color: #2B2B2B; background: #FFFDF9; line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; border-radius: 12px; }
figure { margin: 0; }
ul, ol { padding-left: 1.2rem; }
a { color: #0D3B66; text-decoration: underline; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid #F4A261; outline-offset: 2px; border-radius: 8px; }

/* ---------- Theme Variables ---------- */
:root {
  --c-primary: #0D3B66; /* brand primary */
  --c-secondary: #2A9D8F; /* brand secondary (used sparingly) */
  --c-accent: #F5F7FA; /* brand accent */
  --c-warm-50: #FFF7F0; /* warm soft background */
  --c-warm-100: #FFECD9; /* warm card bg */
  --c-warm-200: #FFDAB8; /* warm highlight */
  --c-ink: #2B2B2B;      /* body text */
  --c-muted: #6B7280;    /* muted text */
  --c-border: #E5E7EB;   /* borders */
  --radius-s: 8px;
  --radius-m: 12px;
  --radius-l: 16px;
  --shadow-s: 0 2px 8px rgba(13, 59, 102, 0.08);
  --shadow-m: 0 10px 24px rgba(13, 59, 102, 0.12);
}

/* ---------- Typography ---------- */
h1, h2, h3 { font-family: "Trebuchet MS", Verdana, Geneva, sans-serif; color: #0D3B66; line-height: 1.25; margin: 0 0 12px; }
h1 { font-size: 32px; }
h2 { font-size: 24px; }
h3 { font-size: 18px; }
p { margin: 0 0 12px; }
small { color: var(--c-muted); }
.eyebrow { color: #8C4A1F; letter-spacing: .04em; text-transform: uppercase; font-size: 12px; font-weight: 700; margin-bottom: 8px; }

/* ---------- Layout Utilities (Flex-only) ---------- */
.container { max-width: 1200px; padding: 0 20px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.content-wrapper { display: flex; flex-direction: column; gap: 16px; }
.cta-group { display: flex; flex-wrap: wrap; gap: 12px; }

/* Mandatory spacing and alignment 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; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 18px; border-radius: var(--radius-m); border: 1px solid transparent; text-decoration: none; font-weight: 700; cursor: pointer; transition: background-color .25s ease, color .25s ease, border-color .25s ease, transform .06s ease; box-shadow: var(--shadow-s); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--c-primary); color: #FFFFFF; border-color: rgba(13,59,102,0.1); }
.btn-primary:hover { background: #0B3358; }
.btn-secondary { background: var(--c-warm-200); color: #3A2A1A; border-color: #F0C08D; }
.btn-secondary:hover { background: #F8C893; }
.btn-outline { background: transparent; color: var(--c-primary); border-color: var(--c-primary); }
.btn-outline:hover { background: rgba(13,59,102,0.06); }

/* ---------- Header & Navigation ---------- */
header { background: #FFFFFF; box-shadow: 0 2px 10px rgba(13,59,102,0.08); position: sticky; top: 0; z-index: 50; }
header .container { flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; padding-top: 10px; padding-bottom: 10px; }
.logo { display: inline-flex; align-items: center; }
.logo img { height: 40px; width: auto; border-radius: 0; box-shadow: none; }

.main-nav { display: none; align-items: center; gap: 14px; }
.main-nav a { text-decoration: none; color: var(--c-primary); padding: 8px 10px; border-radius: var(--radius-s); transition: background-color .2s ease, color .2s ease; }
.main-nav a[aria-current="page"], .main-nav a:hover { background: var(--c-warm-50); }

.header-cta { display: none; align-items: center; gap: 10px; }

/* Mobile menu toggle */
.mobile-menu-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid var(--c-border); border-radius: 10px; background: #FFF; box-shadow: var(--shadow-s); cursor: pointer; font-size: 22px; color: var(--c-primary); }
.mobile-menu-toggle:hover { background: var(--c-warm-50); }

/* Mobile menu overlay */
.mobile-menu { position: fixed; inset: 0 0 0 auto; width: 100%; height: 100%; background: rgba(0,0,0,0.3); display: flex; flex-direction: row; justify-content: flex-end; transform: translateX(100%); transition: transform .35s ease; z-index: 100; }
.mobile-menu.open { transform: translateX(0); }
.mobile-menu > .mobile-nav { background: #FFFFFF; width: 86%; max-width: 360px; height: 100%; display: flex; flex-direction: column; gap: 8px; padding: 20px; box-shadow: var(--shadow-m); border-top-left-radius: 16px; border-bottom-left-radius: 16px; overflow-y: auto; }
.mobile-menu-close { align-self: flex-end; margin: 12px 16px 4px; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--c-border); background: #FFF; box-shadow: var(--shadow-s); cursor: pointer; font-size: 18px; color: var(--c-primary); }
.mobile-nav a { display: flex; align-items: center; padding: 12px 10px; border-radius: 10px; color: var(--c-primary); text-decoration: none; font-weight: 600; }
.mobile-nav a:hover { background: var(--c-warm-50); }

/* ---------- Sections ---------- */
main section { padding: 28px 0; background: transparent; }
main section:nth-of-type(odd) { background: #FFFFFF; }
main section:nth-of-type(even) { background: var(--c-warm-50); }

/* hero spacing */
[aria-labelledby="hero"], [aria-labelledby="hero-title"] { padding-top: 40px; padding-bottom: 40px; }

/* Text + Image sections */
.text-image-section > div { flex: 1 1 280px; }
.text-image-section img { width: 100%; box-shadow: var(--shadow-s); border-radius: var(--radius-m); }

/* Content grid & cards (flex only) */
.card { background: #FFFFFF; border: 1px solid var(--c-border); border-radius: var(--radius-l); box-shadow: var(--shadow-s); padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.card h3 { margin-bottom: 4px; }
.card-container .card { flex: 1 1 280px; }
.content-grid > * { flex: 1 1 260px; }

/* Feature item */
.feature-item { background: #FFFFFF; border: 1px solid var(--c-border); border-radius: var(--radius-m); padding: 16px; box-shadow: var(--shadow-s); }

/* Testimonial cards (light bg, dark text for contrast) */
.testimonial-card { background: #FFF6EB; border: 1px solid #F5D7B8; border-radius: var(--radius-l); box-shadow: var(--shadow-s); color: #2E2A23; }
.testimonial-card p { margin: 0; }
.testimonial-card p + p { color: #4B4B4B; }

/* Lists inside content areas */
.content-wrapper ul { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.content-wrapper ol { display: flex; flex-direction: column; gap: 8px; margin: 0; }

/* Details/FAQ */
details { background: #FFFFFF; border: 1px solid var(--c-border); border-radius: var(--radius-m); padding: 10px 14px; box-shadow: var(--shadow-s); }
summary { cursor: pointer; color: var(--c-primary); font-weight: 700; list-style: none; }
details[open] { background: var(--c-warm-50); }
details p { margin-top: 8px; }

/* Links inside content */
.content-wrapper a.btn { text-decoration: none; }

/* ---------- Footer ---------- */
footer { background: #0D3B66; color: #FFFFFF; padding: 24px 0; }
footer .container { gap: 20px; }
footer .content-wrapper { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
footer .content-wrapper > * { flex: 1 1 240px; }
footer nav { display: flex; flex-direction: column; gap: 6px; }
footer a { color: #FFFFFF; text-decoration: none; }
footer a:hover { text-decoration: underline; }
footer img { background: #FFFFFF; padding: 8px; border-radius: 10px; box-shadow: var(--shadow-s); }

/* ---------- Cookie Consent Banner & Modal ---------- */
.cookie-banner { position: fixed; left: 12px; right: 12px; bottom: 12px; background: #FFFFFF; border: 1px solid var(--c-border); border-radius: 14px; box-shadow: var(--shadow-m); padding: 14px; display: flex; flex-direction: column; gap: 12px; z-index: 200; transform: translateY(120%); opacity: 0; transition: transform .35s ease, opacity .35s ease; }
.cookie-banner.show { transform: translateY(0); opacity: 1; }
.cookie-banner .cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-banner .btn-accept { background: var(--c-primary); color: #FFF; border-color: rgba(13,59,102,0.1); }
.cookie-banner .btn-reject { background: #FFFFFF; color: var(--c-primary); border-color: var(--c-primary); }
.cookie-banner .btn-settings { background: var(--c-warm-200); color: #3A2A1A; border-color: #F0C08D; }

.cookie-modal { position: fixed; inset: 0; background: rgba(0,0,0,0.4); display: flex; align-items: center; justify-content: center; padding: 20px; opacity: 0; pointer-events: none; transition: opacity .3s ease; z-index: 300; }
.cookie-modal.show { opacity: 1; pointer-events: auto; }
.cookie-modal .cookie-modal-content { background: #FFFFFF; width: 100%; max-width: 720px; border-radius: 16px; border: 1px solid var(--c-border); box-shadow: var(--shadow-m); display: flex; flex-direction: column; gap: 14px; padding: 18px; }
.cookie-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--c-border); border-radius: 12px; padding: 12px; }
.cookie-row .cookie-toggle { display: inline-flex; align-items: center; gap: 8px; }
.cookie-modal .actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }

/* ---------- Helpers ---------- */
.hr { height: 1px; background: var(--c-border); border: 0; }
.muted { color: var(--c-muted); }

/* ---------- Responsive (Mobile-first) ---------- */
@media (min-width: 480px) {
  h1 { font-size: 36px; }
  h2 { font-size: 26px; }
}

@media (min-width: 768px) {
  h1 { font-size: 40px; }
  h2 { font-size: 28px; }
  .text-image-section { flex-direction: row; }
  .content-wrapper { gap: 20px; }
  main section { padding: 40px 0; }
}

@media (min-width: 992px) {
  .main-nav { display: flex; }
  .header-cta { display: flex; }
  .mobile-menu-toggle { display: none; }
  header .container { padding-top: 14px; padding-bottom: 14px; }
  .container { gap: 24px; }
  .cta-group { gap: 14px; }
}

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

/* ---------- Page-specific small touches ---------- */
/* Index hero headline spacing */
#hero-title { margin-bottom: 8px; }

/* Price lists emphasis */
[aria-labelledby="preise"] strong { color: #8C4A1F; }

/* Footer copyright row */
footer .content-wrapper:last-child { border-top: 1px solid rgba(255,255,255,0.15); padding-top: 12px; margin-top: 6px; justify-content: center; }

/* ---------- Ensure minimum spacing between blocks ---------- */
.content-wrapper > * + * { margin-top: 4px; }
.container > * + * { margin-top: 0; }

/* ---------- Ensure adequate spacing for cards & sections ---------- */
main .container + .container { margin-top: 20px; }
section + section { margin-top: 20px; }

/* ---------- Strictly Flex for layout containers ---------- */
/* Already enforced on: header .container, .container, .content-wrapper, .cta-group, .card-container, .content-grid, .text-image-section, .testimonial-card, footer .content-wrapper, nav groups, cookie elements */

/* ---------- Dark text on testimonials & review sections ---------- */
[aria-labelledby="kundenstimmen"], [aria-labelledby="bewertungen"], [aria-labelledby="stimmen"] { color: var(--c-ink); }
[aria-labelledby="kundenstimmen"] .testimonial-card, [aria-labelledby="bewertungen"] .testimonial-card, [aria-labelledby="stimmen"] .testimonial-card { background: #FFF6EB; color: #2E2A23; }

/* ---------- Link & interactive micro-interactions ---------- */
a, .btn, summary, .mobile-menu-toggle, .mobile-menu-close { transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .06s ease; }

/* ---------- Prevent overlaps and maintain stacking ---------- */
header, .mobile-menu, .cookie-banner, .cookie-modal { z-index: 10; }
.mobile-menu { z-index: 100; }
.cookie-banner { z-index: 200; }
.cookie-modal { z-index: 300; }

/* ---------- Branding-friendly subtle accents in lists ---------- */
.content-wrapper li::marker { color: #8C4A1F; }

/* ---------- Additional Classes (not in HTML but ready for reuse) ---------- */
.badge { display: inline-flex; align-items: center; padding: 4px 8px; background: var(--c-warm-100); color: #3A2A1A; border-radius: 999px; border: 1px solid #F0C08D; font-size: 12px; font-weight: 700; }

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

/* ---------- End of file ---------- */
