/* ==========================================================
   Kompass Deutschland – Nature Organic Theme (Flexbox Only)
   Author: Senior CSS Developer & UI Designer
   Notes:
   - Mobile-first, flexbox everywhere (no grid/columns)
   - Nature-inspired: earth tones, organic shapes, green accents
   - Brand fonts/colors, accessible contrast
   - Includes mobile burger menu + cookie consent banner
   ========================================================== */

/* =====================
   0) CSS Reset / Normalize
   ===================== */
*, *::before, *::after { box-sizing: border-box; }
html { line-height: 1.4; -webkit-text-size-adjust: 100%; }
body { margin: 0; }
img { max-width: 100%; height: auto; display: block; }
a { background-color: transparent; text-decoration: none; color: inherit; }
ul, ol { margin: 0 0 1rem; padding-left: 1.25rem; }
h1, h2, h3, h4, h5, h6, p { margin: 0 0 0.75rem; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
:focus { outline: none; }
:focus-visible { outline: 3px solid rgba(30, 86, 49, 0.35); outline-offset: 2px; }

/* =====================
   1) Theme Variables (with fallbacks)
   ===================== */
:root {
  --color-primary: #0B3D91;           /* Brand Blue */
  --color-secondary: #1E5631;         /* Brand Green (leaf) */
  --color-accent: #F5F7FA;            /* Light UI */

  --color-ink: #1f2a24;               /* Deep ink (dark text) */
  --color-ink-soft: #32463b;          /* Softer ink */
  --color-bg: #FAF9F5;                /* Sand/Off-white */
  --color-card: #FFFFFF;              /* Card white */
  --color-earth: #7A5C49;             /* Earth brown */
  --color-moss: #3D5A40;              /* Moss green */
  --color-leaf: #2F6E4F;              /* Leaf green */
  --color-sky: #E8F3EC;               /* Misty green tint */

  --shadow-sm: 0 2px 8px rgba(20, 30, 20, 0.08);
  --shadow-md: 0 8px 24px rgba(20, 30, 20, 0.12);

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 28px;
  --radius-pill: 999px;

  --container-max: 1160px;
}

/* =====================
   2) Base / Typography
   ===================== */
body {
  font-family: Verdana, Geneva, Tahoma, sans-serif; /* brand body */
  color: var(--color-ink);
  background-color: var(--color-bg);
  font-size: 16px;
}

h1, h2, h3, h4 {
  font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande", Arial, sans-serif; /* brand display */
  color: var(--color-ink);
}

h1 { font-size: 32px; line-height: 1.15; letter-spacing: 0.2px; }
h2 { font-size: 24px; line-height: 1.2; }
h3 { font-size: 18px; line-height: 1.25; }
p, li { font-size: 16px; line-height: 1.6; }
.small { font-size: 14px; }

.subheadline { color: var(--color-ink-soft); font-size: 18px; }

strong { color: var(--color-ink); }
em { color: var(--color-ink-soft); }

/* Links */
a { color: var(--color-leaf); }
a:hover { color: var(--color-secondary); text-decoration: underline; text-underline-offset: 2px; }

/* =====================
   3) Layout Helpers (Flex-only)
   ===================== */
.container {
  width: 100%;
  max-width: var(--container-max);
  padding: 0 20px;
  margin: 0 auto;
}

.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Mandatory spacing 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; background: var(--color-card); border: 1px solid rgba(50,60,50,0.08); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: 18px; }
.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: #ffffff; color: #1b2620; border: 1px solid rgba(60,70,60,0.14); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); margin-bottom: 20px; }
.feature-item { display: flex; flex-direction: column; align-items: flex-start; gap: 15px; }

/* Generic section spacing */
main section { padding: 36px 0; }
main section + section { padding-top: 0; }

/* =====================
   4) Header & Navigation
   ===================== */
header {
  position: sticky; top: 0; z-index: 1000; background: #ffffff;
  border-bottom: 1px solid rgba(30, 40, 30, 0.08);
  backdrop-filter: saturate(120%) blur(4px);
}

header .container { display: flex; flex-direction: column; gap: 10px; padding-top: 10px; padding-bottom: 10px; }

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

.main-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.nav-links, .nav-ctas { display: none; }

.nav-links a, .mobile-nav a {
  padding: 10px 12px;
  border-radius: var(--radius-pill);
  transition: background-color 0.25s ease, color 0.25s ease, transform 0.1s ease;
}

.nav-links a:hover { background: var(--color-sky); }
.nav-links a[aria-current="page"] { background: rgba(47,110,79,0.12); color: var(--color-leaf); font-weight: bold; }

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: var(--radius-pill);
  border: 1px solid rgba(40,60,40,0.18); background: var(--color-card);
  color: var(--color-ink); box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, background-color 0.25s ease;
}
.mobile-menu-toggle:hover { background: var(--color-accent); }
.mobile-menu-toggle:active { transform: scale(0.97); }

