/* ===============================
   Reset & Base Variables
   =============================== */
* { box-sizing: border-box; }
html, body, h1, h2, h3, h4, h5, h6, p, ul, ol, li, figure, blockquote, dl, dd { margin: 0; padding: 0; }
ul, ol { padding-left: 1.2rem; }
img { max-width: 100%; height: auto; display: inline-block; }
a { color: inherit; text-decoration: none; }
button { background: none; border: none; font: inherit; color: inherit; cursor: pointer; }
:root {
  /* Brand */
  --ink: #2B2B2B;               /* primary text */
  --copper: #C4552D;            /* brand accent */
  --cream: #F5EFE8;             /* soft background accent */
  /* Corporate blue-gray palette */
  --blue-700: #2F4A68;          /* primary UI */
  --blue-600: #35577A;          /* hover */
  --blue-50:  #F2F6FA;          /* light section background */
  --gray-900: #1F2933;
  --gray-700: #4B5563;
  --gray-500: #6B7785;
  --gray-300: #D9DEE3;
  --gray-200: #EDF0F3;
  --gray-100: #F7F7F9;
  --white: #FFFFFF;
  --focus: #0ea5e9;             /* focus outline */
  /* Shadows & radii */
  --shadow-sm: 0 1px 2px rgba(16,24,40,.06);
  --shadow-md: 0 4px 10px rgba(16,24,40,.08);
  --shadow-lg: 0 12px 24px rgba(16,24,40,.12);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

html { scroll-behavior: smooth; }
body {
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4 { font-family: Georgia, 'Times New Roman', serif; color: var(--ink); letter-spacing: .2px; }
h1 { font-size: 32px; line-height: 1.25; }
h2 { font-size: 24px; line-height: 1.3; }
h3 { font-size: 20px; line-height: 1.35; }
p, li, a, address { font-size: 16px; }
small { font-size: 14px; color: var(--gray-500); }

/* Links */
a { color: var(--blue-700); text-underline-offset: 2px; }
a:hover { color: var(--blue-600); text-decoration: underline; }

/* Accessibility */
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

/* ===============================
   Layout Containers (Flex-only)
   =============================== */
.container {
  width: 100%;
  padding: 0 16px;
  display: flex;               /* flex container per requirement */
  justify-content: center;
}
.content-wrapper {
  width: 100%;
  max-width: 1200px;
  display: flex;               /* flex container */
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;                   /* global gap control */
}

/* Mandatory spacing pattern for sections */
section, .section { margin-bottom: 60px; padding: 40px 20px; }

/* General text section block */
.text-section { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.text-section p + p { margin-top: 4px; }
.text-section img { width: 18px; height: 18px; vertical-align: middle; margin-right: 8px; }

/* Content utilities (required patterns) */
.card-container { display: flex; flex-wrap: wrap; gap: 24px; }
.card { margin-bottom: 20px; position: relative; display: flex; flex-direction: column; gap: 12px; }
.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; }

/* ===============================
   Header & Navigation
   =============================== */
header { position: sticky; top: 0; z-index: 50; background: var(--white); box-shadow: 0 1px 0 var(--gray-200); }
header .content-wrapper { flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; }
.logo img { height: 36px; width: auto; display: block; }

.main-nav { display: none; align-items: center; gap: 20px; }
.main-nav a { color: var(--ink); padding: 8px 10px; border-radius: 6px; transition: background-color .2s ease, color .2s ease; }
.main-nav a:hover { background: var(--blue-50); color: var(--blue-700); }
.main-nav a[aria-current="page"] { color: var(--blue-700); box-shadow: inset 0 -2px 0 var(--copper); }

.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--blue-700);
  color: var(--white);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0,0,0,.05);
  box-shadow: var(--shadow-sm);
  transition: background-color .2s ease, transform .05s ease, box-shadow .2s ease;
}
.btn-primary:hover { color: white; background: var(--blue-600); box-shadow: var(--shadow-md); text-decoration: none; }
.btn-primary:active { transform: translateY(1px); }

