/* =========================================================
   Wohnkauf Navigator – style.css
   Design style: nature_organic (earth tones, organic shapes, green accents)
   Mobile-first, ONLY Flexbox layouts (no CSS Grid/Columns)
   ========================================================= */

/* -----------------------------
   CSS RESET / NORMALIZE
------------------------------ */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body, h1, h2, h3, h4, h5, h6, p, ul, ol, li, figure, blockquote { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
button { background: none; border: none; padding: 0; cursor: pointer; font: inherit; }
:focus-visible { outline: 3px solid rgba(46, 125, 107, 0.6); outline-offset: 2px; }

/* -----------------------------
   THEME TOKENS (with fallbacks)
------------------------------ */
:root {
  /* Brand */
  --brand-primary: #123A5A; /* deep trust blue */
  --brand-secondary: #2E7D6B; /* natural green */
  --brand-accent: #F5F7FA; /* light accent */

  /* Nature Organic Palette */
  --earth-cream: #FAF9F4; /* soft background */
  --earth-sand: #E6E1D5; /* subtle divider */
  --earth-stone: #C8C1B0; /* muted detail */
  --leaf-olive: #6E8B74; /* secondary accent */
  --leaf-moss: #466A57; /* darker green for hovers */
  --ink: #1E2A24; /* readable dark */
  --ink-soft: #2D3A34;
  --white: #FFFFFF;

  /* Shadows & radius */
  --shadow-soft: 0 6px 18px rgba(18, 58, 90, 0.08);
  --shadow-card: 0 10px 24px rgba(0, 0, 0, 0.08);
  --radius-s: 10px;
  --radius-m: 16px;
  --radius-l: 22px;
  --radius-pill: 999px;

  /* Spacing scale */
  --space-4: 4px;
  --space-8: 8px;
  --space-12: 12px;
  --space-16: 16px;
  --space-20: 20px;
  --space-24: 24px;
  --space-28: 28px;
  --space-32: 32px;
  --space-40: 40px;
  --space-48: 48px;
  --space-60: 60px;
}

/* -----------------------------
   BASE TYPOGRAPHY
------------------------------ */
body {
  font-family: Arial, Helvetica, sans-serif; /* brand body */
  color: var(--ink, #1E2A24);
  background-color: var(--earth-cream, #FAF9F4);
  line-height: 1.6;
}

h1, h2, h3, h4 {
  font-family: Georgia, 'Times New Roman', serif; /* brand display */
  letter-spacing: 0.2px;
  color: var(--ink, #1E2A24);
}

h1 { font-size: 32px; line-height: 1.2; margin-bottom: var(--space-16); }
h2 { font-size: 24px; line-height: 1.3; margin-bottom: var(--space-16); }
h3 { font-size: 18px; line-height: 1.4; margin-bottom: var(--space-12); }

p, li { font-size: 16px; }
strong { color: var(--ink-soft); font-weight: 700; }
em { font-style: italic; }

/* Links */
a { color: var(--brand-secondary); text-underline-offset: 3px; }
a:hover { text-decoration: underline; }
a[aria-disabled="true"] { color: #7c8a83; pointer-events: none; text-decoration: line-through; }

/* Selection */
::selection { background: rgba(46, 125, 107, 0.2); }

/* Utilities */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* -----------------------------
   LAYOUT STRUCTURE (Flex only)
------------------------------ */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-20);
}

.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: var(--space-20);
}

/* 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; }

/* Ensure min gap between components */
section + section { margin-top: var(--space-40); }

/* -----------------------------
   HEADER & NAVIGATION
------------------------------ */
header {
  background: var(--white);
  border-bottom: 1px solid var(--earth-sand);
  position: relative;
  z-index: 50;
}

header .container {
  padding-top: var(--space-12);
  padding-bottom: var(--space-12);
}

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

.tagline {
  font-size: 14px;
  color: #41524a;
}

/* Main navigation (desktop shown later) */
.main-nav {
  display: none; /* hidden on mobile */
  gap: var(--space-16);
  align-items: center;
}
.main-nav a {
  color: var(--ink);
  padding: 10px 12px;
  border-radius: var(--radius-pill);
  transition: background-color .2s ease, color .2s ease, transform .2s ease;
}
.main-nav a:hover { background: var(--brand-accent); }
.main-nav a[aria-current="page"] { color: var(--brand-secondary); font-weight: 700; }

/* Primary CTA in top nav */
.main-nav .cta-primary {
  background: var(--brand-secondary);
  color: var(--white);
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-soft);
}
.main-nav .cta-primary:hover { background: var(--leaf-moss); transform: translateY(-1px); }

/* Mobile menu toggle */
.mobile-menu-toggle {
  margin-left: auto;
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--brand-secondary);
  color: var(--white);
  box-shadow: var(--shadow-soft);
}
.mobile-menu-toggle:hover { background: var(--leaf-moss); }

