/* =========================================================
   NährKompass - Warm & Friendly UI (Mobile-first, Flex-only)
   Brand: Warm greens, friendly orange accents, soft cards
   Fonts: Trebuchet MS (display), Verdana (body)
   ========================================================= */

/* -----------------------------
   CSS Reset & Normalize (light)
------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
img, picture, video, canvas, svg { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; }
button { border: 0; background: none; cursor: pointer; }
:focus { outline: 2px solid #FF8A3D; outline-offset: 2px; }

/* -----------------------------
   Theme Variables + Fallbacks
------------------------------ */
:root {
  --color-primary: #1E5E3B;     /* deep fresh green */
  --color-secondary: #FF8A3D;   /* warm friendly orange */
  --color-accent: #F4F7F1;      /* soft light backdrop */
  --color-surface: #FFFFFF;     /* cards/base */
  --color-text: #2A2A2A;        /* primary text */
  --color-muted: #6B6B6B;       /* secondary text */
  --color-border: #E7E7E7;      /* lines */
  --shadow-soft: 0 6px 18px rgba(30, 94, 59, 0.08);
  --radius-s: 8px; --radius-m: 14px; --radius-l: 22px;
}

/* -----------------------------
   Base Typography & Layout
------------------------------ */
body {
  font-family: Verdana, Geneva, sans-serif;
  color: var(--color-text, #2A2A2A);
  background: var(--color-accent, #F4F7F1);
  line-height: 1.65;
  font-size: 16px;
}

h1, h2, h3, h4 { font-family: "Trebuchet MS", Tahoma, sans-serif; color: var(--color-primary, #1E5E3B); margin: 0 0 12px; line-height: 1.25; }
h1 { font-size: 32px; }
h2 { font-size: 28px; }
h3 { font-size: 22px; }
h4 { font-size: 18px; }

p { margin: 0 0 14px; color: var(--color-text, #2A2A2A); }
small { color: var(--color-muted, #6B6B6B); }

ul, ol { margin: 0 0 16px 20px; padding: 0; }
ul li::marker, ol li::marker { color: var(--color-secondary, #FF8A3D); }

/* Links */
a { color: var(--color-primary, #1E5E3B); text-decoration: none; transition: color .2s ease, background-color .2s ease, box-shadow .2s ease; }
a:hover, a:focus { color: #174E31; text-decoration: underline; }

/* Container & Common Wrappers */
.container {
  display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between;
  max-width: 1100px; margin: 0 auto; padding: 0 20px;
}
.content-wrapper { display: flex; flex-direction: column; gap: 16px; width: 100%; }

/* Sections */
section { padding: 40px 0; }
.section { margin-bottom: 60px; padding: 40px 20px; }

/* -----------------------------
   Header & Navigation
------------------------------ */
header { position: relative; background: var(--color-surface, #FFFFFF); border-bottom: 1px solid var(--color-border, #E7E7E7); box-shadow: 0 2px 10px rgba(0,0,0,.03); }
header .container { min-height: 64px; padding-top: 10px; padding-bottom: 10px; }

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

.main-nav { display: none; align-items: center; gap: 16px; }
.main-nav a { padding: 8px 10px; border-radius: var(--radius-s); color: var(--color-text); }
.main-nav a[aria-current="page"] { color: var(--color-primary); font-weight: bold; }
.main-nav a:hover { background: var(--color-accent); text-decoration: none; }

/* Header CTAs */
.cta-nav { display: none; align-items: center; gap: 10px; }
.cta-nav a { display: inline-flex; align-items: center; justify-content: center; padding: 10px 14px; border-radius: 999px; font-weight: 600; box-shadow: var(--shadow-soft); background: var(--color-secondary); color: #1C1C1C; }
.cta-nav a:hover { filter: brightness(0.95); text-decoration: none; }

/* Mobile burger */
.mobile-menu-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; font-size: 22px; line-height: 1; border-radius: 12px; background: var(--color-accent); color: var(--color-primary); box-shadow: var(--shadow-soft); }
.mobile-menu-toggle:hover { background: #EAF2E6; }

/* Mobile Menu (off-canvas) */
.mobile-menu {
  position: fixed; top: 0; right: 0; height: 100vh; width: 82%; max-width: 420px; z-index: 1000;
  background: var(--color-surface); box-shadow: -8px 0 24px rgba(0,0,0,.15);
  padding: 20px; border-top-left-radius: var(--radius-l); border-bottom-left-radius: var(--radius-l);
  display: flex; flex-direction: column; gap: 16px; transform: translateX(100%); transition: transform .3s ease;
}
.mobile-menu.active, .mobile-menu.open, .mobile-menu.is-open { transform: translateX(0); }
.mobile-menu-close { align-self: flex-end; width: 44px; height: 44px; border-radius: 12px; background: var(--color-accent); color: var(--color-primary); font-size: 20px; }
.mobile-nav { display: flex; flex-direction: column; gap: 8px; }
.mobile-nav a { display: flex; align-items: center; padding: 12px 14px; border-radius: 12px; background: var(--color-accent); color: var(--color-text); font-weight: 600; }
.mobile-nav a[aria-current="page"] { background: #EAF2E6; color: var(--color-primary); }
.mobile-nav a:hover { background: #EDEFE9; text-decoration: none; }

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

/* -----------------------------
   Hero Sections
------------------------------ */
.hero { background: var(--color-accent); border-top: 1px solid #EAF1E6; border-bottom: 1px solid #EAF1E6; }
.hero .container { align-items: center; justify-content: center; }
.hero .content-wrapper { padding: 10px 0; }
.hero h1 { color: var(--color-primary); }
.hero p { max-width: 780px; }

/* CTA group */
.cta-group { display: flex; flex-wrap: wrap; gap: 12px; margin: 4px 0 8px; }
.cta-group a { display: inline-flex; align-items: center; justify-content: center; padding: 12px 18px; border-radius: 999px; font-weight: 700; box-shadow: var(--shadow-soft); }
.cta-group a:first-child { background: var(--color-secondary); color: #1F1308; }
.cta-group a:first-child:hover { filter: brightness(0.95); text-decoration: none; }
.cta-group a:nth-child(2) { background: #FFFFFF; color: var(--color-primary); border: 1px solid #E6EDE3; }
.cta-group a:nth-child(2):hover { background: #FAFAFA; text-decoration: none; }

/* Make single hero links look like buttons when used alone */
.hero .content-wrapper > a:not(.plain-link) { display: inline-flex; align-items: center; justify-content: center; width: fit-content; padding: 12px 18px; border-radius: 999px; font-weight: 700; box-shadow: var(--shadow-soft); background: var(--color-secondary); color: #23160B; }
.hero .content-wrapper > a:not(.plain-link):hover { filter: brightness(0.95); text-decoration: none; }

/* -----------------------------
   Cards, Grids & Text Blocks
------------------------------ */
.card-container { display: flex; flex-wrap: wrap; gap: 24px; }
.card { margin-bottom: 20px; position: relative; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-m); box-shadow: var(--shadow-soft); padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.content-grid { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; }

.text-section { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-m); padding: 18px; box-shadow: var(--shadow-soft); }
.text-image-section { display: flex; align-items: center; gap: 30px; flex-wrap: wrap; }

.feature-item { display: flex; flex-direction: column; align-items: flex-start; gap: 15px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-m); padding: 16px; box-shadow: var(--shadow-soft); }

/* Testimonials (high contrast, light bg, dark text) */
.testimonial-card { display: flex; align-items: center; gap: 20px; padding: 20px; background: #FFFFFF; color: #1E2320; border: 1px solid #E6ECE3; border-left: 6px solid var(--color-secondary); border-radius: var(--radius-m); box-shadow: var(--shadow-soft); }
.testimonial-card p { margin: 0; }
.testimonial-card strong { color: var(--color-primary); }

/* Buttons (utility) */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 12px 18px; border-radius: 999px; font-weight: 700; box-shadow: var(--shadow-soft); text-decoration: none; }
.btn-primary { background: var(--color-secondary); color: #24160C; }
.btn-primary:hover { filter: brightness(0.95); }
.btn-ghost { background: #FFFFFF; border: 1px solid #E6EDE3; color: var(--color-primary); }
.btn-ghost:hover { background: #FAFAFA; }

/* Lists tight spacing inside text-sections */
.text-section ul, .text-section ol { margin-left: 18px; }
.text-section li { margin-bottom: 8px; }

/* Links inside content wrappers (soft emphasis) */
section .content-wrapper > a { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--color-primary); background: #FFFFFF; border: 1px solid #E6EDE3; border-radius: 999px; padding: 10px 14px; box-shadow: var(--shadow-soft); }
section .content-wrapper > a:hover { background: #FAFAFA; text-decoration: none; }

/* -----------------------------
   Footer
------------------------------ */
footer { background: #173D28; color: #F4FBF6; margin-top: 30px; padding: 32px 0 20px; }
footer .container { align-items: flex-start; }
footer .content-wrapper { display: flex; flex-direction: column; gap: 20px; width: 100%; }
.footer-brand { display: flex; flex-direction: column; gap: 12px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); padding: 16px; border-radius: var(--radius-m); }
.footer-brand img { height: 36px; width: auto; }
.footer-brand p { color: #EAF4EC; margin: 0; }
.footer-links nav, .footer-contact { display: flex; flex-direction: column; gap: 8px; }
.footer-links a { color: #EAF4EC; opacity: 0.95; padding: 6px 0; }
.footer-links a:hover { opacity: 1; text-decoration: underline; }
.footer-contact a { color: #FFFFFF; text-decoration: underline; }
.footer-legal { border-top: 1px solid rgba(255,255,255,0.12); padding-top: 10px; display: flex; justify-content: center; }
.footer-legal p { color: #DDEBE1; margin: 0; }

/* -----------------------------
   Cookie Banner & Preferences Modal
------------------------------ */
#cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 1200;
  display: flex; flex-direction: column; gap: 12px; padding: 16px 16px;
  background: #FFFFFF; border: 1px solid var(--color-border); border-radius: var(--radius-l);
  box-shadow: var(--shadow-soft);
  transform: translateY(120%); opacity: 0; transition: transform .35s ease, opacity .35s ease;
}
#cookie-banner.show { transform: translateY(0); opacity: 1; }
#cookie-banner h4 { margin: 0; font-size: 18px; color: var(--color-primary); }
#cookie-banner p { margin: 0; color: var(--color-text); }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-actions .accept-all { background: var(--color-secondary); color: #1D140D; }
.cookie-actions .reject-all { background: #F7F7F7; border: 1px solid #E7E7E7; color: #2A2A2A; }
.cookie-actions .settings { background: #FFFFFF; border: 1px solid #E6EDE3; color: var(--color-primary); }
.cookie-actions a, .cookie-actions button { padding: 10px 14px; border-radius: 999px; box-shadow: var(--shadow-soft); font-weight: 700; }
.cookie-actions a:hover, .cookie-actions button:hover { filter: brightness(0.98); text-decoration: none; }

.cookie-modal { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 1300; display: flex; align-items: center; justify-content: center; padding: 16px; opacity: 0; pointer-events: none; transition: opacity .25s ease; }
.cookie-modal.show { opacity: 1; pointer-events: auto; }
.cookie-modal-content { width: 100%; max-width: 700px; background: #FFFFFF; border: 1px solid var(--color-border); border-radius: var(--radius-l); box-shadow: var(--shadow-soft); padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.cookie-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 10px; border: 1px solid #EFEFEF; border-radius: 12px; background: #FCFCFC; }
.cookie-row strong { color: var(--color-primary); }

/* toggle using native checkbox */
.cookie-row input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--color-secondary); }
.cookie-row .always-on { color: #6B6B6B; font-size: 14px; }

.cookie-modal-actions { display: flex; justify-content: flex-end; gap: 10px; }
.cookie-modal-actions .save { background: var(--color-secondary); color: #20150F; padding: 10px 14px; border-radius: 999px; font-weight: 700; box-shadow: var(--shadow-soft); }
.cookie-modal-actions .cancel { background: #FFFFFF; border: 1px solid #E6EDE3; color: var(--color-primary); padding: 10px 14px; border-radius: 999px; font-weight: 700; }

/* -----------------------------
   Responsive Rules
------------------------------ */
/* Text-image sections stack on mobile */
@media (max-width: 768px) {
  .text-image-section { flex-direction: column; }
}

/* Larger type scale and spacing on wider screens */
@media (min-width: 768px) {
  h1 { font-size: 40px; }
  h2 { font-size: 32px; }
  h3 { font-size: 24px; }
  .hero .content-wrapper { gap: 20px; }
}
@media (min-width: 1100px) {
  h1 { font-size: 48px; }
}

/* -----------------------------
   Utility Spacing & Micro-interactions
------------------------------ */
.flow > * + * { margin-top: 12px; }
.shadow-soft { box-shadow: var(--shadow-soft); }
.rounded { border-radius: var(--radius-m); }

/* Hover lift for cards and buttons */
.card, .text-section, .feature-item, .testimonial-card, .cta-group a, .btn, section .content-wrapper > a {
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover, .text-section:hover, .feature-item:hover, .testimonial-card:hover {
  transform: translateY(-2px); box-shadow: 0 10px 24px rgba(30,94,59,.12);
}

/* -----------------------------
   Page-specific small touches
------------------------------ */
/* 404 page suggestions list */
main .hero + section ul { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 10px 0 0; padding: 0; }
main .hero + section ul li a { display: inline-flex; padding: 8px 12px; background: #FFFFFF; border: 1px solid #E6EDE3; border-radius: 999px; box-shadow: var(--shadow-soft); font-weight: 600; }
main .hero + section ul li a:hover { background: #FAFAFA; text-decoration: none; }

/* Ordered lists style */
ol { counter-reset: item; }
ol li { position: relative; margin-bottom: 10px; }

/* -----------------------------
   Forms (basic for future use)
------------------------------ */
input[type="text"], input[type="email"], input[type="tel"], textarea, select {
  width: 100%; padding: 12px 12px; border-radius: 12px; border: 1px solid var(--color-border); background: #FFFFFF;
}
input:focus, textarea:focus, select:focus { border-color: #BFD8C9; box-shadow: 0 0 0 3px rgba(30,94,59,0.12); }

/* -----------------------------
   Accessibility helpers
------------------------------ */
.skip-link { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.skip-link:focus { position: static; width: auto; height: auto; padding: 8px 12px; background: #000; color: #fff; border-radius: 8px; }

/* -----------------------------
   Enforce gaps between content blocks
------------------------------ */
.content-wrapper > * + * { margin-top: 8px; }
section + section { margin-top: 10px; }

/* Ensure all layout containers use flex (no grid anywhere) */
header .container, footer .container, footer .content-wrapper, nav.main-nav, nav.mobile-nav, .cta-group, .cookie-actions, .cookie-modal-content, .cookie-modal-actions { display: flex; }

/* End of stylesheet */