.mobile-menu-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 8px; background: var(--blue-50);
}
.mobile-menu-toggle:hover { background: var(--gray-200); }

/* ===============================
   Mobile Menu (slide-in)
   =============================== */
.mobile-menu {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 85%; max-width: 380px; background: var(--white);
  display: flex; flex-direction: column; gap: 14px;
  padding: 20px; box-shadow: -8px 0 20px rgba(16,24,40,.12);
  transform: translateX(100%); transition: transform .35s ease;
  z-index: 1000; pointer-events: none;
}
.mobile-menu.open { transform: translateX(0); pointer-events: auto; }
.mobile-menu-close { align-self: flex-end; width: 40px; height: 40px; border-radius: 8px; background: var(--blue-50); }
.mobile-menu-close:hover { background: var(--gray-200); }
.mobile-nav { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.mobile-nav a { display: flex; align-items: center; padding: 12px; border-radius: 8px; background: var(--gray-100); color: var(--ink); }
.mobile-nav a:hover { background: var(--gray-200); }
.mobile-nav a[aria-current="page"] { box-shadow: inset 0 0 0 2px var(--copper); }

/* Optional backdrop when menu is open (if toggled via JS on body) */
body.menu-open::after { content: ""; position: fixed; inset: 0; background: rgba(17,24,39,.35); z-index: 999; }

/* ===============================
   Sections styling
   =============================== */
/* Hero & top sections get a subtle background to set corporate tone */
main section:first-of-type { background: var(--blue-50); border-bottom: 1px solid var(--gray-200); }

/* Headings spacing */
section h1, section h2 { margin-bottom: 6px; }
section h3 { margin-top: 8px; }

/* Breadcrumbs (within .text-section) */
nav[aria-label="Brotkrumen"], nav[aria-label="Brotkrumen"].text-section { color: var(--gray-500); font-size: 14px; }
nav[aria-label="Brotkrumen"] a { color: var(--blue-700); }

/* Lists */
ul li, ol li { margin: 6px 0; }
ul { list-style: disc; }
ol { list-style: decimal; }

/* Inline icon links in CTAs */
.text-section a img { margin-right: 6px; }

/* ===============================
   Cards & Testimonials
   =============================== */
.card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); padding: 20px; }

.testimonial-card {
  background: var(--white);
  color: var(--ink);                 /* dark text on light background for readability */
  border: 1px solid var(--gray-200);
  border-left: 4px solid var(--copper);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
.testimonial-card p { margin: 0; }
.testimonial-card p + p { color: var(--gray-700); }

/* ===============================
   Footer
   =============================== */
footer { background: var(--cream); border-top: 1px solid var(--gray-200); }
footer .content-wrapper { flex-direction: column; gap: 16px; padding: 24px 0; }
footer nav { display: flex; flex-wrap: wrap; gap: 12px 16px; }
footer nav a { color: var(--ink); padding: 6px 8px; border-radius: 6px; }
footer nav a:hover { background: var(--gray-200); }
footer address { font-style: normal; color: var(--ink); }
footer address a { color: var(--blue-700); }

/* ===============================
   Cookie Consent Banner & Modal
   =============================== */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--gray-300);
  border-left: 4px solid var(--copper);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 16px;
  transform: translateY(140%);
  transition: transform .35s ease;
  z-index: 60;
}
.cookie-banner.show { transform: translateY(0); }
.cookie-actions { display: flex; align-items: center; gap: 10px; }
.cookie-actions .btn { display: inline-flex; align-items: center; justify-content: center; padding: 10px 14px; border-radius: 8px; border: 1px solid var(--gray-300); }
.cookie-actions .btn-accept { background: var(--blue-700); color: var(--white); border-color: transparent; }
.cookie-actions .btn-accept:hover { background: var(--blue-600); }
.cookie-actions .btn-reject { background: var(--gray-100); color: var(--ink); }
.cookie-actions .btn-reject:hover { background: var(--gray-200); }
.cookie-actions .btn-settings { background: var(--white); color: var(--blue-700); }
.cookie-actions .btn-settings:hover { background: var(--gray-100); }

