/* ===============================
   LänderLotse - Soft Pastel UI
   style.css (mobile-first, flex-only)
   =============================== */

/* -------- CSS RESET & BASE -------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img, svg { display: block; max-width: 100%; height: auto; }
input, button, select, textarea { font: inherit; }

/* -------- THEME VARIABLES (with fallbacks) -------- */
:root {
  /* Brand */
  --brand-primary: #0D3B66;
  --brand-secondary: #1B6B43;
  --brand-accent: #F5F7FA;
  /* Soft Pastels */
  --pastel-sky: #EAF2FB;   /* soft blue */
  --pastel-mint: #EAF7F1;  /* soft mint */
  --pastel-rose: #FBEAF2;  /* soft rose */
  --pastel-peach: #FFF4E8; /* soft peach */
  --pastel-lav: #F1E8FF;   /* soft lavender */
  /* Surfaces & Text */
  --surface: #FCFDFE;
  --surface-alt: #F7F9FD;
  --card: #FFFFFF;
  --ink: #1F2A44;          /* dark text */
  --ink-muted: #475268;     /* muted text */
  --border: #E4E8F0;        /* soft border */
  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(13,59,102,0.06);
  --shadow-md: 0 6px 20px rgba(13,59,102,0.08);
  /* Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  /* Spacing scale */
  --space-8: 8px;
  --space-12: 12px;
  --space-16: 16px;
  --space-20: 20px;
  --space-24: 24px;
  --space-32: 32px;
  --space-40: 40px;
  --space-60: 60px;
  /* Transitions */
  --swift: 180ms ease;
  --float: 300ms ease;
}

/* -------- TYPOGRAPHY -------- */
body {
  font-family: Verdana, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--surface);
  line-height: 1.65;
  font-size: 16px;
}

h1, h2, h3 {
  font-family: "Trebuchet MS", "Segoe UI", Verdana, Arial, sans-serif;
  color: var(--brand-primary);
  margin: 0 0 var(--space-16) 0;
  letter-spacing: 0.2px;
}

h1 { font-size: 32px; line-height: 1.25; }
h2 { font-size: 24px; line-height: 1.3; margin-top: var(--space-8); }
h3 { font-size: 18px; line-height: 1.35; color: var(--ink); }

p { margin: 0 0 var(--space-12) 0; color: var(--ink); }
small, nav[aria-label="Brotkrumen"] { font-size: 14px; color: var(--ink-muted); }

ul, ol { margin: 0; padding-left: var(--space-20); }
ul { list-style: disc; }
ol { list-style: decimal; }

