/* =====================================================
   AquaLeman Bewässerung – Warm Friendly UI (Flex-only)
   Complete style.css for all pages
   ===================================================== */

/* -------------------------
   CSS Reset & Base Normalize
   ------------------------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body, h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd { margin: 0; }
ul, ol { margin: 0; padding-left: 1.25rem; }
a { background-color: transparent; text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }
button { font: inherit; border: none; background: none; padding: 0; cursor: pointer; }
input, select, textarea { font: inherit; }

/* -------------------------
   Theme Variables & Fallbacks
   ------------------------- */
:root {
  --primary: #0A6FB6;
  --secondary: #2E7D32;
  --accent: #F2F7FA;
  --warm-bg: #FFF8F2; /* warm backdrop */
  --warm-surface: #FFF3E5; /* warm surface for hero/cards */
  --warm-chip: #FFE9D6; /* chips/badges */
  --ink: #2B2B2B;
  --muted: #616161;
  --border: #E8DFD7;
  --shadow: rgba(17, 24, 39, 0.08);
  --shadow-strong: rgba(17, 24, 39, 0.14);
}

/* -------------------------
   Base Typography & Page
   ------------------------- */
body {
  color: #2B2B2B; color: var(--ink);
  background: #FFFDF9; background: var(--warm-bg);
  font-family: Verdana, Geneva, sans-serif;
  line-height: 1.6;
  font-size: 16px;
}