.cookie-modal {
  position: fixed; inset: 0; z-index: 70;
  display: none; align-items: center; justify-content: center; padding: 20px;
  background: rgba(17,24,39,.45);
}
.cookie-modal.open { display: flex; }
.cookie-modal .modal-content {
  background: var(--white);
  width: 100%; max-width: 680px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-300);
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; gap: 16px; padding: 20px;
}
.cookie-options { display: flex; flex-direction: column; gap: 12px; }
.cookie-option { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px; border-radius: 8px; background: var(--gray-100); }
.cookie-option small { color: var(--gray-500); }

/* simple toggle visuals (for checkboxes that JS may add) */
.toggle { width: 46px; height: 26px; border-radius: 26px; background: var(--gray-300); position: relative; transition: background .2s ease; }
.toggle::after { content: ""; width: 20px; height: 20px; border-radius: 50%; background: var(--white); position: absolute; top: 3px; left: 3px; box-shadow: var(--shadow-sm); transition: transform .2s ease; }
.toggle.on { background: var(--blue-700); }
.toggle.on::after { transform: translateX(20px); }

.cookie-modal .modal-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.cookie-modal .modal-actions .btn-primary { background: var(--copper); }
.cookie-modal .modal-actions .btn-primary:hover { background: #aa4726; }

/* ===============================
   Utilities
   =============================== */
.hr { width: 100%; height: 1px; background: var(--gray-200); }
.muted { color: var(--gray-500); }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; background: var(--cream); color: var(--ink); border-radius: 999px; border: 1px solid var(--gray-300); }

/* ===============================
   Responsive
   =============================== */
@media (max-width: 768px) {
  .text-image-section { flex-direction: column; }
}

@media (min-width: 640px) {
  h1 { font-size: 36px; }
  h2 { font-size: 26px; }
  h3 { font-size: 21px; }
}

@media (min-width: 768px) {
  h1 { font-size: 40px; }
  h2 { font-size: 28px; }
  nav[aria-label="Brotkrumen"] { font-size: 15px; }
}

@media (min-width: 992px) {
  .main-nav { display: flex; }
  .mobile-menu-toggle { display: none; }
  /* Tighter horizontal section padding on wide screens since container centers content */
  section, .section { padding: 50px 20px; }
  footer .content-wrapper { flex-direction: row; align-items: flex-start; justify-content: space-between; }
}

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

/* ===============================
   Micro-interactions
   =============================== */
.btn-primary, .mobile-menu-toggle, .mobile-menu-close, .cookie-actions .btn { will-change: transform; }

/* ===============================
   Additional component polish for this project
   =============================== */
/* First hero paragraphs slightly larger for corporate hierarchy */
main section:first-of-type p { font-size: 18px; color: var(--gray-700); }

/* Accent markers for key bullets within .text-section */
.text-section ul li strong { color: var(--ink); }

/* Icon alignment for footer info rows */
address img { width: 16px; height: 16px; margin-right: 6px; vertical-align: middle; }

/* Ensure no elements overlap by spacing between siblings */
section .testimonial-card + .testimonial-card { margin-top: 20px; }

/* Highlight rating rows with star icon */
.text-section img[alt*="Bewertung"] { width: 18px; height: 18px; }

/* Distinct CTA sections */
#kontakt-teaser, #kontakt-ref, #cta-plan, #cta-about, #angebot { background: var(--cream); border: 1px solid var(--gray-200); border-radius: var(--radius-md); }

/* Emphasis on brand through subtle copper dividers */
section h2 { box-shadow: inset 0 -2px 0 rgba(196,85,45,.15); padding-bottom: 6px; }

/* Breadcrumb separator spacing */
nav[aria-label="Brotkrumen"] span { color: var(--gray-700); }

/* Ensure adequate spacing between all links/buttons within .text-section */
.text-section a { margin-right: 10px; }

/* Print safe defaults */
@media print {
  header, .mobile-menu, .cookie-banner, .cookie-modal { display: none !important; }
  a { text-decoration: underline; }
}
