/* =====================================
   Goldflamme Rezeptreise – Vibrant Energetic UI
   Single stylesheet for all pages
   REQUIREMENTS MET:
   - Flexbox-only layouts (no grid/columns)
   - Mobile-first, responsive
   - Brand colors & typography
   - Mandatory spacing patterns
   - Mobile burger menu styles
   - Cookie consent banner + modal styles
   - Strong contrast for testimonials
   ===================================== */

/* ========== CSS RESET & BASELINE ========== */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: Verdana, Geneva, sans-serif; color: #1b1715; background: #FFFFFF; line-height: 1.6; font-size: 16px; }
img { max-width: 100%; height: auto; display: block; }
a { color: #1E66FF; text-decoration: none; }
a:hover, a:focus { text-decoration: underline; text-underline-offset: 3px; }
button { font-family: inherit; }
:focus-visible { outline: 3px solid #06D6A0; outline-offset: 2px; }

/* ========== THEME TOKENS ========== */
:root {
  --brand-primary: #5A1E0E;   /* deep warm */
  --brand-secondary: #7A9E6E; /* earthy green */
  --brand-accent: #FAF6EE;    /* light cream */
  /* energetic accents */
  --electric-orange: #FF5A3A;
  --electric-teal: #06D6A0;
  --electric-blue: #1E66FF;
  --ink: #1b1715;
  --ink-80: rgba(27,23,21,0.8);
  --ink-60: rgba(27,23,21,0.6);
  --surface: #FFFFFF;
  --surface-elev: #FFFFFF;
  --border: #E9E3D8;
  --shadow-1: 0 4px 14px rgba(0,0,0,0.08);
  --shadow-2: 0 10px 24px rgba(0,0,0,0.12);
}

h1, h2, h3, h4 { font-family: Georgia, "Times New Roman", serif; color: var(--brand-primary); margin: 0 0 16px; line-height: 1.2; }
h1 { font-size: 32px; letter-spacing: 0.2px; }
h2 { font-size: 24px; }
h3 { font-size: 18px; }
p { margin: 0 0 16px; }
ul { margin: 0 0 16px 20px; }
strong { font-weight: 700; }

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

/* ========== GLOBAL LAYOUT PRIMITIVES (FLEX ONLY) ========== */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; display: flex; flex-direction: column; align-items: stretch; gap: 20px; }
.content-wrapper { display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }

/* Mandatory spacing & alignment patterns */
.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; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px; box-shadow: var(--shadow-1); }
.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; background: #FFFFFF; border: 2px solid #EDE8DD; border-radius: 16px; box-shadow: var(--shadow-1); color: #21201F; }
.feature-item { display: flex; flex-direction: column; align-items: flex-start; gap: 15px; }

