/* --------------------------------------------------
   CSS RESET & BASE STYLES (ELEGANT CLASSIC THEME)
-------------------------------------------------- */
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, menu, 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, 
main, 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;
}
html { box-sizing: border-box; scroll-behavior: smooth; }
*, *:before, *:after { box-sizing: inherit; }
body {
  font-family: 'Georgia', 'Times New Roman', Times, serif;
  background: #F7F9FA;
  color: #2B3746;
  font-size: 16px;
  line-height: 1.65;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: #248675; text-decoration-skip-ink: auto; transition: color .2s; }
a:hover,a:focus { color: #153A2C; text-decoration: underline; }
img { max-width: 100%; vertical-align: middle; }
ul, ol { list-style: none; }
strong { font-weight: 600; }

/* Custom Properties for Brand Colors */
:root {
  --color-primary: #283E54;
  --color-bg: #F7F9FA;
  --color-accent: #248675;
  --color-accent-alt: #2496C4; /* as accent alternative from guidelines */
  --color-text: #2B3746;
  --color-white: #FFFFFF;
  --color-section-bg: #FFFFFF;
  --color-card-bg: #FAFBFC;
  --color-muted: #E1E7EB;
  --color-border: #D8DFE5;
}

/* --------------------------------------------------
   TYPOGRAPHY (SERIF, MODERN ELEGANT CONTRAST)
-------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=Montserrat:wght@500;700&family=Open+Sans:wght@400;600&display=swap');

body {
  font-family: 'Open Sans', 'Georgia', serif;
  color: var(--color-text);
  background: var(--color-bg);
}
h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', 'Georgia', serif;
  color: var(--color-primary);
  margin-bottom: 16px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
h1 { font-size: 2.7rem; line-height: 1.15; margin-bottom: 24px; }
h2 { font-size: 2rem; line-height: 1.2; margin-bottom: 20px; }
h3 { font-size: 1.3rem; line-height: 1.25; margin-bottom: 12px; }
h4, h5, h6 { font-size: 1.13rem; margin-bottom: 8px; font-weight: 600; }
p, li, .text-section {
  font-family: 'Open Sans', 'Georgia', serif;
  font-size: 1rem;
}
p { margin-bottom: 20px; }

/* Typography scaling */
@media (max-width: 768px) {
  h1 { font-size: 2.1rem; }
  h2 { font-size: 1.45rem; }
  h3 { font-size: 1.08rem; }
}

/* Lead/Intro text */
.hero p {
  font-size: 1.2rem;
  color: var(--color-primary);
  margin-bottom: 32px;
  font-family: 'Open Sans', 'Georgia', serif;
}

.section h2,
.content-wrapper > h2 {
  font-size: 2rem;
  margin-bottom: 24px;
  font-family: 'Playfair Display', serif;
  color: var(--color-primary);
}

/* --------------------------------------------------
   LAYOUT CONTAINER & SPACING
-------------------------------------------------- */
.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}
.content-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: var(--color-section-bg);
  border-radius: 18px;
  box-shadow: 0 2px 6px 0 rgba(40, 62, 84, 0.06);
}

@media (max-width: 800px) {
  .section { padding: 32px 8px; }
}
@media (max-width: 600px) {
  .section { margin-bottom: 32px; padding: 20px 4px; }
}


