/* CSS Reset & Normalize */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center, dl, dt, dd, ol, ul, li,
fieldset, form, label, legend, table, caption,
tbody, tfoot, thead, tr, th, td, article,
aside, canvas, details, embed, figure, figcaption,
footer, header, hgroup, menu, nav, output, ruby,
section, summary, time, mark, audio, video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
  box-sizing: border-box; 
}

article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
  display: block;
}
body {
  line-height: 1.6;
}
ul, ol {
  list-style: none;
}
a {
  background-color: transparent;
  text-decoration: none;
  color: inherit;
}
img {
  border: 0;
  max-width: 100%;
  display: block;
}
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
}
button, input, textarea, select {
  font-family: inherit;
  font-size: 100%;
}

/* Brand Variables */
:root {
  --color-primary: #1E232A;
  --color-secondary: #4FB99F;
  --color-accent: #F6F8F9;
  --color-white: #fff;
  --color-black: #000;
  --color-neutral-800: #353B43;
  --color-neutral-400: #AEB4BB;
  --brand-shadow: 0 2px 12px 0 rgba(30,35,42,0.04);
  --radius-lg: 20px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --transition: 0.18s cubic-bezier(.47,1.64,.41,.8);
}

/* Typography */
html {
  font-size: 16px;
}
body {
  font-family: 'Roboto', Arial, Helvetica, sans-serif;
  color: var(--color-primary);
  background: var(--color-accent);
  font-size: 1rem;
  min-height: 100vh;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  background-color: var(--color-accent);
}
h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  line-height: 1.15;
  color: var(--color-primary);
  letter-spacing: 0.0em;
}
h1 { font-size: 2.5rem; margin-bottom: 24px; }
h2 { font-size: 2rem; margin-bottom: 18px; }
h3 { font-size: 1.3rem; margin-bottom: 10px; font-weight: 600; }
h4 { font-size: 1.125rem; font-weight: 600; }
strong, b { font-weight: 600; }
p, ul, ol, li, a { font-size: 1rem; }
p { margin-bottom: 1.3em; color: var(--color-neutral-800); }

/* Containers & Layout */
.container {
  width: 100%;
  max-width: 1160px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.content-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* Spacing Patterns (MANDATORY) */
.section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: none;
  border-radius: var(--radius-lg);
}
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--brand-shadow);
  margin-bottom: 20px;
  position: relative;
  padding: 28px 24px;
  transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover,
.card:focus-within {
  box-shadow: 0 4px 32px 0 rgba(30,35,42,0.08);
  transform: translateY(-2px) scale(1.015);
}
.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;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  padding: 20px;
  margin-bottom: 20px;
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: 0 2px 24px 0 rgba(30,35,42,0.06);
  color: var(--color-primary);
  min-width: 0;
}
.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}

/* Grid for Features (Flex Only!) */
.feature-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: flex-start;
}
.feature-grid > div {
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--brand-shadow);
  flex: 1 1 230px;
  min-width: 220px;
  max-width: 320px;
  padding: 26px 18px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  transition: box-shadow var(--transition), transform var(--transition);
}
.feature-grid > div:hover {
  box-shadow: 0 8px 40px 0 rgba(30,35,42,0.07);
  transform: translateY(-3px) scale(1.015);
}
.feature-grid img {
  height: 44px;
  width: 44px;
  margin-bottom: 12px;
}

/* Service List (Leistungen) */
.service-list {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.service-list .text-section {
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--brand-shadow);
  min-width: 220px;
  flex: 1 1 280px;
  padding: 26px 18px;
  margin-bottom: 20px;
}

/* Text sections */
.text-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 10px;
}
.text-section ul,
.text-section ol {
  padding-left: 25px;
  margin-bottom: 10px;
}
.text-section ul li,
.text-section ol li {
  margin-bottom: 6px;
  color: var(--color-neutral-800);
  line-height: 1.6;
}

