/* =========================================
   Frostveil Autokontor – style.css
   Vibrant & energetic theme, mobile-first, flex-only
   ========================================= */

/* RESET & 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: #0F2742; background: #F5F7FA; line-height: 1.6; }
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: #E67E22; text-decoration: none; }
a:hover, a:focus { text-decoration: underline; }
ul, ol { padding-left: 20px; margin: 0; }
p { margin: 0; }
button { font-family: inherit; cursor: pointer; border: none; background: transparent; }
:focus-visible { outline: 3px solid #00E5FF; outline-offset: 2px; }

/* THEME VARIABLES (with fallbacks) */
:root {
  --c-primary: #0F2742; /* brand primary */
  --c-secondary: #E67E22; /* brand secondary */
  --c-accent: #F5F7FA; /* brand accent */
  --c-dark: #0A1626;
  --c-white: #FFFFFF;
  /* Vibrant electric accents for energetic vibe */
  --c-electric-1: #00E5FF; /* electric cyan */
  --c-electric-2: #FF2E63; /* neon magenta */
  --c-electric-3: #21E6C1; /* aqua green */
  --shadow-soft: 0 6px 16px rgba(15, 39, 66, 0.12);
  --shadow-strong: 0 10px 28px rgba(15, 39, 66, 0.22);
  --radius-md: 12px;
  --radius-lg: 16px;
}

/* TYPOGRAPHY */
h1, h2, h3 { font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande", Arial, sans-serif; line-height: 1.2; margin: 0; letter-spacing: 0.2px; }
h1 { font-size: 32px; font-weight: 800; }
h2 { font-size: 24px; font-weight: 800; }
h3 { font-size: 18px; font-weight: 700; }
.subheadline { font-size: 16px; opacity: 0.9; margin-top: 10px; }
strong { font-weight: 800; }

/* LAYOUT CONTAINERS – FLEX ONLY */
.container { width: 100%; display: flex; justify-content: center; padding: 0 16px; }
.content-wrapper { width: 100%; max-width: 1200px; display: flex; flex-direction: column; gap: 24px; }

/* Global section spacing (also matches mandatory patterns below) */
section { padding: 40px 0; }
section + section { margin-top: 20px; }

/* 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(--c-white); border-radius: var(--radius-md); box-shadow: var(--shadow-soft); padding: 20px; }
.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: var(--c-white); color: var(--c-primary); box-shadow: var(--shadow-soft); border-left: 6px solid var(--c-secondary); }
.feature-item { display: flex; flex-direction: column; align-items: flex-start; gap: 15px; }

/* HEADER */
header { position: relative; z-index: 20; }
.top-bar { background: var(--c-primary); color: var(--c-white); font-size: 13px; }
.top-bar .content-wrapper { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 14px 24px; padding: 8px 0; }
.top-bar span { display: flex; align-items: center; gap: 8px; opacity: 0.95; }
.top-bar a { color: var(--c-white); text-decoration: none; border-bottom: 1px dotted rgba(255,255,255,0.5); }
.top-bar img { width: 16px; height: 16px; }

/* Branding + Nav Row */
header .container { padding-top: 14px; padding-bottom: 14px; }
header .content-wrapper { flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; }
.brand img { height: 44px; }
.tagline { color: var(--c-primary); font-size: 13px; opacity: 0.8; }

/* Desktop main navigation */
.main-nav { display: none; align-items: center; gap: 10px; flex-wrap: wrap; }
.main-nav a { padding: 10px 14px; border-radius: 999px; font-weight: 700; color: var(--c-primary); background: transparent; transition: all 0.2s ease; }
.main-nav a:hover { background: var(--c-accent); color: var(--c-primary); box-shadow: 0 0 0 2px var(--c-electric-1) inset; }
.main-nav a[aria-current="page"] { color: var(--c-white); background: var(--c-primary); }

/* CTA Buttons */
.btn-primary, .btn-secondary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 12px; padding: 12px 18px; font-weight: 800; letter-spacing: 0.2px; transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease; border: 2px solid transparent; }
.btn-primary { background: var(--c-secondary); color: var(--c-white); box-shadow: 0 6px 14px rgba(230,126,34,0.3); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow-strong); }
.btn-secondary { background: var(--c-white); color: var(--c-primary); border-color: var(--c-electric-1); box-shadow: 0 6px 14px rgba(0,229,255,0.2); }
.btn-secondary:hover { background: var(--c-electric-1); color: var(--c-dark); box-shadow: var(--shadow-strong); }