/* --------------------------------------------------
   HEADER & NAVIGATION (DESKTOP & MOBILE)
-------------------------------------------------- */
header {
  position: sticky;
  top: 0;
  z-index: 90;
  width: 100%;
  background: var(--color-white);
  box-shadow: 0 1px 6px 0 rgba(40,62,84,0.06);
}
header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 16px; padding-bottom: 16px;
}
.logo img { height: 38px; width: auto; display: block; }
.main-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px; /* For nav item spacing */
}
.main-nav a {
  font-family: 'Montserrat', 'Arial', sans-serif;
  font-size: 1rem;
  color: var(--color-primary);
  text-decoration: none;
  position: relative;
  padding: 3px 10px;
  letter-spacing: 0.01em;
  border-radius: 4px;
  transition: background .2s, color .2s, box-shadow .2s;
}
.main-nav a:hover,
.main-nav a:focus {
  background: var(--color-accent);
  color: var(--color-white);
  box-shadow: 0 2px 10px 0 rgba(36,134,117,0.06);
}
.cta-btn {
  display: inline-block;
  font-family: 'Montserrat', 'Arial', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-white);
  background: var(--color-accent);
  border: none;
  padding: 12px 28px 12px 28px;
  border-radius: 24px;
  box-shadow: 0 3px 16px -2px rgba(36, 150, 196, 0.12);
  text-decoration: none;
  cursor: pointer;
  transition: background .18s, box-shadow .2s, transform .13s;
  margin-left: 8px;
}
.cta-btn:hover, .cta-btn:focus {
  background: #153A2C; color: var(--color-white);
  box-shadow: 0 6px 16px -6px rgba(36, 150, 196, 0.18);
  transform: translateY(-2px) scale(1.04);
}

/* --------------  MOBILE NAVIGATION  ---------------- */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--color-primary);
  cursor: pointer;
  z-index: 300;
  margin-left: 14px;
  padding: 4px 8px;
  border-radius: 8px;
  transition: background .2s;
}
.mobile-menu-toggle:focus, .mobile-menu-toggle:hover { background: var(--color-muted); }

