/* 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;
}

html {
  box-sizing: border-box;
  font-size: 16px;
  scroll-behavior: smooth;
}
*, *:before, *:after {
  box-sizing: inherit;
}
body {
  background: #F6F8FA;
  color: #243E63;
  font-family: 'Roboto', Arial, Helvetica, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  font-size: 1rem;
}
img, svg {
  max-width: 100%;
  display: block;
  height: auto;
}
a {
  color: #243E63;
  text-decoration: none;
  transition: color .2s;
}
a:focus {
  outline: 2px solid #F4B942;
  outline-offset: 2px;
}

/* BRAND FONTS (always declare fallback) */
h1, h2, h3, .cta-primary, nav a, .mobile-nav a {
  font-family: 'Montserrat', 'Roboto', Arial, sans-serif;
}

/* CONTAINERS & GENERIC STRUCTURE */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}
.content-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* HEADER */
header {
  background: #fff;
  box-shadow: 0 6px 24px rgba(36, 62, 99, 0.08);
  position: sticky;
  top: 0;
  z-index: 100;
}
header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 20px;
}
header nav {
  display: flex;
  align-items: center;
  gap: 20px;
}
header nav a {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.02em;
  padding: 8px 12px;
  border-radius: 8px;
  transition: background .2s, color .2s;
}
header nav a:hover, header nav a:focus {
  background: #F4B942;
  color: #243E63;
}
.cta-primary {
  background: #243E63;
  color: #fff;
  font-weight: 700;
  font-size: 1.12rem;
  padding: 12px 26px;
  border: none;
  border-radius: 28px;
  cursor: pointer;
  box-shadow: 0 2px 14px rgba(36,62,99,0.13);
  transition: background .18s, box-shadow .16s, color .18s;
  text-align: center;
  display: inline-block;
  letter-spacing: 0.06em;
  margin-left: 20px;
  text-transform: uppercase;
  outline: none;
}
.cta-primary:hover, .cta-primary:focus {
  background: #F4B942;
  color: #243E63;
  box-shadow: 0 4px 28px rgba(36,62,99,0.15);
}

/* Mobile Menu Button */
.mobile-menu-toggle {
  display: none;
  background: #243E63;
  color: #fff;
  border: none;
  font-size: 2rem;
  padding: 9px 16px;
  border-radius: 8px;
  cursor: pointer;
  margin-left: 20px;
  transition: background .18s;
}
.mobile-menu-toggle:focus, .mobile-menu-toggle:hover {
  background: #F4B942;
  color: #243E63;
}

/* MOBILE MENU OVERLAY */
.mobile-menu {
  position: fixed;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background: #243E63;
  color: #fff;
  z-index: 10000;
  transform: translateX(-100%);
  transition: transform 0.35s cubic-bezier(.4,1,.41,1);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-top: 0;
}
.mobile-menu.open {
  transform: translateX(0);
}
.mobile-menu-close {
  position: absolute;
  right: 24px;
  top: 26px;
  font-size: 2.3rem;
  background: none;
  color: #fff;
  border: none;
  cursor: pointer;
  z-index: 10002;
  transition: color .15s;
}
.mobile-menu-close:hover, .mobile-menu-close:focus {
  color: #F4B942;
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 34px;
  margin-top: 90px;
  width: 100%;
  align-items: flex-start;
  padding-left: 40px;
}
.mobile-nav a {
  color: #fff;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 10px 5px;
  border-radius: 10px;
  transition: background .2s, color .18s;
}
.mobile-nav a:hover, .mobile-nav a:focus {
  background: #fff;
  color: #243E63;
}

/* MAIN SECTIONS & LAYOUTS */
main {
  padding-top: 18px;
  padding-bottom: 30px;
}
section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: transparent;
}
.section {
  margin-bottom: 60px;
  padding: 40px 20px;
}

/* Flexible layout classes */
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  background: #fff;
  border-radius: 18px;
  padding: 32px 22px;
  box-shadow: 0 8px 32px rgba(36,62,99,0.07);
  margin-bottom: 20px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 270px;
  transition: box-shadow .19s, transform .18s;
}
.card:hover, .card:focus {
  box-shadow: 0 12px 40px #F4B94233, 0 16px 54px rgba(36,62,99,.11);
  transform: translateY(-6px) scale(1.02);
}
.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: #fff;
  border-radius: 18px;
  box-shadow: 0 2px 14px rgba(36,62,99,0.09);
  margin-bottom: 20px;
  transition: box-shadow .17s;
  border-left: 6px solid #F4B942;
  max-width: 680px;
}
.testimonial-card blockquote {
  color: #243E63;
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.5;
  margin: 0;
  font-family: 'Montserrat', 'Roboto', Arial, sans-serif;
}
.testimonial-card cite {
  color: #787f95;
  font-size: 0.95rem;
  font-style: normal;
  margin-left: 16px;
  letter-spacing: .01em;
}

.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}

