/* ========================== 
   ImmobilienKompass Berlin - Minimalist Brand CSS
   ========================== */

/* --- CSS RESET & NORMALIZE --- */
html { box-sizing: border-box; }
*, *::before, *::after { box-sizing: inherit; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; scroll-behavior: smooth; }
body {
  font-family: 'Roboto', Arial, sans-serif;
  background: #fff;
  color: #18385D;
  line-height: 1.65;
  min-height: 100vh;
}
img { display: block; max-width: 100%; height: auto; }

/* --- VARIABLES WITH FALLBACKS --- */
:root {
  --color-primary: #18385D;
  --color-secondary: #97B9D4;
  --color-accent: #F5F6F8;
  --color-dark: #231F20;
  --color-light: #fff;
  --color-grey: #e0e3e7;
}

/* --- LAYOUT CONTAINER --- */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* --- TYPOGRAPHY --- */
h1, h2, h3, h4, h5 {
  font-family: 'Montserrat', 'Roboto', Arial, sans-serif;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: 0.01em;
}
h1 { font-size: 2.25rem; margin-bottom: 20px; line-height: 1.2; }
h2 { font-size: 1.75rem; margin-bottom: 18px; line-height: 1.25; }
h3 { font-size: 1.25rem; margin-bottom: 12px; line-height: 1.3; }
h4, h5 { font-size: 1rem; margin-bottom: 8px; }
p, ul, ol, li {
  font-size: 1rem;
  color: var(--color-primary);
  margin-bottom: 12px;
  font-weight: 400;
}
ul, ol { padding-left: 20px; }
li { margin-bottom: 8px; }
a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover, a:focus {
  color: var(--color-secondary);
  text-decoration: underline;
  outline: none;
}
strong, b {
  font-weight: bold;
}

/* --- BUTTONS --- */
.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  padding: 0.75em 2em;
  border-radius: 6px;
  font-family: 'Montserrat', 'Roboto', Arial, sans-serif;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(24,56,93,0.03);
  transition: background 0.22s, color 0.2s, box-shadow 0.23s;
  margin-top: 12px;
}
.btn-primary {
  background: var(--color-primary);
  color: var(--color-light);
}
.btn-primary:hover, .btn-primary:focus {
  background: var(--color-secondary);
  color: var(--color-primary);
  box-shadow: 0 4px 24px rgba(24,56,93,0.07);
}
.btn-secondary {
  background: var(--color-accent);
  color: var(--color-primary);
  border: 1px solid var(--color-grey);
}
.btn-secondary:hover, .btn-secondary:focus {
  background: var(--color-secondary);
  color: var(--color-light);
  border-color: var(--color-secondary);
}

/* --- HEADER & NAV --- */
header {
  width: 100%;
  background: var(--color-light);
  box-shadow: 0 2px 12px rgba(24,56,93,0.03);
  position: sticky;
  top: 0;
  z-index: 30;
}
header .container {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 18px 20px;
}
header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
}
header nav a {
  font-family: 'Montserrat', 'Roboto', Arial, sans-serif;
  font-weight: 500;
  font-size: 1rem;
  color: var(--color-primary);
  padding: 4px 0;
  position: relative;
}
header nav a:after {
  content: "";
  display: block;
  height: 2px;
  background: transparent;
  transition: width .2s, background .2s;
  width: 0%;
  position: absolute;
  bottom: -2px;
  left: 0;
}
header nav a:hover:after, header nav a:focus:after {
  background: var(--color-secondary);
  width: 100%;
}
header .btn-primary {
  margin-top: 0;
  margin-left: 12px;
}
/* Hide the mobile menu toggle on desktop */
.mobile-menu-toggle {
  display: none;
}

