/* ===============================
   Frosty Moon Kaffeetechnik – style.css
   Warm & friendly aesthetic • Mobile-first • Flexbox-only
   =============================== */

/* -------------------------------
   1) CSS Reset / Normalize
-------------------------------- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
img, svg { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
ul, ol { margin: 0 0 16px 0; padding: 0 0 0 20px; }
li { margin: 6px 0; }
figure { margin: 0; }
a { color: inherit; text-decoration: none; }

/* -------------------------------
   2) Design Tokens (CSS Variables)
-------------------------------- */
:root {
  --color-primary: #3B2314;   /* dark coffee brown */
  --color-secondary: #5A7C6E; /* sage green */
  --color-accent: #F4EDE3;    /* warm cream */
  --color-bg: #FFF9F4;        /* softer warm base */
  --color-surface: #FFFFFF;   /* cards & panels */
  --color-text: #2B1A12;      /* body text dark brown */
  --color-muted: #77665C;     /* muted text */
  --color-border: #E8DFD5;    /* subtle border */
  --shadow-soft: 0 6px 20px rgba(59, 35, 20, 0.08);
  --shadow-hover: 0 10px 30px rgba(59, 35, 20, 0.12);
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;
  --spacing-8: 8px;
  --spacing-12: 12px;
  --spacing-16: 16px;
  --spacing-20: 20px;
  --spacing-24: 24px;
  --spacing-30: 30px;
  --spacing-32: 32px;
  --spacing-40: 40px;
  --spacing-48: 48px;
  --spacing-60: 60px;
  --transition: 200ms ease;
}

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

h1, h2, h3, h4 { font-family: Georgia, 'Times New Roman', serif; /* brand display */ }
h1 { font-size: 36px; line-height: 1.2; margin: 0 0 16px; }
h2 { font-size: 28px; line-height: 1.25; margin: 0 0 16px; }
h3 { font-size: 20px; line-height: 1.3; margin: 0 0 10px; }
@media (min-width: 768px) {
  h1 { font-size: 44px; }
  h2 { font-size: 32px; }
  h3 { font-size: 22px; }
}

p { margin: 0 0 14px; color: var(--color-text); }
small, .note { color: var(--color-muted); font-size: 14px; }
strong { font-weight: 700; }

/* Links */
a { color: var(--color-secondary); text-underline-offset: 2px; }
a:hover { color: #47685C; text-decoration: underline; }

/* Focus states */
:focus-visible { outline: 3px solid rgba(90,124,110,0.5); outline-offset: 2px; border-radius: 6px; }

/* -------------------------------
   4) Layout Containers (Flex-only)
-------------------------------- */
.container {
  display: flex; /* flexbox centering wrapper */
  width: 100%;
  padding: 0 var(--spacing-16);
  justify-content: center;
}
.content-wrapper {
  display: flex;
  flex-direction: column; /* mobile-first */
  gap: var(--spacing-20);
  width: 100%;
  max-width: 1200px;
  align-items: flex-start;
}

/* Global section spacing (also provide .section class as required) */
section, .section {
  margin-bottom: var(--spacing-60);
  padding: var(--spacing-40) var(--spacing-20);
}

/* Mandatory spacing/flex 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 all list-based content rows use flex when needed */
.feature-grid, .service-cards, .testimonial-list, .footer-columns, .cta-group, .main-nav, .mobile-nav, .rating-summary {
  display: flex;
}

/* -------------------------------
   5) Buttons & Badges
-------------------------------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
  color: #FFFFFF;
  padding: 12px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-primary);
  box-shadow: 0 2px 10px rgba(59, 35, 20, 0.15);
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  font-weight: 700;
}
.button:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); background: #2F1C10; text-decoration: none; }
.button:active { transform: translateY(0); box-shadow: var(--shadow-soft); }
.button.secondary {
  background: #FFFFFF;
  color: var(--color-secondary);
  border: 1px solid var(--color-secondary);
}
.button.secondary:hover { background: #F0F5F3; box-shadow: var(--shadow-hover); }

.badge, .phone-snippet {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  background: #F3F7F5;
  color: var(--color-secondary);
  border: 1px solid #DCE7E2;
}
.phone-snippet img { width: 18px; height: 18px; }

/* -------------------------------
   6) Header & Navigation (mobile-first)
-------------------------------- */
.site-header {
  position: relative;
  background: #FFFFFF;
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 2px 20px rgba(59, 35, 20, 0.04);
}
.site-header .content-wrapper {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-16);
  padding: 14px 0;
}
.logo img { height: 42px; width: auto; }

/* Desktop nav hidden on mobile */
.main-nav { display: none; }
.main-nav a {
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--color-primary);
}
.main-nav a:hover { background: var(--color-accent); }

.header-cta { display: none; }