.features-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  align-items: stretch;
  justify-content: flex-start;
}
.features-grid > div {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(36,62,99,0.08);
  padding: 28px 20px 24px 28px;
  min-width: 240px;
  max-width: 280px;
  flex: 1 1 180px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: box-shadow .16s, transform .16s;
  margin-bottom: 20px;
}
.features-grid > div:hover {
  box-shadow: 0 8px 36px #F4B94222;
  transform: translateY(-4px) scale(1.03);
}
.features-grid img {
  width: 38px;
  height: 38px;
  filter: saturate(1.05) drop-shadow(0 1px 5px #F4B94222);
}

/* TYPOGRAPHY */
h1 {
  font-family: 'Montserrat', 'Roboto', Arial, sans-serif;
  font-size: 2.7rem;
  line-height: 1.18;
  font-weight: 900;
  color: #243E63;
  margin-bottom: 12px;
  letter-spacing: .01em;
}
h2 {
  font-size: 2rem;
  font-weight: 800;
  color: #243E63;
  margin-bottom: 16px;
  letter-spacing: .01em;
}
h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #243E63;
  margin-bottom: 6px;
}
.subheadline {
  color: #243E63;
  font-size: 1.23rem;
  font-weight: 500;
  margin-bottom: 12px;
  margin-top: -6px;
  letter-spacing: .015em;
}
p, ul, ol, address, dl, dd, dt, li {
  color: #34496e;
  font-size: 1.08rem;
  font-family: 'Roboto', Arial, sans-serif;
}
strong {
  font-weight: 700;
}
ul, ol {
  margin-left: 24px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
li {
  margin-bottom: 0;
}
dl {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
dt {
  font-weight: bold;
  margin-top: 12px;
}
dd {
  margin-left: 0;
}
address {
  font-style: normal;
  margin-bottom: 12px;
}

/* ALERT, TIP, INFO */
.alert, .tip {
  background: #F4B94222;
  color: #243E63;
  border-radius: 14px;
  padding: 20px 18px 20px 20px;
  margin-bottom: 24px;
  font-weight: 600;
  box-shadow: 0 1px 4px #f4b94211;
  border-left: 7px solid #F4B942;
}
.tip strong, .alert strong {
  color: #243E63;
  font-weight: 900;
}

/* VISUALS / BUTTONS / EFFECTS */
button, .cta-primary {
  font-family: 'Montserrat', 'Roboto', Arial, sans-serif;
  font-weight: 700;
}
button {
  cursor: pointer;
}
button:active {
  transform: translateY(1px) scale(.98);
}

/* FOOTER */
footer {
  background: #243E63;
  color: #fff;
  padding-top: 34px;
  padding-bottom: 24px;
  margin-top: 40px;
}
footer .container {
  display: flex;
  flex-direction: column;
}
footer .content-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  align-items: flex-start;
  justify-content: space-between;
  width: 100%;
}
footer nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
footer nav a {
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: .02em;
  transition: color .17s;
}
footer nav a:hover, footer nav a:focus {
  color: #F4B942;
}
footer img[alt="Miete Klar"], footer img[alt="Miete Klar"] + span {
  vertical-align: middle;
}
footer div {
  font-size: 1rem;
  color: #f6f8fa;
}
footer img {
  display: inline-block;
  vertical-align: middle;
  width: 21px;
  margin-right: 8px;
}

/* COOKIE CONSENT BANNER */
.cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: #fffaf2;
  color: #243E63;
  border-top: 2px solid #F4B942;
  box-shadow: 0 -3px 16px #243E6320;
  display: flex;
  align-items: flex-start;
  gap: 30px;
  padding: 26px 24px;
  z-index: 11000;
  font-size: 1rem;
  flex-wrap: wrap;
  min-height: 70px;
  justify-content: center;
  transition: transform .38s;
  pointer-events: auto;
}
.cookie-banner.hide {
  transform: translateY(110%);
  pointer-events: none;
}
.cookie-banner .cookie-text {
  flex: 1 1 300px;
  font-size: 1.05rem;
  color: #243E63;
}
.cookie-banner .cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-left: 20px;
  align-items: center;
}
.cookie-banner button {
  font-family: 'Montserrat', 'Roboto', Arial, sans-serif;
  font-weight: 700;
  font-size: 1rem;
  border: none;
  border-radius: 20px;
  transition: background .16s, color .15s;
  padding: 12px 22px;
  box-shadow: 0 1px 6px #243E6322;
  min-width: 130px;
  margin: 0 4px;
  outline: none;
}
.cookie-accept {
  background: #243E63;
  color: #fff;
}
.cookie-accept:hover, .cookie-accept:focus {
  background: #F4B942;
  color: #243E63;
}
.cookie-reject {
  background: #fff;
  color: #243E63;
  border: 2px solid #243E63;
}
.cookie-reject:hover, .cookie-reject:focus {
  background: #F4B942;
  color: #fff;
  border-color: #F4B942;
}
.cookie-settings {
  background: #F6F8FA;
  color: #243E63;
  border: 1.5px solid #243E63;
}
.cookie-settings:hover, .cookie-settings:focus {
  background: #243E63;
  color: #fff;
  border-color: #243E63;
}

