/* =============================
   Reset & Base – Mobile-first
   ============================= */
* { box-sizing: border-box; }
*:before, *:after { box-sizing: inherit; }
html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: Arial, Helvetica, sans-serif; color: #1a1a1a; background-color: #FFFFFF; line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { color: #1B4332; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid #B85C38; outline-offset: 2px; }

/* =============================
   Theme Variables (with fallbacks)
   ============================= */
:root { --color-primary: #1B4332; --color-secondary: #B85C38; --color-accent: #FAF3E7; --ink: #1a1a1a; --ink-muted: #4c4c4c; --bg: #FFFFFF; --bg-alt: #FFF6EC; --border: #E5DFC9; --shadow: rgba(0,0,0,0.08); --shadow-strong: rgba(0,0,0,0.14); --success: #2a9d8f; --warning: #e9c46a; }

/* =============================
   Typography – Creative/Artistic flair using brand fonts
   ============================= */
h1, h2, h3, h4 { font-family: Georgia, 'Times New Roman', serif; color: #1B4332; line-height: 1.25; letter-spacing: 0.2px; }
h1 { font-size: 32px; margin: 0 0 12px; }
h2 { font-size: 24px; margin: 0 0 12px; position: relative; }
h3 { font-size: 18px; margin: 16px 0 8px; }
h4 { font-size: 16px; margin: 12px 0 6px; }
.subheadline { color: #333; font-size: 16px; margin: 8px 0 16px; }
p { margin: 0 0 12px; }
ul, ol { margin: 0 0 16px 20px; padding: 0; }
strong { color: #1B4332; }

/* Decorative underline for section headings (artistic touch) */
h2:after { content: ""; display: block; width: 72px; height: 6px; background: #B85C38; margin-top: 8px; border-radius: 6px 12px 6px 12px; }

/* Visually hidden for a11y */
.visually-hidden { position: absolute !important; height: 1px; width: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }

/* =============================
   Layout Containers – Flex only
   ============================= */
.container { display: flex; flex-direction: column; gap: 20px; width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 16px; }
.content-wrapper { display: flex; flex-direction: column; gap: 16px; }

/* MANDATORY 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 minimum spacing between standalone sections */
main > section { padding: 28px 0; }
main > section + section { margin-top: 20px; }

/* =============================
   Header & Navigation
   ============================= */
.site-header { position: sticky; top: 0; background: #FFFFFF; border-bottom: 3px solid #1B4332; z-index: 1000; }
.site-header .container { flex-direction: row; align-items: center; justify-content: space-between; padding: 10px 16px; }
.logo { display: flex; align-items: center; }
.logo img { height: 40px; width: auto; }

.main-nav { display: none; align-items: center; gap: 16px; flex-wrap: wrap; }
.main-nav a { color: #1B4332; padding: 8px 10px; border-radius: 10px; transition: background-color 0.25s, transform 0.2s; }
.main-nav a:hover { background: var(--bg-alt); transform: translateY(-1px); }
.main-nav a[aria-current="page"] { background: #FAF3E7; border: 1px solid #E5DFC9; }
.nav-cta { background: #B85C38; color: #fff !important; padding: 8px 14px; border-radius: 16px; box-shadow: 0 2px 0 #8c3f23; }
.nav-cta:hover { background: #a34e31; }

.mobile-menu-toggle { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; font-size: 22px; border: 2px solid #1B4332; background: #FFFFFF; color: #1B4332; border-radius: 10px; cursor: pointer; transition: transform 0.2s, background 0.2s; }
.mobile-menu-toggle:hover { transform: rotate(-3deg); background: #FAF3E7; }

/* Mobile Menu Overlay */
.mobile-menu { position: fixed; inset: 0; display: flex; flex-direction: column; background: rgba(27,67,50,0.97); color: #fff; padding: 20px; transform: translateX(100%); transition: transform 0.35s ease; z-index: 1100; }
.mobile-menu.open, .mobile-menu.active { transform: translateX(0); }
.mobile-menu-close { align-self: flex-end; width: 42px; height: 42px; font-size: 22px; background: transparent; color: #fff; border: 2px solid #fff; border-radius: 10px; cursor: pointer; }
.mobile-nav { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }
.mobile-nav a { color: #fff; font-size: 18px; padding: 12px 10px; border-radius: 12px; transition: background 0.2s, transform 0.2s; }
.mobile-nav a:hover { background: rgba(250,243,231,0.15); transform: translateX(4px); }
.mobile-nav a[aria-current="page"] { background: rgba(250,243,231,0.25); }

/* =============================
   Hero Sections
   ============================= */
.hero { background: #FAF3E7; border-bottom: 2px solid #E5DFC9; }
.hero .container { padding-top: 24px; padding-bottom: 24px; }
.hero h1 { font-size: 28px; }
.hero .cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.top-categories { display: flex; flex-wrap: wrap; gap: 10px; }
.trust-badges { display: flex; flex-wrap: wrap; gap: 14px; color: #1B4332; }
.trust-badges .trust { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: #FFF6EC; border: 1px dashed #B85C38; border-radius: 14px; }
.trust-badges img { width: 18px; height: 18px; }

.breadcrumbs { display: flex; flex-wrap: wrap; gap: 6px; color: #4c4c4c; font-size: 14px; }
.breadcrumbs a { color: #1B4332; }

/* =============================
   Search Bar
   ============================= */
.search-bar { display: flex; align-items: center; }
.search-bar input[type="search"] { width: 100%; padding: 12px 14px; border-radius: 14px; border: 2px solid #1B4332; background: #FFFFFF; font-size: 16px; transition: box-shadow 0.2s, transform 0.1s; }
.search-bar input[type="search"]:focus { box-shadow: 0 6px 22px var(--shadow); transform: translateY(-1px); }

/* =============================
   Text Sections & Lists
   ============================= */
.text-section { display: flex; flex-direction: column; gap: 10px; background: #FFFFFF; border: 1px solid #E5DFC9; border-radius: 16px; padding: 16px; box-shadow: 0 4px 14px var(--shadow); }
.text-section ul, .text-section ol { margin-left: 18px; }
.text-section li { margin-bottom: 8px; }
.active-filters { font-size: 14px; color: #4c4c4c; }

/* =============================
   Badges
   ============================= */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; background: #1B4332; color: #fff; border-radius: 999px; font-size: 12px; letter-spacing: 0.3px; box-shadow: 0 2px 0 #0f261d; }
.badge + .badge { margin-left: 2px; }
/* Secondary style variation */
li .badge, p .badge { background: #B85C38; box-shadow: 0 2px 0 #8c3f23; }

/* =============================
   Buttons (artistic micro-interactions)
   ============================= */
.button, .main-nav .nav-cta, .footer-newsletter .button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border-radius: 16px; border: 2px solid #1B4332; background: #FFFFFF; color: #1B4332; font-weight: 700; cursor: pointer; transition: transform 0.15s ease, background 0.2s, box-shadow 0.2s; box-shadow: 0 3px 0 #1B4332; }
.button:hover { transform: translateY(-2px) rotate(-0.5deg); background: #FAF3E7; }
.button:active { transform: translateY(0); box-shadow: 0 1px 0 #1B4332; }
.button-primary { background: #1B4332; color: #fff; border-color: #1B4332; box-shadow: 0 3px 0 #0f261d; }
.button-primary:hover { background: #163828; }
.button-secondary { background: #B85C38; color: #fff; border-color: #B85C38; box-shadow: 0 3px 0 #8c3f23; }
.button-secondary:hover { background: #a34e31; }

/* =============================
   Cards & Testimonials
   ============================= */
.card { background: #FFFFFF; border-radius: 18px; border: 1px solid #E5DFC9; box-shadow: 0 8px 20px var(--shadow); padding: 18px; }
.testimonial-card { background: #FFFFFF; border: 2px solid #1B4332; border-radius: 18px; box-shadow: 6px 6px 0 #B85C38; color: #1a1a1a; }
.testimonial-card p { margin: 0; }
.testimonial-card p + p { margin-top: 6px; }

/* =============================
   Pagination
   ============================= */
.pagination { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.pagination a { padding: 8px 12px; border: 1px solid #1B4332; border-radius: 12px; color: #1B4332; background: #fff; transition: background 0.2s, transform 0.2s; }
.pagination a:hover { background: #FAF3E7; transform: translateY(-1px); }

/* =============================
   Footer
   ============================= */
.site-footer { background: #1B4332; color: #fff; margin-top: 20px; padding: 24px 0; border-top: 6px solid #B85C38; }
.site-footer .content-wrapper { display: flex; flex-direction: column; gap: 18px; }
.site-footer a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.footer-nav, .footer-meta, .footer-contact, .footer-newsletter { display: flex; flex-direction: column; gap: 8px; }
.footer-brand { display: flex; flex-direction: column; gap: 10px; }
.footer-brand img { width: 120px; height: auto; }

/* =============================
   Utilities specific to pages
   ============================= */
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.top-categories .badge { background: #B85C38; box-shadow: 0 2px 0 #8c3f23; }
.active-filters a { color: #B85C38; }

/* =============================
   Cookie Consent Banner & Modal
   ============================= */
.cookie-banner { position: fixed; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; gap: 14px; background: #FAF3E7; color: #1a1a1a; border-top: 3px solid #B85C38; padding: 16px; z-index: 1200; box-shadow: 0 -8px 24px var(--shadow-strong); transform: translateY(100%); transition: transform 0.35s ease; }
.cookie-banner.show { transform: translateY(0); }
.cookie-banner .cookie-row { display: flex; flex-direction: column; gap: 12px; }
.cookie-banner .cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-banner .button-accept { background: #1B4332; color: #fff; border-color: #1B4332; box-shadow: 0 3px 0 #0f261d; }
.cookie-banner .button-reject { background: #FFFFFF; color: #1B4332; border-color: #1B4332; }
.cookie-banner .button-settings { background: #B85C38; color: #fff; border-color: #B85C38; box-shadow: 0 3px 0 #8c3f23; }

/* Cookie modal overlay */
.cookie-modal { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; background: rgba(0,0,0,0.55); z-index: 1300; }
.cookie-modal.open { display: flex; }
.cookie-modal .cookie-dialog { display: flex; flex-direction: column; gap: 12px; width: 92%; max-width: 560px; background: #FFFFFF; color: #1a1a1a; border: 2px solid #1B4332; border-radius: 18px; box-shadow: 10px 10px 0 #B85C38; padding: 18px; }
.cookie-modal .cookie-header { display: flex; align-items: center; justify-content: space-between; }
.cookie-modal .cookie-body { display: flex; flex-direction: column; gap: 8px; }
.cookie-modal .cookie-footer { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.cookie-switch { display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid #E5DFC9; border-radius: 10px; background: #FAF3E7; }

/* =============================
   Accessibility & Contrast helpers
   ============================= */
.testimonial-card, .text-section, .card { color: #1a1a1a; background-color: #FFFFFF; }
.hero .subheadline, .text-section p, .text-section li { color: #333; }

/* =============================
   Responsive (Flex directions & spacing)
   ============================= */
@media (min-width: 480px) {
  h1 { font-size: 34px; }
  .hero h1 { font-size: 32px; }
}

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

  .main-nav { display: flex; }
  .mobile-menu-toggle { display: none; }

  .content-wrapper { gap: 20px; }
  .hero .container { padding-top: 36px; padding-bottom: 36px; }
  .text-image-section { flex-direction: row; }

  /* Footer columns via flex-wrap */
  .site-footer .content-wrapper { flex-direction: row; flex-wrap: wrap; gap: 24px; }
  .footer-brand, .footer-nav, .footer-contact, .footer-newsletter, .footer-meta { flex: 1 1 240px; }
}

@media (min-width: 1024px) {
  h1 { font-size: 48px; }
  .hero h1 { font-size: 42px; }
  .site-header .container { padding: 12px 20px; }
  .container { gap: 24px; }
}

/* =============================
   Additional Artistic Touches
   ============================= */
/* Hand-drawn accent corners */
.card:before, .testimonial-card:before { content: ""; position: absolute; top: 10px; left: 10px; width: 16px; height: 16px; border-top: 3px solid #B85C38; border-left: 3px solid #B85C38; border-radius: 6px 0 0 0; pointer-events: none; }
.card:after, .testimonial-card:after { content: ""; position: absolute; bottom: 10px; right: 10px; width: 16px; height: 16px; border-bottom: 3px solid #1B4332; border-right: 3px solid #1B4332; border-radius: 0 0 6px 0; pointer-events: none; }

/* =============================
   Forms (generic)
   ============================= */
input, button, select, textarea { font-family: inherit; font-size: 16px; }
button { cursor: pointer; }

/* =============================
   Page-specific small tweaks
   ============================= */
/* Index: trust badges spacing already defined */

/* Rezepte: highlight lists */
[aria-current="page"] { font-weight: 700; }

/* Regions page */

/* Tipps & Techniken */

/* Über uns */

/* Rezept einsenden */

/* Legal pages: neutral content emphasis */
.hero + section .text-section a { color: #B85C38; }

/* =============================
   Ensuring flex usage where grouping occurs
   ============================= */
main { display: flex; flex-direction: column; gap: 20px; }
.site-footer .container { display: flex; flex-direction: column; }
footer .footer-meta { align-items: flex-start; }

/* =============================
   Spacing safety to prevent overlapping
   ============================= */
section .content-wrapper > * + * { margin-top: 4px; }

/* =============================
   Breadcrumb separators styling
   ============================= */
.breadcrumbs { padding: 6px 10px; background: #FFF6EC; border: 1px dashed #E5DFC9; border-radius: 12px; }

/* =============================
   Header/hero artistic separators
   ============================= */
.hero { position: relative; }
.hero:before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: #B85C38; }

/* =============================
   Touch targets & link spacing
   ============================= */
nav a { min-height: 36px; display: inline-flex; align-items: center; }

/* =============================
   Table-of-contents like lists (if any)
   ============================= */
.content-grid > * { flex: 1 1 300px; }
.card-container > * { flex: 1 1 260px; }

/* =============================
   Z-index safety
   ============================= */
.site-header { z-index: 1000; }
.mobile-menu { z-index: 1100; }
.cookie-banner { z-index: 1200; }
.cookie-modal { z-index: 1300; }

/* =============================
   Print basics (lightweight)
   ============================= */
@media print { .site-header, .site-footer, .mobile-menu, .cookie-banner, .cookie-modal { display: none !important; } a { text-decoration: underline; } }
