/* CSS RESET & NORMALIZATION */
html {
  box-sizing: border-box;
}
*, *::before, *::after {
  box-sizing: inherit;
  margin: 0;
  padding: 0;
}
html,
body {
  width: 100%;
  height: 100%;
}
body {
  background: #fff;
  color: #171717;
  font-family: 'Roboto', Arial, Helvetica, sans-serif;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  line-height: 1.65;
}
img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}
a {
  color: #171717;
  text-decoration: none;
  transition: color 0.2s;
}
a:hover, a:focus {
  color: #175A7A;
  outline: none;
}
ul, ol {
  margin-left: 1.5em;
  margin-bottom: 16px;
}
li {
  margin-bottom: 8px;
}
h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-weight: 700;
  color: #171717;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin-bottom: 16px;
}
h1 {
  font-size: 2.6rem;
}
h2 {
  font-size: 2rem;
}
h3 {
  font-size: 1.35rem;
}
h4, h5, h6 {
  font-size: 1.1rem;
  font-weight: 600;
}
strong {
  font-weight: 600;
}
p {
  margin-bottom: 16px;
}
body, button, input, select, textarea {
  font-family: 'Roboto', Arial, Helvetica, sans-serif;
  font-size: 1rem;
}

/* COLOR PALETTE (Monochrome Sophisticated w/ Brand Accents) */
:root {
  --black: #171717;
  --white: #fff;
  --gray-800: #272727;
  --gray-600: #3A3A3A;
  --gray-400: #888888;
  --gray-100: #F3F6F7;
  --primary: #175A7A;
  --secondary: #537341;
  --accent: #F3F6F7;
  --border: #E5E6E9;
}

/* BASE CONTAINERS & LAYOUT */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* HEADER */
header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 50;
}
header .container {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
}
header a img {
  height: 40px;
}
.main-nav {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 28px;
  margin-left: 40px;
}
.main-nav a {
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-weight: 500;
  font-size: 1rem;
  color: var(--gray-600);
  position: relative;
  transition: color 0.2s;
}
.main-nav a:hover, .main-nav a:focus {
  color: var(--primary);
}
.button.primary {
  background: var(--black);
  color: var(--white);
  border: none;
  border-radius: 22px;
  padding: 10px 24px;
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(23,23,23,0.07);
  letter-spacing: 0.02em;
  transition: background 0.2s, color 0.2s, box-shadow 0.15s;
  cursor: pointer;
  margin-left: 32px;
}
.button.primary:hover, .button.primary:focus {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 4px 18px rgba(23,90,122,0.15);
}
.button {
  background: var(--white);
  color: var(--black);
  border: 1px solid var(--black);
  border-radius: 22px;
  padding: 10px 24px;
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-size: 1.05rem;
  font-weight: 500;
  transition: background 0.2s, color 0.2s, border 0.2s, box-shadow 0.15s;
  cursor: pointer;
  margin-left: 0;
}
.button:hover, .button:focus {
  background: var(--black);
  color: var(--white);
  box-shadow: 0 4px 18px rgba(23,23,23,0.17);
}

.mobile-menu-toggle {
  display: none;
  color: var(--black);
  background: var(--gray-100);
  border: none;
  font-size: 2rem;
  margin-left: 24px;
  padding: 6px 14px 6px 10px;
  border-radius: 50%;
  transition: background 0.15s, color 0.15s;
  cursor: pointer;
  z-index: 105;
}
.mobile-menu-toggle:focus {
  outline: 2px solid var(--primary);
}

