/* ==== 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;
}
/* HTML5 display-role reset for older browsers */
article,aside,details,figcaption,figure, 
footer,header,hgroup,menu,nav,section {
  display: block;
}
body {
  line-height: 1.5;
  background: #F3F6FA;
  color: #22303f;
  font-family: 'Roboto', Arial, sans-serif;
}
a {
  color: #20426C;
  text-decoration: none;
  transition: color 0.2s;
}
a:hover, a:focus {
  color: #FFA94D;
  text-decoration: underline;
}
ul, ol {
  margin-left: 22px;
  margin-bottom: 18px;
}
ul ul, ol ol, ul ol, ol ul {
  margin-bottom: 0;
}
img {
  max-width: 100%;
  display: block;
}
button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  outline: none;
}
:root {
  --primary: #20426C;
  --secondary: #F3F6FA;
  --accent: #FFA94D;
  --text: #22303f;
  --heading: #1b2e4b;
  --card-bg: #fff;
  --card-border: #dde2ea;
  --shadow: 0 2px 12px 0 rgba(32,66,108,0.09);
  --radius: 10px;
}

/* ==== TYPOGRAPHY ==== */
h1,h2,h3,h4,h5,h6 {
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 700;
  line-height: 1.2;
  color: var(--heading);
  letter-spacing: 0.01em;
}
h1 {font-size: 2.4rem; margin-bottom: 18px;}
h2 {font-size: 1.8rem; margin-bottom: 16px;}
h3 {font-size: 1.35rem; margin-bottom: 12px; font-weight:600;}
h4 {font-size: 1.1rem;}
p, li, .text-section {
  font-size: 1rem;
  color: var(--text);
}
p {
  margin-bottom: 14px;
}
strong,b {
  font-weight: 700;
}
.hero-section h1 {
  font-size: 2.5rem;
}
/* Larger type for hero descriptions */
.hero-section p { 
  font-size: 1.2rem;
  color: #22303f;
  margin-bottom: 24px;
}
.section h2 {
  margin-top: 0;
}

/* ==== LAYOUT WRAPPERS ==== */
.container {
  max-width: 1150px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
  width: 100%;
}
.content-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 0;
}
.section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: none;
}
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 20px;
  margin-bottom: 20px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 250px;
  transition: box-shadow 0.25s, transform 0.2s;
}
.card:hover {
  box-shadow: 0 4px 24px 0 rgba(32,66,108,0.13);
  transform: translateY(-2px);
}
.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;
  background: #fff;
  border-left: 6px solid var(--primary);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 24px;
  max-width: 500px;
}
.testimonial-card p {
  font-size: 1.07rem;
  color: #22303f;
  margin-bottom: 4px;
}
.testimonial-card div {
  color: var(--accent);
  font-size: 1.3rem;
  font-weight: 600;
}
.testimonial-card span {
  color: #697c99;
  font-size: 0.96rem;
  font-style: italic;
}
.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}

/* ==== HEADER ==== */
header {
  background: #fff;
  box-shadow: 0 2px 20px 0 rgba(32,66,108,0.05);
  border-bottom: 1px solid #e5e9f2;
  position: relative;
  z-index: 40;
}
header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 78px;
  min-height: 72px;
}
header nav {
  display: flex;
  gap: 18px;
}
header nav a {
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: 1rem;
  font-weight: 500;
  color: var(--primary);
  padding: 8px 0 6px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-bottom 0.2s;
}
header nav a:hover, header nav a:focus {
  color: var(--accent);
  border-bottom: 2px solid var(--accent);
}
header img[alt="ImmoMetropole"] {
  height: 40px;
  width: auto;
  margin-right: 28px;
}
header .button-primary {
  margin-left: 12px;
  min-width: 46px;
}

/* ==== HERO SECTION ==== */
.hero-section {
  background: linear-gradient(90deg, #f3f6fa 60%, #e7effa 100%);
  padding: 60px 0 55px 0;
  margin-bottom: 40px;
}
.hero-section .container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}
.hero-section .content-wrapper {
  align-items: flex-start;
  gap: 18px;
}

