/* =====================================================
   SchimmerReiter Rezepte – style.css
   Elegant Classic theme: serif display, muted colors, refined spacing
   Mobile-first, ONLY flexbox layouts (no grid/columns)
   ===================================================== */

/* -------------------------
   CSS Reset & Base Normalize
   ------------------------- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
button { font: inherit; background: none; border: none; padding: 0; cursor: pointer; }
ul, ol { margin: 0; padding: 0 0 0 18px; }
:focus { outline: 2px solid #2F6E3F; outline-offset: 2px; }

/* -------------------------
   Theme Variables & Fallbacks
   ------------------------- */
:root {
  --primary: #4A3A2A; /* deep brown */
  --secondary: #2F6E3F; /* herb green */
  --accent: #FAF5EC; /* warm paper */
  --bg: #F8F5F0; /* page background */
  --text: #2D2A26; /* body text */
  --muted: #6E665E; /* muted text */
  --border: #E6E0D8; /* classic border */
  --surface: #FFFFFF; /* card surface */
  --shadow: 0 2px 10px rgba(74,58,42,0.08);
  --radius-s: 8px; --radius-m: 12px; --radius-l: 16px;
  --speed: 200ms; --easing: cubic-bezier(.2,.7,.2,1);
}

/* -------------------------
   Typography
   ------------------------- */
body {
  font-family: Verdana, Geneva, Tahoma, sans-serif; /* brand body */
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
}

h1, h2, h3, h4, h5, h6 {
  font-family: Georgia, 'Times New Roman', Times, serif; /* brand display */
  color: var(--primary);
  margin: 0 0 10px 0;
  line-height: 1.25;
}

h1 { font-size: 36px; letter-spacing: 0.2px; }
h2 { font-size: 28px; }
h3 { font-size: 20px; }
h4 { font-size: 18px; }
p, li { color: var(--text); font-size: 16px; }
small { color: var(--muted); }

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

/* -------------------------
   Layout Containers (ONLY Flexbox)
   ------------------------- */
.container {
  display: flex; /* REQUIRED flex container */
  flex-direction: column; /* mobile-first */
  gap: 20px; /* consistent spacing */
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.content-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

/* Mandatory spacing & 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; }

/* -------------------------
   Header & Navigation
   ------------------------- */
header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 1000;
}
header .container { flex-direction: row; align-items: center; justify-content: space-between; padding-top: 12px; padding-bottom: 12px; }
.logo { display: flex; align-items: center; }
.logo img { height: 40px; width: auto; }

.main-nav {
  display: none; /* mobile hidden */
  align-items: center; gap: 14px;
}
.main-nav a {
  color: var(--primary);
  padding: 8px 10px;
  border-radius: var(--radius-s);
  transition: color var(--speed) var(--easing), background var(--speed) var(--easing), transform var(--speed) var(--easing);
}
.main-nav a:hover { background: var(--accent); color: var(--secondary); transform: translateY(-1px); }
.main-nav a.cta {
  background: var(--secondary);
  color: #fff;
  padding: 8px 14px;
  border-radius: 999px;
}
.main-nav a.cta:hover { background: #265b34; color: #fff; }

.mobile-menu-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border);
  color: var(--primary); background: var(--surface);
}
.mobile-menu-toggle:hover { background: var(--accent); }

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

/* -------------------------
   Mobile Menu Overlay
   ------------------------- */
.mobile-menu {
  position: fixed; inset: 0; z-index: 1500;
  background: rgba(74,58,42,0.1);
  display: flex; /* overlay uses flex */
  align-items: stretch; justify-content: flex-end;
  pointer-events: none; /* hidden state */
  opacity: 0; transition: opacity var(--speed) var(--easing);
}
.mobile-menu .mobile-nav {
  display: flex; flex-direction: column; gap: 8px; flex: 0 0 82%; max-width: 420px;
  background: var(--surface);
  border-left: 1px solid var(--border);
  padding: 20px;
  transform: translateX(100%);
  transition: transform 260ms var(--easing);
}
.mobile-menu .mobile-nav a {
  padding: 14px 12px; border-radius: var(--radius-s);
  color: var(--primary);
}
.mobile-menu .mobile-nav a:hover { background: var(--accent); color: var(--secondary); }
.mobile-menu .mobile-menu-close {
  position: absolute; top: 14px; right: 14px; z-index: 1600;
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--surface); color: var(--primary);
}