/* MOBILE MENU */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(23,23,23,0.96);
  color: var(--white);
  z-index: 1001;
  transform: translateX(-100%);
  transition: transform 0.36s cubic-bezier(.8,.17,.41,.96);
  display: flex;
  flex-direction: column;
  padding-top: 42px;
  padding-bottom: 20px;
  visibility: hidden;
  opacity: 0;
}
.mobile-menu.open {
  transform: translateX(0);
  visibility: visible;
  opacity: 1;
}
.mobile-menu-close {
  position: absolute;
  top: 18px;
  right: 26px;
  background: none;
  color: var(--white);
  border: none;
  font-size: 2.1rem;
  padding: 6px 14px 6px 10px;
  border-radius: 50%;
  transition: background 0.2s, color 0.2s;
  z-index: 1020;
  cursor: pointer;
}
.mobile-menu-close:focus {
  background: var(--primary);
  outline: 2px solid var(--white);
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 28px;
  align-items: flex-start;
  padding: 60px 32px 0 32px;
}
.mobile-nav a {
  color: var(--white);
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  width: 100%;
  transition: color 0.17s;
  display: block;
}
.mobile-nav a:hover, .mobile-nav a:focus {
  color: var(--primary);
  background: none;
}

/* HERO SECTION & CALLS TO ACTION */
.hero {
  background: linear-gradient(90deg, #fff 65%, #E5E6E9 100%);
  color: var(--black);
  padding: 60px 0 48px 0;
  box-shadow: 0 2px 32px 0 rgba(23,23,23,0.04);
}
.hero .container {
  align-items: center;
}
.hero .content-wrapper {
  align-items: flex-start;
  justify-content: center;
  gap: 26px;
}
.hero h1 {
  font-size: 2.2rem;
  line-height: 120%;
  color: var(--black);
  margin-bottom: 8px;
}
.hero p {
  font-size: 1.25rem;
  color: var(--gray-600);
}

.cta {
  background: var(--black);
  color: var(--white);
  padding: 60px 0;
}
.cta h2 {
  color: var(--white);
}
.cta .button,
.cta .button.primary {
  margin-top: 20px;
}

/* FLEXIBLE LAYOUTS (MANDATORY CLASSES) */
.section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: var(--white);
  border-radius: 18px;
  box-shadow: 0 2px 14px 0 rgba(23,23,23,0.03);
}

.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  margin-bottom: 20px;
  position: relative;
  background: var(--white);
  border-radius: 14px;
  box-shadow: 0 2px 14px 0 rgba(23,23,23,0.06);
  border: 1px solid var(--border);
  padding: 32px 20px;
  flex: 1 1 290px;
  min-width: 250px;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.19s, border 0.19s;
}
.card:hover, .card:focus-within {
  box-shadow: 0 6px 24px 0 rgba(23,23,23,0.09);
  border: 1px solid var(--primary);
}

.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;
  background: var(--gray-100);
  border-radius: 14px;
  box-shadow: 0 2px 8px 0 rgba(23,23,23,0.07);
  margin-bottom: 24px;
  border: 1px solid var(--border);
  color: var(--black);
  transition: box-shadow 0.19s, border 0.19s;
}
.testimonial-card p {
  color: var(--black);
  font-size: 1.12rem;
  margin-bottom: 0;
  flex: 1;
}
.testimonial-card strong {
  color: var(--primary);
  font-weight: 700;
}

.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
  background: var(--white);
  border-radius: 13px;
  box-shadow: 0 1px 8px 0 rgba(23,23,23,0.03);
  border: 1px solid var(--border);
  padding: 24px 18px 22px 18px;
  margin-bottom: 20px;
  flex: 1 1 220px;
  min-width: 180px;
  transition: box-shadow 0.16s, border 0.17s;
}
.feature-item:hover {
  box-shadow: 0 6px 24px 0 rgba(23,23,23,0.10);
  border: 1px solid var(--primary);
}
.feature-item img {
  height: 34px;
  width: 34px;
  margin-bottom: 4px;
}

