/* =========================================================
   KernWerk Ausbau - style.css
   Design Style: gradient_modern (Modern gradients, smooth UI)
   Brand: Trustworthy, precise, modern handcraft aesthetic
   Layout: FLEXBOX ONLY (no grid/columns), mobile-first
   ========================================================= */

/* -----------------------------
   CSS RESET & NORMALIZE
   ----------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body, h1, h2, h3, h4, h5, h6, p, ul, ol, li, figure, figcaption, blockquote, dl, dd { margin: 0; padding: 0; }
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul, ol { padding-left: 1rem; }
button, input, select, textarea { font: inherit; }
:focus { outline: none; }
:focus-visible { outline: 3px solid rgba(138,94,60,0.45); outline-offset: 2px; border-radius: 8px; }

/* -----------------------------
   THEME VARIABLES & FALLBACKS
   ----------------------------- */
:root {
  --clr-primary: #2B2F36; /* deep charcoal */
  --clr-secondary: #8A5E3C; /* warm bronze */
  --clr-accent: #F5F3EE; /* soft warm neutral */
  --clr-bg: #FAF9F6; /* page background */
  --clr-muted: #6B7280; /* text muted */
  --clr-border: #E5E7EB; /* light border */
  --clr-white: #FFFFFF;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 4px 12px rgba(0,0,0,0.06);
  --shadow-md: 0 10px 24px rgba(0,0,0,0.08);
  --shadow-lg: 0 20px 40px rgba(0,0,0,0.10);
  --trans-fast: 150ms ease;
  --trans-base: 220ms ease;
}

/* -----------------------------
   BASE TYPOGRAPHY & BODY
   ----------------------------- */
