/* =============================
   Mondstein Küchenmagie – style.css
   Design: elegant_classic (serif, muted colors, refined spacing)
   Mobile-first, Flexbox-only layouts
   ============================= */

/* -----------------------------
   RESET & NORMALIZE
------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body, h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd { margin: 0; }
ul[role="list"], ol[role="list"], ul, ol { list-style: none; margin: 0; padding: 0; }
a { text-decoration: none; color: inherit; }
img, picture { max-width: 100%; display: block; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: none; padding: 0; cursor: pointer; }
:focus { outline: 2px solid #2F6E4F; outline-offset: 2px; }

/* -----------------------------
   THEME TOKENS (with fallbacks)
------------------------------ */
:root {
  --primary: #5A1F0F; /* Gewürz-Ton */
  --secondary: #2F6E4F; /* Waldgrün */
  --accent: #FFF7EE; /* Creme */
  --ink: #2B2A29; /* Textfarbe dunkel */
  --muted: #6B625C; /* Sekundärtext */
  --line: #E7E0D9; /* feine Linien */
  --paper: #FFFFFF; /* Karten/Hintergründe */
  --shadow: rgba(34, 18, 8, 0.06);
  --shadow-strong: rgba(34, 18, 8, 0.12);

  --font-display: Georgia, "Times New Roman", Times, serif;
  --font-body: Verdana, Geneva, Tahoma, sans-serif;

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

  --space-4: 4px;
  --space-8: 8px;
  --space-12: 12px;
  --space-16: 16px;
  --space-20: 20px;
  --space-24: 24px;
  --space-30: 30px;
  --space-32: 32px;
  --space-40: 40px;
  --space-48: 48px;
  --space-60: 60px;
  --space-80: 80px;
}