.features {
  width: 100%;
  background: var(--white);
  padding: 60px 0;
}
.features .container {
  width: 100%;
}
.features .content-wrapper {
  gap: 32px;
}
.features ul {
  display: flex;
  flex-direction: row;
  gap: 24px;
  flex-wrap: wrap;
  list-style: none;
}
.features ul li {
  background: var(--gray-100);
  border-radius: 10px;
  padding: 28px 18px;
  min-width: 220px;
  flex: 1 1 220px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  border: 1px solid var(--border);
  margin-bottom: 0;
  box-shadow: 0 2px 10px 0 rgba(23,23,23,0.05);
  transition: box-shadow 0.17s;
}
.features ul li img {
  height: 32px;
  width: 32px;
  margin-bottom: 6px;
}
.features ul li h3 {
  font-size: 1.1rem;
  margin-bottom: 4px;
}
.features ul li p {
  color: var(--gray-600);
  font-size: 1rem;
  margin-bottom: 0;
}

/* SERVICE CARDS */
.services-preview .service-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 22px;
}
.services-preview .service-cards .card {
  flex: 1 1 220px;
  min-width: 170px;
  background: var(--gray-100);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 1px 8px 0 rgba(23,23,23,0.04);
  padding: 24px 12px;
  transition: box-shadow 0.17s, border 0.17s;
}
.services-preview .service-cards .card:hover {
  box-shadow: 0 6px 22px 0 rgba(23,90,122,0.09);
  border: 1px solid var(--primary);
}
.services-preview .card h3 {
  font-size: 1.10rem;
  margin-bottom: 10px;
}
.services-preview .card p {
  color: var(--gray-600);
  font-size: 0.99rem;
}

/* Service List (dienstleistungen.html) */
.service-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.service-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 13px;
  box-shadow: 0 2px 14px 0 rgba(23,23,23,0.04);
  padding: 28px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border 0.13s, box-shadow 0.13s;
}
.service-item:hover {
  border: 1.5px solid var(--primary);
  box-shadow: 0 6px 18px 0 rgba(23,90,122,0.07);
}
.service-item details {
  margin-top: 6px;
}
.service-item summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--primary);
  outline: none;
  margin-bottom: 6px;
}
.service-item p {
  color: var(--gray-600);
  font-size: 1rem;
}

/* Feature List (produkte.html) */
.feature-list {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 18px;
  list-style: disc inside;
  margin-bottom: 16px;
}
.feature-list li {
  background: var(--gray-100);
  border-radius: 8px;
  padding: 8px 14px;
  font-weight: 500;
  color: var(--gray-600);
}

.features-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 12px;
}

/* Tables (produkte.html compare) */
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  box-shadow: 0 1px 8px 0 rgba(23,23,23,0.04);
  margin-bottom: 24px;
  border-radius: 14px;
  overflow: hidden;
  font-size: 1rem;
}
thead th {
  background: var(--gray-100);
  color: var(--black);
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-weight: 600;
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
}
tbody td {
  border-bottom: 1px solid var(--border);
  padding: 14px 10px;
  color: var(--gray-600);
  font-size: 1rem;
}
tbody tr:last-child td {
  border-bottom: none;
}

/* MAP PLACEHOLDER (kontakt.html) */
.map-placeholder {
  background: var(--gray-100) !important;
  color: var(--gray-600);
  border-radius: 12px;
  border: 1px solid var(--border);
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-size: 1.03rem;
  margin-top: 8px;
  margin-bottom: 18px;
  justify-content: center;
  align-items: center;
}

/* FOOTER */
footer {
  background: var(--gray-800);
  color: var(--white);
  padding: 40px 0;
  margin-top: 56px;
}
footer .container {
  width: 100%;
}
footer .content-wrapper {
  display: flex;
  flex-direction: row;
  gap: 40px;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
}
footer .brand-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 210px;
}
footer .brand-info img {
  height: 34px;
  margin-bottom: 10px;
}
footer .brand-info p {
  color: var(--gray-400);
  font-size: 1rem;
  line-height: 1.5;
  margin-bottom: 0;
}
footer .kontakt {
  font-size: 1rem;
  color: var(--white);
  line-height: 1.7;
  min-width: 200px;
}
footer .kontakt a {
  color: var(--gray-100);
  word-break: break-all;
}
footer .footer-nav {
  display: flex;
  flex-direction: column;
  gap: 11px;
  justify-content: flex-start;
  align-items: flex-end;
  min-width: 170px;
}
footer .footer-nav a {
  color: var(--gray-400);
  font-size: 0.97rem;
  transition: color 0.15s;
}
footer .footer-nav a:hover, footer .footer-nav a:focus {
  color: var(--white);
}