/* Links */
a {
  color: var(--brand-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--swift);
}
a:hover { color: #0b2f51; }
a:focus-visible { outline: 2px dashed var(--brand-secondary); outline-offset: 2px; }

/* -------- LAYOUT WRAPPERS (FLEX-ONLY) -------- */
.container {
  display: flex;
  width: 100%;
  justify-content: center;
  padding: 0 var(--space-16);
}
.content-wrapper {
  display: flex;
  width: 100%;
  max-width: 1100px;
  flex-direction: column;
  gap: var(--space-16);
}

/* Sections (element + required .section class) */
section, .section {
  margin-bottom: var(--space-60);
  padding: var(--space-40) var(--space-20);
  background: transparent;
}
/* Soft pastel atmosphere: alternate subtle backgrounds */
main section:nth-of-type(2n) { background: var(--surface-alt); }

/* Space between repeated blocks */
.text-section + .text-section,
.testimonial-card + .testimonial-card { margin-top: var(--space-20); }

/* -------- HEADER -------- */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
header .content-wrapper { flex-direction: row; align-items: center; justify-content: space-between; gap: var(--space-16); }

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

.main-nav { display: none; align-items: center; gap: var(--space-16); }
.main-nav a {
  text-decoration: none;
  color: var(--ink);
  background: var(--pastel-sky);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: background var(--swift), transform var(--swift);
}
.main-nav a[aria-current="page"] { background: var(--pastel-mint); border-color: #d4eade; }
.main-nav a:hover { background: #dfeafb; transform: translateY(-1px); }

.header-ctas { display: none; align-items: center; gap: var(--space-12); }
.header-ctas a {
  text-decoration: none;
  color: var(--brand-primary);
  background: var(--pastel-peach);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid #ffe2c0;
  box-shadow: var(--shadow-sm);
  transition: background var(--swift), box-shadow var(--swift), transform var(--swift);
}
.header-ctas a:hover { background: #ffe8cf; box-shadow: var(--shadow-md); transform: translateY(-1px); }

/* Mobile burger */
.mobile-menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--pastel-rose);
  color: var(--ink);
  cursor: pointer;
  transition: background var(--swift), transform var(--swift);
}
.mobile-menu-toggle:hover { background: #f7dce9; transform: translateY(-1px); }
.mobile-menu-toggle:focus-visible { outline: 2px dashed var(--brand-secondary); outline-offset: 3px; }

/* Slide-in mobile menu */
.mobile-menu {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 86%; max-width: 360px;
  background: var(--card);
  border-left: 1px solid var(--border);
  box-shadow: -8px 0 24px rgba(13,59,102,0.12);
  padding: var(--space-24);
  display: flex; flex-direction: column; gap: var(--space-16);
  transform: translateX(100%);
  transition: transform var(--float);
  z-index: 1200;
}
/* Support multiple open states */
.mobile-menu.open, .mobile-menu.active, body.menu-open .mobile-menu { transform: translateX(0); }

.mobile-menu-close {
  align-self: flex-end;
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--pastel-mint);
  color: var(--ink);
  cursor: pointer;
}
.mobile-menu-close:hover { background: #ddf0e6; }

.mobile-nav { display: flex; flex-direction: column; gap: var(--space-12); }
.mobile-nav a {
  text-decoration: none;
  color: var(--ink);
  background: var(--pastel-sky);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
}
.mobile-nav a:hover { background: #dfeafb; }

/* -------- MAIN CONTENT -------- */
/* Text tiles to embody soft pastel cards */
.text-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
  padding: var(--space-16);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
.text-section ul,
.text-section ol { padding-left: var(--space-20); }
.text-section img { width: 20px; height: 20px; display: inline-block; vertical-align: middle; margin-right: 8px; }

/* Breadcrumbs */
nav[aria-label="Brotkrumen"] { display: flex; gap: 6px; flex-wrap: wrap; }
nav[aria-label="Brotkrumen"] a { text-decoration: none; color: var(--ink-muted); }
nav[aria-label="Brotkrumen"] a:hover { color: var(--ink); }

/* Testimonials - high contrast on light background */
.testimonial-card {
  display: flex;
  align-items: center;
  gap: var(--space-20);
  padding: var(--space-20);
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
}
.testimonial-card p { margin: 0; }

/* Footer */
footer {
  background: var(--pastel-lav);
  border-top: 1px solid var(--border);
}
footer .content-wrapper { flex-direction: column; gap: var(--space-20); padding: var(--space-32) 0; }
.footer-nav { display: flex; flex-wrap: wrap; gap: var(--space-12); }
.footer-nav a { text-decoration: none; color: var(--ink); background: var(--pastel-sky); padding: 8px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.footer-nav a:hover { background: #dfeafb; }

/* -------- BUTTONS (utility) -------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--pastel-mint);
  color: var(--brand-primary);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: background var(--swift), box-shadow var(--swift), transform var(--swift);
}
.btn:hover { background: #ddf0e6; box-shadow: var(--shadow-md); transform: translateY(-1px); }

.btn-primary { background: #d7e6f5; color: var(--brand-primary); border-color: #c7d8eb; }
.btn-primary:hover { background: #cfe0f2; }

.btn-outline { background: #fff; color: var(--brand-primary); border: 1px solid var(--brand-primary); }
.btn-outline:hover { background: var(--pastel-sky); }

.btn-ghost { background: #fff; color: var(--ink); border-color: var(--border); }
.btn-ghost:hover { background: var(--brand-accent); }

/* -------- FLEX PATTERNS (required) -------- */
.section { margin-bottom: 60px; padding: 40px 20px; }
.card-container { display: flex; flex-wrap: wrap; gap: 24px; }
.card { margin-bottom: 20px; position: relative; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); padding: var(--space-16); }
.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 minimum spacing between content blocks */
.section > *, section > .container, .card-container > *, .content-grid > *, .text-image-section > * { margin: 0; }

/* -------- LISTS & ICON ROWS -------- */
.text-section[aria-label="Vorteile"] ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: var(--space-12); }
.text-section[aria-label="Vorteile"] li { display: flex; align-items: center; gap: 10px; }

/* -------- ACCESSIBILITY FOCUS -------- */
:focus-visible { outline: 2px dashed var(--brand-secondary); outline-offset: 2px; }

/* -------- COOKIE CONSENT BANNER -------- */
.cookie-banner {
  position: fixed;
  left: var(--space-16); right: var(--space-16); bottom: var(--space-16);
  display: flex; flex-direction: column; gap: var(--space-12);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: var(--space-16);
  z-index: 1100;
  transform: translateY(120%);
  opacity: 0; pointer-events: none;
  transition: transform var(--float), opacity var(--float);
}
.cookie-banner.show, .cookie-banner.active { transform: translateY(0); opacity: 1; pointer-events: auto; }
.cookie-banner h4 { margin: 0; font-size: 18px; color: var(--ink); }
.cookie-buttons { display: flex; flex-wrap: wrap; gap: var(--space-12); }
.cookie-buttons .btn-accept { background: #d7e6f5; border-color: #c7d8eb; color: var(--brand-primary); }
.cookie-buttons .btn-reject { background: #fff; border-color: var(--brand-secondary); color: var(--brand-secondary); }
.cookie-buttons .btn-settings { background: var(--pastel-rose); border-color: #f2cfe0; color: var(--ink); }
.cookie-buttons .btn-accept:hover { background: #cfe0f2; }
.cookie-buttons .btn-reject:hover { background: var(--pastel-mint); }
.cookie-buttons .btn-settings:hover { background: #f7dce9; }

/* Cookie Preferences Modal */
.cookie-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(13,59,102,0.2);
  display: flex; align-items: center; justify-content: center;
  z-index: 1200;
  opacity: 0; pointer-events: none;
  transition: opacity var(--float);
}
.cookie-modal-overlay.open, .cookie-modal-overlay.active { opacity: 1; pointer-events: auto; }
.cookie-modal {
  width: 92%; max-width: 560px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: var(--space-24);
  display: flex; flex-direction: column; gap: var(--space-16);
  transform: translateY(20px);
  transition: transform var(--float);
}
.cookie-modal-overlay.open .cookie-modal, .cookie-modal-overlay.active .cookie-modal { transform: translateY(0); }
.cookie-modal .modal-header { display: flex; align-items: center; justify-content: space-between; gap: var(--space-12); }
.cookie-modal .modal-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(--border); border-radius: var(--radius-md); background: var(--brand-accent); }
.cookie-toggle { display: flex; align-items: center; gap: 8px; }
.cookie-modal .modal-actions { display: flex; flex-wrap: wrap; gap: var(--space-12); justify-content: flex-end; }

/* -------- RESPONSIVE (mobile-first) -------- */
@media (min-width: 480px) {
  h1 { font-size: 36px; }
}

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

@media (min-width: 992px) {
  .main-nav { display: flex; }
  .header-ctas { display: flex; }
  .mobile-menu-toggle { display: none; }
  footer .content-wrapper { flex-direction: row; align-items: flex-start; justify-content: space-between; }
}

/* -------- UTILITY HELPERS -------- */
.muted { color: var(--ink-muted); }
.center { display: flex; align-items: center; justify-content: center; }
.stack-20 > * + * { margin-top: var(--space-20); }

/* -------- PAGE-SPECIFIC POLISH -------- */
/* Hero first section emphasis */
main > section:first-of-type .content-wrapper > h1 { background: var(--pastel-rose); border: 1px solid #f2cfe0; border-radius: var(--radius-lg); padding: 14px var(--space-16); box-shadow: var(--shadow-sm); }

/* Index: "Stimmen der Community" review line */
.text-section img[alt^="Stern"],
.text-section img[alt^="Abzeichen"] { margin-right: 6px; }

/* Contact links clarity */
.text-section a[href^="tel:"], .text-section a[href^="mailto:"] { text-decoration: none; font-weight: bold; }
.text-section a[href^="tel:"]:hover, .text-section a[href^="mailto:"]:hover { text-decoration: underline; }

/* Cards and feature items spacing in lists */
.text-section ul li, .text-section ol li { margin-bottom: 8px; }

/* Ensure no overlap and ample spacing */
section .text-section, section .testimonial-card { margin-right: 0; }

/* -------- SAFETY: NO GRID, FLEX ONLY -------- */
/* Intentionally no display:grid or column-* properties used anywhere */
