/* ===============================
   Brightwave Trail Ernährungsatelier
   Vibrant + Energetic Style CSS (Flex-only)
   Author: Senior CSS Developer & UI Designer
   =============================== */

/* -------------------------------
   0) CSS Reset / Normalize (light)
   ------------------------------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { height: 100%; }
body, h1, h2, h3, h4, h5, h6, p, ul, ol, li, figure { margin: 0; padding: 0; }
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
button { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; }
ul, ol { padding-left: 1.2rem; }

/* -------------------------------
   1) Brand Variables + Fallbacks
   ------------------------------- */
:root {
  --color-primary: #0E5A38;     /* brand primary */
  --color-secondary: #3A7D8C;   /* brand secondary */
  --color-accent: #F4FFF9;      /* brand accent */
  --color-ink: #0F172A;         /* dark ink for contrast */
  --color-muted: #5B6574;
  --color-border: #D7E5DD;
  --color-card: #FFFFFF;
  /* energetic supporting accents */
  --energy-pink: #FF3D5A;
  --energy-yellow: #FFD400;
  --energy-lime: #2DD36F;

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;

  --shadow-sm: 0 2px 10px rgba(0,0,0,0.06);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.12);
  --shadow-lg: 0 18px 40px rgba(0,0,0,0.16);

  --container-max: 1180px;
}

/* -------------------------------
   2) Base Typography & Body
   ------------------------------- */
body {
  font-family: Verdana, Geneva, Tahoma, sans-serif; /* brand body */
  color: var(--color-ink);
  background-color: #FFFFFF;
  line-height: 1.6;
}

h1, h2, h3 {
  font-family: "Trebuchet MS", Verdana, Geneva, Tahoma, sans-serif; /* brand display */
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.2px;
  color: var(--color-ink);
}

h1 { font-size: 32px; margin-bottom: 16px; }
h2 { font-size: 24px; margin-bottom: 14px; }
h3 { font-size: 18px; margin-bottom: 10px; }

p, li { font-size: 16px; }
strong { font-weight: 800; }
em { font-style: italic; }

/* Energetic highlight underline for links */
a { color: var(--color-secondary); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--color-primary); text-decoration-thickness: 2px; }

/* Focus styles */
:focus-visible { outline: 3px solid var(--energy-yellow); outline-offset: 2px; border-radius: 6px; }

/* -------------------------------
   3) Layout Primitives (Flex-only)
   ------------------------------- */
.container {
  width: 100%;
  margin: 0 auto;
  padding: 16px 20px;
  max-width: var(--container-max);
  display: flex;
  flex-direction: column;
  gap: 20px; /* breathing room */
}

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

.text-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

/* Default section spacing for all sections */
main section {
  background: var(--color-accent);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin: 20px; /* ensure separation from viewport edges on mobile */
}

/* MANDATORY CSS SPACING AND ALIGNMENT PATTERNS */
.section { margin-bottom: 60px; padding: 40px 20px; }
.card-container { display: flex; flex-wrap: wrap; gap: 24px; }
.card { margin-bottom: 20px; position: relative; }
.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 all cards/sections have at least 20px separation */
section + section { margin-top: 24px; }

/* -------------------------------
   4) Header & Navigation
   ------------------------------- */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #FFFFFF;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

header .container {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo img { height: 36px; width: auto; }

.main-nav {
  display: none; /* mobile hidden */
  align-items: center;
  gap: 16px;
}

.main-nav a {
  display: inline-flex;
  align-items: center;
  padding: 10px 12px;
  border-radius: 999px;
  font-weight: 700;
  color: var(--color-ink);
  background: transparent;
  transition: background-color .25s ease, color .25s ease, transform .2s ease;
}

.main-nav a:hover {
  background: var(--color-accent);
  color: var(--color-primary);
  transform: translateY(-1px);
}

.mobile-menu-toggle {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, background-color .25s ease;
}
.mobile-menu-toggle:hover { transform: translateY(-2px); background: #0c4c30; }

/* Mobile Menu Overlay */
.mobile-menu {
  position: fixed;
  inset: 0 0 0 auto; /* right-side panel semantics; covers full width by default */
  width: 100%;
  background: rgba(15,23,42,0.5);
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  align-items: stretch;
  transform: translateX(100%);
  transition: transform .35s ease;
  z-index: 100;
}

/* panel */
.mobile-menu > nav.mobile-nav {
  background: #FFFFFF;
  width: 82%;
  max-width: 360px;
  padding: 24px 20px 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-lg);
}

.mobile-menu .mobile-menu-close {
  position: absolute;
  right: 14px; top: 12px;
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--energy-pink);
  color: #fff;
  z-index: 101;
}