.mobile-menu {
  position: fixed;
  left: 0; top: 0;
  width: 100vw; height: 100vh;
  background: rgba(40, 62, 84, 0.98);
  transform: translateX(-100%);
  transition: transform 0.35s cubic-bezier(.6,0,.3,1);
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-top: 36px;
  padding-left: 0;
  gap: 0;
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu-close {
  background: none; border: none;
  color: var(--color-white);
  font-size: 2.2rem; position: absolute;
  top: 24px; right: 28px; cursor: pointer;
  z-index: 1002;
  opacity: 0.82;
  transition: opacity .17s;
}
.mobile-menu-close:hover, .mobile-menu-close:focus {
  opacity: 1;
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
}
.mobile-nav {
  display: flex; flex-direction: column; gap: 18px;
  width: 100%;
  margin-top: 62px;
  padding-left: 30px;
}
.mobile-nav a {
  color: var(--color-white);
  font-family: 'Montserrat', 'Open Sans', sans-serif;
  font-size: 1.1rem;
  text-decoration: none;
  padding: 16px 0 10px 0;
  border-bottom: 1px solid rgba(230,232,239,0.10);
  transition: color .18s;
}
.mobile-nav a:last-child { border-bottom: 0; }
.mobile-nav a:hover,
.mobile-nav a:focus {
  color: var(--color-accent-alt);
}

@media (max-width: 1020px) {
  .main-nav, .cta-btn {
    display: none;
  }
  .mobile-menu-toggle {
    display: inline-block;
  }
}
@media (max-width: 770px) {
  header .container {
    gap: 12px;
    padding-top: 10px; padding-bottom: 10px;
  }
  .logo img { height: 32px; }
}


/* --------------------------------------------------
   HERO, SECTIONS, FEATURES, CARDS & FLEX LAYOUTS
-------------------------------------------------- */
.hero {
  background: linear-gradient(110deg, var(--color-bg) 75%, #EAF3F2 100%);
  padding: 54px 0 36px 0;
  margin-bottom: 38px;
  border-bottom: 1.5px solid var(--color-muted);
}
.hero .content-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  padding-top: 12px;
}
.hero .cta-btn {
  margin-top: 12px;
}
/* Features Section Styles */
.features-grid, .steps-grid, .districts-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: flex-start;
  margin: 28px 0 0 0;
}
.features-grid li, .steps-grid li, .districts-grid > div {
  flex: 1 1 225px;
  background: var(--color-card-bg);
  border-radius: 18px;
  padding: 30px 26px 28px 26px;
  min-width: 210px;
  box-shadow: 0 1.5px 12px 0 rgba(40,62,84,0.06);
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 13px;
  border: 1px solid var(--color-border);
  transition: box-shadow .18s, border .18s, transform .15s;
}
.features-grid li:hover, .steps-grid li:hover, .districts-grid > div:hover {
  box-shadow: 0 2px 20px 0 rgba(36,150,196,0.13);
  border: 1.5px solid var(--color-accent);
  transform: translateY(-2px) scale(1.01);
}
.features-grid img, .steps-grid img, .districts-grid img {
  max-width: 54px;
  height: auto;
  margin-bottom: 8px;
  display: block;
}
.features-grid h3, .steps-grid h3, .districts-grid h3 {
  font-size: 1.1rem;
  color: var(--color-primary);
  font-family: 'Playfair Display', serif;
  margin-bottom: 5px;
  letter-spacing: 0.01em;
}
.features-grid p, .steps-grid p, .districts-grid ul li {
  font-size: .97rem;
  color: #385977;
}
.districts-grid ul {
  margin: 0 0 8px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Service List (Cards) */
.service-list {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 16px;
  margin-bottom: 16px;
}
.service-list > div {
  background: var(--color-card-bg);
  border-radius: 15px;
  box-shadow: 0 2px 10px 0 rgba(40,62,84,0.05);
  border: 1px solid var(--color-border);
  flex: 1 1 270px;
  min-width: 210px;
  margin-bottom: 20px;
  padding: 28px 26px 18px 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: box-shadow .18s, border .18s, transform .15s;
}
.service-list > div:hover {
  box-shadow: 0 5px 24px 0 rgba(36,134,117,0.11);
  transform: translateY(-3.5px) scale(1.012);
  border: 1.5px solid var(--color-accent);
}
.service-list h3 {
  font-size: 1.08rem;
  color: var(--color-primary);
  font-weight: 700;
}
.service-list p { font-size: 1rem; }


/* Testimonials */
.testimonial-slider {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 18px;
  justify-content: flex-start;
}
.testimonial-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  padding: 24px 28px;
  background: var(--color-white);
  border: 1.2px solid var(--color-border);
  border-radius: 18px;
  box-shadow: 0 3px 18px -3px rgba(40, 62, 84, 0.07);
  min-width: 260px;
  max-width: 355px;
  margin-bottom: 20px;
  transition: box-shadow .18s, border .14s;
}
.testimonial-card:hover {
  box-shadow: 0 4px 32px -3px rgba(36,150,196,0.13);
  border-color: var(--color-accent);
}
.testimonial-card p {
  font-size: 1.08rem;
  color: #283E54;
  font-style: italic;
  line-height: 1.7;
}
.testimonial-card .author {
  font-size: .97rem;
  color: var(--color-accent);
  font-family: 'Montserrat', 'Open Sans', sans-serif;
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* Contact Details */
.contact-details {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 18px;
}

/* Card Container Pattern */
.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;
}
.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}

/* Steps List (ol/ul) in Ablauf/Kauf sections */
.steps-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 24px;
  margin-top: 10px;
  padding-left: 18px;
}
.steps-list li {
  background: var(--color-card-bg);
  border-bottom: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 18px 22px;
  margin-bottom: 0;
  position: relative;
}
.steps-list li strong {
  color: var(--color-accent);
  font-weight: 700;
}