/* COOKIE MODAL */
.cookie-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(36,62,99,0.46);
  z-index: 12002;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn .24s cubic-bezier(.55,1,.45,1);
}
@keyframes fadeIn {
  from { opacity: 0; } to { opacity: 1; }
}
.cookie-modal {
  background: #fff;
  border-radius: 18px;
  padding: 34px 38px 28px 38px;
  min-width: 325px;
  max-width: 92vw;
  box-shadow: 0 8px 50px #243E6335;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.cookie-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.cookie-modal-title {
  font-size: 1.3rem;
  font-weight: 900;
  letter-spacing: .03em;
  color: #243E63;
}
.cookie-modal-close {
  background: none;
  border: none;
  font-size: 1.8rem;
  color: #243E63;
  cursor: pointer;
  transition: color .1s;
  margin-left: 30px;
}
.cookie-modal-close:hover, .cookie-modal-close:focus {
  color: #F4B942;
}
.cookie-category {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  margin: 10px 0;
}
.cookie-category-label {
  font-size: 1.05rem;
  font-weight: 700;
  color: #243E63;
}
.cookie-category-toggle {
  width: 44px;
  height: 24px;
  background: #DFE6EF;
  border-radius: 14px;
  position: relative;
  border: none;
  transition: background .16s;
  cursor: pointer;
}
.cookie-category-toggle.enabled {
  background: #F4B942;
}
.cookie-category-toggle::after {
  content: "";
  display: block;
  position: absolute;
  left: 4px;
  top: 3.5px;
  width: 17px;
  height: 17px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 8px #243E6322;
  transition: left .17s;
}
.cookie-category-toggle.enabled::after {
  left: 23px;
}
.cookie-modal-footer {
  display: flex;
  flex-direction: row;
  gap: 16px;
  margin-top: 12px;
}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 1100px) {
  .features-grid {
    gap: 20px;
  }
  .features-grid > div {
    min-width: 190px;
    padding-right: 14px;
    padding-left: 18px;
  }
}
@media (max-width: 900px) {
  header .container {
    flex-wrap: wrap;
    gap: 10px;
  }
  .features-grid {
    gap: 16px;
  }
}
@media (max-width: 800px) {
  main, section {
    padding-left: 8px;
    padding-right: 8px;
  }
  .testimonial-card {
    max-width: 98vw;
    padding: 17px 8px 17px 10px;
    border-left-width: 4px;
  }
}
@media (max-width: 768px) {
  html {
    font-size: 15px;
  }
  header nav {
    display: none;
  }
  .cta-primary {
    margin-left: 0;
    margin-top: 8px;
  }
  .mobile-menu-toggle {
    display: inline-block;
  }
  .container {
    padding-left: 9px;
    padding-right: 9px;
  }
  .features-grid {
    flex-direction: column;
    gap: 12px;
  }
  .features-grid > div {
    min-width: 0;
    max-width: 100%;
    width: 100%;
  }
  .content-grid, .card-container {
    flex-direction: column;
    gap: 12px;
  }
  .text-image-section {
    flex-direction: column;
    gap: 20px;
  }
  section, .section {
    padding: 26px 8px;
    margin-bottom: 36px;
  }
  .testimonial-card {
    flex-direction: column;
    gap: 13px;
    border-left-width: 4px;
    padding: 12px 6px 12px 8px;
    font-size: 1rem;
  }
  .card {
    padding: 17px 9px;
  }
  .cookie-banner {
    flex-direction: column;
    gap: 18px;
    padding: 18px 8px 22px 8px;
    min-height: 0;
  }
  .cookie-banner .cookie-actions {
    margin-left: 0;
    gap: 12px;
  }
  .cookie-modal {
    padding: 22px 8px 18px 13px;
    min-width: 0;
    width: 98vw;
  }
  footer .content-wrapper {
    gap: 20px;
    flex-direction: column;
  }
}
@media (max-width: 520px) {
  h1 {
    font-size: 2rem;
  }
  h2 {
    font-size: 1.22rem;
  }
  .cta-primary {
    font-size: 1rem;
    padding: 10px 13px;
    border-radius: 19px;
  }
}

/* --- UTILITIES --- */
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-1 { margin-top: 8px; }
.mb-1 { margin-bottom: 8px; }
.mt-2 { margin-top: 16px; }
.mb-2 { margin-bottom: 16px; }
.mt-3 { margin-top: 24px; }
.mb-3 { margin-bottom: 24px; }

/* --- PRINT STYLES --- */
@media print {
  .mobile-menu, .mobile-menu-toggle, .cookie-banner, .cookie-modal-overlay { display: none !important; }
  header, footer { box-shadow: none !important; }
}
