/* =====================================================================
   LumenWelle Ernährung – style.css
   Design: geometric_structured (geometric shapes, structured, precise)
   Brand: #1E5F4A (primary), #2F6D1E (secondary), #FAFDFB (accent)
   Fonts: Trebuchet MS (display), Verdana (body)
   Layout: Mobile-first, ONLY Flexbox (no CSS Grid/Columns)
   ===================================================================== */

/* ----------------------------
   0) CSS Reset / Normalize
   ---------------------------- */
* { box-sizing: border-box; }
html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; line-height: 1.5; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; color: #0F2A22; background-color: #FFFFFF; }
img, picture, video, canvas, svg { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0 0 16px 24px; padding: 0; }

/* ----------------------------
   1) Root Variables & Typography
   ---------------------------- */
:root {
  --primary: #1E5F4A;
  --primary-900: #0D3D30;
  --primary-800: #154C3A;
  --secondary: #2F6D1E;
  --accent: #FAFDFB;
  --ink: #0F2A22;
  --ink-70: rgba(15,42,34,0.7);
  --muted: #6A7D74;
  --line: #D6E8E0;
  --surface: #F2F7F4;
  --warning: #B9381E;
  --focus: #173D31;
  --radius-s: 6px; /* geometric, crisp */
  --radius-m: 8px;
  --radius-l: 12px;
  --shadow-s: 0 1px 0 rgba(0,0,0,0.06), 0 2px 6px rgba(0,0,0,0.06);
  --shadow-m: 0 4px 14px rgba(0,0,0,0.10);
  --space-8: 8px;
  --space-12: 12px;
  --space-16: 16px;
  --space-20: 20px;
  --space-24: 24px;
  --space-30: 30px;
  --space-32: 32px;
  --space-40: 40px;
  --space-48: 48px;
  --space-60: 60px;
}

body {
  font-family: Verdana, "Trebuchet MS", Tahoma, Arial, sans-serif;
  font-size: 16px;
  background-color: #FFFFFF;
}

h1, h2, h3, h4, h5 {
  font-family: "Trebuchet MS", Verdana, Tahoma, Arial, sans-serif;
  color: var(--primary-900);
  letter-spacing: 0.5px; /* precise, slightly angular feel */
  margin: 0 0 12px 0;
}

h1 { font-size: 36px; line-height: 1.2; }
h2 { font-size: 26px; line-height: 1.25; }
h3 { font-size: 20px; line-height: 1.3; }

