/* 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;
  scroll-behavior: smooth;
  font-size: 16px;
}
*, *:before, *:after {
  box-sizing: inherit;
}
body {
  line-height: 1.6;
  font-family: 'Roboto', Arial, sans-serif;
  background-color: #F5F5F2;
  color: #234C6A;
  min-height: 100vh;
}

/* BRAND COLORS */
:root {
  --primary: #234C6A;
  --primary-dark: #18344B;
  --secondary: #F5F5F2;
  --secondary-dark: #E5E7EA;
  --accent: #E89B3D;
  --accent-dark: #C77613;
  --gray-100: #F9FAFB;
  --gray-200: #E5E7EA;
  --gray-300: #C9CBD1;
  --gray-800: #1C2C3A;
  --white: #FFFFFF;
  --black: #1a222b;
}

/* TYPOGRAPHY */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  color: var(--primary);
  font-weight: 700;
  letter-spacing: 0.01em;
  margin-bottom: 16px;
}
h1 {
  font-size: 2.25rem;
  margin-bottom: 24px;
}
h2 {
  font-size: 1.5rem;
  margin-bottom: 16px;
}
h3 {
  font-size: 1.17rem;
  margin-bottom: 12px;
}

p, li, ul, ol {
  font-family: 'Roboto', Arial, sans-serif;
  font-size: 1rem;
  color: var(--gray-800);
}
p {
  margin-bottom: 16px;
}
ul, ol {
  padding-left: 24px;
  margin-bottom: 16px;
  color: var(--gray-800);
}
strong {
  font-weight: 600;
  color: var(--primary);
}
em {
  font-style: italic;
}

/* BUTTONS & CTA */
.cta-primary,
button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 8px;
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 12px 32px;
  margin-top: 8px;
  margin-bottom: 8px;
  text-decoration: none;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
  cursor: pointer;
}
.cta-primary:hover, .cta-primary:focus,
button:hover, .button:hover,
.cta-primary:active {
  background: var(--accent);
  color: var(--white);
  box-shadow: 0 2px 22px 0 rgba(35, 76, 106, .17);
}

/* NAVIGATION */
header {
  position: relative;
  background: var(--white);
  box-shadow: 0 2px 16px 0 rgba(16,32,45,.06);
  z-index: 100;
}
.main-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 18px;
  padding: 12px 24px;
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  background: var(--white);
  width: 100%;
}
.main-nav a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  position: relative;
  padding: 4px 8px;
  transition: color 0.15s;
}
.main-nav a:hover, .main-nav a:focus {
  color: var(--accent);
}
.main-nav img {
  height: 36px;
  margin-right: 18px;
}
.main-nav .cta-primary {
  margin-left: auto;
  margin-right: 0;
  background: var(--accent);
  color: var(--white);
  border-radius: 8px;
  padding: 10px 28px;
  font-size: 1rem;
  font-weight: 700;
  transition: background 0.16s, color 0.16s;
}
.main-nav .cta-primary:hover, .main-nav .cta-primary:focus {
  background: var(--primary);
}

/* MOBILE NAVIGATION */
.mobile-menu-toggle {
  display: none;
  background: var(--primary);
  color: var(--white);
  font-size: 2rem;
  border: none;
  border-radius: 6px;
  padding: 8px 16px;
  position: absolute;
  right: 22px;
  top: 14px;
  z-index: 110;
  cursor: pointer;
  transition: background 0.18s;
}
.mobile-menu-toggle:hover, .mobile-menu-toggle:focus {
  background: var(--accent);
}
.mobile-menu {
  display: flex;
  flex-direction: column;
  background: var(--white);
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 85vw;
  max-width: 340px;
  z-index: 1200;
  transform: translateX(-110%);
  transition: transform 0.32s cubic-bezier(.86,0,.07,1);
  box-shadow: 4px 0 22px rgba(35,76,106,.18);
  padding: 0 0 32px 0;
  border-right: 1px solid var(--gray-200);
}
.mobile-menu.open {
  transform: translateX(0);
}
.mobile-menu-close {
  align-self: flex-end;
  margin: 16px 18px 0 0;
  background: none;
  border: none;
  color: var(--primary);
  font-size: 2rem;
  cursor: pointer;
  transition: color 0.18s;
}
.mobile-menu-close:hover, .mobile-menu-close:focus {
  color: var(--accent);
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  padding: 32px 28px 0 28px;
}
.mobile-nav a {
  font-size: 1.13rem;
  padding: 10px 0;
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.17s;
}
.mobile-nav a:hover, .mobile-nav a:focus {
  color: var(--accent);
}