/* HERO */
.hero { position: relative; background: var(--c-primary); color: var(--c-white); overflow: hidden; }
.hero .content-wrapper { position: relative; z-index: 1; }
.hero .subheadline { color: rgba(255,255,255,0.92); }
.hero .cta-group { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
/* energetic stripes */
.hero::before, .hero::after { content: ""; position: absolute; z-index: 0; pointer-events: none; opacity: 0.18; }
.hero::before { width: 140%; height: 120px; background: var(--c-electric-2); top: 0; left: -20%; transform: skewY(-4deg); }
.hero::after { width: 140%; height: 120px; background: var(--c-electric-1); bottom: -30px; left: -20%; transform: skewY(-6deg); }

/* TRUST BADGES */
.trust-badges { display: flex; flex-wrap: wrap; gap: 10px; }
.trust-badges ul { display: flex; flex-wrap: wrap; gap: 10px; padding-left: 0; list-style: none; margin: 0; }
.trust-badges li { display: inline-flex; align-items: center; padding: 8px 12px; border-radius: 999px; background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.26); font-weight: 700; font-size: 13px; }
.hero .trust-badges li { backdrop-filter: saturate(120%); }

/* Quick contact strip – high energy bar */
.quick-contact-strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; background: var(--c-secondary); color: var(--c-white); border-radius: var(--radius-md); padding: 10px 14px; box-shadow: 0 8px 20px rgba(230,126,34,0.3); }
.quick-contact-strip a { color: var(--c-white); font-weight: 800; }

/* TEXT SECTIONS as cards */
.text-section { background: var(--c-white); border-radius: var(--radius-md); padding: 20px; box-shadow: var(--shadow-soft); border: 1px solid rgba(15,39,66,0.08); }
.text-section h3 { color: var(--c-primary); }
.text-section a { font-weight: 800; }

/* LISTS in content – clearer spacing */
.content-wrapper > ul, .content-wrapper > ol { display: flex; flex-direction: column; gap: 10px; padding-left: 18px; }
.content-wrapper > p { max-width: 70ch; }

/* CTA group in sections */
.cta-group p { margin: 0; }

/* TESTIMONIALS – ensure dark text on light bg */
.testimonial-card p { margin: 0; }
.testimonial-card strong { color: var(--c-primary); }

/* FOOTER */
footer section { background: var(--c-primary); color: var(--c-white); }
footer .content-wrapper { flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: 20px 30px; padding: 24px 0; }
footer nav { display: flex; flex-direction: column; gap: 10px; min-width: 220px; }
footer nav a { color: var(--c-white); opacity: 0.9; font-weight: 700; }
footer nav a:hover { color: var(--c-electric-1); }
footer .text-section { background: rgba(255,255,255,0.06); color: var(--c-white); border: 1px solid rgba(255,255,255,0.12); }

/* MOBILE MENU – burger + overlay */
.mobile-menu-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; font-size: 22px; border-radius: 10px; color: var(--c-white); background: var(--c-secondary); box-shadow: 0 8px 18px rgba(230,126,34,0.35); }
.mobile-menu-toggle:hover { transform: translateY(-1px); }

