/* ===================================================================
   Ice Veil Ernährungsatelier - Professional Corporate UI
   Global CSS (mobile-first). Flexbox-only layouts. No CSS Grid/Columns.
   =================================================================== */

/* -----------------------------
   1) CSS RESET / NORMALIZE
   ----------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: Verdana, Geneva, Tahoma, sans-serif; color: #0f172a; background: #ffffff; line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { color: #155D27; text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { margin: 0 0 16px; padding-left: 20px; }
li { margin: 6px 0; }
button { font: inherit; cursor: pointer; background: none; border: none; color: inherit; }
:focus { outline: none; }
:focus-visible { outline: 3px solid rgba(21,93,39,0.4); outline-offset: 2px; }

/* -----------------------------
   2) THEME TOKENS (CSS variables with fallbacks)
   ----------------------------- */
:root {
  --brand-primary: #155D27; /* green */
  --brand-secondary: #9A4A00; /* warm accent */
  --brand-accent: #F7FBF9; /* light accent surface */
  --corporate-blue: #1E3A8A; /* corporate blue accent */
  --text-900: #0f172a; /* near-black */
  --text-700: #1f2937; /* dark gray */
  --text-600: #374151; /* mid gray */
  --muted-50: #f8fafc; /* very light */
  --muted-100: #f3f4f6;
  --muted-200: #e5e7eb;
  --muted-300: #d1d5db;
  --muted-400: #9ca3af;
  --surface: #ffffff;
  --shadow-md: 0 6px 20px rgba(15,23,42,0.08);
  --shadow-sm: 0 2px 8px rgba(15,23,42,0.08);
}

/* -----------------------------
   3) TYPOGRAPHY
   ----------------------------- */