/* ==== BUTTONS ==== */
.button-primary {
  background: var(--primary);
  color: #fff;
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 600;
  font-size: 1.07rem;
  letter-spacing: 0.02em;
  border: none;
  border-radius: 7px;
  padding: 12px 28px;
  cursor: pointer;
  box-shadow: 0 4px 14px 0 rgba(32,66,108,0.10);
  transition: background 0.18s, box-shadow 0.2s, color 0.18s, transform 0.18s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.button-primary:hover, .button-primary:focus {
  background: var(--accent);
  color: var(--primary);
  box-shadow: 0 6px 16px 0 rgba(32,66,108,0.12);
  transform: translateY(-2px) scale(1.012);
  text-decoration: none;
}
.button-secondary {
  background: #fff;
  color: var(--primary);
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 500;
  font-size: 1rem;
  border: 1.5px solid var(--primary);
  border-radius: 7px;
  padding: 11px 24px;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, border 0.2s, box-shadow 0.2s;
}
.button-secondary:hover, .button-secondary:focus {
  background: var(--primary);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 2px 10px 0 rgba(32,66,108,0.08);
}
.button-plain {
  background: none;
  color: var(--primary);
  border: none;
  font-size: 1rem;
  padding: 9px 8px;
  cursor: pointer;
  transition: color 0.15s;
}
.button-plain:hover, .button-plain:focus {
  color: var(--accent);
  text-decoration: underline;
}

/* ==== LISTS WITH ICONS ==== */
li img {
  vertical-align: middle;
  height: 26px;
  width: 26px;
  object-fit: contain;
  margin-right: 10px;
  margin-bottom: -3px;
}
ul:not(.mobile-nav) li, ol li {
  margin-bottom: 10px;
  line-height: 1.5;
}

/* ==== SECTIONS & FLEX ==== */
@media (min-width: 900px) {
  .content-wrapper {
    flex-direction: row;
    gap: 44px;
    align-items: flex-start;
  }
}
@media (min-width: 1150px) {
  .container {
    padding-left: 0;
    padding-right: 0;
  }
}

.section { /* as defined in requirements */
  margin-bottom: 60px;
  padding: 40px 20px;
}
.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;
}
.testimonial-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
}
.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}

/* ==== FOOTER ==== */
footer {
  background: #fff;
  border-top: 1px solid #e7edf6;
  padding: 38px 0 28px 0;
  font-size: 0.97rem;
  color: #718096;
  box-shadow: 0 -2px 18px rgba(32,66,108,0.05);
}
footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 32px;
  align-items: flex-start;
}
footer nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
footer nav a {
  color: var(--primary);
  transition: color 0.22s;
  font-weight: 500;
  margin-bottom: 2px;
}
footer nav a:hover,
footer nav a:focus {
  color: var(--accent);
}
footer .contact-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  color: #22303f;
  font-size: 0.98rem;
}
footer .contact-info img {
  height: 18px;
  width: 18px;
  margin-right: 5px;
  vertical-align: middle;
  margin-bottom: -2px;
}
footer > .container > div:last-child {
  color: #a5b4c7;
  font-size: 0.94rem;
  margin-top: 19px;
}