.mobile-menu { position: fixed; inset: 0; background: rgba(10,22,38,0.9); color: var(--c-white); transform: translateX(100%); transition: transform 0.3s ease; display: flex; flex-direction: column; justify-content: flex-start; align-items: stretch; padding: 16px; gap: 16px; z-index: 999; }
.mobile-menu.open { transform: translateX(0); }
.mobile-menu-close { align-self: flex-end; width: 44px; height: 44px; font-size: 22px; color: var(--c-white); background: rgba(255,255,255,0.08); border-radius: 10px; }
.mobile-nav { display: flex; flex-direction: column; gap: 10px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.18); border-radius: var(--radius-lg); padding: 16px; }
.mobile-nav a { display: flex; align-items: center; padding: 12px 14px; border-radius: 12px; font-weight: 800; color: var(--c-white); background: transparent; }
.mobile-nav a:hover { background: rgba(255,255,255,0.14); color: var(--c-white); }
.mobile-nav a[aria-current="page"] { background: var(--c-secondary); color: var(--c-white); }

/* COOKIE CONSENT BANNER */
.cookie-banner { position: fixed; left: 0; right: 0; bottom: 0; display: none; /* hidden by default */ align-items: center; justify-content: center; padding: 12px 16px; background: var(--c-dark); color: var(--c-white); gap: 12px; z-index: 1000; box-shadow: 0 -10px 30px rgba(0,0,0,0.25); }
.cookie-banner.show { display: flex; }
.cookie-banner .cookie-message { max-width: 900px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.cookie-banner .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-left: auto; }
.cookie-banner .btn-accept { background: var(--c-secondary); color: var(--c-white); padding: 10px 14px; border-radius: 10px; font-weight: 800; }
.cookie-banner .btn-reject { background: rgba(255,255,255,0.1); color: var(--c-white); padding: 10px 14px; border-radius: 10px; font-weight: 800; border: 1px solid rgba(255,255,255,0.25); }
.cookie-banner .btn-settings { background: var(--c-electric-1); color: var(--c-dark); padding: 10px 14px; border-radius: 10px; font-weight: 800; }

/* COOKIE PREFERENCES MODAL */
.cookie-modal { position: fixed; inset: 0; background: rgba(10,22,38,0.7); display: none; align-items: center; justify-content: center; z-index: 1001; }
.cookie-modal.open { display: flex; }
.cookie-modal-content { width: 92%; max-width: 720px; background: var(--c-white); color: var(--c-primary); border-radius: var(--radius-lg); box-shadow: var(--shadow-strong); 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: 10px; padding: 12px; border-radius: 10px; border: 1px solid rgba(15,39,66,0.1); background: #fff; }
.cookie-option .label { display: flex; flex-direction: column; gap: 4px; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }

/* Simple toggle style for modal options (input[type=checkbox]) */
.toggle { position: relative; width: 48px; height: 28px; background: #d6dde6; border-radius: 20px; transition: background 0.2s ease; display: inline-flex; align-items: center; padding: 3px; }
.toggle::after { content: ""; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,0.15); transform: translateX(0); transition: transform 0.2s ease; }
.toggle.active { background: var(--c-electric-1); }
.toggle.active::after { transform: translateX(20px); }

/* CARDS & CONTENT PRESENTATION */
.content-wrapper > h2, .content-wrapper > h1 { width: 100%; }
/* Make multiple .text-section items flow responsively using flex-wrap */
.content-wrapper { flex-wrap: wrap; }
.content-wrapper > .text-section { flex: 1 1 100%; min-width: 260px; }

/* Lists inside .text-section for better rhythm */
.text-section ul, .text-section ol { display: flex; flex-direction: column; gap: 8px; }

/* LINKS general */
a.btn-primary, a.btn-secondary { text-decoration: none; }

/* UTILITIES */
.hidden { display: none !important; }
.center { display: flex; justify-content: center; align-items: center; }

/* RESPONSIVE */
@media (min-width: 480px) {
  h1 { font-size: 36px; }
  h2 { font-size: 26px; }
  h3 { font-size: 19px; }
}

@media (min-width: 768px) {
  h1 { font-size: 42px; }
  h2 { font-size: 28px; }
  .subheadline { font-size: 18px; }

  .text-image-section { flex-direction: row; }

  /* Flow text cards in 2 columns via flex-basis */
  .content-wrapper > .text-section { flex: 1 1 calc(50% - 12px); }

  /* Hero CTA a bit larger */
  .hero .cta-group .btn-primary, .hero .cta-group .btn-secondary { padding: 14px 20px; }
}

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

  /* Allow 3-up where appropriate */
  .content-wrapper > .text-section { flex: 1 1 calc(33.33% - 14px); }
}