h1, h2, h3, h4 { font-family: "Trebuchet MS", Verdana, Geneva, Tahoma, sans-serif; color: var(--text-900, #0f172a); margin: 0 0 16px; line-height: 1.25; }
.subheadline { color: var(--text-600, #374151); margin: 8px 0 16px; font-size: 16px; }

/* Type scale mobile */
h1 { font-size: 32px; }
h2 { font-size: 24px; margin-top: 4px; }
h3 { font-size: 18px; color: var(--text-700, #1f2937); }
p { margin: 0 0 16px; font-size: 16px; }
small { font-size: 14px; color: var(--text-600, #374151); }

/* -----------------------------
   4) LAYOUT PRIMITIVES (Flexbox-only)
   ----------------------------- */
.container { width: 100%; display: flex; justify-content: center; }
.content-wrapper { width: 100%; max-width: 1200px; display: flex; flex-direction: column; gap: 16px; padding: 0 16px; }

/* Mandatory spacing class (explicit) */
.section { margin-bottom: 60px; padding: 40px 20px; }

/* Apply generous defaults to all sections too */
section { padding: 40px 20px; margin-bottom: 60px; }

/* Standard utility groupings required */
.card-container { display: flex; flex-wrap: wrap; gap: 24px; }
.card { margin-bottom: 20px; position: relative; background: var(--surface, #ffffff); border: 1px solid var(--muted-200, #e5e7eb); border-radius: 10px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; padding: 20px; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.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: 1px solid var(--muted-200, #e5e7eb); border-radius: 12px; box-shadow: var(--shadow-sm); color: var(--text-900, #0f172a); }
.feature-item { display: flex; flex-direction: column; align-items: flex-start; gap: 15px; }

/* General text block layout */
.text-section { display: flex; flex-direction: column; gap: 12px; }

/* Icon alignment in lists */
.text-section li, .hero li { display: flex; align-items: center; gap: 10px; }
.text-section li img, .hero li img, .text-section p img { width: 20px; height: 20px; flex: 0 0 20px; }

/* -----------------------------
   5) HEADER & NAVIGATION
   ----------------------------- */
header { position: sticky; top: 0; z-index: 100; background: var(--surface, #ffffff); border-bottom: 1px solid var(--muted-200, #e5e7eb); }
header .content-wrapper { padding-top: 12px; padding-bottom: 12px; }
.logo img { height: 40px; width: auto; }

/* Top bar flex (mobile: column, desktop: row) */
header .content-wrapper { flex-direction: column; align-items: stretch; gap: 12px; }

/* Main navigation */
.main-nav { display: none; align-items: center; gap: 16px; flex-wrap: wrap; }
.main-nav a { color: var(--text-700, #1f2937); padding: 8px 6px; border-radius: 6px; transition: color 0.2s ease, background-color 0.2s ease; }
.main-nav a:hover { color: var(--brand-primary, #155D27); background: var(--brand-accent, #F7FBF9); text-decoration: none; }

/* Header CTA buttons */
.header-cta { display: none; align-items: center; gap: 12px; flex-wrap: wrap; }
.header-cta a { display: inline-flex; align-items: center; justify-content: center; padding: 10px 14px; border-radius: 8px; font-weight: 600; border: 1px solid transparent; transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.05s ease; }
.header-cta a:first-child { background: var(--brand-primary, #155D27); color: #ffffff; }
.header-cta a:first-child:hover { background: #0f4a1f; transform: translateY(-1px); }
.header-cta a:last-child { background: #ffffff; color: var(--brand-primary, #155D27); border-color: var(--brand-primary, #155D27); }
.header-cta a:last-child:hover { background: var(--brand-accent, #F7FBF9); }

/* Hamburger toggle */
.mobile-menu-toggle { display: inline-flex; align-self: flex-end; font-size: 24px; line-height: 1; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--muted-300, #d1d5db); color: var(--text-700, #1f2937); background: #ffffff; transition: background-color 0.2s ease, border-color 0.2s ease; }
.mobile-menu-toggle:hover { background: var(--muted-100, #f3f4f6); border-color: var(--muted-400, #9ca3af); }

/* Mobile slide-in menu */
.mobile-menu { position: fixed; top: 0; right: 0; height: 100vh; width: 85%; max-width: 380px; background: #ffffff; transform: translateX(100%); transition: transform 0.35s ease; box-shadow: -8px 0 24px rgba(15,23,42,0.15); z-index: 9999; display: flex; flex-direction: column; padding: 20px; gap: 16px; }
.mobile-menu.open, body.menu-open .mobile-menu, .mobile-menu.active { transform: translateX(0); }
body.menu-open { overflow: hidden; }
.mobile-menu-close { align-self: flex-end; font-size: 22px; padding: 6px 10px; border: 1px solid var(--muted-300, #d1d5db); border-radius: 6px; background: #ffffff; }
.mobile-nav { display: flex; flex-direction: column; gap: 8px; }
.mobile-nav a { display: block; padding: 12px 10px; border-radius: 8px; color: var(--text-700, #1f2937); border: 1px solid transparent; }
.mobile-nav a:hover { background: var(--brand-accent, #F7FBF9); border-color: var(--muted-200, #e5e7eb); text-decoration: none; }

/* Desktop header (>= 992px) */
@media (min-width: 992px) {
  header .content-wrapper { flex-direction: row; align-items: center; justify-content: space-between; }
  .mobile-menu-toggle { display: none; }
  .main-nav { display: flex; }
  .header-cta { display: flex; }
}

/* -----------------------------
   6) HERO / SECTIONS
   ----------------------------- */
.hero { background: var(--brand-accent, #F7FBF9); border-bottom: 1px solid var(--muted-200, #e5e7eb); }
.hero .content-wrapper { padding-top: 20px; padding-bottom: 10px; }
.hero h1 { color: var(--text-900, #0f172a); }
.hero .subheadline { color: var(--text-600, #374151); max-width: 42ch; }

/* CTA links inside content blocks become buttons */
.text-section > a { display: inline-flex; align-items: center; justify-content: center; padding: 10px 14px; border-radius: 8px; font-weight: 600; border: 1px solid var(--brand-primary, #155D27); color: var(--brand-primary, #155D27); background: #ffffff; transition: background-color 0.25s ease, color 0.25s ease, transform 0.05s ease; }
.text-section > a:hover { background: var(--brand-accent, #F7FBF9); text-decoration: none; }
.text-section > a:first-child { background: var(--brand-primary, #155D27); color: #ffffff; border-color: var(--brand-primary, #155D27); }
.text-section > a:first-child:hover { background: #0f4a1f; }
.text-section > a + a { margin-left: 8px; }

/* Lists inside sections */
section ul, section ol { padding-left: 18px; }

/* -----------------------------
   7) FOOTER
   ----------------------------- */
footer { background: #0b172e; color: #e6e8ee; }
footer a { color: #fff !important; }
footer a:hover { color: #ffffff; text-decoration: underline; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 12px; }
.footer-nav a { padding: 6px 0; }
footer .text-section { color: #e6e8ee; }


/* Ensure sections inside footer are visually tighter */
footer section { padding-top: 28px; padding-bottom: 28px; margin-bottom: 0; }

/* -----------------------------
   8) CARDS / TESTIMONIALS / UTILITIES
   ----------------------------- */
.testimonial-card p { margin: 0; }
.testimonial-card strong { color: var(--text-700, #1f2937); }

/* Utility color accents */
.badge { display: inline-flex; align-items: center; padding: 4px 8px; border-radius: 999px; font-size: 12px; background: var(--muted-100, #f3f4f6); color: var(--text-700, #1f2937); }

/* Links within paragraphs should be clear */
.text-section p a, p a { color: var(--corporate-blue, #1E3A8A); text-decoration: underline; text-underline-offset: 2px; }
.text-section p a:hover, p a:hover { color: #102865; }

/* -----------------------------
   9) RESPONSIVE RULES
   ----------------------------- */
@media (max-width: 768px) {
  .text-image-section { flex-direction: column; align-items: flex-start; }
}

@media (min-width: 768px) {
  /* Larger type on tablet/desktop */
  h1 { font-size: 42px; }
  h2 { font-size: 28px; }
  .hero .content-wrapper { padding-top: 28px; padding-bottom: 18px; }
}

@media (min-width: 1200px) {
  h1 { font-size: 48px; }
  h2 { font-size: 32px; }
}

/* -----------------------------
   10) BUTTONS / INTERACTIONS
   ----------------------------- */
.button, .btn { display: inline-flex; align-items: center; justify-content: center; padding: 10px 16px; border-radius: 10px; border: 1px solid var(--brand-primary, #155D27); background: var(--brand-primary, #155D27); color: #fff; font-weight: 600; transition: transform 0.05s ease, background-color 0.25s ease, color 0.25s ease; }
.button:hover, .btn:hover { background: #0f4a1f; text-decoration: none; }
.button--secondary, .btn--secondary { background: #ffffff; color: var(--brand-primary, #155D27); }
.button--secondary:hover, .btn--secondary:hover { background: var(--brand-accent, #F7FBF9); }

/* -----------------------------
   11) ACCESSIBILITY & STATES
   ----------------------------- */
[aria-current="page"], .main-nav a.active { color: var(--brand-primary, #155D27); font-weight: 700; }

/* -----------------------------
   12) COOKIE CONSENT (banner + modal)
   ----------------------------- */
.cookie-banner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 9998; display: flex; flex-direction: column; gap: 14px; background: #ffffff; border-top: 1px solid var(--muted-200, #e5e7eb); box-shadow: 0 -6px 18px rgba(15,23,42,0.08); padding: 16px; transform: translateY(110%); transition: transform 0.35s ease; }
.cookie-banner.show { transform: translateY(0); }
.cookie-banner .container { display: flex; justify-content: center; }
.cookie-banner .content-wrapper { flex-direction: column; gap: 12px; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-actions .accept { background: var(--brand-primary, #155D27); color: #ffffff; border: 1px solid var(--brand-primary, #155D27); padding: 10px 14px; border-radius: 8px; font-weight: 600; }
.cookie-actions .reject { background: #ffffff; color: var(--brand-primary, #155D27); border: 1px solid var(--brand-primary, #155D27); padding: 10px 14px; border-radius: 8px; font-weight: 600; }
.cookie-actions .settings { background: #ffffff; color: var(--corporate-blue, #1E3A8A); border: 1px solid var(--muted-300, #d1d5db); padding: 10px 14px; border-radius: 8px; font-weight: 600; }
.cookie-actions .accept:hover { background: #0f4a1f; }
.cookie-actions .reject:hover, .cookie-actions .settings:hover { background: var(--muted-100, #f3f4f6); }

/* Cookie modal overlay */
.cookie-modal-overlay { position: fixed; inset: 0; background: rgba(2,6,23,0.55); display: none; align-items: center; justify-content: center; z-index: 10000; }
.cookie-modal-overlay.open { display: flex; }
.cookie-modal { width: 92%; max-width: 640px; background: #ffffff; border-radius: 12px; box-shadow: var(--shadow-md); display: flex; flex-direction: column; gap: 16px; padding: 20px; transform: translateY(30px); transition: transform 0.3s ease; }
.cookie-modal-overlay.open .cookie-modal { transform: translateY(0); }
.cookie-modal header { display: flex; align-items: center; justify-content: space-between; }
.cookie-modal .modal-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.cookie-category { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px; border: 1px solid var(--muted-200, #e5e7eb); border-radius: 8px; }
.cookie-category .label { font-weight: 600; color: var(--text-700, #1f2937); }

/* Simple toggle switch */
.cookie-toggle { position: relative; width: 46px; height: 26px; border-radius: 999px; background: var(--muted-300, #d1d5db); transition: background-color 0.2s ease; flex: 0 0 auto; }
.cookie-toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #ffffff; box-shadow: 0 1px 3px rgba(0,0,0,0.2); transition: transform 0.2s ease; }
.cookie-toggle.is-on { background: var(--brand-primary, #155D27); }
.cookie-toggle.is-on::after { transform: translateX(20px); }

/* -----------------------------
   13) CORPORATE DETAILS / EMPHASIS BLOCKS
   ----------------------------- */
.note { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; background: var(--muted-100, #f3f4f6); border: 1px solid var(--muted-200, #e5e7eb); border-radius: 8px; color: var(--text-700, #1f2937); }

/* -----------------------------
   14) SPECIFIC TWEAKS FOR PAGE STRUCTURE
   ----------------------------- */
/* Give inner sections a calm corporate divider on non-hero blocks */
main section:not(.hero) .content-wrapper h2 { border-left: 4px solid var(--corporate-blue, #1E3A8A); padding-left: 10px; }

/* Maintain sufficient spacing between multiple testimonial-cards in a row */
.testimonial-card + .testimonial-card { margin-top: 14px; }

/* -----------------------------
   15) FLEX LAYOUT ENHANCEMENTS (no grid!)
   ----------------------------- */
/* When multiple .text-section appear in a row, keep them breathable */
.content-wrapper > .text-section + .text-section { margin-top: 8px; }

/* If a row-like arrangement is needed on large screens */
@media (min-width: 992px) {
  /* Horizontal groupings inside general content wrappers */
  .content-wrapper.row-on-desktop { flex-direction: row; align-items: flex-start; gap: 24px; flex-wrap: wrap; }
}

/* -----------------------------
   16) COLOR CONTRAST GUARANTEES
   ----------------------------- */
/* Testimonials and review text must be dark on light */
.testimonial-card, .review-card { background: #ffffff; color: #0f172a; border-color: #e5e7eb; }

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

/* -----------------------------
   18) HELPER CLASSES
   ----------------------------- */
.hidden { display: none !important; }
.center { display: flex; align-items: center; justify-content: center; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }

/* -----------------------------
   19) BLUE/GRAY CORPORATE ACCENTS (consistent with brand)
   ----------------------------- */
.hr-line { width: 100%; height: 1px; background: var(--muted-200, #e5e7eb); }
.kpi-card { display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: 10px; background: var(--muted-50, #f8fafc); border: 1px solid var(--muted-200, #e5e7eb); }
.kpi-card .kpi-value { font-family: "Trebuchet MS", Verdana, sans-serif; font-size: 24px; color: var(--corporate-blue, #1E3A8A); font-weight: 700; }

/* Ensure no element overlaps: ample spacing via gaps and margins already applied */
/* End of stylesheet */