/* Mobile menu toggle */
.mobile-menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  background: var(--color-accent);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  color: var(--color-primary);
  box-shadow: var(--shadow-soft);
  transition: background var(--transition), transform var(--transition);
}
.mobile-menu-toggle:hover { background: #EFE7DC; transform: translateY(-1px); }
.mobile-menu-toggle:active { transform: translateY(0); }

/* Mobile full-screen menu */
.mobile-menu {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  background: rgba(0,0,0,0.25);
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  transform: translateX(100%);
  transition: transform 280ms ease;
  z-index: 9999;
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu > nav, .mobile-nav {
  background: #FFFFFF;
  width: min(90%, 360px);
  padding: 18px;
  display: flex; flex-direction: column; gap: 8px;
  box-shadow: -6px 0 24px rgba(59, 35, 20, 0.15);
}
.mobile-nav a {
  padding: 14px 12px;
  border-radius: var(--radius-md);
  font-size: 18px;
  color: var(--color-primary);
}
.mobile-nav a:hover { background: var(--color-accent); }
.mobile-menu-close {
  position: absolute;
  top: 12px; right: 12px;
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #FFFFFF;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  color: var(--color-primary);
  box-shadow: var(--shadow-soft);
}

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

/* -------------------------------
   7) Hero & Common Sections
-------------------------------- */
.hero {
  background: var(--color-accent);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}
.hero .content-wrapper { align-items: flex-start; }
.hero ul { list-style: none; padding-left: 0; display: flex; flex-direction: column; gap: 10px; }
.hero li { display: flex; align-items: center; gap: 10px; color: var(--color-primary); }
.hero li img { width: 20px; height: 20px; }

.trust-badges { color: var(--color-muted); font-size: 14px; }

.breadcrumb { font-size: 14px; color: var(--color-muted); }
.breadcrumb a { color: var(--color-secondary); }

/* Text sections and grids */
.text-section { display: flex; flex-direction: column; gap: 14px; }
.text-section ul { margin: 0; padding-left: 20px; }
.text-section li { margin: 6px 0; }

.feature-grid, .service-cards {
  flex-wrap: wrap;
  gap: var(--spacing-20);
}
.feature-grid > div, .service-cards > div {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-soft);
  flex: 1 1 260px; /* flexbox responsive tiles */
  min-width: 240px;
  transition: transform var(--transition), box-shadow var(--transition);
}
.feature-grid > div:hover, .service-cards > div:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }

.stats { color: var(--color-primary); }
.stats .note { display: block; margin-top: 6px; }

ol { padding-left: 20px; }
ol li { margin: 8px 0; }

.rating-summary { align-items: center; gap: 8px; color: var(--color-primary); font-weight: 700; }
.rating-summary img { width: 20px; height: 20px; }

/* Testimonials – ensure dark text on light background for readability */
.testimonial-list { flex-wrap: wrap; gap: var(--spacing-20); }
.testimonial-card {
  background: #FFFFFF;
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-soft);
  flex: 1 1 280px;
  min-width: 260px;
  transition: transform var(--transition), box-shadow var(--transition);
}
.testimonial-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.testimonial-card p { margin: 0 0 8px; }