/* Open states (support multiple toggling conventions) */
.mobile-menu.open,
.mobile-menu.active,
.mobile-menu.is-open,
.mobile-menu[aria-hidden="false"] { transform: translateX(0); }

.mobile-nav a {
  display: flex;
  align-items: center;
  padding: 14px 12px;
  border-radius: 12px;
  font-weight: 700;
  color: var(--color-ink);
  transition: background-color .25s ease, color .25s ease;
}
.mobile-nav a:hover { background: var(--color-accent); color: var(--color-primary); }

/* -------------------------------
   5) Buttons
   ------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: 0.2px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, background-color .25s ease, color .25s ease;
  border: 2px solid transparent;
}
.btn.primary { background: var(--color-primary); color: #FFFFFF; }
.btn.primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); background: #0c4c30; }

.btn.secondary { background: #FFFFFF; color: var(--color-primary); border-color: var(--color-primary); }
.btn.secondary:hover { background: var(--color-primary); color: #FFFFFF; transform: translateY(-2px); }

/* Emphasis chip (optional) */
.chip { display: inline-flex; align-items: center; padding: 6px 10px; border-radius: 999px; background: var(--energy-yellow); color: #0F172A; font-weight: 800; }

/* -------------------------------
   6) Cards, Testimonials & Lists
   ------------------------------- */
.card, .text-section, .testimonial-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.text-section { padding: 16px; }
.card { padding: 20px; }

.testimonial-card {
  background: #FFFFFF; /* high readability */
  border-left: 6px solid var(--color-secondary);
  border-right: 6px solid var(--energy-lime);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  color: var(--color-ink);
}

.testimonial-card p { margin: 0; }
.testimonial-card p:first-child { font-size: 16px; }
.testimonial-card p + p { opacity: 0.95; }

/* Lift on hover for interactive feel */
.card:hover, .text-section:hover, .testimonial-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); transition: transform .2s ease, box-shadow .2s ease; }

/* Ordered and unordered lists inside content */
.content-wrapper ul, .content-wrapper ol, .text-section ul, .text-section ol {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 8px 0 0 0;
}

/* -------------------------------
   7) Footer
   ------------------------------- */
footer {
  background: #0b1320;
  color: #E8EDF5;
}
footer a { color: #E8EDF5; text-decoration: underline; text-underline-offset: 3px; }
footer a:hover { color: var(--energy-yellow); }

footer .content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.footer-links, .footer-legal {
  display: flex; flex-wrap: wrap; gap: 12px;
}

/* -------------------------------
   8) Images & Icon rows in text
   ------------------------------- */
.text-section img { width: 18px; height: 18px; display: inline-block; vertical-align: text-bottom; margin-right: 6px; }

/* -------------------------------
   9) Responsive Enhancements (Flex-only)
   ------------------------------- */
@media (min-width: 576px) {
  h1 { font-size: 36px; }
  h2 { font-size: 28px; }
  h3 { font-size: 20px; }
}

@media (min-width: 768px) {
  .text-image-section { flex-direction: row; }

  .content-wrapper { gap: 24px; }
  .cta-group { gap: 16px; }

  main section { margin: 24px; }
}

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

  .container { padding: 20px 24px; }

  /* Create dynamic split layouts using flex only */
  .content-grid { justify-content: space-between; }
  .content-grid > * { flex: 1 1 calc(50% - 10px); }

  /* Footer into multi-column using flex */
  footer .content-wrapper { flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; }
  footer .content-wrapper > * { flex: 1 1 280px; }
}

@media (min-width: 1200px) {
  h1 { font-size: 48px; }
  h2 { font-size: 32px; }
  h3 { font-size: 22px; }
}

/* -------------------------------
   10) Energetic Section Treatments
   ------------------------------- */
/* Accent stripe on section titles */
.content-wrapper > h2, .content-wrapper > h1 {
  position: relative;
  padding-left: 14px;
}
.content-wrapper > h2::before, .content-wrapper > h1::before {
  content: "";
  position: absolute; left: 0; top: 6px; bottom: 6px;
  width: 6px;
  background: var(--energy-pink);
  border-radius: 6px;
}