/* --- MOBILE NAV --- */
.mobile-menu-toggle {
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--color-primary);
  cursor: pointer;
  position: absolute;
  right: 24px;
  top: 18px;
  z-index: 110;
  transition: color 0.22s;
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
}
.mobile-menu-toggle:focus {
  outline: 2px solid var(--color-secondary);
}
.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(24, 56, 93, 0.94);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-start;
  transform: translateX(100%);
  transition: transform 0.33s cubic-bezier(.77,0,.175,1);
  z-index: 200;
  pointer-events: none;
  opacity: 0;
}
.mobile-menu.open {
  transform: translateX(0);
  pointer-events: all;
  opacity: 1;
}
.mobile-menu-close {
  background: none;
  border: none;
  font-size: 2.25rem;
  color: #fff;
  margin: 22px 32px 12px 0;
  cursor: pointer;
  outline-offset: 2px;
}
.mobile-nav {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  margin-top: 30px;
}
.mobile-nav a {
  color: var(--color-light);
  font-size: 1.25rem;
  font-family: 'Montserrat', 'Roboto', Arial, sans-serif;
  font-weight: 500;
  padding: 12px 0;
  min-width: 200px;
  text-align: left;
  border-radius: 3px;
  transition: background 0.18s, color 0.18s;
}
.mobile-nav a:hover,
.mobile-nav a:focus {
  background: var(--color-secondary);
  color: var(--color-primary);
}
@media (max-width: 1024px) {
  header .container {
    gap: 12px;
    padding: 16px 12px;
  }
  nav {
    gap: 14px;
  }
  header nav {
    gap: 12px;
  }
}
@media (max-width: 900px) {
  header nav, header .btn-primary {
    display: none;
  }
  .mobile-menu-toggle {
    display: inline-flex;
  }
}

/* --- SECTIONS --- */
section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: transparent;
  display: flex;
  justify-content: center;
}
.content-wrapper {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* --- FLEX LAYOUT PATTERNS --- */
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  background: var(--color-light);
  border-radius: 12px;
  box-shadow: 0 2px 16px rgba(24,56,93,0.05);
  padding: 28px 28px 22px 28px;
  flex: 1 1 280px;
  min-width: 240px;
  max-width: 350px;
  margin-bottom: 20px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: box-shadow 0.22s;
}
.card:hover, .card:focus-within {
  box-shadow: 0 6px 24px rgba(24,56,93,0.10);
}
.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;
  background: var(--color-accent);
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 2px 12px rgba(24,56,93,0.04);
  margin-bottom: 20px;
  flex: 1 1 300px;
  min-width: 220px;
  max-width: 420px;
  color: var(--color-primary);
  transition: box-shadow 0.18s, background 0.15s;
}
.testimonial-card:hover {
  box-shadow: 0 6px 24px rgba(24,56,93,0.10);
  background: #f0f4fa;
}
.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}

