/* =======================================================
   KaufKompass Deutschland – tech_futuristic style.css
   Mobile-first, flexbox-only, brand-compliant, accessible
   ======================================================= */

/* ------------------------------
   0) Reset & Base Normalization
   ------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: Verdana, Arial, sans-serif; line-height: 1.6; color: #E6EEF7; background-color: #0B1D31; }
img, svg { max-width: 100%; height: auto; display: block; }
input, button, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding-left: 1.25rem; }
h1, h2, h3, h4, h5, h6, p { margin: 0; }
button { background: none; border: none; padding: 0; cursor: pointer; color: inherit; }
:focus { outline: none; }
:focus-visible { outline: 3px solid #D4A857; outline-offset: 2px; }

/* ------------------------------
   1) Design Tokens (CSS Variables)
   ------------------------------ */
:root {
  --primary: #0F2A43; /* Navy */
  --secondary: #D4A857; /* Gold */
  --accent: #FFFFFF; /* Light */
  --bg: #0B1D31; /* Deep Night */
  --bg-elev: #0E1F33; /* Elevated panels */
  --text: #E6EEF7; /* Body text */
  --muted: #A9B7C6; /* Muted text */
  --light: #F5F7FA; /* Light surfaces */
  --border: rgba(212, 168, 87, 0.35); /* Gold tint */
  --shadow: 0 8px 24px rgba(3, 10, 22, 0.5);
  --radius-s: 8px; --radius-m: 12px; --radius-l: 16px;
  --transition: 200ms ease;
}

/* ------------------------------
   2) Layout Primitives (Flexbox only)
   ------------------------------ */
.container {
  width: 100%; display: flex; flex-direction: column; align-items: stretch; justify-content: center;
}
.content-wrapper {
  width: 100%; max-width: 1200px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; padding: 0 20px;
}
main { display: flex; flex-direction: column; gap: 40px; }
section { padding: 40px 0; }

/* 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(--bg-elev); border: 1px solid rgba(255,255,255,0.06); border-radius: var(--radius-m); box-shadow: var(--shadow); padding: 20px; transition: transform var(--transition), box-shadow var(--transition); }
.card:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0,0,0,0.6), 0 0 0 1px var(--border); }
.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(--light); color: var(--primary); border: 1px solid rgba(15,42,67,0.15); border-radius: var(--radius-m); box-shadow: 0 6px 18px rgba(15,42,67,0.12); }
.feature-item { display: flex; flex-direction: column; align-items: flex-start; gap: 15px; }

/* ------------------------------
   3) Typography (Brand fonts)
   ------------------------------ */
.display, h1, h2, h3, h4 { font-family: Georgia, 'Times New Roman', serif; letter-spacing: 0.02em; }
h1 { font-size: 40px; line-height: 1.15; }
h2 { font-size: 28px; line-height: 1.25; margin-bottom: 8px; }
h3 { font-size: 20px; line-height: 1.3; color: var(--accent); }
body, p, li { font-size: 16px; }
.subhead { color: var(--muted); font-size: 18px; }
small, .small { font-size: 14px; color: var(--muted); }

/* ------------------------------
   4) Futuristic Surface & Section Styles
   ------------------------------ */