/* Prices lists & notes */
.note { background: #FAF6F0; border: 1px solid var(--color-border); padding: 10px 12px; border-radius: var(--radius-sm); display: inline-flex; }

/* -------------------------------
   8) Footer
-------------------------------- */
.site-footer { background: var(--color-primary); color: var(--color-accent); }
.site-footer .content-wrapper { gap: var(--spacing-24); padding: 24px 0; }
.footer-columns { flex-direction: column; gap: var(--spacing-20); width: 100%; }
.footer-columns > div { flex: 1 1 200px; }
.site-footer h3 { color: #F9F4ED; margin-bottom: 8px; }
.site-footer a { color: #E7DED3; }
.site-footer a:hover { color: #FFFFFF; text-decoration: underline; }
.site-footer nav { display: flex; flex-direction: column; gap: 6px; }
.brand-signature { color: #E7DED3; font-style: italic; }

@media (min-width: 900px) {
  .footer-columns { flex-direction: row; gap: var(--spacing-24); }
}

/* -------------------------------
   9) Cards (generic) & Content Elements
-------------------------------- */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-soft);
}
.card:hover { box-shadow: var(--shadow-hover); }

.content-grid { width: 100%; }

/* Text + Image section (flex) */
.text-image-section { width: 100%; }
.text-image-section > * { flex: 1 1 300px; }

/* -------------------------------
   10) Responsive Utilities
-------------------------------- */
@media (max-width: 768px) {
  .text-image-section { flex-direction: column; align-items: center; }
  .cta-group { flex-direction: column; width: 100%; }
  .cta-group .button { width: 100%; }
}

@media (min-width: 768px) {
  .cta-group { gap: var(--spacing-12); }
  .content-wrapper.wide-row { flex-direction: row; align-items: center; justify-content: space-between; }
}

/* -------------------------------
   11) Lists with icons and contact blocks
-------------------------------- */
ul.icon-list { list-style: none; padding-left: 0; display: flex; flex-direction: column; gap: 10px; }
ul.icon-list li { display: flex; align-items: center; gap: 10px; }
ul.icon-list img { width: 18px; height: 18px; }

/* -------------------------------
   12) Mobile Menu & Overlays Z-Index
-------------------------------- */
.site-header { z-index: 1000; }
.mobile-menu { z-index: 9999; }

/* -------------------------------
   13) Cookie Consent (banner + modal)
-------------------------------- */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0;
  background: #FFFFFF;
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -8px 30px rgba(59, 35, 20, 0.10);
  padding: 12px 16px;
  display: flex; align-items: center; justify-content: center;
  z-index: 9998;
  transform: translateY(100%);
  transition: transform 260ms ease;
}
.cookie-banner.show { transform: translateY(0); }
.cookie-banner .banner-inner {
  display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 1200px;
}
.cookie-banner p { margin: 0; color: var(--color-text); }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-actions .button { padding: 10px 16px; }
.cookie-actions .button.reject { background: #FFFFFF; color: var(--color-primary); border-color: var(--color-primary); }
.cookie-actions .button.settings { background: var(--color-secondary); border-color: var(--color-secondary); }
.cookie-actions .button.settings:hover { background: #4D6B5F; }

/* Cookie modal overlay */
.cookie-modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.4);
  display: none; align-items: center; justify-content: center; padding: 20px;
  z-index: 9999;
}
.cookie-modal-backdrop.show { display: flex; }
.cookie-modal {
  background: #FFFFFF; border: 1px solid var(--color-border); border-radius: var(--radius-lg);
  width: 100%; max-width: 640px; padding: 20px; box-shadow: var(--shadow-hover);
  display: flex; flex-direction: column; gap: 14px;
  transform: translateY(10px); opacity: 0; transition: all 220ms ease;
}
.cookie-modal-backdrop.show .cookie-modal { transform: translateY(0); opacity: 1; }
.cookie-modal .modal-header { display: flex; align-items: center; justify-content: space-between; }
.cookie-modal .modal-body { display: flex; flex-direction: column; gap: 10px; }
.cookie-category { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-accent); }
.cookie-category small { color: var(--color-muted); }

/* Simple toggle switch */
.switch { position: relative; width: 46px; height: 26px; display: inline-flex; align-items: center; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: relative; width: 46px; height: 26px; background: #D9D9D9; border-radius: 26px; transition: background var(--transition);
}
.switch .slider::after {
  content: ""; position: absolute; left: 2px; top: 2px; width: 22px; height: 22px; background: #FFFFFF; border-radius: 50%; box-shadow: var(--shadow-soft); transition: transform var(--transition);
}
.switch input:checked + .slider { background: var(--color-secondary); }
.switch input:checked + .slider::after { transform: translateX(20px); }

.cookie-modal .modal-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* -------------------------------
   14) Micro-interactions / Effects
-------------------------------- */
.hover-lift { transition: transform var(--transition), box-shadow var(--transition); }
.hover-lift:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }

/* -------------------------------
   15) Page-specific fine-tuning
-------------------------------- */
/* Index: "So läuft Ihre Reparatur ab" highlight timing */
.turnaround { background: #FAF6F0; border: 1px solid var(--color-border); padding: 8px 12px; border-radius: var(--radius-pill); display: inline-flex; }

/* Section headings spacing harmony */
.content-wrapper > h2 + .text-section,
.content-wrapper > h2 + .feature-grid,
.content-wrapper > h2 + .service-cards,
.content-wrapper > h2 + ul,
.content-wrapper > h2 + ol { margin-top: -4px; }

/* Lists inside content wrappers: better vertical rhythm */
.content-wrapper ul { display: flex; flex-direction: column; gap: 8px; }

/* Footer spacing in legal pages */
main + .site-footer { margin-top: 0; }

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

/* -------------------------------
   17) Desktop enhancements
-------------------------------- */
@media (min-width: 1024px) {
  .content-wrapper { gap: var(--spacing-24); }
  section, .section { padding: var(--spacing-48) var(--spacing-20); }
  .hero { padding-top: var(--spacing-40); padding-bottom: var(--spacing-40); }
}

/* -------------------------------
   18) Prevent overlapping & ensure spacing
-------------------------------- */
.feature-grid > div, .service-cards > div, .testimonial-card, .card { margin-bottom: 20px; }
.feature-grid, .service-cards, .testimonial-list, .card-container, .content-grid { gap: 20px; }

/* -------------------------------
   19) Ensure flex alignment requirements
-------------------------------- */
.text-image-section { align-items: center; }
.card-content { display: flex; flex-direction: column; justify-content: center; gap: 10px; }

/* -------------------------------
   20) Print basics
-------------------------------- */
@media print {
  .mobile-menu, .mobile-menu-toggle, .cookie-banner, .cookie-modal-backdrop { display: none !important; }
  a { text-decoration: underline; }
}