/* --- SLIDERS & SPECIAL FLEX GRIDS --- */
.testimonial-slider {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.features-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 12px;
}
.feature {
  flex: 1 1 220px;
  min-width: 210px;
  max-width: 340px;
  background: var(--color-accent);
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(24,56,93,0.04);
  padding: 24px 22px 18px 22px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  transition: box-shadow 0.22s, background 0.13s;
}
.feature img {
  width: 42px;
  margin-bottom: 10px;
}
.feature:hover, .feature:focus-within {
  box-shadow: 0 6px 20px rgba(24,56,93,0.08);
  background: #f0f4fa;
}
.district-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.district {
  background: var(--color-accent);
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(24,56,93,0.04);
  padding: 22px 20px 14px 20px;
  flex: 1 1 240px;
  min-width: 200px;
  max-width: 320px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.team-bios {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 16px;
}
.team-member {
  background: var(--color-accent);
  border-radius: 10px;
  padding: 20px 18px 14px 18px;
  flex: 1 1 220px;
  min-width: 180px;
  max-width: 280px;
  box-shadow: 0 2px 12px rgba(24,56,93,0.04);
}
.downloads {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.process-teaser {
  background: var(--color-accent);
  border-radius: 10px;
  padding: 22px;
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.key-highlights, .lifestyle-tips, .popular-articles {
  margin-top: 18px;
}

/* --- ACCORDION FAQ --- */
.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.faq-item {
  background: var(--color-accent);
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(24,56,93,0.03);
  padding: 20px 20px 13px 20px;
  margin-bottom: 8px;
  transition: box-shadow 0.12s;
}
.faq-item h3 {
  font-size: 1.08rem;
  margin-bottom: 10px;
}
.faq-item:hover, .faq-item:focus-within {
  box-shadow: 0 6px 20px rgba(24,56,93,0.07);
}

/* --- FOOTER --- */
footer {
  background: var(--color-accent);
  color: var(--color-primary);
  padding: 42px 0 18px 0;
  font-size: 0.96rem;
}
footer .container {
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
footer nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}
footer nav a {
  color: var(--color-primary);
  text-decoration: none;
  font-family: 'Montserrat', 'Roboto', Arial, sans-serif;
  font-weight: 500;
  margin-bottom: 2px;
  font-size: 0.99rem;
  transition: color 0.13s;
}
footer nav a:hover,
footer nav a:focus {
  color: var(--color-secondary);
  text-decoration: underline;
}
.footer-contact {
  font-size: 0.96rem;
  color: var(--color-primary);
  margin-top: 4px;
}
.footer-contact a {
  color: var(--color-primary);
  border-bottom: 1px dashed var(--color-secondary);
  text-decoration: none;
  transition: color 0.15s, border 0.14s;
}
.footer-contact a:hover, .footer-contact a:focus {
  color: var(--color-secondary);
  border-bottom: 1px solid var(--color-secondary);
}

/* --- RESPONSIVE BREAKPOINTS --- */
@media (max-width: 900px) {
  .container {
    padding: 0 8px;
  }
  .content-wrapper {
    max-width: 100%;
  }
  .features-grid, .testimonial-slider, .district-grid, .team-bios, .card-container, .downloads {
    gap: 14px;
  }
  footer .container {
    flex-direction: column;
    gap: 18px;
    align-items: flex-start;
  }
  section {
    padding: 32px 8px;
    margin-bottom: 36px;
  }
}
@media (max-width: 768px) {
  h1 { font-size: 1.48rem; }
  h2 { font-size: 1.18rem; }
  h3 { font-size: 1.05rem; }
  section {
    padding: 18px 4px;
    margin-bottom: 24px;
  }
  .features-grid, .testimonial-slider, .district-grid, .team-bios, .card-container {
    flex-direction: column;
    gap: 12px;
  }
  .content-grid {
    flex-direction: column;
    gap: 10px;
  }
  .card, .feature, .district, .team-member, .testimonial-card {
    max-width: 100%;
    min-width: 0;
    padding: 18px 10px;
  }
  .text-image-section {
    flex-direction: column;
    gap: 18px;
  }
  header .container {
    flex-direction: row;
    gap: 8px;
    padding: 10px 4px;
  }
}
@media (max-width: 480px) {
  h1 { font-size: 1.18rem; }
  h2 { font-size: 1rem; }
  .btn-primary, .btn-secondary { padding: 0.6em 1.1em; font-size: 0.98rem; }
  .district, .feature, .testimonial-card { padding: 12px 4px; }
  .mobile-nav a { font-size: 1.08rem; min-width: 120px; padding: 10px 0; }
}


/* --- COOKIE CONSENT BANNER --- */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  background: var(--color-light);
  color: var(--color-primary);
  padding: 20px 12px;
  box-shadow: 0 -1px 18px rgba(24,56,93,0.12);
  z-index: 240;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 22px;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(110%);
  transition: opacity 0.32s, transform 0.32s;
}
.cookie-banner.active {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}
.cookie-banner .cookie-message {
  flex: 1 1 400px;
  font-size: 0.98rem;
  color: var(--color-primary);
  margin-right: 16px;
}
.cookie-banner .cookie-actions {
  display: flex;
  flex-direction: row;
  gap: 12px;
}
.cookie-btn {
  background: var(--color-primary);
  color: var(--color-light);
  border: none;
  border-radius: 5px;
  padding: 8px 18px;
  font-family: 'Montserrat', 'Roboto', Arial, sans-serif;
  font-size: 1rem;
  margin: 0 2px;
  transition: background 0.18s, color 0.18s;
  cursor: pointer;
}
.cookie-btn.secondary {
  background: var(--color-accent);
  color: var(--color-primary);
  border: 1px solid var(--color-secondary);
}
.cookie-btn.settings {
  background: var(--color-secondary);
  color: var(--color-primary);
}
.cookie-btn:hover, .cookie-btn:focus {
  background: var(--color-secondary);
  color: var(--color-light);
  outline: none;
}
.cookie-btn.secondary:hover, .cookie-btn.secondary:focus {
  background: #e9eff7;
  color: var(--color-primary);
}
@media (max-width: 768px) {
  .cookie-banner {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 14px 5px;
  }
  .cookie-banner .cookie-message { margin-right: 0; }
  .cookie-banner .cookie-actions { gap: 8px; }
}

/* --- COOKIE MODAL --- */
.cookie-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(24,56,93,0.26);
  z-index: 251;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.27s;
}
.cookie-modal-overlay.open {
  display: flex;
  opacity: 1;
  pointer-events: all;
}
.cookie-modal {
  background: #fff;
  color: var(--color-primary);
  border-radius: 16px;
  box-shadow: 0 6px 32px rgba(24,56,93,0.17);
  padding: 30px 28px 22px 28px;
  max-width: 98vw;
  width: 380px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: relative;
}
.cookie-modal h2 {
  margin-bottom: 7px;
  font-size: 1.15rem;
}
.cookie-category {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 8px 0;
}
.cookie-category label {
  font-size: 1rem;
  font-weight: 500;
}
.cookie-toggle {
  appearance: none;
  width: 36px;
  height: 20px;
  background: var(--color-grey);
  border-radius: 12px;
  position: relative;
  outline: none;
  cursor: pointer;
  transition: background 0.17s;
}
.cookie-toggle:checked {
  background: var(--color-secondary);
}
.cookie-toggle:before {
  content: "";
  display: block;
  width: 17px;
  height: 17px;
  background: var(--color-light);
  border-radius: 50%;
  position: absolute;
  top: 1.5px;
  left: 2px;
  transition: left 0.18s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.cookie-toggle:checked:before {
  left: 16px;
}
.cookie-modal-actions {
  display: flex;
  flex-direction: row;
  gap: 12px;
  margin-top: 8px;
}
.cookie-modal-close {
  position: absolute;
  top: 14px;
  right: 18px;
  background: none;
  border: none;
  font-size: 1.45rem;
  color: var(--color-secondary);
  cursor: pointer;
  padding: 2px 6px;
}
.cookie-modal-close:hover, .cookie-modal-close:focus {
  color: var(--color-primary);
}
@media (max-width: 480px) {
  .cookie-modal {
    padding: 16px 7px 14px 12px;
    width: 94vw;
  }
}

/* --- FORMS (if present in modals/other) --- */
input, textarea, select {
  border: 1px solid var(--color-grey);
  border-radius: 6px;
  padding: 10px 11px;
  font-size: 1rem;
  font-family: inherit;
  box-shadow: 0 2px 10px rgba(24,56,93,0.025);
  margin-bottom: 10px;
  width: 100%;
  transition: border 0.18s, box-shadow 0.21s;
}
input:focus, textarea:focus, select:focus {
  border: 1.5px solid var(--color-secondary);
  outline: none;
}

/* --- UTILITIES --- */
.mt-1 { margin-top: 12px !important; }
.mb-1 { margin-bottom: 12px !important; }
.mt-2 { margin-top: 28px !important; }
.mb-2 { margin-bottom: 28px !important; }
.text-center { text-align: center !important; }

/* --- VISUAL MICRO-INTERACTIONS --- */
.card, .feature, .district, .testimonial-card, .faq-item {
  transition: box-shadow 0.21s, background 0.18s;
}
.btn-primary, .btn-secondary {
  transition: background 0.19s, color 0.22s;
}
footer nav a, footer .footer-contact a {
  transition: color 0.14s, border-bottom 0.15s;
}

/* --- PRINT OPTIMIZATION --- */
@media print {
  header, .mobile-menu, .cookie-banner, .cookie-modal-overlay, footer { display: none !important; }
  section, main, .container { background: #fff !important; box-shadow: none !important; color: #000 !important; }
}

/* --- END --- */