/* -----------------------------
   BASE TYPOGRAPHY & PAGE
------------------------------ */
body {
  font-family: var(--font-body, Verdana, Geneva, Tahoma, sans-serif);
  color: var(--ink, #2B2A29);
  background: var(--accent, #FFF7EE);
  line-height: 1.65;
  font-size: 16px;
}

h1, h2, h3, h4 { font-family: var(--font-display, Georgia, serif); color: var(--primary, #5A1F0F); line-height: 1.2; }
h1 { font-size: 34px; letter-spacing: 0.2px; }
h2 { font-size: 26px; margin-top: var(--space-16); }
h3 { font-size: 20px; color: var(--ink); }
.subtitle { color: var(--muted); font-size: 16px; margin-top: var(--space-8); }

p { margin: var(--space-12) 0; }
strong { font-weight: 700; }

/* Links */
a { color: var(--secondary); }
a:hover { color: #255741; }
a:focus-visible { outline: 2px solid var(--secondary); outline-offset: 2px; border-radius: 2px; }

/* Utility */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* -----------------------------
   LAYOUT CONTAINERS (Flexbox-only)
------------------------------ */
.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 var(--space-20);
  display: flex;             /* Flexbox as required */
  flex-direction: column;    /* Mobile-first */
  align-items: stretch;
  gap: var(--space-20);
}

.content-wrapper {
  display: flex;             /* Flexbox as required */
  flex-direction: column;
  gap: var(--space-16);
}

/* Global section rhythm (elegant spacing) */
section { margin-bottom: var(--space-60); padding: var(--space-40) 0; }

/* Header */
header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0; z-index: 1200;
  box-shadow: 0 2px 16px var(--shadow);
}
header > .container { flex-direction: row; align-items: center; justify-content: space-between; gap: var(--space-16); min-height: 64px; }
.logo img { height: 42px; width: auto; }

/* Main navigation */
.main-nav { display: none; align-items: center; gap: var(--space-20); }
.main-nav a {
  padding: 8px 6px;
  color: var(--ink);
  border-bottom: 1px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}
.main-nav a:hover { color: var(--primary); border-color: var(--line); }
.main-nav a[aria-current="page"] { color: var(--primary); border-color: var(--primary); }

/* Header CTAs */
.header-ctas { display: none; align-items: center; gap: var(--space-12); }

/* Mobile menu toggle */
.mobile-menu-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 1px 6px var(--shadow);
}
.mobile-menu-toggle:hover { background: #FFFAF5; }

/* Off-canvas mobile menu (covers full screen) */
.mobile-menu {
  position: fixed; inset: 0; /* full screen */
  background: var(--paper);
  transform: translateX(100%);
  transition: transform .35s ease;
  display: flex; flex-direction: column; gap: var(--space-16);
  padding: var(--space-20);
  z-index: 2000; /* above header */
}
.mobile-menu.active { transform: translateX(0); }
.mobile-menu-close {
  align-self: flex-end; width: 42px; height: 42px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--paper); color: var(--ink);
}
.mobile-menu-close:hover { background: #FFFAF5; }
.mobile-nav { display: flex; flex-direction: column; gap: 0; }
.mobile-nav a {
  padding: 14px 10px; border-bottom: 1px solid var(--line);
  color: var(--ink);
}
.mobile-nav a:hover { background: #FFFAF5; color: var(--primary); }
.mobile-nav a[aria-current="page"] { color: var(--primary); font-weight: bold; }

/* Hero */
.hero {
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 0; border-right: 0;
  box-shadow: 0 2px 18px var(--shadow);
}
.hero .content-wrapper { gap: var(--space-20); }
.hero h1 { font-size: 30px; }
.hero .cta-row { display: flex; flex-wrap: wrap; gap: var(--space-12); align-items: center; }

/* Breadcrumbs */
nav[aria-label="Brotkrumen"] {
  display: flex; flex-wrap: wrap; gap: var(--space-8);
  font-size: 14px; color: var(--muted);
}
nav[aria-label="Brotkrumen"] a { color: var(--secondary); }

/* Text blocks */
.text-section { display: flex; flex-direction: column; gap: var(--space-12); color: var(--ink); }
.text-section ul { display: flex; flex-direction: column; gap: 8px; padding-left: 1.25rem; list-style: disc; }
.text-section li { padding-left: 2px; }
.text-section img { width: 18px; height: 18px; margin-right: 8px; display: inline-block; vertical-align: middle; }

.tagline { font-size: 14px; color: var(--muted); border-left: 3px solid var(--secondary); padding-left: var(--space-12); }

/* Buttons */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 10px 16px; border-radius: var(--radius-sm); border: 1px solid transparent; transition: all .2s ease; text-decoration: none; }
.button.primary {
  background: var(--primary); color: #fff; border-color: var(--primary);
  box-shadow: 0 2px 10px var(--shadow);
}
.button.primary:hover { background: #4B1A0C; border-color: #4B1A0C; transform: translateY(-1px); }
.button.secondary {
  background: transparent; color: var(--secondary); border-color: var(--secondary);
}
.button.secondary:hover { background: #F0F6F3; }
.button.link {
  background: transparent; border-color: transparent; color: var(--primary); padding-left: 0; padding-right: 0;
  border-bottom: 1px solid var(--line);
}
.button.link:hover { color: #4B1A0C; border-color: var(--primary); }

/* Testimonials (high contrast, light bg) */
.testimonial-card {
  display: flex; align-items: center; gap: var(--space-20); padding: var(--space-20);
  background: var(--paper); color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: 0 3px 16px var(--shadow);
}
.testimonial-card p { margin: 0; }
.testimonial-card + .testimonial-card { margin-top: var(--space-20); }

/* Footer */
footer { background: #FBF6F0; border-top: 1px solid var(--line); }
footer .content-wrapper { display: flex; flex-direction: column; gap: var(--space-16); }
footer nav { display: flex; flex-wrap: wrap; gap: var(--space-12); }
footer nav a { color: var(--ink); font-size: 14px; padding: 6px 4px; }
footer nav a[aria-current="page"] { color: var(--primary); font-weight: 700; }
footer .text-section p { font-size: 14px; color: var(--muted); }

/* Images inside lists align nicely */
.text-section li img + * { vertical-align: middle; }

/* ------------------------------------
   MANDATORY SPACING & FLEX PATTERNS
------------------------------------- */
.section { margin-bottom: 60px; padding: 40px 20px; }
.card-container { display: flex; flex-wrap: wrap; gap: 24px; }
.card { margin-bottom: 20px; position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: 0 2px 12px var(--shadow); padding: var(--space-20); }
.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 */
.content-wrapper > * + * { margin-top: 10px; }

/* ------------------------------------
   COOKIE CONSENT: Banner & Modal
------------------------------------- */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0;
  background: var(--paper);
  border-top: 1px solid var(--line);
  box-shadow: 0 -4px 18px var(--shadow-strong);
  z-index: 1500;
  transform: translateY(100%);
  transition: transform .35s ease;
}
.cookie-banner.visible { transform: translateY(0); }
.cookie-banner .inner {
  display: flex; flex-direction: column; gap: var(--space-16);
  padding: var(--space-16) var(--space-20);
}
.cookie-banner p { margin: 0; font-size: 14px; color: var(--ink); }
.cookie-buttons { display: flex; flex-wrap: wrap; gap: var(--space-12); }
.cookie-buttons .accept { background: var(--secondary); color: #fff; border: 1px solid var(--secondary); }
.cookie-buttons .accept:hover { background: #255741; border-color: #255741; }
.cookie-buttons .reject { background: transparent; color: var(--primary); border: 1px solid var(--primary); }
.cookie-buttons .reject:hover { background: #FFF2EA; }
.cookie-buttons .settings { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.cookie-buttons .settings:hover { background: #FFFAF5; }
.cookie-buttons .button { padding: 10px 14px; border-radius: var(--radius-sm); }

/* Cookie modal */
.cookie-modal {
  position: fixed; inset: 0; background: rgba(0,0,0,0.45);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .25s ease;
  z-index: 3000;
}
.cookie-modal.open { opacity: 1; pointer-events: auto; }
.cookie-modal .dialog {
  width: 92%; max-width: 720px; background: var(--paper); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: 0 12px 28px var(--shadow-strong);
  display: flex; flex-direction: column; gap: var(--space-16);
  padding: var(--space-24);
  transform: translateY(12px); transition: transform .25s ease;
}
.cookie-modal.open .dialog { transform: translateY(0); }
.cookie-modal .dialog h3 { margin-top: 0; }
.cookie-categories { 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 0; border-bottom: 1px solid var(--line); }
.cookie-category .meta { display: flex; flex-direction: column; gap: 4px; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: var(--space-12); justify-content: flex-end; }

/* Simple toggle switch */
.toggle { position: relative; width: 46px; height: 26px; border-radius: 20px; background: #DDD; transition: background .2s ease; border: 1px solid #CCC; }
.toggle::after { content: ""; position: relative; display: block; width: 22px; height: 22px; background: #fff; border-radius: 50%; margin: 1px; box-shadow: 0 1px 4px var(--shadow); left: 0; transition: left .2s ease; }
.toggle.on { background: var(--secondary); border-color: var(--secondary); }
.toggle.on::after { left: 18px; }

/* ------------------------------------
   ACCESSIBILITY & INTERACTIONS
------------------------------------- */
.button, .mobile-menu-toggle, .mobile-menu-close { transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease; }
.button:active { transform: translateY(0); }

/* ------------------------------------
   RESPONSIVE (Mobile-first)
------------------------------------- */
@media (min-width: 600px) {
  h1 { font-size: 38px; }
  .hero h1 { font-size: 40px; }
}

@media (min-width: 768px) {
  .text-image-section { flex-direction: row; }
  .container { gap: var(--space-24); }
  .content-wrapper { gap: var(--space-20); }
  .hero .content-wrapper { gap: var(--space-24); }
}

@media (min-width: 960px) {
  header > .container { gap: var(--space-24); }
  .main-nav { display: flex; }
  .header-ctas { display: flex; }
  .mobile-menu-toggle { display: none; }
  .hero h1 { font-size: 48px; }
  .cta-row { gap: var(--space-16); }
  footer .content-wrapper { flex-direction: row; justify-content: space-between; align-items: center; }
}

/* ------------------------------------
   ADDITIONAL ELEGANT COMPONENTS
------------------------------------- */
/* Classic card visual for any content */
.card { background: var(--paper); }
.card:hover { box-shadow: 0 6px 20px var(--shadow); }

/* Content grid spacing with flex-only */
.content-grid > * {
  flex: 1 1 260px;
}

/* Lists inside hero or sections keep readable width */
.content-wrapper { max-width: 900px; }

/* Ensure no overlaps and healthy spacing */
.content-wrapper > .testimonial-card { margin-top: var(--space-12); }
.container > .content-wrapper + .content-wrapper { margin-top: var(--space-20); }

/* ------------------------------------
   STATES & MISC
------------------------------------- */
[aria-current="page"] { position: relative; }
[aria-current="page"]::after {
  content: ""; display: block; height: 2px; width: 100%; background: var(--primary);
}

/* Make inline icons align text */
.text-section li { display: flex; align-items: center; gap: 8px; }

/* ------------------------------------
   PRINT (simple, elegant)
------------------------------------- */
@media print {
  header, .mobile-menu, .cookie-banner, .cookie-modal, footer { display: none !important; }
  body { background: #fff; color: #000; }
  a { color: #000; text-decoration: underline; }
}

/* ------------------------------------
   SAFEGUARDS (Flex-only rule compliance)
------------------------------------- */
/* No CSS Grid or multi-column properties are used. All layout containers use display:flex. */