/* Hide main-nav & show burger on mobile */
@media (max-width: 992px) {
  .main-nav {
    display: none;
  }
  .mobile-menu-toggle {
    display: block;
  }
}
@media (min-width: 993px) {
  .mobile-menu {
    display: none !important;
  }
}

/* CONTAINER & SECTIONS */
.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}
.section, section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: var(--white);
  border-radius: 14px;
  box-shadow: 0 2px 18px 0 rgba(35,76,106,.07);
  position: relative;
}
.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: flex-start;
  width: 100%;
}

/* HERO SECTION */
.hero {
  background: linear-gradient(99deg, #eaf1f7 0%, #f5f5f2 95%);
  border-radius: 0 0 24px 24px;
  box-shadow: 0 8px 36px 0 rgba(35,76,106,.08);
  padding-top: 70px;
  padding-bottom: 50px;
  margin-bottom: 0;
}
.hero .content-wrapper {
  align-items: flex-start;
  gap: 16px;
}
.hero h1 {
  font-size: 2.4rem;
  color: var(--primary);
  line-height: 1.23;
}
.hero p {
  font-size: 1.17rem;
  color: var(--gray-800);
  margin-bottom: 12px;
}

/* FEATURES */
.features, .services-overview, .features-values, .features-benefits {
  background: var(--secondary);
}
.features .content-wrapper > ul,
.features-values .content-wrapper > ul,
.features-benefits .content-wrapper .benefits-list
{
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 8px;
}
.features .content-wrapper > ul > li,
.features-values .content-wrapper > ul > li {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 2px 14px 0 rgba(35,76,106,.06);
  padding: 24px 18px;
  gap: 15px;
  min-width: 190px;
  flex: 1 1 200px;
}
.features .content-wrapper > ul > li img,
.features-values .content-wrapper > ul > li img {
  height: 36px;
  margin-bottom: 10px;
}

/* About/Services Section, Text-Section */
.text-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.services ul, .services-overview ul {
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.services-overview ul > li {
  background: var(--white);
  border-radius: 10px;
  padding: 16px 18px;
  box-shadow: 0 1px 8px 0 rgba(35,76,106,.07);
  margin-bottom: 0;
}

.features-benefits .benefits-list {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
}
.features-benefits .benefits-list > div {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: var(--white);
  border-radius: 10px;
  box-shadow: 0 2px 12px 0 rgba(35,76,106,.04);
  padding: 14px 14px;
  min-width: 190px;
  flex: 1 1 160px;
  gap: 10px;
}
.features-benefits .benefits-list img {
  height: 32px;
  margin-bottom: 6px;
}

/* Card Patterns */
.card-container,
.card-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 2px 14px 0 rgba(35,76,106,.08);
  margin-bottom: 20px;
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  position: relative;
  width: 100%;
  max-width: 340px;
  transition: box-shadow 0.18s, transform 0.18s;
}
.card:hover {
  box-shadow: 0 8px 28px 0 rgba(35,76,106,0.13);
  transform: translateY(-4px);
}
.card-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}

