/* =====================================================
   Funkenküche – Elegant Classic UI (Mobile-first, Flex-only)
   Style: timeless, muted palette, serif-forward typography
   ===================================================== */

/* -----------------------------
   CSS Reset & Normalize
----------------------------- */
html { box-sizing: border-box; -webkit-text-size-adjust: 100%; }
*, *::before, *::after { box-sizing: inherit; }
body, h1, h2, h3, h4, h5, h6, p, ul, ol, li, figure, blockquote { margin: 0; padding: 0; }
img, picture { max-width: 100%; display: block; }
ul, ol { list-style: none; }
a { text-decoration: none; color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid #3F6B4C; outline-offset: 2px; }

/* -----------------------------
   Theme Tokens
----------------------------- */
:root {
  --color-primary: #7A2E1F; /* warm chestnut */
  --color-primary-700: #612517;
  --color-secondary: #3F6B4C; /* deep herb green */
  --color-secondary-700: #2E5039;
  --color-accent: #FFF4E6; /* soft cream */
  --color-cream: #FAF6F0;
  --color-paper: #FFFFFF;
  --color-ink: #2A2A2A;
  --color-muted: #6B625B;
  --color-border: #E6DED5;
  --radius-sm: 8px;
  --radius-md: 12px;
  --shadow-sm: 0 2px 8px rgba(20, 16, 12, 0.06);
  --shadow-md: 0 8px 18px rgba(20, 16, 12, 0.09);
  --shadow-lg: 0 14px 30px rgba(20, 16, 12, 0.12);
}

/* -----------------------------
   Base Typography (Elegant Classic)
----------------------------- */
body {
  font-family: Georgia, 'Times New Roman', Times, serif; /* serif-first for classic tone */
  color: var(--color-ink);
  background: var(--color-cream);
  line-height: 1.6;
  font-size: 16px;
}

h1, h2, h3, h4, h5, h6 {
  font-family: Georgia, 'Times New Roman', Times, serif;
  color: var(--color-primary);
  line-height: 1.25;
}

h1 { font-size: 32px; letter-spacing: 0.2px; }
h2 { font-size: 24px; margin-top: 8px; }
h3 { font-size: 20px; color: var(--color-ink); }

p, li { font-size: 16px; color: var(--color-ink); }
.small, .tagline, .subheadline { font-family: Georgia, 'Times New Roman', Times, serif; }
.subheadline { font-size: 18px; color: var(--color-muted); }
.tagline { font-size: 14px; color: var(--color-muted); font-style: italic; }

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

/* Utility Typography */
.lead { font-size: 18px; color: var(--color-ink); }
.muted { color: var(--color-muted); }

/* -----------------------------
   Layout Containers (Flex-only)
----------------------------- */
.container { display: flex; width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.content-wrapper { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; width: 100%; }

main { display: flex; flex-direction: column; gap: 32px; }
section { display: flex; width: 100%; padding: 28px 0; border-top: 1px solid rgba(122,46,31,0.06); }

/* Mandatory spacing classes */
.section { margin-bottom: 60px; padding: 40px 20px; display: flex; flex-direction: column; gap: 20px; }
.card-container { display: flex; flex-wrap: wrap; gap: 24px; }
.card { margin-bottom: 20px; position: relative; display: flex; flex-direction: column; gap: 14px; }
.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; }

/* Generic text block styling used widely in HTML */
.text-section { display: flex; flex-direction: column; gap: 10px; }
.text-section ul, .text-section ol { display: flex; flex-direction: column; gap: 8px; padding-left: 18px; }
.text-section ul { list-style: disc; }
.text-section ol { list-style: decimal; }

/* -----------------------------
   Header & Navigation
----------------------------- */
header { background: var(--color-paper); border-bottom: 1px solid var(--color-border); position: relative; z-index: 1050; }
header .container { align-items: center; }
header .content-wrapper { padding: 16px 0; }

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

/* Main navigation */
.main-nav { display: none; align-items: center; gap: 16px; flex-wrap: wrap; }
.main-nav a {
  padding: 8px 10px;
  color: var(--color-ink);
  border-radius: var(--radius-sm);
  transition: color .2s ease, background-color .2s ease;
}
.main-nav a:hover { background: var(--color-accent); color: var(--color-primary); }

/* Header CTAs */
.header-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.header-cta a { display: inline-flex; align-items: center; justify-content: center; padding: 10px 14px; border-radius: 999px; border: 1px solid var(--color-primary); color: var(--color-primary); transition: background-color .25s ease, color .25s ease, border-color .25s ease, transform .08s ease; }
.header-cta a:first-child { background: var(--color-primary); color: #fff; }
.header-cta a:first-child:hover { background: var(--color-primary-700); border-color: var(--color-primary-700); }
.header-cta a:hover { transform: translateY(-1px); }

/* Hero */
.hero { background: var(--color-accent); border-top: none; border-bottom: 1px solid var(--color-border); }
.hero .content-wrapper { padding: 28px 0; gap: 14px; }
.hero h1 { font-size: 28px; color: var(--color-primary); }
.hero .cta-row { display: flex; gap: 12px; flex-wrap: wrap; }
.cta-row a { display: inline-flex; align-items: center; justify-content: center; padding: 10px 16px; border-radius: 999px; border: 1px solid var(--color-secondary); color: var(--color-paper); background: var(--color-secondary); transition: background-color .25s ease, border-color .25s ease, transform .08s ease; }
.cta-row a:hover { background: var(--color-secondary-700); border-color: var(--color-secondary-700); transform: translateY(-1px); }
.cta-row a + a { background: transparent; color: var(--color-secondary); border-color: var(--color-secondary); }
.cta-row a + a:hover { background: rgba(63,107,76,0.08); }

/* -----------------------------
   Testimonials (Readable, light backgrounds)
----------------------------- */
.testimonial-card {
  background: var(--color-paper);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
.testimonial-card p { color: var(--color-ink); }
.testimonial-card strong { color: var(--color-primary); }

/* -----------------------------
   Footer
----------------------------- */
footer { background: #F7F2EB; border-top: 1px solid var(--color-border); }
footer .container { padding-top: 20px; padding-bottom: 24px; }
footer .content-wrapper { gap: 16px; }
.footer-nav-main, .footer-nav-legal { display: flex; flex-wrap: wrap; gap: 12px; }
.footer-nav-main a, .footer-nav-legal a { color: var(--color-ink); padding: 6px 8px; border-radius: 6px; }
.footer-nav-main a:hover, .footer-nav-legal a:hover { background: var(--color-accent); color: var(--color-primary); }
.footer-brand img { height: 36px; width: auto; }
.contact-info { display: flex; flex-direction: column; gap: 6px; }
.contact-info p { display: flex; align-items: center; gap: 8px; color: var(--color-muted); font-size: 15px; }
.contact-info img { width: 18px; height: 18px; }
.newsletter-cta p a { color: var(--color-secondary); font-weight: 600; }

/* -----------------------------
   Cards & Surfaces (Generic)
----------------------------- */
.card { background: var(--color-paper); border: 1px solid var(--color-border); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); padding: 16px; }
.card:hover { box-shadow: var(--shadow-md); }

/* -----------------------------
   Buttons (Utility classes)
----------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 10px 16px; border-radius: 999px; border: 1px solid transparent; transition: background-color .25s ease, border-color .25s ease, color .2s ease, transform .08s ease; cursor: pointer; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.btn-primary:hover { background: var(--color-primary-700); border-color: var(--color-primary-700); }
.btn-secondary { background: var(--color-secondary); color: #fff; border-color: var(--color-secondary); }
.btn-secondary:hover { background: var(--color-secondary-700); border-color: var(--color-secondary-700); }
.btn-outline { background: transparent; color: var(--color-secondary); border-color: var(--color-secondary); }
.btn-outline:hover { background: rgba(63,107,76,0.08); }

/* Any standalone button in content */
button, .cookie-settings-open { border-radius: 999px; border: 1px solid var(--color-secondary); background: var(--color-secondary); color: #fff; padding: 10px 14px; transition: background-color .25s ease; }
button:hover, .cookie-settings-open:hover { background: var(--color-secondary-700); }

/* -----------------------------
   Mobile Navigation (Hamburger)
----------------------------- */
.mobile-menu-toggle { position: fixed; right: 14px; top: 14px; z-index: 2100; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 999px; border: 1px solid var(--color-border); background: var(--color-paper); color: var(--color-ink); box-shadow: var(--shadow-sm); }
.mobile-menu-toggle:hover { background: var(--color-accent); }

/* Overlay container */
.mobile-menu {
  position: fixed; inset: 0; z-index: 2000; display: flex; justify-content: flex-end; align-items: stretch; background: rgba(0,0,0,0.35);
  transform: translateX(100%);
  transition: transform .35s ease;
}
.mobile-menu.open, .mobile-menu.active, .mobile-menu.is-open { transform: translateX(0); }

/* Slide-in panel is the nav itself */
.mobile-nav { background: var(--color-paper); width: 86%; max-width: 360px; padding: 22px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow-lg); border-left: 1px solid var(--color-border); }
.mobile-nav a { padding: 10px 12px; border-radius: 8px; color: var(--color-ink); }
.mobile-nav a:hover { background: var(--color-accent); color: var(--color-primary); }
.mobile-menu-close { align-self: flex-end; margin: 10px 12px 0 0; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 999px; border: 1px solid var(--color-border); background: var(--color-paper); color: var(--color-ink); }
.mobile-menu-close:hover { background: var(--color-accent); }

/* Show/hide desktop vs mobile nav */
@media (min-width: 992px) {
  .mobile-menu-toggle { display: none; }
  .main-nav { display: flex; }
  header .content-wrapper { flex-direction: row; align-items: center; justify-content: space-between; gap: 18px; }
  .tagline { margin-left: 6px; }
}

/* -----------------------------
   Lists & Inline media
----------------------------- */
.text-section img { display: inline-block; width: 18px; height: 18px; vertical-align: middle; margin-right: 6px; }

/* -----------------------------
   Page-specific gentle accents
----------------------------- */
/* Recipe listings presented as classic text blocks */
article.text-section { background: var(--color-paper); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 16px; box-shadow: var(--shadow-sm); }
article.text-section h3 { color: var(--color-primary); }
article.text-section p + p a { font-weight: 600; }

/* Accents for seasonal pages */
#kalender .content-wrapper, #rezepte-der-saison .content-wrapper { gap: 16px; }

/* -----------------------------
   Cookie Consent Banner & Modal
----------------------------- */
.cookie-banner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 3000; background: var(--color-paper); border-top: 1px solid var(--color-border); box-shadow: 0 -6px 18px rgba(20,16,12,0.06); display: flex; }
.cookie-banner .container { padding: 12px 16px; }
.cookie-banner .content-wrapper { gap: 12px; }
.cookie-banner p { font-size: 14px; color: var(--color-ink); }
.cookie-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cookie-accept { composes: btn btn-primary; }
.cookie-reject { composes: btn btn-outline; }
.cookie-settings { composes: btn btn-secondary; }
/* Without CSS Modules support, provide direct classes */
.cookie-accept, .cookie-reject, .cookie-settings { display: inline-flex; align-items: center; justify-content: center; padding: 10px 14px; border-radius: 999px; border: 1px solid transparent; cursor: pointer; }
.cookie-accept { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.cookie-accept:hover { background: var(--color-primary-700); border-color: var(--color-primary-700); }
.cookie-reject { background: transparent; color: var(--color-secondary); border-color: var(--color-secondary); }
.cookie-reject:hover { background: rgba(63,107,76,0.08); }
.cookie-settings { background: var(--color-secondary); color: #fff; border-color: var(--color-secondary); }
.cookie-settings:hover { background: var(--color-secondary-700); border-color: var(--color-secondary-700); }

/* Cookie modal */
.cookie-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 3100; display: none; align-items: center; justify-content: center; padding: 20px; }
.cookie-modal-overlay.open { display: flex; }
.cookie-modal { background: var(--color-paper); width: 100%; max-width: 720px; border-radius: 14px; box-shadow: var(--shadow-lg); border: 1px solid var(--color-border); display: flex; flex-direction: column; gap: 16px; padding: 18px; }
.cookie-modal header, .cookie-modal footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cookie-modal .modal-body { display: flex; flex-direction: column; gap: 12px; }
.cookie-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--color-border); }
.cookie-row:last-child { border-bottom: none; }

/* Toggle switch (simple) */
.switch { position: relative; width: 46px; height: 26px; background: #d7d1c9; border-radius: 999px; transition: background .2s ease; display: inline-flex; align-items: center; padding: 2px; }
.switch::after { content: ""; width: 22px; height: 22px; background: #fff; border-radius: 50%; box-shadow: var(--shadow-sm); transform: translateX(0); transition: transform .2s ease; }
input[type="checkbox"].switch-input { position: absolute; opacity: 0; }
input[type="checkbox"].switch-input:checked + .switch { background: var(--color-secondary); }
input[type="checkbox"].switch-input:checked + .switch::after { transform: translateX(20px); }

/* -----------------------------
   Accessibility helpers
----------------------------- */
.visually-hidden { position: absolute !important; clip: rect(1px,1px,1px,1px); padding: 0 !important; border: 0 !important; height: 1px !important; width: 1px !important; overflow: hidden; }

/* -----------------------------
   Spacing rhythm helpers
----------------------------- */
.stack-8 > * + * { margin-top: 8px; }
.stack-12 > * + * { margin-top: 12px; }
.stack-16 > * + * { margin-top: 16px; }
.stack-24 > * + * { margin-top: 24px; }

/* -----------------------------
   Responsive (Mobile-first)
----------------------------- */
@media (min-width: 576px) {
  h1 { font-size: 36px; }
  .hero .content-wrapper { gap: 16px; }
}

@media (min-width: 768px) {
  h1 { font-size: 42px; }
  h2 { font-size: 28px; }

  .text-image-section { flex-direction: row; }
  .content-wrapper { gap: 18px; }
  .hero .content-wrapper { padding: 36px 0; }

  /* Multi-column-like with flex wrap */
  .content-grid { justify-content: flex-start; }
  .content-grid > * { flex: 1 1 300px; }
}

@media (min-width: 992px) {
  .container { padding: 0 20px; }
  section { padding: 36px 0; }

  header .content-wrapper { gap: 20px; }
  .logo img { height: 48px; }

  .hero h1 { font-size: 48px; }
  .hero .subheadline { font-size: 20px; }

  /* Align header blocks neatly */
  header .content-wrapper { display: flex; }
  header .content-wrapper > * { display: flex; }
  .main-nav { gap: 18px; }
}

/* -----------------------------
   Elevation & micro-interactions
----------------------------- */
article.text-section:hover, .testimonial-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); transition: box-shadow .25s ease, transform .1s ease; }

/* -----------------------------
   Ensuring minimum gaps and no overlap
----------------------------- */
section .content-wrapper > * { margin-bottom: 8px; }
section .content-wrapper > *:last-child { margin-bottom: 0; }

/* -----------------------------
   Additional specific element tweaks
----------------------------- */
/* Pagination-like inline links spacing */
.text-section p a + a { margin-left: 8px; }

/* Icon rows in contact */
footer .contact-info p img, .contact-info p img { flex-shrink: 0; }

/* Ensure testimonials/readability rules */
.hero .testimonial-card, .testimonial-card { color: var(--color-ink); background: var(--color-paper); }

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