p { margin: 0 0 16px 0; color: #407666; }
strong { color: #407666; }

/* Typography adjustments on larger screens */
@media (min-width: 768px) {
  h1 { font-size: 44px; }
  h2 { font-size: 30px; }
  h3 { font-size: 22px; }
  body { font-size: 17px; }
}
@media (min-width: 1024px) {
  h1 { font-size: 48px; }
  h2 { font-size: 32px; }
  h3 { font-size: 24px; }
}

/* ----------------------------
   2) Global Layout Helpers – Flex-only
   ---------------------------- */
.container {
  display: flex; /* FLEX ONLY */
  flex-direction: column;
  gap: var(--space-20);
  padding: 0 20px;
  max-width: 1160px;
  margin: 0 auto;
}

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

section { /* base rhythm for sections in pages without .section class */
  margin-bottom: var(--space-60);
  padding: var(--space-40) 0;
  background-color: #fff;
}

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

/* Responsive alignment rules */
@media (max-width: 768px) {
  .text-image-section { flex-direction: column; }
}

/* Ensure minimum spacing between content cards/sections */
.content-grid > *,
.card-container > *,
.content-wrapper > * { margin: 0; }

/* ----------------------------
   3) Header & Navigation (Geometric, structured)
   ---------------------------- */
header { border-bottom: 2px solid var(--line); background-color: var(--accent); position: sticky; top: 0; z-index: 50; }
header .container { padding-top: 14px; padding-bottom: 14px; }

/* Header layout */
header .content-wrapper {
  display: flex; flex-direction: column; gap: var(--space-16);
}

@media (min-width: 992px) {
  header .content-wrapper { flex-direction: row; align-items: center; justify-content: space-between; gap: var(--space-20); }
}

.logo { display: flex; align-items: center; gap: 10px; }
.logo img { width: 148px; height: auto; }

.brand-tagline {
  color: var(--muted);
  font-size: 14px;
  border-left: 3px solid var(--primary);
  padding-left: 10px;
}

.main-nav { display: none; }
.main-nav a { padding: 10px 12px; border-bottom: 2px solid transparent; transition: color .2s ease, border-color .2s ease, background-color .2s ease; border-radius: var(--radius-s); }
.main-nav a:hover, .main-nav a:focus { color: var(--primary-800); background-color: var(--surface); border-color: var(--primary); }

.header-ctas { display: flex; flex-wrap: wrap; gap: 12px; }

.mobile-menu-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 2px solid var(--primary); color: var(--primary); border-radius: 6px; background-color: #fff; transition: background-color .2s ease, color .2s ease, transform .12s ease; }
.mobile-menu-toggle:hover { background-color: var(--primary); color: #fff; }
.mobile-menu-toggle:active { transform: translateY(1px); }

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

/* ----------------------------
   4) Mobile Menu (slide-in)
   ---------------------------- */
.mobile-menu {
  position: fixed; inset: 0 0 0 auto; /* anchors right side */
  width: 86%; max-width: 380px; height: 100vh;
  background-color: #FFFFFF;
  border-left: 3px solid var(--primary);
  box-shadow: var(--shadow-m);
  transform: translateX(100%);
  transition: transform .32s ease;
  z-index: 999;
  display: flex; flex-direction: column; gap: 12px; padding: 20px;
}
.mobile-menu.open, .mobile-menu.is-open, .mobile-menu.active { transform: translateX(0); }

/* Backdrop using pseudo-element (decorative) */
.mobile-menu::before {
  content: "";
  position: fixed; inset: 0; background: rgba(0,0,0,0.32);
  opacity: 0; pointer-events: none; transition: opacity .32s ease;
}
.mobile-menu.open::before, .mobile-menu.is-open::before, .mobile-menu.active::before { opacity: 1; pointer-events: auto; }

.mobile-menu-close { align-self: flex-end; width: 40px; height: 40px; border: 2px solid var(--primary); color: var(--primary); border-radius: 6px; background: #fff; display: inline-flex; align-items: center; justify-content: center; }
.mobile-menu-close:hover { background: var(--primary); color: #fff; }

.mobile-nav { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.mobile-nav a { padding: 12px 14px; border: 2px solid var(--line); border-radius: var(--radius-s); color: var(--primary-900); transition: background-color .2s ease, border-color .2s ease; }
.mobile-nav a:hover { background-color: var(--surface); border-color: var(--primary); }

/* ----------------------------
   5) Hero Sections – geometric surfaces
   ---------------------------- */
.hero { background-color: var(--accent); position: relative; }
.hero .container { padding-top: 28px; padding-bottom: 28px; }
.hero .content-wrapper { display: flex; flex-direction: column; gap: var(--space-20); align-items: flex-start; }

/* Angular accent band */
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 10px; background: var(--primary); }

/* USP badges - geometric chips with cut corners illusion */
.usp-badges { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 6px 0 0 0; padding: 0; }
.usp-badges li {
  display: inline-flex; align-items: center; justify-content: center; padding: 8px 12px;
  background: #FFFFFF; color: var(--primary-900);
  border: 2px solid var(--primary);
  border-radius: 4px; /* crisp */
  box-shadow: var(--shadow-s);
  text-transform: uppercase; font-size: 12px; letter-spacing: 0.6px;
}

/* CTA group */
.cta-group { display: flex; flex-wrap: wrap; gap: 12px; }

/* ----------------------------
   6) Buttons – angular, high-contrast
   ---------------------------- */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 18px; border-radius: 6px; border: 2px solid var(--primary); font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; transition: transform .12s ease, background-color .2s ease, color .2s ease, box-shadow .2s ease; box-shadow: var(--shadow-s); }
.button:focus { outline: 3px solid var(--focus); outline-offset: 2px; }
.button:active { transform: translateY(1px); }

.button.primary { background: var(--primary); color: #fff; }
.button.primary:hover { background: var(--primary-800); box-shadow: var(--shadow-m); }

.button.secondary { background: #FFFFFF; color: var(--primary); border-color: var(--primary); }
.button.secondary:hover { background: var(--surface); }

.button.tertiary { background: transparent; color: var(--primary-900); border-color: var(--line); }
.button.tertiary:hover { border-color: var(--primary); background: var(--surface); }

/* ----------------------------
   7) Text blocks & Lists
   ---------------------------- */
.text-section { display: flex; flex-direction: column; gap: 10px; color: var(--ink); }
.text-section ul, .text-section ol { margin: 0 0 0 20px; }
.text-section li { margin-bottom: 8px; }
.text-section img { display: inline-block; vertical-align: middle; margin-right: 6px; }

/* Emphasis blocks */
em { color: var(--muted); }

/* ----------------------------
   8) Cards & Testimonials (light background, dark text)
   ---------------------------- */
.card { background: #fff; border: 2px solid var(--line); border-radius: var(--radius-m); padding: 16px; box-shadow: var(--shadow-s); }

.testimonial-card { background: var(--accent); border: 2px solid var(--line); border-radius: var(--radius-m); box-shadow: var(--shadow-s); color: var(--ink); }
.testimonial-card p { margin: 0; }
.testimonial-card p + p { color: var(--ink-70); }

/* Ensure spacing between multiple testimonial cards */
.content-wrapper .testimonial-card + .testimonial-card { margin-top: 16px; }

/* ----------------------------
   9) Footer
   ---------------------------- */
footer { background: #0F2A22; color: #EAF4F0; border-top: 4px solid var(--primary); }
footer .container { padding-top: 28px; padding-bottom: 28px; }
footer .content-wrapper { display: flex; flex-direction: column; gap: 20px; }
footer a { color: #EAF4F0; text-decoration: underline; text-decoration-color: rgba(234,244,240,0.4); }
footer a:hover { text-decoration-color: #EAF4F0; }
footer .logo img { filter: brightness(0) invert(1); width: 140px; }

footer nav { display: flex; flex-direction: column; gap: 12px; }
footer nav > div { display: flex; flex-direction: column; gap: 6px; }

@media (min-width: 992px) {
  footer .content-wrapper { flex-direction: row; justify-content: space-between; align-items: flex-start; }
  footer nav { flex-direction: row; gap: 24px; }
}

/* ----------------------------
   10) Links, Focus & Accessibility
   ---------------------------- */
a { color: var(--primary); }
a:hover { color: var(--primary-800); }
a:focus { outline: 3px solid var(--focus); outline-offset: 2px; }

/* ----------------------------
   11) Utilities & Geometric Accents
   ---------------------------- */
.badge { display: inline-flex; align-items: center; padding: 6px 10px; border: 2px solid var(--primary); border-radius: 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .6px; background: #fff; }

.hr-line { height: 2px; background: var(--line); width: 100%; }

/* Subtle geometric divider for sections */
.section-edge { display: flex; height: 8px; background: var(--primary); }

/* ----------------------------
   12) Responsive Layout Tweaks
   ---------------------------- */
@media (min-width: 768px) {
  .hero .content-wrapper { max-width: 900px; }
}

@media (min-width: 992px) {
  .hero .container { padding-top: 40px; padding-bottom: 40px; }
  .container { gap: var(--space-24); }
}

/* ----------------------------
   13) Tables (if any appear later) – flex wrappers only
   ---------------------------- */
.table-like { display: flex; flex-direction: column; gap: 10px; }
.table-row { display: flex; flex-wrap: wrap; gap: 10px; border: 1px solid var(--line); border-radius: var(--radius-s); padding: 8px 12px; }
.table-cell { display: flex; align-items: center; min-width: 120px; flex: 1; }

/* ----------------------------
   14) Page-specific small enhancements
   ---------------------------- */
/* Index “Fakten” inline stats */
.text-section p strong + text { font-weight: normal; }

/* Recipe page article blocks */
article.text-section { border: 2px solid var(--line); border-radius: var(--radius-m); padding: 16px; background: #fff; box-shadow: var(--shadow-s); }

/* Pricing style hints (Abo page) */
.text-section h3 { color: var(--secondary); text-transform: uppercase; letter-spacing: .6px; margin-top: 8px; }

/* Contact icons alignment */
.text-section p img { width: 16px; height: 16px; }

/* ----------------------------
   15) Forms (future-proof)
   ---------------------------- */
.input, input[type="text"], input[type="email"], input[type="tel"], textarea, select {
  display: flex; width: 100%; padding: 12px 12px; border: 2px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink);
}
.input:focus, input:focus, textarea:focus, select:focus { border-color: var(--primary); outline: 3px solid rgba(30,95,74,0.2); }

/* ----------------------------
   16) Cookie Consent Banner & Modal
   ---------------------------- */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 1000;
  display: none; /* hidden by default */
  flex-direction: column; gap: 12px;
  background: #FFFFFF; color: var(--ink);
  border: 2px solid var(--primary);
  border-radius: 10px; box-shadow: var(--shadow-m);
  padding: 16px;
}
.cookie-banner.show { display: flex; animation: slideUp .28s ease forwards; }
.cookie-banner h4 { margin: 0; font-size: 18px; color: var(--primary-900); }
.cookie-banner p { margin: 0; color: var(--ink-70); }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-actions .button { padding: 10px 14px; }
.cookie-actions .accept { background: var(--primary); color: #fff; border-color: var(--primary); }
.cookie-actions .reject { background: #fff; color: var(--primary); border-color: var(--primary); }
.cookie-actions .settings { background: var(--surface); color: var(--primary-900); border-color: var(--line); }

@keyframes slideUp { from { transform: translateY(12px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* Cookie Modal */
.cookie-modal {
  position: fixed; inset: 0; z-index: 1001; display: none; align-items: center; justify-content: center; padding: 20px;
}
.cookie-modal.show { display: flex; }
.cookie-modal::before { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,0.45); }
.cookie-modal .modal-panel {
  position: relative; background: #fff; color: var(--ink); border: 3px solid var(--primary);
  border-radius: 12px; width: 100%; max-width: 720px; display: flex; flex-direction: column; gap: 16px; padding: 18px; box-shadow: var(--shadow-m);
}
.cookie-modal .modal-header { display: flex; align-items: center; justify-content: space-between; }
.cookie-modal .modal-title { font-size: 20px; }
.cookie-modal .modal-close { width: 40px; height: 40px; border: 2px solid var(--primary); border-radius: 6px; background: #fff; color: var(--primary); display: flex; align-items: center; justify-content: center; }
.cookie-modal .modal-close:hover { background: var(--primary); color: #fff; }
.cookie-options { display: flex; flex-direction: column; gap: 12px; }
.cookie-option { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 2px solid var(--line); border-radius: 8px; padding: 10px 12px; background: #fff; }
.cookie-option .label { display: flex; flex-direction: column; }
.cookie-option small { color: var(--muted); }

/* Toggle switch (accessible) */
.switch { position: relative; display: inline-flex; width: 48px; height: 26px; border: 2px solid var(--primary); border-radius: 20px; background: #fff; transition: background .2s ease; }
.switch .knob { width: 18px; height: 18px; background: var(--primary); border-radius: 50%; margin: 2px; transition: transform .2s ease, background .2s ease; }
.switch[aria-checked="true"] { background: var(--surface); }
.switch[aria-checked="true"] .knob { transform: translateX(20px); background: var(--secondary); }

.cookie-modal .modal-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }

/* ----------------------------
   17) Accessibility Helpers
   ---------------------------- */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }

/* ----------------------------
   18) Precise Spacing System
   ---------------------------- */
.stack-8 > * + * { margin-top: 8px; }
.stack-12 > * + * { margin-top: 12px; }
.stack-16 > * + * { margin-top: 16px; }
.stack-20 > * + * { margin-top: 20px; }

/* ----------------------------
   19) Prevent overlapping / ensure gaps
   ---------------------------- */
.content-wrapper { gap: 20px; }
.card-container, .content-grid, .text-image-section, .testimonial-card, .feature-item { gap: 20px; }

/* ----------------------------
   20) Print basics
   ---------------------------- */
@media print {
  header, footer, .mobile-menu, .cookie-banner, .cookie-modal { display: none !important; }
  body { color: #000; }
}