/* Header */
header {
  background: var(--color-white);
  box-shadow: 0 2px 12px 0 rgba(30,35,42,0.03);
  position: sticky;
  top: 0;
  z-index: 50;
}
header .container {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 0;
  min-height: 70px;
}
header nav {
  display: flex;
  flex-direction: row;
  gap: 24px;
  align-items: center;
}
header nav a {
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-primary);
  padding: 7px 2px;
  transition: color var(--transition);
}
header nav a:hover,
header nav a:focus {
  color: var(--color-secondary);
  outline: none;
}
header img {
  height: 44px;
  width: auto;
  margin-right: 28px;
}
header .cta-button {
  margin-left: 32px;
  display: inline-flex;
}

/* CTA Button Styles */
.cta-button {
  display: inline-flex;
  align-items: center;
  background: var(--color-secondary);
  color: var(--color-white);
  border: none;
  border-radius: var(--radius-md);
  padding: 15px 28px;
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-size: 1.08rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 10px 0 rgba(79,185,159,0.07);
  letter-spacing: 0.01em;
  transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
}
.cta-button:hover, .cta-button:active, .cta-button:focus {
  background: var(--color-primary);
  color: var(--color-white);
  box-shadow: 0 2px 22px 0 rgba(79,185,159,0.16);
  transform: translateY(-2px) scale(1.025);
  outline: none;
}

/* Footer */
footer {
  background: var(--color-white);
  box-shadow: 0 -2px 10px 0 rgba(30,35,42,0.03);
  padding: 38px 0 22px 0;
}
footer .container {
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: 36px;
}
footer nav {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
footer nav a {
  font-size: 0.98rem;
  color: var(--color-neutral-800);
  margin-bottom: 1px;
  transition: color var(--transition);
}
footer nav a:hover, footer nav a:focus {
  color: var(--color-secondary);
}
footer img {
  height: 38px;
  width: auto;
  margin-bottom: 14px;
}
footer .text-section {
  font-size: 0.97rem;
  color: var(--color-neutral-800);
}
footer .text-section a {
  color: var(--color-secondary);
  word-break: break-all;
  transition: color var(--transition);
}
footer .text-section a:hover, footer .text-section a:focus {
  color: var(--color-primary);
}

/* Hamburger Mobile Menu Button */
.mobile-menu-toggle {
  appearance: none;
  display: none;
  background: var(--color-secondary);
  color: var(--color-white);
  border: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 2rem;
  align-items: center;
  justify-content: center;
  margin-left: 18px;
  z-index: 160;
  cursor: pointer;
  transition: background var(--transition), box-shadow var(--transition);
  box-shadow: 0 2px 8px rgba(79,185,159,0.09);
}
.mobile-menu-toggle:hover, .mobile-menu-toggle:focus {
  background: var(--color-primary);
  color: var(--color-white);
  outline: none;
}

/* Mobile Menu Overlay */
.mobile-menu {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100svh;
  background: rgba(246, 248, 249, 0.96);
  z-index: 200;
  transform: translateX(100vw);
  transition: transform 0.36s cubic-bezier(.77,0,.18,1);
  box-shadow: 0 8px 40px 0 rgba(30,35,42,0.16);
}
.mobile-menu.open {
  transform: translateX(0);
}
.mobile-menu-close {
  position: absolute;
  right: 24px;
  top: 24px;
  background: var(--color-secondary);
  color: var(--color-white);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.7rem;
  z-index: 10;
  cursor: pointer;
  transition: background var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}
.mobile-menu-close:hover, .mobile-menu-close:focus {
  background: var(--color-primary);
}
.mobile-nav {
  margin-top: 70px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  align-items: flex-start;
  padding: 38px 32px 0 32px;
}
.mobile-nav a {
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-size: 1.17rem;
  font-weight: 500;
  color: var(--color-primary);
  padding: 13px 0;
  width: 100%;
  border-radius: 9px;
  transition: background 0.17s, color var(--transition);
}
.mobile-nav a:hover, .mobile-nav a:focus {
  background: var(--color-secondary);
  color: var(--color-white);
}

/* Responsive - Mobile Navigation */
@media (max-width: 1100px) {
  .container {
    max-width: 970px;
  }
}
@media (max-width: 900px) {
  .container {
    max-width: 90vw;
  }
}
@media (max-width: 840px) {
  footer .container {
    flex-direction: column;
    gap: 18px;
    align-items: flex-start;
  }
  header .cta-button {
    margin-left: 12px;
  }
}
@media (max-width: 768px) {
  html {
    font-size: 15px;
  }
  .container {
    max-width: 99vw;
    padding-left: 11px;
    padding-right: 11px;
  }
  .section {
    padding: 30px 7px;
    margin-bottom: 36px;
  }
  .feature-grid,
  .service-list,
  .card-container,
  .content-grid {
    flex-direction: column;
    gap: 20px;
  }
  .text-image-section {
    flex-direction: column;
    gap: 18px;
    align-items: center;
  }
  header .container {
    flex-direction: row;
    min-height: 58px;
    gap: 6px;
  }
  header nav {
    display: none;
  }
  .mobile-menu-toggle {
    display: inline-flex;
  }
  header .cta-button {
    margin-left: 0;
    padding: 12px 18px;
    font-size: 1rem;
  }
}
@media (max-width: 480px) {
  .section {
    padding: 17px 2px;
  }
  .cta-button {
    padding: 13px 9px;
    font-size: 0.97rem;
  }
  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.25rem; }
  .mobile-nav {
    padding: 28px 9px 0 9px;
    gap: 19px;
    margin-top: 43px;
  }
  .mobile-menu-close {
    top: 12px;
    right: 12px;
  }
}