/* Punchy callouts inside paragraphs */
.text-section strong { background: rgba(255,61,90,0.08); padding: 2px 6px; border-radius: 6px; }

/* -------------------------------
   11) Accessibility & Readability
   ------------------------------- */
/* Ensure testimonial high contrast */
.testimonial-card, .testimonial-card p, .testimonial-card strong { color: #0F172A; }

/* -------------------------------
   12) Utilities
   ------------------------------- */
.hide { display: none !important; }
.center { display: flex; align-items: center; justify-content: center; }

/* -------------------------------
   13) Cookie Consent Banner & Modal
   ------------------------------- */
.cookie-banner {
  position: fixed;
  left: 16px; right: 16px; bottom: 16px;
  background: #FFFFFF;
  border: 1px solid var(--color-border);
  border-left: 6px solid var(--color-primary);
  box-shadow: var(--shadow-md);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
  z-index: 120;
  transform: translateY(120%);
  opacity: 0;
  transition: transform .35s ease, opacity .35s ease;
}
.cookie-banner.show, .cookie-banner.open, .cookie-banner.is-visible { transform: translateY(0); opacity: 1; }
.cookie-banner h4 { font-family: "Trebuchet MS", Verdana, sans-serif; font-size: 18px; font-weight: 800; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-btn { padding: 10px 14px; border-radius: 999px; font-weight: 800; border: 2px solid transparent; box-shadow: var(--shadow-sm); }
.cookie-btn.accept { background: var(--color-primary); color: #fff; }
.cookie-btn.accept:hover { background: #0c4c30; }
.cookie-btn.reject { background: #FFFFFF; color: var(--energy-pink); border-color: var(--energy-pink); }
.cookie-btn.reject:hover { background: var(--energy-pink); color: #fff; }
.cookie-btn.settings { background: #FFFFFF; color: var(--color-secondary); border-color: var(--color-secondary); }
.cookie-btn.settings:hover { background: var(--color-secondary); color: #fff; }

/* Cookie Preferences Modal */
.cookie-modal-overlay {
  position: fixed; inset: 0; background: rgba(15,23,42,0.55); z-index: 140;
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.cookie-modal-overlay.open, .cookie-modal-overlay.active { display: flex; }

.cookie-modal {
  background: #FFFFFF;
  width: 100%; max-width: 720px;
  border-radius: 16px;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; gap: 16px;
  padding: 20px;
}
.cookie-modal header { display: flex; align-items: center; justify-content: space-between; }
.cookie-modal h3 { font-size: 22px; }
.cookie-modal .modal-body { display: flex; flex-direction: column; gap: 14px; }
.cookie-category { display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border: 1px solid var(--color-border); border-radius: 12px; background: var(--color-accent); }
.cookie-category .info { display: flex; flex-direction: column; gap: 6px; }
.cookie-modal .modal-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }

/* Toggle switch */
.toggle { display: inline-flex; align-items: center; gap: 10px; }
.toggle input { appearance: none; width: 44px; height: 26px; border-radius: 999px; background: #E5E7EB; position: relative; outline: none; transition: background-color .25s ease; }
.toggle input::after { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; background: #fff; border-radius: 50%; box-shadow: var(--shadow-sm); transition: transform .25s ease; }
.toggle input:checked { background: var(--color-secondary); }
.toggle input:checked::after { transform: translateX(18px); }
.toggle .label { font-weight: 700; color: var(--color-ink); }

/* -------------------------------
   14) Print tweaks
   ------------------------------- */
@media print {
  header, .mobile-menu, .cookie-banner, .cookie-modal-overlay { display: none !important; }
  a { text-decoration: underline; }
}

/* -------------------------------
   15) Page-specific gentle tweaks
   ------------------------------- */
/* Hero intro paragraphs a bit larger for energy */
main section:first-of-type .content-wrapper > p { font-size: 18px; color: var(--color-muted); }

/* Index: principle steps list spacing */
ol.text-section { counter-reset: step; }
ol.text-section li { position: relative; padding-left: 0; }

/* Buttons inside paragraphs spacing */
.content-wrapper p .btn { margin-top: 8px; }

/* -------------------------------
   16) Compliance checks
   - Flex-only layouts for all container classes
   - No CSS Grid or Columns used
   ------------------------------- */
/* Additional Flex helpers for possible future containers */
.flex-row { display: flex; flex-direction: row; gap: 20px; }
.flex-col { display: flex; flex-direction: column; gap: 20px; }

/* END */
