/* =============================
   MaßGenuss – style.css
   Theme: gradient_modern (modern gradients, smooth transitions, contemporary feel)
   Constraints: Flexbox-only layouts (no CSS Grid/Columns)
   ============================= */

/* -----------------------------
   Reset & Base
----------------------------- */
* { box-sizing: border-box; }
html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: Verdana, Arial, sans-serif; color: #123A35; background: #F6F7F2; line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { color: #123A35; text-decoration: none; transition: color .2s ease, background-color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
a:hover { color: #0e2f2b; }
button { font-family: inherit; cursor: pointer; border: 0; background: transparent; color: inherit; }
:focus { outline: 2px solid #E07A5F; outline-offset: 2px; }

/* CSS Variables (with fallbacks) */
:root {
  --color-primary: #123A35;
  --color-primary-600: #145348; /* derived */
  --color-primary-700: #0e2f2b; /* derived */
  --color-secondary: #E07A5F;
  --color-secondary-600: #cc6c54; /* derived */
  --color-accent: #F6F7F2;
  --color-surface: #FFFFFF;
  --color-muted: #7B8E88; /* derived */
  --shadow-1: 0 4px 14px rgba(18,58,53,0.08);
  --shadow-2: 0 10px 24px rgba(18,58,53,0.12);
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 8px;
}

/* Typography scale */
h1, h2, h3, h4 { font-family: "Trebuchet MS", Verdana, sans-serif; line-height: 1.2; margin: 0 0 16px; }
h1 { font-size: 32px; }
h2 { font-size: 26px; }
h3 { font-size: 20px; }
p { margin: 0 0 16px; }
ul, ol { margin: 0 0 16px 20px; }
li { margin-bottom: 8px; }
strong { font-weight: 700; }

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

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

/* Global section spacing and the mandatory patterns */
section { margin-bottom: 60px; padding: 40px 0; }
.section { margin-bottom: 60px; padding: 40px 20px; }
.card-container { display: flex; flex-wrap: wrap; gap: 24px; }
.card { margin-bottom: 20px; position: relative; background: #FFFFFF; border-radius: var(--radius-lg); box-shadow: var(--shadow-1); padding: 20px; }
.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; border-radius: var(--radius-md); background: #FFFFFF; color: #123A35; box-shadow: var(--shadow-1); border: 1px solid #e5ece8; }
.feature-item { display: flex; flex-direction: column; align-items: flex-start; gap: 15px; }

/* Accent list bullets for readability (decorative) */
ul li { position: relative; list-style: none; padding-left: 22px; }
ul li::before { content: ""; position: absolute; left: 0; top: 9px; width: 8px; height: 8px; border-radius: 50%; background: #E07A5F; }
ol { padding-left: 22px; }

/* -----------------------------
   Header & Navigation
----------------------------- */
header { position: relative; z-index: 20; background: #FFFFFF; box-shadow: 0 1px 0 rgba(18,58,53,0.06); }
header .content-wrapper { flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; }
.logo img { height: 34px; width: auto; }

/* Desktop nav (hidden on mobile-first) */
.main-nav { display: none; align-items: center; gap: 12px; flex-wrap: wrap; }
.main-nav a { padding: 10px 12px; border-radius: 10px; color: #123A35; font-size: 14px; }
.main-nav a:hover { background: #F6F7F2; }

/* Primary/Secondary buttons */
.btn-primary, .main-nav .btn-primary { background: #E07A5F; background-image: linear-gradient(135deg, #E07A5F 0%, #f09b83 100%); color: #FFFFFF; padding: 10px 16px; border-radius: 12px; box-shadow: 0 6px 14px rgba(224,122,95,0.25); font-weight: 700; }
.btn-primary:hover { filter: brightness(0.97); transform: translateY(-1px); box-shadow: 0 10px 20px rgba(224,122,95,0.32); }

.btn-secondary, .main-nav .btn-secondary { background: #FFFFFF; color: #123A35; border: 2px solid #E07A5F; padding: 8px 14px; border-radius: 12px; font-weight: 700; }
.btn-secondary:hover { background: #FFF3EF; }

/* Mobile burger */
.mobile-menu-toggle { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; background: #F6F7F2; box-shadow: var(--shadow-1); }
.mobile-menu-toggle:hover { background: #e9ede7; }

/* Mobile menu overlay */
.mobile-menu { position: fixed; top: 0; right: 0; bottom: 0; left: 0; background: rgba(18,58,53,0.1); backdrop-filter: blur(2px); transform: translateX(100%); transition: transform .35s ease; display: flex; justify-content: flex-end; z-index: 999; }
.mobile-menu.open { transform: translateX(0); }
.mobile-menu-close { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 10px; background: #FFFFFF; box-shadow: var(--shadow-1); }
.mobile-nav { width: 84%; max-width: 360px; background: #FFFFFF; height: 100%; padding: 70px 20px 20px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow-2); }
.mobile-nav a { padding: 12px 14px; border-radius: 10px; background: #F6F7F2; color: #123A35; font-weight: 600; }
.mobile-nav a:hover { background: #e9ede7; }

/* -----------------------------
   Hero (gradient_modern)
----------------------------- */
.hero { color: #FFFFFF; border-radius: 0; margin-bottom: 60px; padding: 60px 0; background-color: #123A35; background-image: linear-gradient(135deg, #123A35 0%, #145348 60%, #187366 100%); }
.hero .content-wrapper { align-items: flex-start; max-width: 860px; }
.hero h1 { font-size: 30px; margin-bottom: 8px; }
.hero p { color: #e6f0ee; }
.cta-group { display: flex; flex-wrap: wrap; gap: 12px; }
.trust-badges { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 8px 0 0; list-style: none; }
.trust-badges li { background: rgba(255,255,255,0.12); color: #FFFFFF; border: 1px solid rgba(255,255,255,0.22); border-radius: 999px; padding: 6px 12px; font-size: 12px; }

/* -----------------------------
   Text Sections as Cards
----------------------------- */
.text-section { background: #FFFFFF; border: 1px solid #e5ece8; border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow-1); }
.text-section h3 { margin-bottom: 8px; }

/* Numbers/Stats emphasis */
.stats { display: flex; flex-wrap: wrap; gap: 16px; }
.stat { background: #FFFFFF; border: 1px solid #e5ece8; border-radius: var(--radius-md); padding: 14px 16px; box-shadow: var(--shadow-1); }

/* -----------------------------
   Testimonials (readability ensured)
----------------------------- */
/* Already defined via .testimonial-card mandatory rule */
.testimonial-card p { margin: 0; }
.testimonial-card strong { color: #0e2f2b; }

/* -----------------------------
   Footer
----------------------------- */
footer section { margin-bottom: 0; padding: 30px 0; background: #0f2f2b; background-image: linear-gradient(135deg, #0f2f2b 0%, #123A35 100%); color: #eaf2f0; }
footer .content-wrapper { flex-direction: column; gap: 20px; }
footer a { color: #eaf2f0; opacity: 0.95; }
footer a:hover { opacity: 1; }
.footer-links { display: flex; flex-wrap: wrap; gap: 12px; }
.footer-links a { background: rgba(255,255,255,0.08); padding: 8px 12px; border-radius: 999px; }
.newsletter-teaser { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.brand, .contact { display: flex; flex-direction: column; gap: 8px; }
.contact img { width: 18px; height: 18px; margin-right: 8px; display: inline-flex; vertical-align: middle; }
.contact p, .brand p { margin: 0; }

/* -----------------------------
   Buttons & Links – global effects
----------------------------- */
.btn-primary:focus, .btn-secondary:focus { box-shadow: 0 0 0 3px rgba(224,122,95,0.35); }
.btn-primary:active, .btn-secondary:active { transform: translateY(0); box-shadow: none; }

/* -----------------------------
   Cookie Consent Banner & Modal
----------------------------- */
.cookie-banner { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 1000; background: #FFFFFF; color: #123A35; border: 1px solid #e5ece8; border-radius: var(--radius-lg); padding: 16px; display: none; align-items: center; justify-content: space-between; gap: 16px; box-shadow: var(--shadow-2); transform: translateY(24px); opacity: 0; transition: transform .3s ease, opacity .3s ease; }
.cookie-banner.show { display: flex; transform: translateY(0); opacity: 1; }
.cookie-text { display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-btn-primary { background: #123A35; background-image: linear-gradient(135deg, #145348 0%, #123A35 100%); color: #FFFFFF; padding: 10px 14px; border-radius: 10px; font-weight: 700; }
.cookie-btn-secondary { background: #FFFFFF; border: 2px solid #123A35; color: #123A35; padding: 8px 12px; border-radius: 10px; }
.cookie-btn-link { background: transparent; color: #123A35; text-decoration: underline; padding: 8px 0; }

/* Cookie modal */
.cookie-modal { position: fixed; inset: 0; background: rgba(18,58,53,0.4); display: none; align-items: center; justify-content: center; z-index: 1001; }
.cookie-modal.open { display: flex; }
.cookie-modal-content { background: #FFFFFF; width: 92%; max-width: 680px; border-radius: var(--radius-lg); border: 1px solid #e5ece8; box-shadow: var(--shadow-2); display: flex; flex-direction: column; padding: 20px; gap: 16px; transform: translateY(12px); opacity: 0; transition: transform .25s ease, opacity .25s ease; }
.cookie-modal.open .cookie-modal-content { transform: translateY(0); opacity: 1; }
.cookie-modal-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cookie-modal-body { display: flex; flex-direction: column; gap: 12px; }
.cookie-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #F6F7F2; border: 1px solid #e5ece8; border-radius: var(--radius-md); padding: 12px; }

/* Toggle switch (analytics/marketing) */
.toggle { position: relative; width: 44px; height: 26px; background: #cfd8d5; border-radius: 999px; transition: background .2s ease; display: inline-flex; align-items: center; padding: 3px; }
.toggle::after { content: ""; width: 20px; height: 20px; background: #FFFFFF; border-radius: 50%; box-shadow: var(--shadow-1); transform: translateX(0); transition: transform .2s ease; }
.toggle.on { background: #E07A5F; }
.toggle.on::after { transform: translateX(18px); }
.toggle[aria-checked="true"] { background: #E07A5F; }
.toggle[aria-checked="true"]::after { transform: translateX(18px); }

/* -----------------------------
   Common Elements
----------------------------- */
blockquote { margin: 0; padding: 0 0 0 14px; border-left: 4px solid #E07A5F; }
hr { border: 0; height: 1px; background: #e5ece8; margin: 24px 0; }

/* Calls to action sections */
.cta-bar, .cta-section { background: #FFFFFF; border: 1px solid #e5ece8; border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow-1); }

/* Links inside paragraphs */
.content-wrapper p a { color: #E07A5F; text-decoration: underline; }
.content-wrapper p a:hover { color: #cc6c54; }

/* Trustworthy chips for any inline icons */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 6px 10px; border-radius: 999px; background: #F6F7F2; border: 1px solid #e5ece8; font-size: 12px; }

/* -----------------------------
   Page-specific light touches
----------------------------- */
/* Pricing page: emphasize package blocks using existing .text-section */
.text-section .btn-secondary { align-self: flex-start; }

/* Lists in legal pages: keep simple bullets (override decorative) */
body:has(main h1:contains("Datenschutzerklärung")) ul li::before,
body:has(main h1:contains("Nutzungsbedingungen")) ul li::before,
body:has(main h1:contains("DSGVO")) ul li::before { background: #123A35; }
/* Note: :has() and :contains() may not be supported everywhere; if unsupported, bullets remain brand secondary. */

/* -----------------------------
   Responsive (Mobile-first)
----------------------------- */
@media (min-width: 600px) {
  .hero h1 { font-size: 34px; }
}

@media (min-width: 768px) {
  h1 { font-size: 40px; }
  h2 { font-size: 28px; }
  h3 { font-size: 22px; }
  .hero { padding: 80px 0; }
  .trust-badges li { font-size: 13px; }
}

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

  /* Allow wider content flows where needed */
  .content-wrapper.wide, .content-grid { flex-direction: row; }
  .cta-group { gap: 16px; }

  /* Arrange text-image sections horizontally if used */
  .text-image-section { flex-direction: row; }

  /* Slightly larger hero text */
  .hero h1 { font-size: 48px; }
}

@media (min-width: 1200px) {
  .hero { padding: 100px 0; }
}

/* -----------------------------
   Accessibility & Micro-interactions
----------------------------- */
/* Subtle lift on cards */
.card:hover, .text-section:hover, .testimonial-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); transition: transform .2s ease, box-shadow .2s ease; }

/* -----------------------------
   Ensuring adequate spacing between elements
----------------------------- */
.content-wrapper > * + * { margin-top: 0; }
section .content-wrapper > * { margin-bottom: 0; }
section .content-wrapper > *:not(:last-child) { margin-bottom: 8px; }

/* -----------------------------
   Images & icons inside paragraphs
----------------------------- */
.content-wrapper p img { display: inline-flex; vertical-align: middle; margin-right: 8px; }

/* -----------------------------
   Forms (for potential newsletter or future inputs)
----------------------------- */
input[type="text"], input[type="email"], select, textarea { width: 100%; padding: 12px 14px; border: 1px solid #cfe0da; border-radius: 10px; background: #FFFFFF; color: #123A35; transition: border-color .2s ease, box-shadow .2s ease; }
input[type="text"]:focus, input[type="email"]:focus, select:focus, textarea:focus { border-color: #E07A5F; box-shadow: 0 0 0 3px rgba(224,122,95,0.2); }
label { font-weight: 600; margin-bottom: 6px; display: inline-flex; }

/* -----------------------------
   Additional helpers for flexible layouts
----------------------------- */
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; }
.center { display: flex; align-items: center; justify-content: center; }

/* -----------------------------
   Ensure top alignment where required
----------------------------- */
.align-start { align-items: flex-start; }
.align-center { align-items: center; }

/* -----------------------------
   Readability in testimonials/reviews (dark text on light bg)
----------------------------- */
.reviews, .ratings, .testimonials { background: #FFFFFF; color: #123A35; border: 1px solid #e5ece8; border-radius: var(--radius-lg); padding: 20px; }

/* -----------------------------
   Page-specific section overrides (gentle)
----------------------------- */
/* Index: final CTA section as light card band */
main > section:last-of-type .content-wrapper .cta-group a { min-width: 180px; text-align: center; }

/* -----------------------------
   Prevent overlap & ensure spacing
----------------------------- */
main { display: flex; flex-direction: column; gap: 0; }
main > section + section { margin-top: 0; }

/* -----------------------------
   Print (basic)
----------------------------- */
@media print {
  .mobile-menu-toggle, .mobile-menu, .btn-primary, .btn-secondary { display: none !important; }
  a { text-decoration: underline; color: #000; }
  body { background: #FFF; }
  section { padding: 16px 0; margin-bottom: 24px; }
}