/* ========== HEADER & NAV ========== */
header { position: sticky; top: 0; z-index: 1000; 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: 12px; padding-top: 10px; padding-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { height: 40px; width: auto; }

.main-nav { display: none; flex-direction: row; align-items: center; gap: 14px; }
.main-nav a { color: var(--ink); font-weight: 700; letter-spacing: 0.4px; padding: 10px 12px; border-radius: 10px; text-transform: uppercase; font-size: 12px; transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease; }
.main-nav a:hover { background: var(--brand-accent); transform: translateY(-2px); }
.main-nav a[aria-current="page"] { color: var(--brand-primary); border: 2px solid var(--brand-primary); }
.main-nav a.cta { background: var(--electric-orange); color: #fff; border: 2px solid transparent; }
.main-nav a.cta:hover { background: #ff3f1c; }

/* Mobile burger */
.mobile-menu-toggle { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; font-size: 22px; line-height: 1; border-radius: 10px; border: 2px solid var(--ink-60); background: #fff; color: var(--ink); cursor: pointer; transition: background 0.2s ease, transform 0.2s ease; }
.mobile-menu-toggle:hover { background: var(--brand-accent); transform: translateY(-2px); }

/* Mobile menu overlay */
.mobile-menu { position: fixed; top: 0; right: 0; bottom: 0; width: 84%; max-width: 380px; background: #0f0f0f; color: #fff; transform: translateX(100%); transition: transform 0.35s ease; box-shadow: -10px 0 24px rgba(0,0,0,0.25); display: flex; flex-direction: column; padding: 20px; gap: 16px; z-index: 1200; }
.mobile-menu.active { transform: translateX(0); }
.mobile-menu-close { align-self: flex-end; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; border: 2px solid rgba(255,255,255,0.3); background: transparent; color: #fff; font-size: 18px; cursor: pointer; }
.mobile-nav { display: flex; flex-direction: column; gap: 12px; }
.mobile-nav a { color: #fff; padding: 12px 10px; border-radius: 10px; background: rgba(255,255,255,0.06); font-weight: 700; letter-spacing: 0.3px; text-transform: uppercase; }
.mobile-nav a:hover { background: rgba(255,255,255,0.14); }

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

/* ========== HERO ========== */
.hero { background: var(--brand-accent); border-top: 6px solid var(--electric-orange); border-bottom: 1px solid var(--border); }
.hero .container { padding-top: 28px; padding-bottom: 28px; }
.hero .content-wrapper { align-items: flex-start; gap: 18px; }
.hero p { color: var(--ink-80); }

/* Trust badges */
.trust-badges { display: flex; flex-wrap: wrap; gap: 12px; }
.badge { display: flex; align-items: center; gap: 8px; background: #fff; border: 2px solid var(--brand-secondary); color: #1d3b22; padding: 8px 12px; border-radius: 999px; font-weight: 700; box-shadow: var(--shadow-1); }
.badge img { width: 18px; height: 18px; }

/* CTA group */
.cta-group { display: flex; flex-wrap: wrap; gap: 12px; }
.cta-group a, .text-section a.cta, .search-bar a, .content-wrapper a.cta { display: inline-flex; align-items: center; justify-content: center; padding: 12px 16px; border-radius: 12px; font-weight: 800; letter-spacing: 0.3px; text-transform: uppercase; background: var(--electric-teal); color: #0b2520; border: 2px solid #049e77; box-shadow: var(--shadow-1); transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.2s ease; }
.cta-group a:hover, .search-bar a:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.cta-group a:active, .search-bar a:active { transform: translateY(0); }

/* Search bars */
.search-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; background: #fff; border: 2px solid var(--border); border-radius: 14px; padding: 10px; box-shadow: var(--shadow-1); }
.search-bar input[type="search"], .text-section input[type="email"], .text-section input[type="text"], .text-section input[type="number"], .text-section input[type="email"], input[type="email"], input[type="search"] { flex: 1 1 200px; min-width: 0; padding: 12px 14px; border-radius: 10px; border: 2px solid #E5DED3; font-size: 16px; outline: none; }
.search-bar input:focus { border-color: var(--electric-blue); box-shadow: 0 0 0 3px rgba(30,102,255,0.12); }
.search-bar a { background: var(--electric-orange); color: #fff; border-color: transparent; }

/* Inline subscribe blocks */
.subscribe-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; background: #fff; border: 2px solid var(--border); padding: 14px; border-radius: 14px; box-shadow: var(--shadow-1); }
.subscribe-inline a { background: var(--electric-orange); color: #fff; border: 2px solid transparent; padding: 10px 14px; border-radius: 12px; font-weight: 800; text-transform: uppercase; }
.privacy-note { font-size: 14px; color: var(--ink-60); }

/* Text sections */
.text-section { display: flex; flex-direction: column; gap: 14px; }
.text-section ul { margin: 0; padding-left: 18px; }
.text-section li { margin-bottom: 10px; }
.text-section a { color: var(--electric-blue); font-weight: 700; }
.text-section a:hover { color: #0f49d9; }

/* Breadcrumbs (where present) */
[aria-label="Brotkrumen"] { display: flex; flex-wrap: wrap; gap: 8px; color: var(--ink-60); font-size: 14px; }

/* Testimonials – readable (dark text on light background) */
.testimonial-card p { margin: 0; color: #1c1b1a; }
.testimonial-card strong { color: var(--brand-primary); }

/* Footer */
footer { background: #0e0e0e; color: #f1f1f1; padding: 28px 0; border-top: 6px solid var(--electric-teal); }
footer .container { gap: 0; }
footer .content-wrapper { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
footer .content-wrapper > * { flex: 1 1 240px; }
.footer-nav, .footer-legal, .footer-contact { display: flex; flex-direction: column; gap: 8px; }
.footer-nav a, .footer-legal a { color: #f1f1f1; }
.footer-nav a:hover, .footer-legal a:hover { color: var(--electric-teal); }
.footer-contact p { margin: 0; color: #eaeaea; }
.footer-brand { display: flex; flex-direction: column; gap: 10px; }
.footer-brand img { width: 120px; }
.footer-brand p { color: #ddd; }
footer .social { display: flex; gap: 8px; }
footer .social a { display: inline-flex; background: #1c1c1c; padding: 8px; border-radius: 10px; }

/* ========== RESPONSIVE ========== */
@media (min-width: 768px) {
  h1 { font-size: 40px; }
  h2 { font-size: 28px; }
  .hero .container { padding-top: 40px; padding-bottom: 40px; }
  .text-image-section { flex-direction: row; }
  .section { padding: 48px 24px; }
}
@media (min-width: 1024px) {
  h1 { font-size: 48px; }
}

/* ========== INTERACTIVE STATES & MICRO-ANIMATIONS ========== */
button, a, input { transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease; }
.card:hover { box-shadow: var(--shadow-2); }

/* ========== PAGE-SPECIFIC ENHANCEMENTS ========== */
/* 404 specifics */
.hero h1:only-child, .hero h1 { word-break: break-word; }

/* Index: highlight lists */
.text-section span { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; background: #eef8f5; color: #0c4c3e; border: 1px solid #cceee4; font-size: 12px; }

/* Nav current page in footer/legal blocks */
[aria-current="page"] { text-decoration: underline; text-underline-offset: 4px; }

/* ========== FORMS & CONTROLS ========== */
label { font-weight: 700; color: var(--ink); }
input[type="checkbox"] { width: 16px; height: 16px; vertical-align: middle; }

/* ========== ACCESSIBLE BUTTON LOOK FOR LINKS WITHIN CTAS ========== */
.main-nav a.cta, .cta-group a, .subscribe-inline a, .text-section a.cta, .search-bar a { cursor: pointer; }

/* ========== COOKIE CONSENT (BANNER + MODAL) ========== */
.cookie-banner, .cookie-consent { position: fixed; left: 0; right: 0; bottom: 0; background: #ffffff; border-top: 3px solid var(--electric-orange); box-shadow: 0 -8px 24px rgba(0,0,0,0.12); z-index: 1500; display: flex; flex-direction: column; gap: 12px; padding: 16px; }
.cookie-banner .container, .cookie-consent .container { display: flex; flex-direction: column; gap: 12px; }
.cookie-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-buttons .accept, .cookie-buttons .reject, .cookie-buttons .settings { display: inline-flex; align-items: center; justify-content: center; padding: 10px 14px; border-radius: 12px; font-weight: 800; text-transform: uppercase; }
.cookie-buttons .accept { background: var(--electric-teal); color: #0b2520; border: 2px solid #049e77; }
.cookie-buttons .reject { background: #1c1c1c; color: #fff; border: 2px solid #000; }
.cookie-buttons .settings { background: var(--brand-accent); color: var(--ink); border: 2px solid var(--border); }

/* Cookie preferences modal */
.cookie-modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 1600; display: none; align-items: center; justify-content: center; padding: 20px; }
.cookie-modal-backdrop.open { display: flex; }
.cookie-modal { background: #ffffff; width: 100%; max-width: 720px; border-radius: 16px; box-shadow: var(--shadow-2); border: 2px solid var(--border); display: flex; flex-direction: column; gap: 16px; padding: 18px; }
.cookie-modal .modal-header { display: flex; align-items: center; justify-content: space-between; }
.cookie-modal .modal-content { display: flex; flex-direction: column; gap: 10px; }
.cookie-modal .modal-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.cookie-toggle { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: #fff; }

/* ========== MANDATORY RULES ENFORCEMENT ========== */
/* Ensure spacing between blocks */
section + section { margin-top: 20px; }
.content-wrapper > * + * { margin-top: 0; }

/* Avoid overlapping by giving breathing room */
.hero, section, .card, .testimonial-card { position: relative; z-index: 1; }

/* ========== PAGE FOOTER SPACING ========== */
main { display: flex; flex-direction: column; gap: 20px; }

/* ========== ALIGNMENT & FLEX FALLBACKS ========== */
/* Containers using flex for layout explicitly */
nav, header, main, footer, section, .hero, .footer-nav, .footer-legal, .footer-contact { display: flex; flex-direction: column; }

/* But avoid forcing unwanted stacking inside content */
main > section > .container > .content-wrapper { display: flex; flex-direction: column; }

/* ========== TEXT-IMAGE SECTION RESPONSIVE RULE ========== */
@media (max-width: 768px) { .text-image-section { flex-direction: column; } }

/* ========== TABLES OR LISTS THAT MAY APPEAR ========== */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px; border-bottom: 1px solid var(--border); }

/* ========== SPECIAL LINK BUTTONS IN POLICY PAGES ========== */
.text-section ul li a[href^="mailto:"], .text-section ul li a[href^="http"], .text-section p a { color: var(--electric-blue); font-weight: 700; }

/* ========== HEADER STATE WHEN MENU OPEN (JS should toggle body.menu-open) ========== */
body.menu-open { overflow: hidden; }

/* ========== ARIA CURRENT IN NAV ========== */
.main-nav a[aria-current="page"], .mobile-nav a[aria-current="page"] { background: rgba(255,255,255,0.18);  border-color: #fff; }

/* Desktop styling adjustments */
@media (min-width: 992px) {
  nav, header, footer { flex-direction: column; }
  .hero .content-wrapper { max-width: 900px; }
  .cta-group a, .search-bar a { padding: 12px 18px; }
}

/* ========== BUTTON-LIKE LINKS GENERAL ========== */
a.button, .btn { display: inline-flex; align-items: center; justify-content: center; background: var(--electric-orange); color: #fff; padding: 12px 16px; border-radius: 12px; font-weight: 800; border: 2px solid transparent; text-transform: uppercase; }
a.button:hover, .btn:hover { background: #ff3f1c; }

/* ========== HIGH ENERGY BORDERS & ACCENTS ========== */
/* Dynamic underlines on headings */
h2::after { content: ""; display: block; width: 56px; height: 4px; background: var(--electric-teal); border-radius: 2px; margin-top: 8px; }

/* ========== LIST EMPHASIS FOR POLICY/HELP PAGES ========== */
.text-section li::marker { color: var(--brand-secondary); }

/* ========== BADGE PULSE (subtle) ========== */
@keyframes pulseBadge { 0% { transform: translateY(0); } 50% { transform: translateY(-1px); } 100% { transform: translateY(0); } }
.badge { animation: pulseBadge 4s ease-in-out infinite; }

/* ========== HEADER COLOR POP ON SCROLL (optional with JS toggle .scrolled) ========== */
header.scrolled { box-shadow: 0 6px 18px rgba(0,0,0,0.12); }

/* ========== ACCESSIBILITY: PRINT ========== */
@media print {
  .mobile-menu-toggle, .mobile-menu, .cta-group a, .search-bar { display: none !important; }
  header { position: static; box-shadow: none; }
  footer { color: #000; background: #fff; border: none; }
}