/* Timeline Visual */
.timeline-visual {
  margin: 28px 0 8px 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.timeline-visual img {
  max-width: 100%;
  height: auto;
}

/* TESTIMONIALS */
.testimonials .testimonial-card,
.testimonial-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  margin-bottom: 25px;
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 2px 18px 0 rgba(35,76,106,.08);
  color: var(--primary);
  min-width: 260px;
  transition: box-shadow 0.18s, transform 0.16s;
}
.testimonials .testimonial-card:hover,
.testimonial-card:hover {
  box-shadow: 0 6px 27px 0 rgba(35,76,106,0.15);
  transform: translateY(-2px);
}
.testimonial-card span {
  color: var(--accent);
  font-size: 1.4rem;
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-weight: 700;
  margin-bottom: 8px;
  display: block;
}
.testimonial-card p {
  color: var(--primary);
  margin: 4px 0;
}
.testimonial-card strong {
  color: var(--primary-dark);
}

/* Ensure color contrast is high for testimonials */
.testimonial-card,
.testimonial-card * {
  color: var(--primary) !important;
  background: var(--white) !important;
}

/* CTA SECTION */
.cta {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 30px 0;
  background: var(--primary);
  border-radius: 14px;
  box-shadow: 0 2px 22px 0 rgba(35,76,106,.11);
  margin: 20px 0 64px 0;
}
.cta .cta-primary {
  background: var(--accent);
  color: var(--white);
  font-size: 1.13rem;
  font-weight: 700;
  padding: 16px 40px;
  border-radius: 8px;
}
.cta .cta-primary:hover, .cta .cta-primary:focus {
  background: var(--primary);
}