body { background-color: var(--bg); background-image: linear-gradient(180deg, rgba(15,42,67,0.5) 0%, rgba(11,29,49,0.0) 100%); }
.hero { background-color: var(--primary); background-image: linear-gradient(180deg, #0F2A43 0%, #0B1D31 100%); color: var(--accent); padding: 80px 0 60px; position: relative; }
.hero .content-wrapper { align-items: flex-start; }
.hero h1 { text-shadow: 0 0 24px rgba(212, 168, 87, 0.15); }

/* trust badges as tech chips */
.trust-badges { display: flex; flex-wrap: wrap; gap: 10px; color: var(--muted); }
.trust-badges span { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 999px; background: rgba(255,255,255,0.02); }

/* ------------------------------
   5) Header & Navigation
   ------------------------------ */
header { position: sticky; top: 0; z-index: 1000; background: rgba(11,29,49,0.85); backdrop-filter: saturate(160%) blur(6px); border-bottom: 1px solid rgba(255,255,255,0.06); }
header .content-wrapper { flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; padding-top: 12px; padding-bottom: 12px; }
.logo img { height: 42px; width: auto; }
.main-nav { display: none; gap: 16px; align-items: center; }
.main-nav a { padding: 10px 12px; border-radius: var(--radius-s); color: var(--accent); opacity: 0.9; transition: background var(--transition), color var(--transition), opacity var(--transition); }
.main-nav a:hover { background: rgba(212,168,87,0.12); color: var(--accent); opacity: 1; }
.main-nav a[aria-current="page"], .main-nav a[aria-current] { background: rgba(212,168,87,0.2); border: 1px solid var(--border); }
.header-ctas { display: none; gap: 12px; align-items: center; }

/* Mobile toggle */
.mobile-menu-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 8px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); transition: background var(--transition), transform var(--transition); }
.mobile-menu-toggle:hover { background: rgba(255,255,255,0.12); transform: translateY(-1px); }

/* Mobile menu overlay & panel */
.mobile-menu { position: fixed; inset: 0; display: flex; align-items: stretch; justify-content: flex-end; background: rgba(5,12,22,0.5); backdrop-filter: blur(2px); z-index: 2000; transform: translateX(0); opacity: 0; pointer-events: none; transition: opacity var(--transition); }
.mobile-menu .mobile-nav { display: flex; flex-direction: column; gap: 8px; width: 82%; max-width: 340px; background: #0E1F33; border-left: 1px solid rgba(255,255,255,0.08); box-shadow: var(--shadow); padding: 20px; transform: translateX(100%); transition: transform 260ms ease; }
.mobile-menu .mobile-nav a { padding: 12px 10px; border-radius: 8px; color: var(--accent); border: 1px solid transparent; }
.mobile-menu .mobile-nav a:hover { background: rgba(212,168,87,0.12); border-color: var(--border); }
.mobile-menu .mobile-nav a[aria-current], .mobile-menu .mobile-nav a[aria-current="page"] { border-color: var(--border); background: rgba(212,168,87,0.2); }
.mobile-menu-close { position: relative; align-self: flex-start; margin: 14px; width: 40px; height: 40px; border-radius: 8px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); }
/* Open states supported via multiple selectors for JS compatibility */
.mobile-menu.open, .mobile-menu.active, body.menu-open .mobile-menu, .mobile-menu[aria-hidden="false"] { opacity: 1; pointer-events: auto; }
.mobile-menu.open .mobile-nav, .mobile-menu.active .mobile-nav, body.menu-open .mobile-menu .mobile-nav, .mobile-menu[aria-hidden="false"] .mobile-nav { transform: translateX(0); }

/* Desktop nav */
@media (min-width: 992px) {
  .main-nav { display: flex; }
  .header-ctas { display: flex; }
  .mobile-menu-toggle, .mobile-menu { display: none; }
}

/* ------------------------------
   6) Buttons & Links (Micro-interactions)
   ------------------------------ */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 12px 18px; border-radius: 12px; border: 1px solid transparent; font-weight: 600; transition: background var(--transition), color var(--transition), box-shadow var(--transition), transform var(--transition), border-color var(--transition); text-align: center; }
.btn.primary { background: var(--secondary); color: var(--primary); box-shadow: 0 6px 18px rgba(212,168,87,0.35); }
.btn.primary:hover { background: #E6B96B; box-shadow: 0 8px 22px rgba(212,168,87,0.45); transform: translateY(-1px); }
.btn.secondary { background: transparent; color: var(--accent); border-color: var(--secondary); box-shadow: inset 0 0 0 1px var(--secondary); }
.btn.secondary:hover { background: rgba(212,168,87,0.15); }
.btn:active { transform: translateY(0); }

/* Links */
a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ------------------------------
   7) Lists, Steps & Content Blocks
   ------------------------------ */