/* RESPONSIVE STYLES */
@media (max-width: 1024px) {
  .container {
    max-width: 94vw;
  }
  .footer-nav {
    align-items: flex-start;
  }
}
@media (max-width: 900px) {
  .features ul,
  .features-grid,
  .card-container,
  .services-preview .service-cards {
    flex-direction: column;
    gap: 16px;
  }
  .features ul li, .card, .feature-item {
    min-width: unset;
    width: 100%;
  }
  .footer .content-wrapper {
    flex-wrap: wrap;
    gap: 24px;
  }
}
@media (max-width: 768px) {
  header .container {
    flex-direction: row;
    align-items: center;
    padding: 0 12px;
    min-height: 57px;
  }
  .main-nav {
    display: none;
  }
  .mobile-menu-toggle {
    display: block;
  }
  .cta, .features, .section {
    padding: 28px 0 28px 0;
    margin-bottom: 30px;
  }
  .content-wrapper {
    gap: 14px;
  }
  .text-image-section, .features ul {
    flex-direction: column;
    gap: 18px;
  }
  .card-container, .services-preview .service-cards, .features-grid {
    flex-direction: column;
    gap: 13px;
  }
  .footer .content-wrapper {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .footer-nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}
@media (max-width: 540px) {
  .hero,
  .cta,
  .section {
    padding: 20px 0;
  }
  h1 {
    font-size: 1.57rem;
  }
  h2 {
    font-size: 1.17rem;
  }
  .card, .feature-item, .testimonial-card, .service-item {
    padding: 14px 8px;
  }
}

/* ANIMATIONS & MICRO-INTERACTIONS */
.button, .button.primary {
  transition: background 0.18s, color 0.18s, box-shadow 0.14s, border 0.16s;
}
.card, .feature-item, .testimonial-card, .service-item {
  transition: box-shadow 0.17s, border 0.19s, transform 0.14s;
}
.card:hover, .feature-item:hover, .service-item:hover, .testimonial-card:hover {
  transform: translateY(-3px) scale(1.012);
  box-shadow: 0 7px 28px 2px rgba(23,90,122,0.10);
}

/* DETAILS ELEMENTS */
details[open] summary::after {
  content: '▲';
  margin-left: 8px;
  font-size: 0.7em;
}
details summary::after {
  content: '▼';
  margin-left: 8px;
  font-size: 0.7em;
}
details[open] summary {
  color: var(--secondary);
}
details > p {
  margin-left: 14px;
  margin-bottom: 7px;
}

/* TYPOGRAPHY HIERARCHY */
.text-section {
  font-size: 1.08rem;
  color: var(--gray-600);
}
.text-section h1,
.text-section h2,
.text-section h3 {
  color: var(--black);
}
.text-section ul, .text-section ol {
  color: var(--gray-600);
}
.text-section ul li {
  margin-bottom: 8px;
}

/* COOKIE CONSENT BANNER */
.cookie-banner {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100vw;
  background: var(--black);
  color: var(--white);
  border-top: 2px solid var(--primary);
  box-shadow: 0 -2px 16px rgba(23,23,23,0.13);
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 28px;
  justify-content: space-between;
  padding: 22px 6vw 22px 6vw;
  z-index: 1100;
  font-size: 1rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(50px);
  transition: opacity 0.4s ease, transform 0.38s cubic-bezier(.8,.17,.41,.96);
}
.cookie-banner.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.cookie-banner__message {
  flex: 1 1 250px;
  color: var(--white);
  font-size: 1rem;
  margin-right: 28px;
}
.cookie-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 17px;
  align-items: center;
}