/* Mobile menu overlay */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: rgba(250, 249, 244, 0.96);
  backdrop-filter: saturate(120%) blur(2px);
  transform: translateX(100%);
  transition: transform .35s ease;
  z-index: 999; /* above all */
  display: flex; /* flex layout */
  flex-direction: column;
  padding: var(--space-20);
}
.mobile-menu.open { transform: translateX(0); }

.mobile-menu-close {
  margin-left: auto;
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--brand-primary);
  color: var(--white);
  box-shadow: var(--shadow-soft);
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
  margin-top: var(--space-20);
}
.mobile-nav a {
  padding: 14px 16px;
  border-radius: var(--radius-m);
  background: var(--white);
  color: var(--ink);
  box-shadow: var(--shadow-soft);
}
.mobile-nav a:hover { background: var(--brand-accent); }
.mobile-nav a[aria-current="page"] { border: 2px solid var(--brand-secondary); padding: 12px 14px; }

/* Header row arrangement */
header .container {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-12);
}
header .logo { order: 1; }
header .tagline { order: 3; width: 100%; }
header .main-nav { order: 4; }
header .mobile-menu-toggle { order: 2; }

/* -----------------------------
   HERO SECTION (organic look)
------------------------------ */
.hero {
  position: relative;
  overflow: hidden;
}
.hero .container { padding-top: var(--space-32); padding-bottom: var(--space-32); }
.hero .content-wrapper {
  background: var(--white);
  border: 1px solid var(--earth-sand);
  border-radius: var(--radius-l);
  padding: var(--space-24);
  box-shadow: var(--shadow-card);
  position: relative;
}
/* Decorative organic shapes (decor only, no content) */
.hero .content-wrapper::before,
.hero .content-wrapper::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: -1;
  border-radius: 50% 40% 60% 50%/55% 45% 55% 45%; /* organic blob */
}
.hero .content-wrapper::before {
  width: 180px; height: 180px;
  background: rgba(46, 125, 107, 0.10);
  top: -40px; left: -40px;
}
.hero .content-wrapper::after {
  width: 240px; height: 240px;
  background: rgba(198, 191, 174, 0.25);
  bottom: -60px; right: -60px;
}

/* Trust bullets & CTA row */
.bullet-trust-points,
.icon-list,
.icon-bullets,
.next-steps-list { display: flex; flex-direction: column; gap: var(--space-12); }
.bullet-trust-points li,
.icon-list li,
.icon-bullets li,
.next-steps-list li { display: flex; align-items: center; gap: var(--space-12); }
.bullet-trust-points img,
.icon-list img,
.icon-bullets img,
.next-steps-list img { width: 22px; height: 22px; }

.cta-row { display: flex; flex-wrap: wrap; gap: var(--space-12); align-items: center; }
.supporting-note { color: #41524a; font-size: 14px; }

/* -----------------------------
   BUTTONS
------------------------------ */
.button, .main-nav .cta-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius-pill);
  padding: 12px 18px;
  font-weight: 700;
  transition: background-color .2s ease, transform .2s ease, box-shadow .2s ease, color .2s ease;
}
.button.primary { background: var(--brand-secondary); color: var(--white); box-shadow: var(--shadow-soft); }
.button.primary:hover { background: var(--leaf-moss); transform: translateY(-1px); }
.button.secondary { background: var(--brand-accent); color: var(--brand-primary); border: 1px solid var(--earth-stone); }
.button.secondary:hover { background: #e9eef5; }
.button:active { transform: translateY(0); }

/* -----------------------------
   GENERIC TEXT SECTIONS & LISTS
------------------------------ */
.text-section { display: flex; flex-direction: column; gap: var(--space-12); }
.text-section ul { display: flex; flex-direction: column; gap: var(--space-8); padding-left: 0; }
.text-section li { display: flex; align-items: center; gap: var(--space-12); }
.text-section img { width: 20px; height: 20px; }

.stats-highlights {
  background: var(--brand-accent);
  border-left: 6px solid var(--brand-secondary);
  padding: var(--space-16);
  border-radius: var(--radius-m);
}

/* Step lists */
.step-overview, .step-nav { display: flex; flex-direction: column; gap: var(--space-8); }
.step-overview li, .step-nav li {
  background: var(--white);
  border: 1px solid var(--earth-sand);
  border-radius: var(--radius-m);
  padding: 12px 14px;
  box-shadow: var(--shadow-soft);
}

/* Accordion (static styling, JS can add .open) */
.accordion-list { display: flex; flex-direction: column; gap: var(--space-12); }
.accordion-list h3 {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--white);
  border: 1px solid var(--earth-sand);
  border-radius: var(--radius-m);
  padding: 12px 14px;
  cursor: pointer;
}
.accordion-list h3::after { content: "▾"; color: var(--leaf-olive); margin-left: 10px; }
.accordion-list h3.open::after { content: "▴"; }
.accordion-list p {
  background: #fff;
  border-left: 3px solid var(--brand-secondary);
  padding: 12px 14px;
  border-radius: 0 var(--radius-m) var(--radius-m) 0;
}