/* Success Stories/Highlight Quotes in Dienstleistungsseite */
.success-stories {
  background: #e9edec;
  border-radius: 15px;
  padding: 18px 22px;
  margin: 24px 0 0 0;
  box-shadow: 0 1.3px 7px 0 rgba(36,150,196,0.04);
  color: #1f3c32;
  font-style: italic;
  font-size: 1.07rem;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Text Section / FAQ */
.text-section {
  background: none;
  padding: 0;
  color: #345369;
  font-size: 1rem;
  line-height: 1.65;
  border: none;
  margin-bottom: 12px;
}
.text-section h2, .text-section h3 { color: var(--color-accent); font-size: 1.18rem; margin-top: 14px; }
.text-section ul {
  margin: 8px 0;
  padding-left: 18px;
  list-style: disc inside;
}
.text-section ul li { margin-bottom: 7px; }

/* --------------------------------------------------
   FOOTER
-------------------------------------------------- */
footer {
  background: var(--color-primary);
  color: var(--color-white);
  padding: 48px 0 22px 0;
  margin-top: 34px;
}
footer .container {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 30px;
}
footer .footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 10px;
}
footer .footer-nav a {
  color: var(--color-white);
  font-size: 1rem;
  text-decoration: none;
  font-family: 'Montserrat', 'Open Sans', sans-serif;
  letter-spacing: 0.01em;
  transition: color .18s;
  opacity: 0.88;
}
footer .footer-nav a:hover,
footer .footer-nav a:focus {
  color: var(--color-accent);
  opacity: 1;
}
.footer-brand img {
  height: 40px; width: auto; display: block;
  margin-bottom: 12px;
}
.footer-contact {
  font-size: 0.98rem;
  color: #d9e2ea;
  font-family: 'Open Sans', serif;
  line-height: 1.7;
}
.footer-contact a {
  color: #dbeffc;
  text-decoration: underline;
  font-weight: 600;
  transition: color .18s;
}
.footer-contact a:hover, .footer-contact a:focus { color: var(--color-accent-alt); }

@media (max-width: 800px) {
  footer .container {
    flex-direction: column;
    gap: 14px;
    align-items: flex-start;
  }
  .footer-brand img {
    margin-bottom: 0;
    height: 32px;
  }
}

/* --------------------------------------------------
   COOKIE BANNER & MODAL
-------------------------------------------------- */
.cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 1400;
  background: var(--color-white);
  border-top: 1.5px solid var(--color-accent);
  box-shadow: 0 -3px 24px 0 rgba(40,62,84,0.12);
  padding: 18px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  transition: transform .3s cubic-bezier(.52,0,.37,1);
  transform: translateY(0);
}
.cookie-banner.hide {
  transform: translateY(120%);
}
.cookie-banner__text {
  font-size: 1.08rem;
  color: var(--color-primary);
  text-align: center;
  line-height: 1.6;
}
.cookie-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 0px;
  align-items: center;
}
.cookie-btn {
  font-family: 'Montserrat', 'Open Sans', sans-serif;
  font-size: 1rem;
  color: var(--color-white);
  background: var(--color-accent);
  padding: 11px 28px;
  border-radius: 20px;
  border: none;
  margin: 0 3px;
  font-weight: 600;
  cursor: pointer;
  transition: background .16s, transform .10s;
}
.cookie-btn.settings {
  background: var(--color-primary);
  color: var(--color-white);
}
.cookie-btn.reject {
  background: var(--color-muted);
  color: var(--color-primary);
}
.cookie-btn:hover, .cookie-btn:focus {
  background: #153A2C;
  color: var(--color-white);
  transform: translateY(-1.5px) scale(1.04);
}