/* ------- Cookies Consent Banner & Modal ---------- */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100vw;
  background: var(--color-white);
  box-shadow: 0 -3px 24px 0 rgba(30,35,42,0.09);
  z-index: 300;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  padding: 20px 32px;
  gap: 28px;
  opacity: 1;
  pointer-events: initial;
  transition: transform 0.34s cubic-bezier(.6,.41,.59,1.16), opacity 0.3s;
  font-size: 1rem;
}
.cookie-banner.hide {
  transform: translateY(100%);
  opacity: 0;
  pointer-events: none;
}
.cookie-banner .cookie-text {
  flex: 2 1 340px;
  color: var(--color-primary);
}
.cookie-banner .cookie-actions {
  display: flex;
  flex-direction: row;
  gap: 16px;
  flex-wrap: wrap;
}
.cookie-banner button {
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 22px;
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  box-shadow: 0 1px 6px rgba(79,185,159,0.09);
}
.cookie-banner .accept {
  background: var(--color-secondary);
  color: var(--color-white);
}
.cookie-banner .accept:hover,
.cookie-banner .accept:focus {
  background: var(--color-primary);
  color: var(--color-white);
}
.cookie-banner .reject {
  background: var(--color-accent);
  color: var(--color-primary);
  border: 1px solid var(--color-neutral-400);
}
.cookie-banner .reject:hover, .cookie-banner .reject:focus {
  background: var(--color-primary);
  color: var(--color-white);
}
.cookie-banner .settings {
  background: var(--color-white);
  color: var(--color-primary);
  border: 1px solid var(--color-neutral-400);
}
.cookie-banner .settings:hover, .cookie-banner .settings:focus {
  background: var(--color-secondary);
  color: var(--color-white);
}

@media (max-width: 600px) {
  .cookie-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 13px;
    padding: 13px 6px;
  }
  .cookie-banner .cookie-actions {
    gap: 9px;
  }
}