/* Testimonials – high contrast, light background */
.testimonial-card {
  background: var(--white);
  border: 1px solid var(--earth-sand);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-card);
}
.testimonial-card p { color: var(--ink); }
.rating-summary { color: var(--ink-soft); font-weight: 700; }

/* Tables (cookie policy) */
table { width: 100%; border-collapse: collapse; background: var(--white); border: 1px solid var(--earth-sand); border-radius: var(--radius-m); overflow: hidden; }
thead th { text-align: left; background: var(--brand-accent); color: var(--ink); padding: 12px; font-weight: 700; }
tbody td { padding: 12px; border-top: 1px solid var(--earth-sand); }

/* Success message */
.success-message { background: #e6f3ee; color: #1f4338; border: 1px solid #b7d8cc; padding: 12px 14px; border-radius: var(--radius-m); }

/* -----------------------------
   FOOTER
------------------------------ */
footer {
  background: #f3f1ea;
  border-top: 1px solid var(--earth-sand);
  margin-top: var(--space-48);
}
footer .container { padding-top: var(--space-24); padding-bottom: var(--space-24); }
footer .content-wrapper { display: flex; flex-direction: column; gap: var(--space-20); }

.brand-snippet { display: flex; flex-direction: row; gap: var(--space-12); align-items: center; }
.brand-snippet img { width: 40px; height: 40px; }

.footer-nav, .legal-links, .contact-snippet, .social-links {
  display: flex; flex-wrap: wrap; gap: var(--space-12); align-items: center;
}
.footer-nav a, .legal-links a {
  padding: 8px 10px; border-radius: var(--radius-pill);
}
.footer-nav a:hover, .legal-links a:hover { background: var(--brand-accent); }
.social-links a { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: var(--white); box-shadow: var(--shadow-soft); }
.social-links img { width: 18px; height: 18px; }

.newsletter-signup { display: flex; align-items: center; }

/* -----------------------------
   COOKIE CONSENT (banner + modal)
------------------------------ */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0;
  display: flex; flex-direction: column; gap: var(--space-12);
  background: var(--white);
  border-top: 1px solid var(--earth-sand);
  box-shadow: 0 -8px 24px rgba(0,0,0,0.05);
  padding: var(--space-16);
  transform: translateY(100%);
  transition: transform .35s ease;
  z-index: 998;
}
.cookie-banner.show { transform: translateY(0); }
.cookie-banner .cookie-text { color: var(--ink); }
.cookie-banner .cookie-actions { display: flex; flex-wrap: wrap; gap: var(--space-12); }
.cookie-banner .btn-accept { background: var(--brand-secondary); color: var(--white); padding: 10px 16px; border-radius: var(--radius-pill); }
.cookie-banner .btn-accept:hover { background: var(--leaf-moss); }
.cookie-banner .btn-reject { background: var(--brand-accent); color: var(--brand-primary); border: 1px solid var(--earth-stone); padding: 10px 16px; border-radius: var(--radius-pill); }
.cookie-banner .btn-settings { color: var(--brand-secondary); padding: 10px 16px; border-radius: var(--radius-pill); background: transparent; border: 1px dashed var(--earth-stone); }