/* ==== MOBILE NAVIGATION ==== */
.mobile-menu-toggle {
  display: none;
}
.mobile-menu {
  display: none;
}
@media (max-width: 1000px) {
  header .container {
    flex-wrap: wrap;
    gap: 12px;
    height: 64px;
    min-height: 56px;
  }
  header nav {
    display: none;
  }
  header .button-primary {
    display: none;
  }
  .mobile-menu-toggle {
    display: flex;
    position: fixed;
    right: 24px;
    top: 16px;
    z-index: 110;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: var(--primary);
    font-size: 2rem;
    border-radius: 8px;
    border: 1px solid #e3e9f2;
    box-shadow: 0 2px 12px rgba(32,66,108,0.09);
    cursor: pointer;
    transition: box-shadow 0.18s, background 0.15s;
  }
  .mobile-menu-toggle:hover, .mobile-menu-toggle:focus {
    background: var(--secondary);
    box-shadow: 0 2px 16px rgba(32,66,108,0.13);
  }
  .mobile-menu {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 100vw;
    background: rgba(30,44,64,0.92);
    z-index: 9999;
    transform: translateX(-100%);
    transition: transform 0.38s cubic-bezier(.6,.02,.09,1.1);
    overflow-y: auto;
    box-shadow: 3px 0 24px 0 rgba(32,66,108,0.15);
  }
  .mobile-menu.open {
    transform: translateX(0);
    transition: transform 0.38s cubic-bezier(.6,.02,.09,1.1);
  }
  .mobile-menu-close {
    margin-top: 22px;
    margin-left: auto;
    margin-right: 14px;
    font-size: 2.25rem;
    background: #fff;
    color: var(--primary);
    border: none;
    border-radius: 50%;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 0 10px 0 rgba(32,66,108,0.11);
    transition: background 0.15s, box-shadow 0.19s;
  }
  .mobile-menu-close:hover, .mobile-menu-close:focus {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 2px 18px 0 rgba(32,66,108,0.16);
  }
  .mobile-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 0 40px 0;
    gap: 22px;
  }
  .mobile-nav a {
    font-size: 1.35rem;
    font-family: 'Montserrat', Arial, sans-serif;
    font-weight: 500;
    color: #fff;
    padding: 12px 28px;
    border-radius: 7px;
    width: 90vw;
    text-align: center;
    background: none;
    transition: background 0.15s, color 0.17s;
    margin-bottom: 0;
    display: block;
  }
  .mobile-nav a:hover, .mobile-nav a:focus {
    color: var(--primary);
    background: var(--accent);
    text-decoration: none;
  }
}