/* ACCESSIBLE CONTRAST FOR TESTIMONIAL/REVIEW SECTIONS */
section:has(.testimonial-card) { background: #f9fbff; }

/* INDEX / COMMON SECTION VARIATION BACKGROUNDS */
section:nth-of-type(even):not(.hero) { background: #ffffff; }

/* ICON SIZING WITHIN LINKS OR LISTS */
li img, a img { width: 18px; height: 18px; }

/* VISUAL MICRO-INTERACTIONS */
.text-section:hover { box-shadow: 0 12px 26px rgba(15, 39, 66, 0.18); transform: translateY(-2px); transition: box-shadow 0.2s ease, transform 0.2s ease; }

/* ACCESSIBILITY STATES */
.btn-primary:focus-visible, .btn-secondary:focus-visible, .mobile-menu-toggle:focus-visible, .mobile-menu-close:focus-visible { box-shadow: 0 0 0 3px var(--c-electric-1); }

/* LINKS IN HERO */
.hero a { color: #fff; text-decoration: underline; }
.hero a.btn-secondary { text-decoration: none; }

/* PRICE, LIST, FAQ clarity */
.content-wrapper ol { display: flex; flex-direction: column; gap: 10px; padding-left: 22px; }

/* ADDRESS formatting */
address { font-style: normal; }

/* Ensure adequate spacing between all content elements */
.content-wrapper > * + * { margin-top: 0; }

/* -----------------------------
   ENSURE FLEX-ONLY FOR COMMON LAYOUTS
   ----------------------------- */
nav[aria-label], .cta-group, .trust-badges, footer nav { display: flex; }

/* -----------------------------
   BRANDED BADGES for metrics (Zahlen & Fakten)
   ----------------------------- */
.content-wrapper > ul li { position: relative; }
.content-wrapper > ul li::marker { color: var(--c-secondary); }

/* HEADER NAV BUTTON VARIANTS (within .main-nav) */
.main-nav .btn-primary, .main-nav .btn-secondary { padding: 10px 14px; }

/* Ensure no overlap with decorative hero stripes */
.hero .container { position: relative; z-index: 1; }

/* TABLE-LIKE content (if any appears) – keep flex only */
.content-grid > * { flex: 1 1 calc(33.33% - 14px); min-width: 240px; }

/* ARIA current page highlight within footer as well */
footer a[aria-current="page"] { text-decoration: underline; text-underline-offset: 4px; }

/* Sitemap clarity */
main a { transition: color 0.15s ease, background 0.15s ease; }
main a:hover { color: var(--c-electric-2); }

/* Year element styling */
#year { font-weight: 800; }

/* BUTTON STATES */
.btn-primary:active, .btn-secondary:active { transform: translateY(0); }

/* Make sure minimum 20px between cards */
.card, .text-section, .testimonial-card { margin-bottom: 20px; }

/* Align text-image section elements vertically centered */
.text-image-section > * { flex: 1 1 300px; }

/* High-visibility chips for tags in Fahrzeugangebot */
.text-section p:has(> a) { margin-top: 10px; }

/* Ensure mobile-first column stacking for text-image sections */
@media (max-width: 768px) {
  .text-image-section { flex-direction: column; align-items: center; }
}

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