.cookie-banner__btn {
  border: none;
  border-radius: 24px;
  padding: 8px 22px;
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-size: 1rem;
  font-weight: 500;
  background: var(--white);
  color: var(--black);
  box-shadow: 0 1px 6px 0 rgba(23,23,23,0.11);
  margin: 0 4px;
  cursor: pointer;
  transition: background 0.18s, color 0.15s, box-shadow 0.13s;
}
.cookie-banner__btn.primary {
  background: var(--primary);
  color: var(--white);
}
.cookie-banner__btn.secondary {
  background: var(--gray-100);
  color: var(--black);
  border: 1px solid var(--gray-600);
}
.cookie-banner__btn:hover, .cookie-banner__btn:focus {
  background: var(--black);
  color: var(--white);
  outline: none;
}
.cookie-banner__btn.primary:hover, .cookie-banner__btn.primary:focus {
  background: var(--secondary);
  color: var(--white);
}

/* Cookie Modal */
.cookie-modal {
  display: none;
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%,-50%) scale(0.98);
  z-index: 1200;
  background: var(--white);
  color: var(--black);
  border-radius: 18px;
  box-shadow: 0 0 23px 2px rgba(23,90,122,0.22);
  min-width: 90vw;
  max-width: 410px;
  padding: 32px 24px 22px 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.36s, transform 0.36s;
}
.cookie-modal.open {
  display: flex;
  flex-direction: column;
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%,-53%) scale(1);
}
.cookie-modal__close {
  position: absolute;
  right: 12px;
  top: 12px;
  background: none;
  border: none;
  color: var(--black);
  font-size: 2rem;
  cursor: pointer;
  transition: background 0.16s, color 0.15s;
  border-radius: 50%;
}
.cookie-modal__close:focus {
  background: var(--accent);
  color: var(--primary);
  outline: none;
}
.cookie-modal__content {
  margin-bottom: 28px;
  padding-top: 14px;
}
.cookie-modal__category {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 16px;
  font-size: 0.99rem;
}
.cookie-modal__toggle {
  width: 36px;
  height: 22px;
  border-radius: 16px;
  background: var(--gray-400);
  position: relative;
  cursor: pointer;
  transition: background 0.2s;
  margin-left: auto;
}
.cookie-modal__toggle[aria-checked="true"] {
  background: var(--primary);
}
.cookie-modal__toggle__circle {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: var(--white);
  border-radius: 50%;
  transition: left 0.23s;
}
.cookie-modal__toggle[aria-checked="true"] .cookie-modal__toggle__circle {
  left: 16px;
}
/* Modal overlay background */
.cookie-modal__overlay {
  position: fixed;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(23,23,23,0.35);
  z-index: 1199;
  display: none;
}
.cookie-modal__overlay.active {
  display: block;
}

@media (max-width: 768px) {
  .cookie-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    padding: 18px 14px;
  }
  .cookie-banner__message {
    margin-right: 0;
  }
  .cookie-modal {
    min-width: 97vw;
    max-width: 97vw;
    padding: 19px 8px 17px 8px;
  }
}

/* MISC SPACING */
section {
  margin-bottom: 60px;
  padding: 40px 20px;
}
/* New: ensure no elements overlap/cards too close on <540px */
@media (max-width:540px) {
  .card, .testimonial-card, .feature-item, .service-item {
    margin-bottom: 20px !important;
    padding: 12px 4px;
  }
  section {
    padding: 14px 2px;
  }
}

/* HIDE/SHOW LOGIC for hamburger, menu, on desktop/mobile */
@media (min-width: 769px) {
  .mobile-menu, .mobile-menu-toggle {
    display: none !important;
  }
  .main-nav {
    display: flex !important;
  }
}