h1, h2, h3, h4 { font-family: "Trebuchet MS", Tahoma, sans-serif; color: #1d1d1f; }
h1 { font-size: 32px; line-height: 1.2; margin-bottom: 16px; }
h2 { font-size: 24px; line-height: 1.3; margin-bottom: 16px; }
h3 { font-size: 18px; line-height: 1.4; margin-top: 12px; margin-bottom: 8px; }

p { margin-bottom: 12px; color: #2B2B2B; }
small, .small { font-size: 14px; color: #616161; color: var(--muted); }
strong { font-weight: 700; }

/* Links & Focus */
a { color: #0A6FB6; color: var(--primary); }
a:hover { color: #084f83; }
:focus-visible { outline: 3px solid #0A6FB6; outline: 3px solid var(--primary); outline-offset: 2px; border-radius: 8px; }

/* -------------------------
   Layout Containers (Flex-only)
   ------------------------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;            /* FLEX ONLY */
  flex-direction: column;   /* mobile-first */
  gap: 20px;
  align-items: stretch;
}

.content-wrapper {
  display: flex;            /* FLEX ONLY */
  flex-direction: column;
  gap: 16px;
}

/* Mandatory spacing patterns (also apply to raw section) */
section, .section { margin-bottom: 60px; padding: 40px 20px; }
.card-container { display: flex; flex-wrap: wrap; gap: 24px; }
.card { margin-bottom: 20px; position: relative; background: #fff; border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 8px 24px var(--shadow); padding: 20px; }
.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: #FFF3E5; background: var(--warm-surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 8px 24px var(--shadow); color: #1f2937; }
.feature-item { display: flex; flex-direction: column; align-items: flex-start; gap: 15px; }

/* Utility flex gaps for repeated patterns */
.stack-8 { display: flex; flex-direction: column; gap: 8px; }
.stack-12 { display: flex; flex-direction: column; gap: 12px; }
.stack-16 { display: flex; flex-direction: column; gap: 16px; }
.row-gap-12 { display: flex; flex-wrap: wrap; gap: 12px; }

/* -------------------------
   Header & Navigation
   ------------------------- */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #FFFFFF;
  box-shadow: 0 6px 20px var(--shadow);
  border-bottom: 1px solid var(--border);
}

header .container {
  flex-direction: row;           /* header horizontal */
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

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

.main-nav {
  display: none;                 /* hidden on mobile */
  align-items: center;
  gap: 16px;
}
.main-nav a {
  color: #2B2B2B; color: var(--ink);
  padding: 10px 12px;
  border-radius: 12px;
  transition: background-color .25s ease, color .25s ease, transform .2s ease;
}
.main-nav a[aria-current="page"], .main-nav a:hover {
  background: #F9EDE1; /* warm hover */
  color: #0A6FB6; color: var(--primary);
}

.mobile-menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 12px;
  color: #FFFFFF;
  background: #0A6FB6; background: var(--primary);
  box-shadow: 0 6px 18px var(--shadow);
  transition: transform .2s ease, background .25s ease;
}
.mobile-menu-toggle:hover { transform: scale(1.04); background: #095f9b; }

/* Mobile menu overlay */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: rgba(30, 27, 22, 0.5);
  display: flex;                 /* FLEX ONLY */
  flex-direction: row;
  align-items: stretch;
  justify-content: flex-end;
  transform: translateX(100%);
  transition: transform .35s ease;
  z-index: 1100;
}
.mobile-menu.open, .mobile-menu.active, body.menu-open .mobile-menu { transform: translateX(0); }

.mobile-menu .mobile-nav {
  width: 86%; max-width: 360px; height: 100%;
  background: #FFFFFF;
  display: flex;                 /* FLEX ONLY */
  flex-direction: column;
  gap: 4px;
  padding: 20px;
  border-top-left-radius: 16px; border-bottom-left-radius: 16px;
  box-shadow: -8px 0 24px var(--shadow-strong);
}
.mobile-menu-close {
  position: absolute; right: 12px; top: 12px;
  width: 40px; height: 40px; border-radius: 12px;
  background: #FFF3E5; background: var(--warm-surface);
  color: #0A6FB6; color: var(--primary);
}
.mobile-nav a {
  padding: 14px 12px;
  border-radius: 12px;
  color: #2B2B2B; color: var(--ink);
  transition: background-color .25s ease, color .25s ease;
}
.mobile-nav a:hover, .mobile-nav a[aria-current="page"] { background: #F9EDE1; color: #0A6FB6; }

/* -------------------------
   Hero
   ------------------------- */
.hero {
  background: #FFF3E5; background: var(--warm-surface);
  border-bottom: 1px solid var(--border);
}
.hero .container { align-items: stretch; }
.hero .content-wrapper { gap: 12px; }
.hero p { color: #3a3a3a; }
.tagline {
  color: #2E7D32; color: var(--secondary);
  background: #EAF7EA;
  padding: 10px 12px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 14px var(--shadow);
}

/* -------------------------
   CTA Buttons & Groups
   ------------------------- */
.cta-group {
  display: flex;                 /* FLEX ONLY */
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.cta-group a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 14px;
  font-weight: 700;
  letter-spacing: 0.2px;
  box-shadow: 0 8px 20px var(--shadow);
  transition: transform .18s ease, box-shadow .25s ease, background .25s ease, color .25s ease;
}
.cta-group a:first-child {
  background: #0A6FB6; background: var(--primary);
  color: #FFFFFF;
}
.cta-group a:first-child:hover { transform: translateY(-1px); box-shadow: 0 10px 26px var(--shadow-strong); background: #095f9b; }
.cta-group a:nth-child(2) {
  background: #FFE9D6; background: var(--warm-chip);
  color: #0A6FB6; color: var(--primary);
}
.cta-group a:nth-child(2):hover { transform: translateY(-1px); background: #FADDC4; }

/* Trust badges */
.trust-badges { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding-left: 0; }
.trust-badges li {
  background: #FFE9D6; background: var(--warm-chip);
  color: #2B2B2B; color: var(--ink);
  padding: 8px 12px;
  border-radius: 999px;
  box-shadow: 0 4px 12px var(--shadow);
}

/* -------------------------
   Generic Text Sections, Lists, Map
   ------------------------- */
.text-section { display: flex; flex-direction: column; gap: 10px; }
.text-section ul, .text-section ol { display: flex; flex-direction: column; gap: 8px; padding-left: 1.2rem; }
.text-section p img, .text-section img { display: inline-block; vertical-align: middle; margin-right: 8px; }

.map-placeholder {
  display: flex; align-items: center; justify-content: center;
  min-height: 200px;
  background: #FFFFFF;
  border: 2px dashed var(--border);
  color: #616161; color: var(--muted);
  border-radius: 16px;
  padding: 16px;
}

/* -------------------------
   Section Styling
   ------------------------- */
section:not(.hero) {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 10px 28px var(--shadow);
}

/* Ordered lists spacing in content wrappers */
.content-wrapper > ol { display: flex; flex-direction: column; gap: 8px; padding-left: 1.2rem; }

/* -------------------------
   Testimonials – High Contrast
   ------------------------- */
.testimonial-card p { margin: 0; }
.testimonial-card strong { color: #1f2937; }

/* -------------------------
   Footer
   ------------------------- */
footer {
  background: #FFF3E5; background: var(--warm-surface);
  border-top: 1px solid var(--border);
}
footer .container { padding-top: 24px; padding-bottom: 24px; }
footer .content-wrapper {
  display: flex;                 /* FLEX ONLY */
  flex-direction: column;
  gap: 16px;
}
.footer-nav, .footer-legal {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
}
.footer-nav a, .footer-legal a {
  color: #2B2B2B; color: var(--ink);
  padding: 8px 10px;
  border-radius: 10px;
}
.footer-nav a:hover, .footer-legal a:hover { background: #F9EDE1; color: #0A6FB6; }

/* -------------------------
   Accessibility helpers
   ------------------------- */
[aria-current="page"] { font-weight: 700; }

/* -------------------------
   Responsive (Flex directions & visibility)
   ------------------------- */
@media (min-width: 768px) {
  h1 { font-size: 40px; }
  h2 { font-size: 28px; }
  .text-image-section { flex-direction: row; }
  .main-nav { display: flex; }
  .mobile-menu-toggle { display: none; }
  .container { gap: 24px; }
}

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

/* -------------------------
   Extra Components (for future use per spec)
   ------------------------- */
/* Features and card patterns */
.features { display: flex; flex-wrap: wrap; gap: 20px; }
.card-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; }
.card-grid .card { flex: 1 1 260px; }

/* -------------------------
   Buttons, Inputs, Chips baseline
   ------------------------- */
.button, .btn { display: inline-flex; align-items: center; justify-content: center; padding: 12px 18px; border-radius: 14px; font-weight: 700; box-shadow: 0 8px 20px var(--shadow); transition: transform .18s ease, box-shadow .25s ease; }
.button:hover, .btn:hover { transform: translateY(-1px); box-shadow: 0 10px 26px var(--shadow-strong); }

input[type="text"], input[type="email"], textarea, select {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  width: 100%;
  box-shadow: 0 4px 12px var(--shadow) inset;
}

/* -------------------------
   Cookie Consent Banner & Modal
   ------------------------- */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0;
  background: #FFFFFF;
  border-top: 1px solid var(--border);
  box-shadow: 0 -8px 24px var(--shadow-strong);
  padding: 16px;
  z-index: 1200;
  display: none;                /* hidden by default */
}
.cookie-banner.show { display: flex; }
.cookie-banner .inner {
  margin: 0 auto; max-width: 1100px; padding: 0 8px;
  display: flex; flex-direction: column; gap: 12px;
}
.cookie-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-buttons .accept {
  background: #0A6FB6; background: var(--primary); color: #fff; border-radius: 12px; padding: 10px 16px;
}
.cookie-buttons .reject {
  background: #FFE9D6; background: var(--warm-chip); color: #0A6FB6; color: var(--primary); border-radius: 12px; padding: 10px 16px;
}
.cookie-buttons .settings {
  background: #FFFFFF; color: #2B2B2B; border: 1px solid var(--border); border-radius: 12px; padding: 10px 16px;
}
.cookie-buttons button { box-shadow: 0 6px 18px var(--shadow); transition: transform .18s ease, box-shadow .25s ease; }
.cookie-buttons button:hover { transform: translateY(-1px); box-shadow: 0 10px 26px var(--shadow-strong); }

/* Cookie Modal */
.cookie-modal {
  position: fixed; inset: 0; display: none; z-index: 1300;
  background: rgba(0,0,0,0.45);
  align-items: center; justify-content: center;
}
.cookie-modal.show { display: flex; }
.cookie-modal .panel {
  width: 92%; max-width: 720px; background: #FFFFFF; border-radius: 18px; border: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 14px; padding: 18px;
  box-shadow: 0 24px 60px var(--shadow-strong);
}
.cookie-category { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; }
.cookie-category .label { display: flex; flex-direction: column; gap: 4px; }
.cookie-category small { color: var(--muted); }

/* Toggle switch */
.switch { position: relative; width: 46px; height: 26px; border-radius: 999px; background: #e5e7eb; transition: background .25s ease; display: inline-flex; align-items: center; padding: 3px; }
.switch input { appearance: none; width: 0; height: 0; }
.switch .dot { width: 20px; height: 20px; border-radius: 50%; background: #FFFFFF; box-shadow: 0 2px 6px var(--shadow); transform: translateX(0); transition: transform .25s ease, background .25s ease; }
.switch input:checked + .dot { transform: translateX(20px); background: #0A6FB6; }

/* -------------------------
   Micro-interactions
   ------------------------- */
section, .card, .testimonial-card, .cta-group a { transition: box-shadow .25s ease, transform .18s ease, background-color .25s ease, border-color .25s ease; }
section:hover { box-shadow: 0 12px 32px var(--shadow-strong); }

/* -------------------------
   Print basics
   ------------------------- */
@media print {
  header, .mobile-menu, .cookie-banner, .cookie-modal { display: none !important; }
  section, .section { box-shadow: none; border: 1px solid #ccc; }
}

/* -------------------------
   Page-specific small tweaks
   ------------------------- */
.hero .cta-group a { will-change: transform; }

/* Ensure proper spacing between sections and prevent overlap */
main { display: flex; flex-direction: column; gap: 24px; padding-top: 12px; }

/* Desktop refinements */
@media (min-width: 992px) {
  .content-grid > * { flex: 1 1 calc(50% - 20px); }
}