/* Cookie Modal */
.cookie-modal {
  position: fixed;
  left: 0; top: 0; bottom: 0; right: 0;
  z-index: 1500;
  background: rgba(56, 88, 119, 0.60);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: fadein 0.22s;
}
@keyframes fadein {
  from { opacity: 0; }
  to { opacity: 1; }
}
.cookie-modal__content {
  background: var(--color-white);
  border-radius: 18px;
  box-shadow: 0 5px 32px 0 rgba(40,62,84,0.19);
  max-width: 95vw; width: 450px;
  padding: 32px 22px 25px 22px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
}
.cookie-modal__close {
  position: absolute;
  right: 16px; top: 14px;
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--color-muted);
  opacity: 0.7;
  cursor: pointer;
  transition: opacity .16s;
}
.cookie-modal__close:hover, .cookie-modal__close:focus {opacity: 1;}
.cookie-modal__title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-primary);
}
.cookie-category {
  display: flex;
  align-items: center;
  gap: 13px;
  margin: 10px 0;
}
.cookie-category label {
  font-size: 1rem;
  color: var(--color-primary);
  flex: 1;
}
.cookie-modal__actions {
  display: flex;
  gap: 14px;
  margin-top: 12px;
  justify-content: flex-end;
}
.switch {
  position: relative;
  display: inline-block;
  width: 44px; height: 24px;
}
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--color-muted);
  border-radius: 20px;
  transition: background 0.2s;
}
.switch input:checked + .slider {
  background: var(--color-accent);
}
.switch .slider:before {
  content: "";
  position: absolute;
  left: 3px; top: 3px;
  width: 18px; height: 18px;
  background: var(--color-white);
  border-radius: 50%;
  transition: transform .18s;
}
.switch input:checked + .slider:before {
  transform: translateX(20px);
}
.switch .slider {
  box-shadow: 0 1px 7px 0 rgba(40,62,84,0.07);
}
.cookie-category .hint {
  color: #8994ab;
  font-size: .92rem;
  margin-left: 4px;
}

/* --------------------------------------------------
   RESPONSIVE FLEX LAYOUTS & ALIGNMENT
-------------------------------------------------- */
@media (max-width: 1020px) {
  .features-grid, .steps-grid, .districts-grid, .service-list, .testimonial-slider {
    gap: 14px;
  }
  .features-grid li, .steps-grid li, .districts-grid > div, .service-list > div, .testimonial-card {
    min-width: 170px;
    padding: 20px 14px;
  }
}
@media (max-width: 900px) {
  .features-grid, .steps-grid, .districts-grid, .service-list, .testimonial-slider {
    flex-direction: column;
    gap: 20px;
  }
  .features-grid li, .steps-grid li, .districts-grid > div, .service-list > div, .testimonial-card {
    width: 100%; min-width: unset; max-width: unset;
  }
}
@media (max-width: 768px) {
  .content-grid { flex-direction: column; gap: 16px; }
  .section { margin-bottom: 32px; padding: 18px 6px; }
  .hero { padding: 36px 4px 24px 4px; }
  .contact-details { gap: 8px; }
  .service-list, .features-grid, .steps-grid, .districts-grid, .testimonial-slider {
    flex-direction: column;
    gap: 16px;
  }
  .text-image-section { flex-direction: column; align-items: flex-start; gap: 12px; }
}
@media (max-width: 480px) {
  .container { padding: 0 4px; }
  .hero { padding: 18px 2px 10px 2px; }
  .footer-brand img { height: 24px; }
  .cookie-modal__content { padding: 18px 6px; }
}

/* --------------------------------------------------
   UTILITY, MICRO-INTERACTIONS, & ACCESSIBILITY
-------------------------------------------------- */
::-webkit-selection { background: #c4f1e1; }
::selection { background: #c4f1e1; }

[tabindex]:focus-visible,
a:focus-visible, .cookie-btn:focus-visible, .mobile-menu-close:focus-visible, .mobile-menu-toggle:focus-visible, button:focus-visible {
  outline: 2px solid var(--color-accent-alt);
  outline-offset: 2px;
  border-radius: 4px;
  box-shadow: 0 0 0 2px #deeef8;
}

/* Subtle card hover effect on links inside cards */
.card a:not(.cta-btn):hover {
  color: var(--color-accent-alt); text-decoration: underline;
}

/* Hide elements visually but keep for screen readers */
.sr-only { position: absolute; width: 1px; height: 1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); border:0; }

/* --------------------------------------------------
   Print Styles (Accessible)
-------------------------------------------------- */
@media print {
  header,footer,.cta-btn,.mobile-menu,.cookie-banner,.cookie-modal { display:none!important; }
  body { background: #fff; color:#222; }
  a { color: #1c4664; text-decoration: underline; }
}