/* Open state (toggle via JS) */
.mobile-menu.open { opacity: 1; pointer-events: auto; }
.mobile-menu.open .mobile-nav { transform: translateX(0); }

/* -------------------------
   Hero
   ------------------------- */
.hero { background: var(--accent); border-bottom: 1px solid var(--border); }
.hero .container { padding-top: 24px; padding-bottom: 28px; }
.hero .content-wrapper { gap: 14px; }
.hero p { color: var(--muted); }
.hero .tagline { font-style: italic; color: var(--primary); opacity: 0.9; }

.search-placeholder {
  display: flex; align-items: center; min-height: 44px;
  width: 100%; padding: 10px 14px; border: 1px solid var(--border);
  background: #fff; color: var(--muted);
  border-radius: 999px; box-shadow: var(--shadow);
}

/* -------------------------
   Buttons & Links
   ------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 16px; border-radius: 999px; border: 1px solid var(--border);
  color: var(--primary); background: var(--surface);
  transition: background var(--speed) var(--easing), color var(--speed) var(--easing), box-shadow var(--speed) var(--easing), transform var(--speed) var(--easing);
}
.btn:hover { background: var(--accent); transform: translateY(-1px); }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: #3f3326; color: #fff; box-shadow: 0 6px 16px rgba(74,58,42,0.18); }
.btn-secondary { background: var(--secondary); color: #fff; border-color: var(--secondary); }
.btn-secondary:hover { background: #265b34; color: #fff; box-shadow: 0 6px 16px rgba(47,110,63,0.18); }

/* -------------------------
   Feature Lists & Grids (Flex only)
   ------------------------- */
.features-grid { display: flex; flex-wrap: wrap; gap: 20px; }
.features-grid > div { flex: 1 1 240px; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-m); background: var(--surface); box-shadow: var(--shadow); }
.features-grid > div h3 { margin-bottom: 6px; }

.gallery-grid { display: flex; flex-wrap: wrap; gap: 20px; }
.gallery-grid .card { flex: 1 1 calc(50% - 10px); min-width: 260px; }

.gallery-row { display: flex; flex-wrap: wrap; gap: 16px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  padding: 18px;
  box-shadow: var(--shadow);
  transition: transform var(--speed) var(--easing), box-shadow var(--speed) var(--easing);
}
.card:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(74,58,42,0.14); }

.mini-card {
  display: flex; flex-direction: column; gap: 6px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-m);
  padding: 14px; box-shadow: var(--shadow);
  flex: 1 1 220px; min-width: 220px;
}

.pagination { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.pagination a { color: var(--secondary); border-bottom: 1px solid transparent; }
.pagination a:hover { border-bottom-color: var(--secondary); }

/* -------------------------
   Lists & Text blocks
   ------------------------- */
.content-wrapper > ul, .content-wrapper > ol { display: flex; flex-direction: column; gap: 8px; }
.content-wrapper > p + ul, .content-wrapper > p + ol { margin-top: 6px; }

/* -------------------------
   Testimonials – dark text on light bg for readability
   ------------------------- */
.testimonial-card {
  background: #FFFFFF; /* high contrast light */
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  box-shadow: var(--shadow);
}
.testimonial-card p { margin: 0; }
.testimonial-card p + p { color: var(--primary); }

/* -------------------------
   Text-Image Section
   ------------------------- */
.text-image-section { width: 100%; }
.text-image-section > div {
  display: flex; flex-direction: column; gap: 8px;
  flex: 1 1 240px; min-width: 240px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-m); padding: 16px; box-shadow: var(--shadow);
}

/* -------------------------
   Footer
   ------------------------- */