.text-section { display: flex; flex-direction: column; gap: 10px; padding: 12px 0; }
.text-section h3 { color: var(--accent); }

.supporting-points, .content-wrapper > ul { display: flex; flex-direction: column; gap: 8px; color: var(--text); }
.supporting-points li, .content-wrapper > ul li { padding-left: 10px; }

.step-list { list-style: none; counter-reset: steps; display: flex; flex-direction: column; gap: 12px; padding: 0; }
.step-list li { counter-increment: steps; display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border: 1px solid rgba(255,255,255,0.08); background: rgba(255,255,255,0.03); border-radius: 10px; }
.step-list li::before { content: counter(steps); flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--secondary); color: var(--primary); font-weight: 700; }

/* ------------------------------
   8) Utility & Helper Layouts
   ------------------------------ */
.cta-group { display: flex; flex-wrap: wrap; gap: 12px; }
.text-image-section img { border-radius: var(--radius-m); }

/* ------------------------------
   9) Cards & Testimonials (Light for readability)
   ------------------------------ */
.testimonial-card p { color: var(--primary); }
.testimonial-card strong { color: #0B1D31; }
.testimonial-card a { color: #0B1D31; }

/* ------------------------------
   10) Footer
   ------------------------------ */
footer { background: #071121; color: var(--text); border-top: 1px solid rgba(255,255,255,0.06); }
footer section { padding: 40px 0; }
footer .content-wrapper { gap: 24px; }
footer .text-section { gap: 10px; }
footer a { color: var(--accent); }
footer a:hover { color: #E6B96B; }

/* ------------------------------
   11) Tables (basic, if any appear)
   ------------------------------ */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,0.08); }
th { text-align: left; color: var(--accent); }

/* ------------------------------
   12) Cookies UI (Banner & Modal)
   ------------------------------ */
.cookie-banner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10000; display: flex; justify-content: center; padding: 14px; }
.cookie-banner .inner { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 1200px; background: #0E1F33; color: var(--text); border: 1px solid rgba(255,255,255,0.1); border-radius: 14px; box-shadow: var(--shadow); padding: 16px; }
.cookie-banner .buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-banner .btn { padding: 10px 14px; }
.cookie-banner .btn.reject { background: transparent; color: var(--accent); border-color: rgba(255,255,255,0.2); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.2); }
.cookie-banner .btn.settings { background: rgba(212,168,87,0.12); color: var(--accent); border-color: var(--secondary); }

.cookie-modal { position: fixed; inset: 0; z-index: 10001; display: none; align-items: center; justify-content: center; background: rgba(5,12,22,0.6); backdrop-filter: blur(2px); padding: 20px; }
.cookie-modal.open { display: flex; }
.cookie-modal .modal { display: flex; flex-direction: column; gap: 16px; width: 100%; max-width: 720px; background: #0E1F33; color: var(--text); border: 1px solid rgba(255,255,255,0.12); border-radius: 16px; box-shadow: var(--shadow); padding: 20px; }
.cookie-modal .modal-header { display: flex; align-items: center; justify-content: space-between; }
.cookie-options { display: flex; flex-direction: column; gap: 12px; }
.cookie-option { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px; border: 1px solid rgba(255,255,255,0.08); border-radius: 10px; }
.cookie-option .meta { display: flex; flex-direction: column; gap: 4px; }

/* toggle switch */
.switch { position: relative; width: 44px; height: 26px; flex: 0 0 auto; border-radius: 999px; background: rgba(255,255,255,0.2); transition: background var(--transition); display: flex; align-items: center; padding: 0 3px; }
.switch .knob { width: 20px; height: 20px; border-radius: 50%; background: var(--accent); transition: transform var(--transition); }
.switch.on { background: var(--secondary); }
.switch.on .knob { transform: translateX(16px); }

/* ------------------------------
   13) Responsive Adjustments
   ------------------------------ */
@media (min-width: 640px) {
  h1 { font-size: 44px; }
}
@media (min-width: 768px) {
  h1 { font-size: 48px; }
  .text-image-section { flex-direction: row; }
}
@media (min-width: 992px) {
  .content-wrapper { flex-direction: row; }
  /* Header row already set; for content sections we keep column by default; adjust where needed */
  main > section .content-wrapper { flex-direction: column; }
  footer .content-wrapper { flex-direction: row; flex-wrap: wrap; justify-content: space-between; }
  footer .text-section { flex: 1 1 220px; }
}
@media (min-width: 1200px) {
  h1 { font-size: 56px; }
  h2 { font-size: 32px; }
}

/* ------------------------------
   14) Accessibility & Motion
   ------------------------------ */
@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ------------------------------
   15) Page-Specific Polishing
   ------------------------------ */
/* Breadcrumbs */
nav[aria-label="Brotkrumen"] { color: var(--muted); display: flex; gap: 6px; font-size: 14px; }
nav[aria-label="Brotkrumen"] a { color: var(--accent); opacity: 0.85; }
nav[aria-label="Brotkrumen"] a:hover { opacity: 1; }

/* Contact info rows */
.content-wrapper p img[alt="Telefon"],
.content-wrapper p img[alt="E-Mail"],
.content-wrapper p img[alt="Adresse"] { display: inline-flex; width: 18px; height: 18px; vertical-align: text-bottom; margin-right: 6px; }

/* Lists in footer and legal pages */
footer ul { list-style: none; padding-left: 0; display: flex; flex-direction: column; gap: 8px; }

/* Quote styling inside testimonials */
.testimonial-card p:first-child { font-style: italic; }

/* ------------------------------
   16) Ensuring adequate spacing between blocks
   ------------------------------ */
.content-wrapper > * + * { margin-top: 8px; }
main section + section { margin-top: 12px; }

/* ------------------------------
   17) High-contrast in testimonial & review sections
   ------------------------------ */
/* Already using light background and dark text. Emphasize any ratings text nearby */
.content-wrapper p:has(strong), .content-wrapper p:has(\u00D8), .content-wrapper p:has(4,9) { color: var(--accent); }

/* ------------------------------
   18) Additional UI flourishes in tech_futuristic spirit (subtle)
   ------------------------------ */
.card::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(212,168,87,0.18), 0 0 24px rgba(212,168,87,0.06); }
.hero::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: linear-gradient(90deg, rgba(212,168,87,0) 0%, rgba(212,168,87,0.7) 50%, rgba(212,168,87,0) 100%); }