/*==== COOKIE CONSENT BANNER ====*/
.cookie-banner {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100vw;
  z-index: 99999;
  background: #24364f;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  box-shadow: 0 0 22px 0 rgba(32,66,108,0.15);
  padding: 28px 18px 18px 18px;
  transition: bottom 0.32s cubic-bezier(.6,.02,.09,1.15);
}
.cookie-banner-content {
  max-width: 1080px;
  text-align: center;
  margin-bottom: 16px;
  font-size: 1.03rem;
  line-height: 1.6;
}
.cookie-banner-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}
.cookie-banner .button-primary {
  background: var(--accent);
  color: var(--primary);
  font-size: 1.05rem;
  font-weight: 600;
}
.cookie-banner .button-primary:hover, .cookie-banner .button-primary:focus {
  background: #fff;
  color: var(--primary);
}
.cookie-banner .button-secondary {
  background: #fff;
  color: var(--primary);
  border-color: var(--primary);
}
.cookie-banner .button-secondary:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--accent);
}
.cookie-banner .button-plain {
  color: #fff;
  font-size: 1rem;
  padding: 9px 8px;
}
.cookie-banner .button-plain:hover {
  color: var(--accent);
}
/* Cookie Modal */
.cookie-modal {
  position: fixed;
  top: 0; left: 0; right:0; bottom:0;
  width: 100vw; height: 100vh;
  z-index: 999999;
  background: rgba(32,66,108,0.58);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.22s;
  pointer-events: all;
}
.cookie-modal-dialog {
  background: #fff;
  color: #20426C;
  border-radius: var(--radius);
  box-shadow: 0 2px 24px 0 rgba(32,66,108,0.18);
  padding: 36px 30px 30px 30px;
  width: 95vw;
  max-width: 415px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  position: relative;
  animation: fadeInModal 0.28s;
}
@keyframes fadeInModal {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.cookie-modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: none;
  color: var(--primary);
  font-size: 1.7rem;
  cursor: pointer;
  transition: color 0.15s;
  line-height: 1;
}
.cookie-modal-close:hover {
  color: var(--accent);
}
.cookie-modal-title {
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: 1.26rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.cookie-category {
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cookie-category label {
  font-size: 1.01rem;
  color: #20426C;
}
.cookie-category input[type=checkbox] {
  accent-color: var(--primary);
  width: 19px; height: 19px;
}
.cookie-category input[disabled] {
  opacity: 0.5;
}
.cookie-modal-actions {
  display: flex; gap: 18px; margin-top: 22px;
}

/* ==== RESPONSIVE DESIGN ====*/
@media (max-width: 900px) {
  .container {
    padding-left: 14px;
    padding-right: 14px;
  }
  .section {
    padding: 28px 8px;
    margin-bottom: 40px;
  }
  .hero-section {
    padding-top: 38px;
    padding-bottom: 35px;
    margin-bottom: 30px;
  }
  .footer .container {
    gap: 16px;
  }
  .testimonial-card {
    max-width: 100%;
  }
}
@media (max-width: 768px) {
  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.25rem; }
  .hero-section h1 { font-size: 1.45rem; }
  .hero-section p { font-size: 1.06rem; }
  .container {
    padding-left: 5px;
    padding-right: 5px;
  }
  .content-wrapper, .card-container, .content-grid, .text-image-section {
    flex-direction: column !important;
    align-items: stretch;
    gap: 19px !important;
  }
  .section { padding: 16px 4px; }
  .card { padding: 18px 9px; min-width: 0; }
  .feature-item { gap: 11px; }
  footer .container {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }
}
@media (max-width: 500px) {
  .cookie-modal-dialog {
    padding: 14px 4vw 20px 4vw;
  }
  .cookie-banner {
    padding: 14px 4px 10px 4px;
    font-size: 0.96rem;
  }
}

/* ==== ANIMATION UTILITIES ==== */
.fade-in {
  opacity: 0;
  transform: translateY(8px);
  animation: fadeInSection 0.62s forwards;
}
@keyframes fadeInSection {
  to { opacity: 1; transform: translateY(0); }
}

/* ==== UTILITY CLASSES ==== */
.mt-16 { margin-top: 16px!important; }
.mb-12 { margin-bottom: 12px!important; }
.flex-row { display: flex; flex-direction: row!important; }
.flex-col { display: flex; flex-direction: column!important; }
.gap-20 { gap: 20px!important; }
.text-center { text-align: center!important; }
.hide { display: none!important; }

/* ==== SPECIAL INFO BOX ==== */
.next-steps-info {
  background: #f6fafd;
  border-left: 4px solid #20426C;
  color: #1b3560;
  padding: 18px 16px;
  border-radius: 8px;
  margin: 18px 0 16px 0;
  font-size: 1.03rem;
}

/* ==== SERVICE DETAILS PARAGRAPH (on immobilienangebote) ==== */
.service-details {
  background: #f3f6fa;
  border-left: 4px solid var(--primary);
  color: #33475b;
  padding: 14px 14px 12px 16px;
  margin-bottom: 14px;
  border-radius: 7px;
  font-size: 1.02rem;
}

/* ==== ICONS ==== */
.contact-info img {
  display: inline-block;
  vertical-align: middle;
  margin-bottom: -2px;
  margin-right: 7px;
}

/* ==== OVERLAY/FOCUS ==== */
:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

/* ==== SHADOW HOVER FOR CARDS/INTERACTION ==== */
.card, .testimonial-card, .service-details, .next-steps-info {
  transition: box-shadow 0.20s, border-color 0.19s;
}
.card:hover, .testimonial-card:hover, .card:focus, .testimonial-card:focus {
  box-shadow: 0 8px 24px 0 rgba(32,66,108,0.15) !important;
  border-color: var(--accent);
}

/* ==== ENSURE MINIMUM SPACING ==== */
.section > * + *, .content-wrapper > * + *, .card-container > * + *, .content-grid > * + *, .feature-item > * + * {
  margin-top: 20px;
}

/* ==== PRINT (FOR DOCUMENT EXPORTS, OPTIONAL) ==== */
@media print {
  header, footer, .mobile-menu, .mobile-menu-toggle, .cookie-banner, .cookie-modal {
    display: none !important;
  }
}