footer {
  background: var(--primary);
  color: #F2EEE7;
  margin-top: 40px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
footer .container { padding-top: 28px; padding-bottom: 28px; }
footer .content-wrapper { display: flex; flex-direction: column; gap: 18px; }
.footer-nav, .legal-links { display: flex; flex-wrap: wrap; gap: 12px; }
.footer-nav a, .legal-links a { color: #F2EEE7; opacity: 0.9; padding: 6px 8px; border-radius: var(--radius-s); }
.footer-nav a:hover, .legal-links a:hover { background: rgba(250,245,236,0.08); opacity: 1; }
.brand-blurb h3 { color: #F7F3EA; }
.contact-snippet p { margin: 0; }

/* -------------------------
   Utility spacing
   ------------------------- */
main section { padding: 24px 0; }
@media (min-width: 768px) { main section { padding: 36px 0; } }

/* -------------------------
   Responsive adjustments
   ------------------------- */
@media (min-width: 768px) {
  .container { gap: 24px; }
  .hero .container { padding-top: 36px; padding-bottom: 40px; }
  .gallery-grid .card { flex: 1 1 calc(33.333% - 14px); }
}

@media (min-width: 992px) {
  .content-wrapper { gap: 18px; }
  header .container { padding-top: 16px; padding-bottom: 16px; }
}

/* -------------------------
   Links in content
   ------------------------- */
.content-wrapper a { color: var(--secondary); }
.content-wrapper a:hover { text-decoration: underline; }

/* -------------------------
   Tables (if any generic)
   ------------------------- */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px; border-bottom: 1px solid var(--border); }

/* -------------------------
   Cookie Consent Banner
   ------------------------- */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 2000;
  display: flex; justify-content: center; align-items: center;
  padding: 14px;
  background: #fff; border-top: 1px solid var(--border);
  box-shadow: 0 -6px 16px rgba(74,58,42,0.08);
  transform: translateY(100%);
  transition: transform var(--speed) var(--easing);
}
.cookie-banner.show { transform: translateY(0); }
.cookie-banner .cookie-inner {
  display: flex; flex-direction: column; gap: 10px;
  width: 100%; max-width: 1100px; padding: 0 20px;
}
.cookie-banner p { margin: 0; color: var(--text); }
.cookie-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-buttons .btn { padding: 10px 14px; }
.cookie-buttons .accept { background: var(--secondary); color: #fff; border-color: var(--secondary); }
.cookie-buttons .reject { background: var(--surface); color: var(--primary); }
.cookie-buttons .settings { background: var(--accent); color: var(--primary); }

/* Cookie Modal */
.cookie-modal-backdrop {
  position: fixed; inset: 0; z-index: 2100;
  background: rgba(0,0,0,0.35);
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.cookie-modal-backdrop.show { display: flex; }
.cookie-modal {
  display: flex; flex-direction: column; gap: 14px; width: 100%; max-width: 680px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-l);
  box-shadow: 0 14px 34px rgba(0,0,0,0.18);
  padding: 18px;
}
.cookie-modal header { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.cookie-categories { display: flex; flex-direction: column; gap: 10px; }
.cookie-category { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius-m); }
.cookie-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* Toggle Switch */
.switch { position: relative; width: 44px; height: 26px; border-radius: 999px; background: #ddd; transition: background var(--speed) var(--easing); display: inline-flex; align-items: center; }
.switch input { position: absolute; opacity: 0; }
.switch .thumb { width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: var(--shadow); transform: translateX(2px); transition: transform var(--speed) var(--easing), background var(--speed) var(--easing); }
.switch input:checked + .thumb { transform: translateX(20px); background: var(--secondary); }
.switch.on { background: rgba(47,110,63,0.35); }

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

/* -------------------------
   Page-specific soft accents
   ------------------------- */
/* Index highlights */
.hero + section .features-grid > div { background: #FFFEFC; }

/* Legal pages: ensure comfortable reading width */
main .content-wrapper { max-width: 100%; }
@media (min-width: 768px) {
  main .content-wrapper { max-width: 900px; }
}

/* -------------------------
   Ensure no overlap & adequate spacing
   ------------------------- */
.card, .mini-card, .testimonial-card, .text-image-section > div { margin-right: 0; }

/* -------------------------
   Header/Footer link focus visibility
   ------------------------- */
.main-nav a:focus, .footer-nav a:focus, .legal-links a:focus { outline: 2px dashed #F7F3EA; outline-offset: 2px; }

/* -------------------------
   Additional structural helpers from brief
   ------------------------- */
/* These classes may appear across pages; keep consistent classic look */
.brand-blurb { display: flex; flex-direction: column; gap: 6px; }
.legal-links { align-items: center; }
.contact-snippet { display: flex; flex-direction: column; gap: 6px; }

/* -------------------------
   Print (clean)
   ------------------------- */
@media print {
  header, .mobile-menu, .cookie-banner, .cookie-modal-backdrop, footer { display: none !important; }
  body { background: #fff; }
  .card, .mini-card { box-shadow: none; }
}

/* -------------------------
   Prevent Grid/Columns properties (not used)
   ------------------------- */
/* Intentionally using only flexbox throughout. */