/* ------------------------------
   19) Hide overflow glitches on iOS during menu open
   ------------------------------ */
body.menu-open { overflow: hidden; }

/* ------------------------------
   20) Forms (future use)
   ------------------------------ */
input[type="text"], input[type="email"], input[type="tel"], textarea { width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.04); color: var(--accent); transition: border-color var(--transition), box-shadow var(--transition); }
input:focus, textarea:focus { border-color: var(--secondary); box-shadow: 0 0 0 3px rgba(212,168,87,0.2); }
label { display: block; margin-bottom: 6px; color: var(--accent); font-weight: 600; }

/* ------------------------------
   21) ARIA current for footer and mobile
   ------------------------------ */
footer a[aria-current], footer a[aria-current="page"], .mobile-nav a[aria-current], .mobile-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 3px; }

/* ------------------------------
   22) Ensure minimum gaps between content blocks
   ------------------------------ */
.content-wrapper > .testimonial-card { margin-top: 10px; }
.card-container > * { flex: 1 1 260px; }
.content-grid > * { flex: 1 1 300px; }

/* ------------------------------
   23) Images in content
   ------------------------------ */
.content-wrapper img { border-radius: 10px; }

/* ------------------------------
   24) Accessibility tweaks for buttons in header/footer
   ------------------------------ */
.header-ctas .btn { white-space: nowrap; }

/* End of stylesheet */