/* Mobile Menu Overlay */
.mobile-menu {
  position: fixed; inset: 0; z-index: 2000; display: flex; flex-direction: column; align-items: stretch; gap: 10px;
  background: rgba(20, 28, 22, 0.4);
  transform: translateX(100%);
  transition: transform 0.35s ease;
}
.mobile-menu[aria-hidden="false"] { transform: translateX(0); }

/* Panel */
.mobile-menu > .mobile-nav {
  margin-left: auto; height: 100%; width: 84%; max-width: 420px;
  background: #ffffff; box-shadow: var(--shadow-md); border-left: 1px solid rgba(20,30,20,0.08);
  display: flex; flex-direction: column; gap: 6px; padding: 18px; overflow-y: auto;
}

.mobile-menu-close {
  position: relative; align-self: flex-end; margin: 12px 12px 0 0;
  width: 42px; height: 42px; border-radius: var(--radius-pill);
  background: #ffffff; color: var(--color-ink);
  border: 1px solid rgba(20,30,20,0.14); box-shadow: var(--shadow-sm);
}

.mobile-nav a {
  display: flex; align-items: center; gap: 10px; min-height: 44px;
  color: var(--color-ink); background: transparent; border-radius: var(--radius-md);
  padding: 12px 14px; border: 1px solid transparent;
}
.mobile-nav a:hover { background: var(--color-accent); }
.mobile-nav a[aria-current="page"] { border-color: rgba(47,110,79,0.35); background: rgba(47,110,79,0.08); font-weight: 700; color: var(--color-leaf); }

/* =====================
   5) Hero Sections (Organic)
   ===================== */