/* CONTACT SECTION */
.contact-info, .contact {
  margin-bottom: 48px;
}
.contact-info ul, .contact .text-section ul {
  margin-left: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.contact-info ul li,
.contact .text-section ul li {
  color: var(--primary);
  font-weight: 500;
  padding-left: 0;
}
.contact-info img, .contact img {
  margin: 18px 0 10px 0;
  height: 36px;
}

/* LEGAL & PLAIN SECTIONS */
.legal {
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 2px 18px 0 rgba(35,76,106,.06);
  padding: 40px 24px;
  margin-bottom: 60px;
}
.legal h1, .legal h2 {
  color: var(--primary);
}

/* FOOTER */
footer {
  background: var(--white);
  box-shadow: 0 -2px 14px 0 rgba(35,76,106,.07);
  padding: 48px 0 16px 0;
  border-radius: 24px 24px 0 0;
  margin-top: 60px;
}
footer .container {
  padding-top: 0;
  padding-bottom: 0;
}
footer .content-wrapper {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.footer-nav {
  display: flex;
  gap: 20px;
}
.footer-nav a {
  color: var(--primary);
  font-size: 1rem;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.12s;
}
.footer-nav a:hover, .footer-nav a:focus {
  color: var(--accent);
}
.brand-credits {
  display: flex;
  align-items: center;
  font-size: 1rem;
  color: var(--gray-800);
  gap: 8px;
  font-family: 'Roboto', Arial, sans-serif;
}
.brand-credits img {
  height: 30px;
}
.social-links {
  display: flex;
  align-items: center;
  gap: 18px;
}
.social-links a img {
  height: 24px;
  transition: filter 0.16s;
  filter: grayscale(0.35) brightness(0.88);
}
.social-links a:hover img, .social-links a:focus img {
  filter: none;
}

/* UTILITY LAYOUT PATTERNS FROM INSTRUCTIONS */
.section { 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; }

/* OTHER UI ELEMENTS */
a {
  color: var(--accent);
  text-decoration: underline;
  transition: color 0.14s;
}
a:hover, a:focus {
  color: var(--primary-dark);
}

img {
  max-width: 100%;
  border-radius: 8px;
}

hr {
  border: none;
  border-top: 1px solid var(--gray-200);
  margin: 32px 0;
}

::-webkit-input-placeholder { color: var(--gray-300); }
:-ms-input-placeholder { color: var(--gray-300); }
::placeholder { color: var(--gray-300); }

/* RESPONSIVE FLEX LAYOUTS */
@media (max-width: 992px) {
  .footer-nav {
    flex-wrap: wrap;
    gap: 12px;
  }
  .content-wrapper, .features .content-wrapper > ul, .features-benefits .benefits-list, .features-values .content-wrapper > ul, .card-container {
    flex-direction: column;
    gap: 20px;
  }
  .card-grid {
    flex-direction: column;
    gap: 18px;
  }
  .about-team .content-wrapper, .features-benefits .benefits-list {
    flex-direction: column;
  }
}
@media (max-width: 768px) {
  html {
    font-size: 14px;
  }
  .container {
    padding-left: 8px;
    padding-right: 8px;
  }
  .hero {
    padding: 48px 8px 32px 8px;
  }
  .cta {
    border-radius: 10px;
    flex-direction: column;
    padding: 18px 8px;
  }
  .section, section {
    padding: 32px 8px;
    border-radius: 8px;
  }
  .content-wrapper { gap: 18px; }
  .features .content-wrapper > ul,
  .features-values .content-wrapper > ul,
  .features-benefits .benefits-list,
  .card-container, .card-grid {
    flex-direction: column;
    gap: 14px;
  }
  .footer-nav, .social-links {
    flex-direction: column;
    gap: 10px;
  }
  .brand-credits {
    flex-direction: column;
    gap: 6px;
  }
  .text-image-section {
    flex-direction: column;
    gap: 20px;
  }
}

/* Microinteractions, Hover & Focus Animations */
.cta-primary, button, .button {
  transition: background 0.18s, color 0.18s, box-shadow 0.18s, transform 0.12s;
}
.cta-primary:active, button:active {
  transform: scale(0.97);
}
.card:active, .testimonial-card:active {
  transform: scale(0.99);
  box-shadow: 0 2px 10px 0 rgba(35,76,106,0.06);
}

/* Hamburger overlay: muted background when open */
.mobile-menu-overlay {
  display: none;
}
.mobile-menu.open ~ .mobile-menu-overlay {
  display: block;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(23,37,49,0.15);
  z-index: 1100;
  animation: fadeIn .22s ease;
}
@keyframes fadeIn { 0% { opacity: 0;} 100% { opacity: 1; } }

/* Cookie Consent Banner (fixed bottom) */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0; right: 0;
  width: 100vw;
  background: var(--white);
  border-top: 2px solid var(--primary);
  box-shadow: 0 -4px 20px rgba(35,76,106,0.06);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: 22px 28px 22px 28px;
  gap: 16px;
  z-index: 1300;
  animation: bannerIn .4s cubic-bezier(.85,0,.07,1);
  font-size: 1rem;
}
@keyframes bannerIn { 0% { transform: translateY(100%);} 100% { transform: translateY(0);} }
.cookie-banner span {
  color: var(--primary);
}
.cookie-banner-buttons {
  display: flex;
  gap: 16px;
}
.cookie-banner button, .cookie-banner .button {
  font-size: 1rem;
  padding: 10px 22px;
  border-radius: 8px;
}
.cookie-banner .cookie-settings {
  background: none;
  color: var(--primary);
  border: 1.5px solid var(--primary);
  font-weight: 600;
}
.cookie-banner .cookie-settings:hover, .cookie-banner .cookie-settings:focus {
  background: var(--gray-100);
  color: var(--accent);
  border-color: var(--accent);
}
.cookie-banner .accept {
  background: var(--accent);
  color: var(--white);
}
.cookie-banner .accept:hover, .cookie-banner .accept:focus {
  background: var(--primary);
}
.cookie-banner .reject {
  background: var(--gray-200);
  color: var(--primary);
}
.cookie-banner .reject:hover, .cookie-banner .reject:focus {
  background: var(--accent);
  color: var(--white);
}

@media (max-width: 600px) {
  .cookie-banner {
    flex-direction: column;
    gap: 18px;
    padding: 18px 8px;
    font-size: 0.95rem;
  }
  .cookie-banner-buttons {
    width: 100%;
    justify-content: flex-start;
  }
}

/* COOKIE SETTINGS MODAL */
.cookie-modal-overlay {
  display: none;
}
.cookie-modal-overlay.active {
  display: block;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 1400;
  background: rgba(16,26,31,0.27);
  animation: fadeIn .16s;
}
.cookie-modal {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%,-50%);
  background: var(--white);
  border-radius: 16px;
  box-shadow: 0 10px 50px 0 rgba(35,76,106,0.13);
  min-width: 290px;
  max-width: 95vw;
  padding: 38px 32px 28px 32px;
  z-index: 1500;
  animation: modalIn .23s cubic-bezier(.89,0,.2,1);
}
@keyframes modalIn { 0% { transform: translate(-50%,20%); opacity:0;} 100% { transform: translate(-50%,-50%); opacity:1;} }
.cookie-modal-header {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
}
.cookie-modal-header span {
  font-size: 1.13rem;
  font-weight: 600;
  color: var(--primary);
}
.cookie-modal-close {
  background: none;
  color: var(--primary);
  font-size: 2rem;
  border: none;
  cursor: pointer;
}
.cookie-modal-close:hover, .cookie-modal-close:focus {
  color: var(--accent);
}
.cookie-modal-category {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}
.cookie-toggle {
  margin-left: 6px;
}
.cookie-toggle input[type=checkbox] {
  appearance: none;
  width: 30px;
  height: 16px;
  background: var(--gray-200);
  border-radius: 9px;
  position: relative;
  outline: none;
  cursor: pointer;
  transition: background 0.14s;
}
.cookie-toggle input[type=checkbox]:checked {
  background: var(--accent);
}
.cookie-toggle input[type=checkbox]:before {
  content: '';
  position: absolute;
  top: 2px; left: 3px;
  width: 12px; height: 12px;
  background: var(--white);
  border-radius: 50%;
  transition: transform 0.17s;
}
.cookie-toggle input[type=checkbox]:checked:before {
  transform: translateX(12px);
}
.cookie-modal .category-label {
  font-weight: 500;
  color: var(--primary);
}
.cookie-modal .category-desc {
  font-size: 0.97rem;
  color: var(--gray-800);
}
.cookie-modal-footer {
  display: flex;
  gap: 16px;
  justify-content: flex-end;
  width: 100%;
}
.cookie-modal-footer button {
  font-size: 1rem;
  padding: 9px 22px;
  border-radius: 7px;
}
.cookie-modal-footer .accept {
  background: var(--accent);
  color: var(--white);
}
.cookie-modal-footer .accept:hover, .cookie-modal-footer .accept:focus {
  background: var(--primary);
}
.cookie-modal-footer .reject {
  background: var(--gray-100);
  color: var(--primary);
  border: 1px solid var(--primary);
}
.cookie-modal-footer .reject:hover, .cookie-modal-footer .reject:focus {
  background: var(--accent);
  color: var(--white);
  border: 1px solid var(--accent);
}

/* CONFIRMATION PAGE */
.confirmation {
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--white);
  box-shadow: 0 2px 14px 0 rgba(35,76,106,.09);
  border-radius: 14px;
  padding: 48px 24px;
  margin-bottom: 48px;
}
.confirmation .content-wrapper { align-items: center; }
.confirmation h1 { color: var(--accent); }
.confirmation ul { margin: 12px 0 22px 0; }

/* ADDITIONAL: Remove empty margin at top for first hero section */
main > section.hero {
  margin-top: 0;
}

/* Accessibility Focus State */
:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

/* Scrollbar Styling for modern browsers */
body {
  scrollbar-color: var(--primary) var(--secondary);
  scrollbar-width: thin;
}
::-webkit-scrollbar {
  height: 9px;
  width: 9px;
}
::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: 6px;
}
::-webkit-scrollbar-track {
  background: var(--secondary);
}

/* Hide scrollbars on mobile navigation when needed */
.mobile-menu {
  overflow-y: auto;
}

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

/************************************/
* END CSS: ImmoGuidance Deutschland *
/************************************/