.cookie-modal {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.35);
  display: none; /* hidden by default */
  align-items: center; justify-content: center;
  padding: var(--space-20);
}
.cookie-modal.open { display: flex; }
.cookie-modal .cookie-modal-content {
  background: var(--white);
  width: 100%; max-width: 720px;
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-card);
  display: flex; flex-direction: column; gap: var(--space-16);
  padding: var(--space-20);
}
.cookie-modal .cookie-header { display: flex; align-items: center; justify-content: space-between; }
.cookie-modal .cookie-body { display: flex; flex-direction: column; gap: var(--space-12); }
.cookie-category { display: flex; align-items: center; justify-content: space-between; gap: var(--space-12); padding: 10px 12px; border: 1px solid var(--earth-sand); border-radius: var(--radius-m); }
.cookie-category .hint { font-size: 14px; color: #51635b; }

/* Toggle switch (for analytics/marketing) */
.toggle { position: relative; width: 46px; height: 26px; border-radius: 20px; background: #cfd6d2; transition: background .2s ease; flex: 0 0 auto; }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; background: #fff; border-radius: 50%; transition: transform .2s ease; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
.toggle.on { background: var(--brand-secondary); }
.toggle.on::after { transform: translateX(20px); }

.cookie-modal .cookie-footer { display: flex; flex-wrap: wrap; gap: var(--space-12); justify-content: flex-end; }
.cookie-modal .btn-save { background: var(--brand-secondary); color: var(--white); padding: 10px 16px; border-radius: var(--radius-pill); }
.cookie-modal .btn-cancel { background: var(--brand-accent); color: var(--brand-primary); padding: 10px 16px; border-radius: var(--radius-pill); border: 1px solid var(--earth-stone); }

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

@media (min-width: 768px) {
  h1 { font-size: 40px; }
  .text-image-section { flex-direction: row; }
  .content-wrapper { gap: var(--space-24); }
  .hero .content-wrapper { padding: var(--space-32); }
}

@media (min-width: 992px) {
  /* Show desktop nav */
  .main-nav { display: flex; margin-left: auto; }
  .mobile-menu-toggle { display: none; }
  header .tagline { order: 2; width: auto; margin-left: var(--space-20); color: #50645b; }
  header .main-nav { order: 3; }

  /* Wider layouts */
  .container { gap: var(--space-24); }
  .content-grid { justify-content: flex-start; }

  /* Lists side-by-side when space allows */
  .icon-list, .icon-bullets, .bullet-trust-points, .next-steps-list { flex-direction: row; flex-wrap: wrap; }
  .icon-list li, .icon-bullets li, .bullet-trust-points li, .next-steps-list li { flex: 1 1 280px; }

  /* Footer side-by-side */
  footer .content-wrapper { flex-direction: row; flex-wrap: wrap; align-items: flex-start; }
  .brand-snippet { flex: 1 1 300px; }
  .footer-nav, .legal-links, .contact-snippet, .newsletter-signup, .social-links { flex: 1 1 220px; }
}

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

/* -----------------------------
   PAGE-SPECIFIC TWEAKS
------------------------------ */
/* Breadcrumbs within hero */
.hero nav[aria-label="Brotkrumen"] p { font-size: 14px; color: #66756e; }
.hero nav[aria-label="Brotkrumen"] a { color: var(--brand-primary); }

/* Ratings and highlights */
.rating-summary { background: var(--brand-accent); padding: 10px 12px; border-radius: var(--radius-pill); display: inline-flex; }

/* Brand snippets text tone */
.brand-snippet p { color: #3f4d47; }

/* Contact snippet rows */
.contact-snippet p { display: flex; align-items: center; gap: 10px; }
.contact-snippet img { width: 18px; height: 18px; }

/* Table typography on Cookie page */
table th, table td { font-size: 16px; }

/* Thank you page list spacing */
.next-steps-list li { background: var(--white); border: 1px solid var(--earth-sand); border-radius: var(--radius-m); padding: 10px 12px; }

/* -----------------------------
   CARDS (generic, reusable)
------------------------------ */
.card {
  background: var(--white);
  border: 1px solid var(--earth-sand);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-card);
  padding: var(--space-20);
}
.card:hover { box-shadow: 0 14px 30px rgba(0,0,0,0.1); }

/* -----------------------------
   VISUAL DETAILS / DIVIDERS
------------------------------ */
hr { border: 0; height: 1px; background: var(--earth-sand); margin: var(--space-24) 0; }

/* -----------------------------
   ACCESSIBILITY EXTRAS
------------------------------ */
[role="button"], .accordion-list h3 { -webkit-tap-highlight-color: rgba(46,125,107,.2); }

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