.hero { background: #fff; position: relative; overflow: hidden; }
.hero .container { padding-top: 28px; padding-bottom: 28px; }
.hero .content-wrapper { gap: 12px; padding: 12px 0; }

/* Decorative organic leaf shape (decorative absolute allowed) */
.hero::before {
  content: ""; position: absolute; right: -60px; top: -60px; width: 240px; height: 240px;
  background: rgba(47,110,79,0.07); border-radius: 44% 56% 58% 42% / 53% 36% 64% 47%;
  z-index: 0;
}
.hero::after {
  content: ""; position: absolute; left: -80px; bottom: -80px; width: 300px; height: 300px;
  background: rgba(122,92,73,0.06); border-radius: 60% 40% 55% 45% / 40% 55% 45% 60%;
  z-index: 0;
}
.hero .container, .hero .content-wrapper, .hero h1, .hero p, .hero .text-section { position: relative; z-index: 1; }

.hero h1 { color: var(--color-moss); }
.hero .subheadline { color: var(--color-ink-soft); }

/* Trust row */
.trust { display: flex; flex-direction: column; gap: 10px; color: var(--color-ink-soft); }
.trust p { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.trust img { width: 18px; height: 18px; }

/* =====================
   6) Buttons & CTAs
   ===================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 10px; padding: 12px 16px; min-height: 44px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(40,55,45,0.22);
  background: #ffffff; color: var(--color-ink);
  box-shadow: var(--shadow-sm);
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.08s ease;
}
.btn:hover { background: var(--color-accent); }
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--color-secondary); /* Nature-forward primary */
  color: #ffffff; border-color: var(--color-secondary);
}
.btn-primary:hover { background: #1a4d2b; border-color: #1a4d2b; }

.btn-secondary {
  background: #ffffff; color: var(--color-primary);
  border-color: rgba(11,61,145,0.35);
}
.btn-secondary:hover { background: rgba(11,61,145,0.06); }

.cta-group { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* =====================
   7) Text Blocks, Lists
   ===================== */
.text-section { display: flex; flex-direction: column; gap: 10px; }
.text-section ul, .text-section ol { display: flex; flex-direction: column; gap: 6px; }
.text-section li { padding-left: 2px; }

/* =====================
   8) Cards & Testimonials (readable contrast)
   ===================== */
.testimonial-card p { margin: 0; }
.testimonial-card strong { color: var(--color-ink); }

/* =====================
   9) Footer
   ===================== */
footer { background: #ffffff; border-top: 1px solid rgba(30, 40, 30, 0.08); margin-top: 20px; }
footer .container { padding-top: 24px; padding-bottom: 28px; }
footer .content-wrapper { display: flex; flex-direction: column; gap: 16px; }
footer nav { display: flex; flex-wrap: wrap; gap: 10px; }
footer nav a { color: var(--color-ink-soft); padding: 6px 10px; border-radius: var(--radius-pill); }
footer nav a:hover { background: var(--color-accent); color: var(--color-ink); }
.footer-top { display: flex; flex-direction: column; gap: 10px; }
.footer-contact { display: flex; flex-direction: column; gap: 4px; color: var(--color-ink-soft); }
.legal { color: var(--color-ink-soft); font-size: 14px; }

/* =====================
   10) Mobile Navigation Visibility Rules
   ===================== */
@media (min-width: 768px) {
  header .container { padding-top: 12px; padding-bottom: 12px; }
  .nav-links, .nav-ctas { display: flex; align-items: center; gap: 6px; }
  .mobile-menu-toggle { display: none; }
  .main-nav { gap: 16px; }
  .nav-links a { color: var(--color-ink); }
}

/* =====================
   11) Responsive Layout Adjustments
   ===================== */
@media (min-width: 768px) {
  .content-wrapper { gap: 18px; }
  .hero .container { padding-top: 44px; padding-bottom: 44px; }
  h1 { font-size: 40px; }
  h2 { font-size: 28px; }
  .text-image-section { flex-direction: row; }
}

@media (min-width: 1024px) {
  h1 { font-size: 48px; }
  .container { padding: 0 24px; }
  .hero .content-wrapper { gap: 16px; }
  .footer-top { flex-direction: row; justify-content: space-between; align-items: flex-start; }
}

/* =====================
   12) Accessibility & Micro-interactions
   ===================== */
.btn, .nav-links a, .mobile-nav a { transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.08s ease; }
[role="button"], button, .btn { -webkit-tap-highlight-color: transparent; }

/* =====================
   13) Utility & Organic Touches
   ===================== */
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.rounded { border-radius: var(--radius-md); }
.pill { border-radius: var(--radius-pill); }
.bg-accent { background: var(--color-accent); }
.bg-card { background: var(--color-card); }
.text-muted { color: var(--color-ink-soft); }

/* =====================
   14) Specific Element Tweaks
   ===================== */
/* Footnotes and addresses with icons */
.footer-contact img, .text-section img { display: inline-block; vertical-align: middle; margin-right: 8px; }

/* Trust button inside hero */
.trust .btn { padding: 10px 14px; min-height: 40px; }

/* =====================
   15) Cookie Consent Banner & Modal (Flex)
   ===================== */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 3000;
  background: #ffffff; border-top: 1px solid rgba(30,40,30,0.12);
  display: flex; flex-direction: column; gap: 12px; padding: 14px 16px;
  box-shadow: 0 -8px 24px rgba(20,30,20,0.08);
}
.cookie-banner.hidden { display: none; }
.cookie-banner .content { display: flex; flex-direction: column; gap: 10px; }
.cookie-banner .actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-banner .btn { min-width: 140px; }
.cookie-banner .btn-accept { background: var(--color-secondary); color: #fff; border-color: var(--color-secondary); }
.cookie-banner .btn-reject { background: #ffffff; color: var(--color-ink); }
.cookie-banner .btn-settings { background: #ffffff; color: var(--color-primary); border-color: rgba(11,61,145,0.35); }
.cookie-banner a { color: var(--color-leaf); text-decoration: underline; text-underline-offset: 2px; }

/* Cookie Preferences Modal */
.cookie-modal {
  position: fixed; inset: 0; z-index: 3500; display: none; align-items: center; justify-content: center;
  background: rgba(20,28,22,0.45);
}
.cookie-modal.is-visible { display: flex; }
.cookie-modal .dialog {
  width: 92%; max-width: 680px; background: #ffffff; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md); border: 1px solid rgba(30,40,30,0.12);
  display: flex; flex-direction: column; gap: 14px; padding: 18px;
}
.cookie-modal .dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cookie-modal .dialog-body { display: flex; flex-direction: column; gap: 12px; }
.cookie-modal .dialog-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }

/* Toggle rows (flex only) */
.cookie-toggle { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid rgba(30,40,30,0.08); border-radius: var(--radius-md); }
.cookie-toggle .meta { display: flex; flex-direction: column; gap: 4px; }

/* =====================
   16) Desktop polish for sections
   ===================== */
@media (min-width: 900px) {
  .content-wrapper { flex-direction: column; }
  .text-section { max-width: 860px; }
}

/* =====================
   17) Edge Cases & Compliance
   ===================== */
/* Ensure min spacing between cards/sections */
.card, .testimonial-card, section, .section { margin-bottom: 20px; }

/* Prevent overlap of decorative shapes with content */
.hero * { z-index: 1; }

/* =====================
   18) Page-specific gentle accents
   ===================== */
/* Map/Karte emphasis: subtle bar along top of hero */
.karte .hero, body:has(main .karte) {} /* placeholder for potential page-level hooks */

/* ========== END ========== */