body {
  font-family: Verdana, Geneva, Tahoma, sans-serif; /* brand body */
  color: var(--clr-primary, #2B2F36);
  background-color: var(--clr-bg, #FAF9F6);
  line-height: 1.6;
}
h1, h2, h3 { font-family: 'Trebuchet MS', 'Segoe UI', Arial, sans-serif; }
h1 { font-size: 32px; line-height: 1.2; letter-spacing: 0.2px; }
h2 { font-size: 24px; line-height: 1.3; margin-top: 4px; }
h3 { font-size: 18px; line-height: 1.4; }
p, li, dd, dt, address { font-size: 16px; color: var(--clr-primary, #2B2F36); }
small, .text-sm { font-size: 14px; color: var(--clr-muted); }

/* Spacing utility scale */
:root { --space-8: 8px; --space-12: 12px; --space-16: 16px; --space-20: 20px; --space-24: 24px; --space-32: 32px; --space-40: 40px; --space-60: 60px; --space-80: 80px; }

/* -----------------------------
   LAYOUT CONTAINERS (Flex only)
   ----------------------------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;            /* FLEX ONLY */
  flex-direction: column;   /* mobile-first */
  gap: var(--space-20);
}
.content-wrapper { /* shared stack wrapper */
  display: flex;            /* FLEX ONLY */
  flex-direction: column;
  gap: var(--space-20);
  align-items: flex-start;
}
section { margin-bottom: var(--space-60); padding: var(--space-40) 0; }
/* Mandatory spacing pattern class */
.section { margin-bottom: 60px; padding: 40px 20px; }

/* Flex helper patterns (MANDATORY) */
.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 {
  background-color: var(--clr-white);
  box-shadow: var(--shadow-sm);
  position: sticky; top: 0; z-index: 900;
}
header .container { flex-direction: row; align-items: center; justify-content: space-between; gap: var(--space-16); }
header img { height: 38px; width: auto; }

.main-nav { display: none; align-items: center; gap: var(--space-16); }
.main-nav a {
  color: var(--clr-primary);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  transition: background-color var(--trans-base), color var(--trans-fast), transform var(--trans-fast);
}
.main-nav a:hover { background-color: var(--clr-accent); }
.main-nav a:active { transform: translateY(1px); }

/* CTA Buttons */
.cta-primary, .cta-secondary, .mobile-nav a.button-link {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; border-radius: 999px; padding: 12px 18px; font-weight: 700;
  transition: transform var(--trans-fast), box-shadow var(--trans-base), background-color var(--trans-base), color var(--trans-base);
}
.cta-primary {
  color: #fff;
  background-color: var(--clr-secondary);
  background-image: linear-gradient(135deg, var(--clr-secondary), #6F482D);
  box-shadow: 0 8px 20px rgba(138,94,60,0.25);
}
.cta-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(138,94,60,0.32); }
.cta-primary:active { transform: translateY(0); }

.cta-secondary {
  color: var(--clr-secondary);
  background-color: transparent;
  border: 2px solid var(--clr-secondary);
}
.cta-secondary:hover { background-color: var(--clr-secondary); color: #fff; }

/* Mobile Menu Trigger */
.mobile-menu-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  position: absolute; right: 16px; top: 14px;
  width: 42px; height: 42px; border-radius: 10px;
  border: 1px solid var(--clr-border);
  background: var(--clr-white);
  color: var(--clr-primary);
  box-shadow: var(--shadow-sm);
  cursor: pointer; z-index: 950;
  transition: background-color var(--trans-base), transform var(--trans-fast);
}
.mobile-menu-toggle:hover { background-color: var(--clr-accent); transform: translateY(-1px); }

/* Mobile Menu Overlay */
.mobile-menu {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: var(--clr-white);
  display: flex; flex-direction: column; gap: 24px; padding: 20px;
  transform: translateX(100%);
  transition: transform 300ms ease;
  z-index: 1000;
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu-close {
  align-self: flex-end; width: 42px; height: 42px; border-radius: 10px;
  border: 1px solid var(--clr-border); background: var(--clr-accent); color: var(--clr-primary);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.mobile-nav { display: flex; flex-direction: column; gap: 12px; }
.mobile-nav a {
  display: flex; align-items: center; padding: 14px 12px; border-radius: 10px;
  background: #fff; border: 1px solid var(--clr-border);
  color: var(--clr-primary); font-weight: 600;
}
.mobile-nav a:hover { background: var(--clr-accent); }
.mobile-nav a.button-link { background: var(--clr-secondary); color: #fff; border: none; }

/* -----------------------------
   HERO (Gradient Modern)
   ----------------------------- */
.hero {
  background-color: var(--clr-primary); /* fallback solid */
  background-image: linear-gradient(135deg, var(--clr-primary), var(--clr-secondary));
  color: #fff;
}
.hero .container { align-items: stretch; }
.hero .content-wrapper { gap: var(--space-16); }
.hero h1 { color: #fff; font-size: 34px; }
.hero h2 { color: #F2EDE7; font-size: 20px; font-weight: 600; }
.hero p { color: #F9F7F2; max-width: 70ch; }
.usp-bullets {
  list-style: none; padding-left: 0; display: flex; flex-direction: column; gap: 10px;
}
.usp-bullets li {
  display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.16); color: #fff;
  padding: 10px 12px; border-radius: var(--radius-sm);
}
.trust-badges-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.trust-badges-row img { width: 38px; height: 38px; object-fit: contain; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2)); }

/* -----------------------------
   SERVICES LIST & CARDS
   ----------------------------- */
.services-list { display: flex; flex-wrap: wrap; gap: 24px; }
.service-card {
  flex: 1 1 260px;
  background: #fff;
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: var(--space-20);
  display: flex; flex-direction: column; gap: 12px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--trans-base), box-shadow var(--trans-base);
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.service-card h3 { font-size: 18px; }
.service-card a { color: var(--clr-secondary); font-weight: 700; }
.service-card a:hover { text-decoration: underline; }

.quick-links { display: flex; flex-wrap: wrap; gap: 12px; }
.quick-links a { padding: 10px 14px; background: var(--clr-accent); border-radius: 999px; color: var(--clr-primary); border: 1px solid var(--clr-border); }
.quick-links a:hover { background: #fff; }

.cta-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* Warranty / Notes */
.warranty-note { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--clr-border); border-radius: var(--radius-sm); padding: 10px 12px; }
.warranty-note img { width: 22px; height: 22px; }

/* -----------------------------
   PROCESS TIMELINE (Horizontal flex)
   ----------------------------- */
.process-timeline-horizontal {
  list-style: none; padding-left: 0; counter-reset: step;
  display: flex; flex-wrap: wrap; gap: 16px;
}
.process-timeline-horizontal li {
  counter-increment: step; display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1px solid var(--clr-border); border-radius: 999px;
  padding: 10px 14px; box-shadow: var(--shadow-sm);
}
.process-timeline-horizontal li::before {
  content: counter(step);
  width: 26px; height: 26px; min-width: 26px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; color: #fff; background: var(--clr-secondary);
  font-weight: 700;
}

/* -----------------------------
   TESTIMONIALS (Contrast safe)
   ----------------------------- */
.testimonial-list { display: flex; flex-wrap: wrap; gap: 24px; }
.testimonial-card {
  flex: 1 1 280px;
  background: #fff; color: var(--clr-primary); /* dark text on light */
  border: 1px solid var(--clr-border);
  border-left: 4px solid var(--clr-secondary);
  border-radius: var(--radius-md);
  padding: var(--space-20);
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 10px;
}
.testimonial-card p { color: var(--clr-primary); }
.testimonial-meta { color: var(--clr-muted); font-weight: 600; }

.rating-widget {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--clr-accent);
  border: 1px solid var(--clr-border);
  border-radius: 999px; padding: 8px 12px; color: var(--clr-primary);
}
.rating-widget img { width: 18px; height: 18px; }
.rating-widget .badge { background: var(--clr-secondary); color: #fff; padding: 4px 10px; border-radius: 999px; font-size: 14px; font-weight: 700; }

/* -----------------------------
   FAQ STYLES
   ----------------------------- */
.faq-list { display: flex; flex-direction: column; gap: 14px; }
.faq-list dt {
  font-weight: 800; color: var(--clr-primary);
  background: #fff; border: 1px solid var(--clr-border);
  padding: 12px 14px; border-radius: var(--radius-sm);
}
.faq-list dd {
  margin-left: 0; padding: 12px 14px; border-left: 3px solid var(--clr-secondary);
  background: var(--clr-accent); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* -----------------------------
   CTA SECTIONS
   ----------------------------- */
section.cta {
  color: #fff; text-align: left;
  background-color: var(--clr-secondary); /* fallback */
  background-image: linear-gradient(135deg, var(--clr-secondary), var(--clr-primary));
}
section.cta h2, section.cta p, section.cta a { color: #fff; }
section.cta .cta-primary { background-image: linear-gradient(135deg, #fff, #F0EAE2); color: var(--clr-primary); box-shadow: 0 10px 26px rgba(255,255,255,0.25); }
section.cta .cta-primary:hover { transform: translateY(-2px); }

/* -----------------------------
   MAP PLACEHOLDER
   ----------------------------- */
.map-placeholder {
  display: flex; align-items: center; justify-content: center;
  min-height: 220px; width: 100%;
  background: repeating-linear-gradient(45deg, #EEE, #EEE 10px, #F7F7F7 10px, #F7F7F7 20px);
  border: 1px dashed var(--clr-border); border-radius: var(--radius-md);
  color: var(--clr-muted); text-align: center; padding: 16px;
}

/* -----------------------------
   FOOTER
   ----------------------------- */
footer {
  background: var(--clr-primary);
  color: #EDEDED;
  padding: 24px 0;
}
footer .content-wrapper { flex-direction: column; gap: var(--space-20); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 12px; }
.footer-nav a { color: #EDEDED; opacity: 0.9; padding: 8px 10px; border-radius: 8px; }
.footer-nav a:hover { background: rgba(255,255,255,0.06); }
.footer-contact { display: flex; flex-direction: column; gap: 6px; }
.footer-contact a { color: #fff; text-decoration: underline; }
footer address, footer p { color: #EDEDED; }

/* -----------------------------
   LINKS & INTERACTIONS
   ----------------------------- */
a { transition: color var(--trans-base), background-color var(--trans-base); }
a:hover { color: var(--clr-secondary); }

/* -----------------------------
   BUTTON BASICS
   ----------------------------- */
button { cursor: pointer; }
button:disabled { opacity: 0.6; cursor: not-allowed; }

/* -----------------------------
   COOKIE CONSENT BANNER & MODAL
   ----------------------------- */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px;
  background: #fff; color: var(--clr-primary);
  border: 1px solid var(--clr-border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 16px; z-index: 1400;
  display: flex; flex-direction: column; gap: 12px;
  transform: translateY(120%);
  transition: transform 280ms ease;
}
.cookie-banner.show { transform: translateY(0); }
.cookie-banner .cookie-text { display: flex; flex-direction: column; gap: 8px; }
.cookie-banner .cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.cookie-banner .btn { padding: 10px 14px; border-radius: 999px; border: 1px solid var(--clr-border); font-weight: 700; }
.cookie-banner .btn-accept { background: var(--clr-secondary); color: #fff; border: none; }
.cookie-banner .btn-accept:hover { box-shadow: 0 10px 26px rgba(138,94,60,0.26); transform: translateY(-1px); }
.cookie-banner .btn-reject { background: #fff; color: var(--clr-primary); }
.cookie-banner .btn-settings { background: var(--clr-accent); color: var(--clr-primary); }

/* Cookie Preferences Modal */
.cookie-modal {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.55);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; z-index: 1450;
  opacity: 0; pointer-events: none; transition: opacity 220ms ease;
}
.cookie-modal.open { opacity: 1; pointer-events: auto; }
.cookie-modal .cookie-modal-content {
  background: #fff; color: var(--clr-primary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--clr-border);
  box-shadow: var(--shadow-lg);
  width: 100%; max-width: 740px; padding: 20px;
  display: flex; flex-direction: column; gap: 14px;
}
.cookie-categories { display: flex; flex-direction: column; gap: 12px; }
.cookie-category { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--clr-accent); border-radius: var(--radius-md); padding: 12px; border: 1px solid var(--clr-border); }
.cookie-category .label { font-weight: 700; }
.cookie-modal .modal-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }

/* Simple toggle switch */
.toggle { position: relative; width: 44px; height: 26px; background: #D1D5DB; border-radius: 999px; transition: background var(--trans-base); display: inline-flex; align-items: center; padding: 3px; }
.toggle.knob { display: none; }
.toggle::after { content: ""; width: 20px; height: 20px; background: #fff; border-radius: 50%; transition: transform var(--trans-base); box-shadow: 0 1px 2px rgba(0,0,0,0.2); }
.toggle.active { background: var(--clr-secondary); }
.toggle.active::after { transform: translateX(18px); }

/* -----------------------------
   ACCESSIBILITY & UTILS
   ----------------------------- */
.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; }
.muted { color: var(--clr-muted); }
.hr { width: 100%; height: 1px; background: var(--clr-border); }

/* -----------------------------
   RESPONSIVE BREAKPOINTS
   ----------------------------- */
@media (min-width: 560px) {
  h1 { font-size: 36px; }
}
@media (max-width: 767.98px) {
  /* Hide desktop nav on mobile, show burger */
  .main-nav { display: none; }
}
@media (min-width: 768px) {
  /* Header layout */
  .mobile-menu-toggle { display: none; }
  .main-nav { display: flex; }
  .hero .content-wrapper { max-width: 900px; }

  /* Two-up flex tendencies */
  .services-list .service-card { flex: 1 1 320px; }
  footer .content-wrapper { flex-direction: row; align-items: flex-start; justify-content: space-between; }
}
@media (min-width: 1024px) {
  h1 { font-size: 42px; }
  h2 { font-size: 28px; }
  .services-list .service-card { flex: 1 1 30%; }
  .content-grid { justify-content: space-between; }
}

/* -----------------------------
   MISC ELEMENT TWEAKS FOR PAGES
   ----------------------------- */
address { font-style: normal; color: var(--clr-primary); }
strong { font-weight: 800; }

/* Lists inside content-wrapper (structured spacing) */
.content-wrapper > ul,
.content-wrapper > ol,
.content-wrapper > dl {
  display: flex; flex-direction: column; gap: 10px;
}

/* Rating badges across pages */
.badge { display: inline-flex; align-items: center; justify-content: center; }

/* Footer copyright spacing */
footer .copyright { opacity: 0.9; font-size: 14px; }

/* Images in inline contact rows */
p img { display: inline-block; vertical-align: middle; margin-right: 8px; }

/* Ensure minimum spacing between cards and sections */
.services-list > *,
.testimonial-list > *,
.card-container > * { margin-bottom: 0; }

/* Ensure no element overlaps: enforce gaps and paddings */
.content-wrapper > * + * { margin-top: 0; }

/* -----------------------------
   TEXT-IMAGE SECTION (if used)
   ----------------------------- */
.text-image-section .text { flex: 1 1 320px; display: flex; flex-direction: column; gap: 12px; }
.text-image-section .image { flex: 1 1 320px; display: flex; align-items: center; justify-content: center; }
.text-image-section img { border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }

/* -----------------------------
   CARD (generic pattern)
   ----------------------------- */
.card {
  background: #fff; border: 1px solid var(--clr-border); border-radius: var(--radius-md);
  padding: var(--space-20); box-shadow: var(--shadow-sm);
}
.card:hover { box-shadow: var(--shadow-md); }

/* -----------------------------
   FOOTER MOBILE MENU LINK STYLE (consistency)
   ----------------------------- */
.footer-nav a:active { transform: translateY(1px); }

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