/* Cookie Preferences Modal */
.cookie-modal-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(30,35,42,0.35);
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  pointer-events: initial;
  transition: opacity 0.22s;
}
.cookie-modal-overlay.hide {
  opacity: 0;
  pointer-events: none;
}
.cookie-modal {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  max-width: 400px;
  width: 94vw;
  padding: 34px 24px 18px 24px;
  box-shadow: 0 8px 64px 0 rgba(30,35,42,0.16);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  animation: cookieModalAppear 0.35s cubic-bezier(0.52,1.28,0.29,0.93);
}
@keyframes cookieModalAppear {
  from { transform: translateY(60px) scale(0.92); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.cookie-modal h2 {
  font-size: 1.35rem;
  color: var(--color-primary);
  margin-bottom: 9px;
}
.cookie-modal .cookie-categories {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 12px;
}
.cookie-modal .category {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
}
.cookie-modal .category label {
  font-size: 1rem;
  color: var(--color-primary);
}
.cookie-modal .category input[type='checkbox'] {
  width: 28px;
  height: 28px;
  accent-color: var(--color-secondary);
  cursor: pointer;
}
.cookie-modal .category input[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}
.cookie-modal .cookie-modal-actions {
  display: flex;
  flex-direction: row;
  gap: 14px;
  justify-content: flex-end;
  margin-top: 10px;
}
.cookie-modal .save-btn {
  background: var(--color-secondary);
  color: var(--color-white);
  border: none;
  border-radius: var(--radius-md);
  padding: 10px 26px;
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
}
.cookie-modal .save-btn:hover, .cookie-modal .save-btn:focus {
  background: var(--color-primary);
}
.cookie-modal .cancel-btn {
  background: var(--color-accent);
  color: var(--color-primary);
  border: 1px solid var(--color-neutral-400);
  border-radius: var(--radius-md);
  padding: 10px 18px;
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.cookie-modal .cancel-btn:hover, .cookie-modal .cancel-btn:focus {
  background: var(--color-primary);
  color: var(--color-white);
}
@media (max-width: 600px) {
  .cookie-modal { padding: 19px 5vw 13px 5vw; }
}

/* --------- Forms ----------- */
input, textarea, select {
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-neutral-400);
  background: var(--color-accent);
  padding: 12px 13px;
  font-size: 1rem;
  width: 100%;
  margin-bottom: 16px;
  color: var(--color-primary);
  transition: border-color var(--transition);
}
input:focus, textarea:focus, select:focus {
  border-color: var(--color-secondary);
  outline: none;
}
button:focus, .cta-button:focus {
  outline: 2px dashed var(--color-secondary);
  outline-offset: 2px;
}

/* ------- Miscellanea & Microinteractions ------- */
section {
  background: transparent;
  border-radius: var(--radius-lg);
}
main {
  min-height: 59vh;
}
hr {
  border: none;
  border-top: 1px solid var(--color-neutral-400);
  margin: 34px 0;
}
::-webkit-scrollbar {
  width: 9px;
  background: var(--color-accent);
}
::-webkit-scrollbar-thumb {
  background: var(--color-neutral-400);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-secondary);
}

/* Focus states for a11y */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--color-secondary);
  outline-offset: 2px;
}

/* Selection color */
::selection {
  background: var(--color-secondary);
  color: var(--color-white);
}

/* Subtle Card Animations */
.card, .feature-grid > div, .testimonial-card, .service-list .text-section {
  will-change: transform, box-shadow;
}

/* Testimonial highlight quote marks (optional, remove if not needed) */
.testimonial-card p:first-child::before { content: '“'; color: var(--color-secondary); font-size: 2.1rem; vertical-align: sub; margin-right: 4px; }
.testimonial-card p:last-child { color: var(--color-neutral-800); font-size: 0.97em; }

/* Utility Classes */
.mt-40 { margin-top: 40px !important; }
.mb-40 { margin-bottom: 40px !important; }

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

/* Remove flicker when loading animated elements */
[aria-busy="true"] { opacity: 0.6; pointer-events: none; }
