@font-face {
  font-family: 'Lora';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('./fonts/Lora-Regular.ttf') format('truetype');
}

@font-face {
  font-family: 'Lora';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('./fonts/Lora-Bold.ttf') format('truetype');
}

html {
  margin: 0;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgb(255, 255, 255);
  border-bottom: 1px solid #ddd;
  padding: 1rem 1.5rem;
  z-index: 10;
  box-shadow: 0 2px 6px rgba(167, 71, 71, 0.08);
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  transition: transform 0.1s ease-out;
}

.site-logo {
  line-height: 0;
  overflow: hidden;
  height: 80px;
}

.site-logo img {
  display: block;
  height: 80px;
  width: auto;
  transform: translateX(0px);
  object-fit: cover;
  object-position: left center;
}

.header-subtext {
  display: flex;
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  font-size: 1.3rem;
  margin-left: 1rem;
  color: #0b3164;
}

.header-subtext span {
  display: inline-block;
}

.header-subtext a {
  color: #0b3164;
  text-decoration: none;
}

.header-subtext a:hover {
  text-decoration: underline;
}

.header-subtext .dropdown {
  position: relative;
}

.header-subtext .dropdown::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -15px;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid #0b3164;
  transition: transform 0.2s ease;
}

.header-subtext .dropdown:hover::after {
  transform: translateY(-50%) rotate(180deg);
}

.header-subtext .dropdown.open::after {
  transform: translateY(-50%) rotate(180deg);
}

.header-subtext .dropdown.open .dropdown-menu {
  display: block;
}

.header-subtext .dropdown-menu {
  display: none;
  position: absolute;
  left: 0;
  top: 100%;
  background: #ffffff;
  border: 1px solid #ddd;
  border-radius: 6px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
  padding: 0.35rem 0;
  min-width: 220px;
  z-index: 20;
}

.header-subtext .dropdown:hover .dropdown-menu,
.header-subtext .dropdown:focus-within .dropdown-menu {
  display: block;
}

.header-subtext .dropdown-menu a {
  display: block;
  padding: 0.65rem 1rem;
  color: #0b3164;
  text-decoration: none;
  white-space: nowrap;
}

.header-subtext .dropdown-menu a:hover {
  background: #f5f7fb;
}

.header-contact {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-right: 3rem;
  margin-left: auto;
  
}

.contact-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.1rem;
  transform: translateY(0.3rem);
}

.contact-link img {
  display: block;
  vertical-align: middle;
}

.header-contact-button {
  width: fit-content;
  padding: 0.85rem 2rem;
  border: none;
  border-radius: 8px;
  background: #0b3164;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.2s ease;
  margin-top: 0.5rem;
}

.header-contact-button:hover {
  background: #093151;
}

.header-contact-button a {
  color: #fff;
  text-decoration: none;
}

@media (max-width: 768px) {
  .site-header {
    justify-content: flex-start;
    align-items: center;
    padding: 1rem 1rem 0.75rem;
    gap: 0.5rem;
    padding-right: 0.25rem; /* tighten right edge on small screens */
  }

  .site-logo {
    flex: 0 0 auto;
    width: auto;
    order: 1;
    height: 40px; /* match the smaller logo image so siblings align */
    display: flex;
    align-items: center;
    padding-right: 3rem;
    padding-left: 0.5rem;  }

  .site-logo img {
    height: 40px;
  }

  .header-contact {
    flex: 0 0 auto;
    width: auto;
    margin: 0;
    align-items: center;
    gap: 0.6rem;
    order: 2; /* sit to the right of the logo */
    margin-right: 0; /* remove extra right gap */
  }

  .header-contact .contact-link img {
    width: 35px;
    height: 35px;
  }

  .header-contact-button {
    width: auto;
    margin-top: 0;
    padding: 0rem 0rem;
    font-size: 0.8rem;
  }

  .header-contact-button a {
    display: inline-block;
  }

  /* Ensure contact controls vertically align with logo and remove downward offset */
  .contact-link {
    transform: none;
    margin: 0;
    padding: 0;
  }

  .site-header {
    padding-right: 0.6rem;
  }

  .header-contact-button {
    height: 33px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.7rem;
  }

  .header-subtext {
    flex: 1 1 100%;
    width: 100%;
    order: 3; /* move dropdowns to the second row */
    margin-left: 0;
    gap: 2rem;
    align-items: center;
    justify-content: flex-start;
    margin-top: 0.35rem;
    font-size: 0.9rem;
    padding-top: 0.25rem;
    padding-left: 0.5rem;
  }

  .header-subtext span {
    min-width: 0;
  }

  /* DEBUG: show element boxes on narrow screens to find spacing issues
     Remove or comment out these rules after inspection */
  /* Tighten paddings and gaps so contact buttons sit flush with logo */
  .site-header {
    padding-left: 0.12rem;
    padding-right: 0.12rem;
    gap: 0.12rem;
    left: 0;
    right: 0;
    width: 100vw; /* ensure full viewport width */
    box-sizing: border-box;
    padding-right: 0 !important;
  }

  .site-logo {
    margin-right: 0;
  }

  .header-contact {
    margin-left: 0;
    margin-right: 0 !important;
    padding-right: 0 !important;
  }

  /* Force the contact button to the right edge if needed */
  .site-header .header-contact { margin-inline-start: 0; }
  .site-header .header-contact { margin-inline-end: 0; }

  .site-header > * {
    box-sizing: border-box;
    margin: 0;
  }
}

.page-content,
.preserve-whitespace {
  max-width: 960px;
  margin: -6rem auto 0;
  padding: 4rem 1.5rem 0;
  color: #222;
  line-height: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.page-content > section,
.preserve-whitespace > section {
  line-height: 1.8;
}

.page-content h1,
.preserve-whitespace h1 {
  color: #0b3164;
  margin-top: 0rem;
  font-family: 'Lora', serif;
  font-size: 2.5rem;
}

.page-content h2,
.preserve-whitespace h2 {
  color: #0b3164;
  margin-top: 0rem;
  font-family: 'Lora', serif;
  font-size: 2.125rem;
  margin-bottom: 0.75rem;
}


h1[id],
h2[id],
section[id] {
  scroll-margin-top: 140px;
}

.page-content ul,
.preserve-whitespace ul {
  margin: 0.5rem 0 1rem 1.5rem;
  padding-left: 1rem;
  white-space: normal;
}

#immobilien ul {
  list-style: none;
  margin-left: 0;
  padding-left: 0;
}

#immobilien ul li {
  margin-bottom: 1rem;
  line-height: 1.6;
}

#immobilien ul li:last-child {
  margin-bottom: 0;
}

.page-content ul li,
.preserve-whitespace ul li {
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.page-content ul li:last-child,
.preserve-whitespace ul li:last-child {
  margin-bottom: 0;
}

.page-content ul li:last-child,
.preserve-whitespace ul li:last-child {
  margin-bottom: 0;
}

body {
  margin: 0;
  padding-top: 80px;
  font-family: 'Geist', sans-serif;
  overflow-x: hidden;
  font-size: 1.3rem;
}

.contact-section-wrapper {
  max-width: 1200px;
  margin: 2rem auto 3rem;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

@media (max-width: 768px) {
  .contact-section-wrapper {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

#altersvorsorge,
#immobilien,
#finanzierungen,
#pkv,
#versicherungen,
#kapitalanlagen {
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  width: 100vw;
  padding: 2rem 0;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  #altersvorsorge,
  #immobilien,
  #finanzierungen,
  #pkv,
  #versicherungen,
  #kapitalanlagen {
    position: static;
    left: auto;
    right: auto;
    margin-left: 0;
    margin-right: 0;
    width: 100%;
    padding: 0rem 0rem;
    box-sizing: border-box;
  }

  .pkv-inner,
  .versicherungen-inner,
  .kapitalanlagen-inner,
  .altersvorsorge-inner,
  .immobilien-inner,
  .finanzierungen-inner {
    width: 100%;
    padding-left: 0;
    padding-right: 0;
    margin-left: -1rem;
    margin-top: -4.5rem;
    box-sizing: border-box;
  }

  .pkv-row,
  .versicherungen-row,
  .kapitalanlagen-row,
  .altersvorsorge-row,
  .immobilien-row,
  .finanzierungen-row {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding-right: 0;
  }

  .pkv-widget,
  .versicherungen-widget,
  .kapitalanlagen-widget,
  .altersvorsorge-widget,
  .immobilien-widget,
  .finanzierungen-widget {
    justify-self: stretch;
    width: 100%;
    margin: 0;
    padding-left: 0;
    padding-right: 0;
  }

  .pkv-widget .calendly-inline-widget,
  .versicherungen-widget .calendly-inline-widget,
  .kapitalanlagen-widget .calendly-inline-widget,
  .altersvorsorge-widget .calendly-inline-widget,
  .immobilien-widget .calendly-inline-widget,
  .finanzierungen-widget .calendly-inline-widget {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
    margin-bottom: 0;
    transform: none;
    box-sizing: border-box;
  }
}

.pkv-inner {
  width: 100%;
  padding-left: max(1.5rem, calc((100vw - 960px) / 2));
  padding-right: 0;
  box-sizing: border-box;
}

.pkv-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
  gap: 2rem;
  align-items: start;
  width: 100%;
  padding-right: 1.5rem;
}

.pkv-text {
  max-width: 960px;
}

.pkv-widget {
  justify-self: end;
  background: #ffffff;
  border-radius: 4px;
  border: 1px solid rgba(11, 49, 100, 0.16);
  box-shadow: 0 24px 48px rgba(11, 49, 100, 0.12);
  padding-top: 0rem;
  padding-bottom: 10rem;
}

.pkv-widget .calendly-inline-widget {
  width: 100%;
  min-height: 700px;
  height: 1000px !important;
  margin-top: 0;
  margin-bottom: -22rem;
  transform: translateY(-4.65rem);
}

.versicherungen-inner {
  width: 100%;
  padding-left: max(1.5rem, calc((100vw - 960px) / 2));
  padding-right: 0;
  box-sizing: border-box;
}

.kapitalanlagen-inner {
  width: 100%;
  padding-left: max(1.5rem, calc((100vw - 960px) / 2));
  padding-right: 0;
  box-sizing: border-box;
}

.versicherungen-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
  gap: 2rem;
  align-items: start;
  width: 100%;
  padding-right: 1.5rem;
}

.kapitalanlagen-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
  gap: 2rem;
  align-items: start;
  width: 100%;
  padding-right: 1.5rem;
}

.versicherungen-text {
  max-width: 960px;
}

.kapitalanlagen-text {
  max-width: 960px;
}

.versicherungen-widget {
  justify-self: end;
  background: #ffffff;
  border-radius: 4px;
  border: 1px solid rgba(11, 49, 100, 0.16);
  box-shadow: 0 24px 48px rgba(160, 170, 232, 0.507);
  overflow: visible;
  padding-top: 0;
  padding-bottom: 9rem;
}

.kapitalanlagen-widget {
  justify-self: end;
  background: #ffffff;
  border-radius: 4px;
  border: 1px solid rgba(11, 49, 100, 0.16);
  box-shadow: 0 24px 48px rgba(11, 49, 100, 0.12);
  padding-top: 0rem;
  padding-bottom: 10rem;
}

.versicherungen-widget .calendly-inline-widget {
  width: 100%;
  min-height: 700px;
  height: 1000px !important;
  margin-top: 0;
  margin-bottom: -22rem;
  transform: translateY(-4.73rem);
}

.kapitalanlagen-widget .calendly-inline-widget {
  width: 100%;
  min-height: 700px;
  height: 1000px !important;
  margin-top: 0;
  margin-bottom: -21rem;
  transform: translateY(-4.65rem);
}

.altersvorsorge-inner,
.immobilien-inner,
.finanzierungen-inner {
  width: 100%;
  padding-left: max(1.5rem, calc((100vw - 960px) / 2));
  padding-right: 0;
  box-sizing: border-box;
}

.altersvorsorge-row,
.immobilien-row,
.finanzierungen-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
  gap: 2rem;
  align-items: start;
  width: 100%;
  padding-right: 1.5rem;
}

.altersvorsorge-text,
.immobilien-text,
.finanzierungen-text {
  max-width: 960px;
    min-width: 0;
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto;
  }

  .altersvorsorge-widget,
  .immobilien-widget,
  .finanzierungen-widget {
    justify-self: end;
    min-width: 0;
  padding-top: 0rem;
  padding-bottom: 10rem;
}

.altersvorsorge-widget .calendly-inline-widget,
.immobilien-widget .calendly-inline-widget,
.finanzierungen-widget .calendly-inline-widget {
  width: 100%;
  min-height: 700px;
  height: 1000px !important;
  margin-top: 0;
  margin-bottom: -22rem;
  transform: translateY(-4.65rem);
}


@media (max-width: 1100px) {
  #altersvorsorge,
  #immobilien,
  #finanzierungen,
  #pkv,
  #versicherungen,
  #kapitalanlagen {
    margin-left: -1.5rem;
    margin-right: -1.5rem;
    width: calc(100% + 3rem);
  }

  .altersvorsorge-row,
  .immobilien-row,
  .finanzierungen-row,
  .pkv-row,
  .versicherungen-row,
  .kapitalanlagen-row {
    grid-template-columns: 1fr;
  }

  .altersvorsorge-widget,
  .immobilien-widget,
  .finanzierungen-widget,
  .pkv-widget,
  .versicherungen-widget,
  .kapitalanlagen-widget {
    justify-self: stretch;
  }
}

@media (max-width: 768px) {
  #altersvorsorge,
  #immobilien,
  #finanzierungen,
  #pkv,
  #versicherungen,
  #kapitalanlagen {
    position: static;
    left: auto;
    right: auto;
    margin-left: 0;
    margin-right: 0;
    width: auto;
  }
}

.contact-title {
  max-width: 1200px;
  margin: -10rem auto 0;
  padding: 0 1.5rem;
  color: #0b3164;
  font-family: 'Lora', serif;
  font-size: 2.5rem;
}

.contact-image-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Fahrplan modal styles */
.pdf-modal{
  position:fixed;
  inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  background:rgba(0, 0, 0, 0.6);
  z-index:2200;
  padding:1rem;
}
.pdf-modal.open{display:flex}
.pdf-modal-content{
  width:min(1100px,98%);
  max-height:90vh;
  background:#3c3c3c;
  border-radius:12px;
  overflow:hidden;
  position:relative;
  box-shadow:0 30px 60px rgba(0,0,0,0.45);
}
.pdf-modal-close{
  position:absolute;
  right:12px;
  top:8px;
  background:rgba(191, 190, 190, 0.9);
  border:none;
  color:#3c3c3c;
  font-size:20px;
  line-height:1;
  cursor:pointer;
  width:36px;
  height:36px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:6;
}
.pdf-modal-close:hover{background:rgb(100, 106, 113)}

/* reserve header space so iframe controls aren't overlapped */
.pdf-modal-body{height:calc(90vh - 32px);padding-top:44px;box-sizing:border-box}
.pdf-modal-iframe{width:100%;height:calc(100% - 44px);border:0;display:block}
.pdf-modal-img{width:100%;height:calc(100% - 44px);object-fit:contain;display:none}

/* Fahrplan link color */
#fahrplan-link {
  color: #ffffff;
  text-decoration: underline;
}
#fahrplan-link:hover {
  color: #e6f0ff;
}

.contact-image {
  width: 100%;
  height: 800px;
  border-radius: 5px;
  object-fit: cover;
}

.contact-form-section {
  background: transparent;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
  transform: translateY(-50px);
}

/* Minimal sizing for embedded content */
.youtube-embed,
.calendly-embed,
.calendly-placeholder,
.calendly-inline-widget {
  min-height: 450px;
}

/* Video container - responsive on mobile only */
.video-container {
  margin-bottom: 1.5rem;
}

.video-container iframe {
  border: none;
  display: block;
}

@media (max-width: 768px) {
  .video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    margin-bottom: 1.25rem;
  }

  .video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
  }
}

.form-heading {
  margin: 0 0 1.5rem 0;
  color: #0b3164;
  font-family: 'Lora', serif;
  font-size: 1.5rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 0.85rem 1rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
  line-height: 1.6;
  background: #fff;
  font-family: 'Geist', sans-serif;
  color: #333;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: #999;
}

.contact-form textarea {
  resize: vertical;
  min-height: 8rem;
  padding: 0.85rem 1rem;
}


.contact-form .conditional-fields {
  display: contents;
}

.contact-form .conditional-fields.hidden {
  display: none;
}

.contact-form input:hover,
.contact-form textarea:hover {
  border-bottom-color: #0b3164;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-bottom-color: #0b3164;
}

.privacy-checkbox {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #333;
  cursor: pointer;
  margin: 0.5rem 0;
}

.privacy-checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 0.2rem;
  cursor: pointer;
  flex-shrink: 0;
}

.privacy-checkbox span {
  display: block;
}

.privacy-checkbox a {
  color: #0b3164;
  text-decoration: none;
  font-weight: 500;
}

.privacy-checkbox a:hover {
  text-decoration: underline;
}

.contact-button {
  width: fit-content;
  padding: 0.85rem 2rem;
  border: none;
  border-radius: 8px;
  background: #0b3164;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.2s ease;
  margin-top: 0.5rem;
}

.contact-button:hover {
  background: #093151;
}

.contact-button:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.contact-button:disabled:hover {
  background: #ccc;
}

/* Contact form dropdown styling */
.contact-form .contact-dropdown {
  position: relative;
  width: 100%;
  margin: 0;
  padding: 0;
}

.contact-form .contact-dropdown input[type="hidden"] {
  display: none;
  margin: 0;
  padding: 0;
}

.contact-form .dropdown-trigger {
  display: block;
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
  line-height: 1.6;
  background: #fff;
  font-family: 'Geist', sans-serif;
  color: #333;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
  text-align: left;
  user-select: none;
  margin-top: -4.75rem;
  margin-bottom: -9.5rem;
  padding-right: 2.5rem;
}

.contact-form .dropdown-trigger::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 1rem;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid #0b3164;
  pointer-events: none;
}

..contact-form .dropdown-trigger:hover {
  border-bottom-color: #0b3164;
}

.contact-form .contact-dropdown:focus-within .dropdown-trigger {
  border-bottom-color: #0b3164;
}

.contact-form .dropdown-trigger,
.contact-form input,
.contact-form textarea {
  position: relative;
}

.contact-form input,
.contact-form textarea {
  z-index: 2;
}

.contact-form .dropdown-trigger {
  z-index: 1;
}

.contact-form .dropdown-menu{
  display: none;
  position: absolute;
  top: 110%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 50; 
  max-height: 170px;
}


.contact-form .contact-dropdown:focus-within .dropdown-menu,
.contact-form .dropdown-menu.active {
  display: block;
}

.contact-form .dropdown-menu div {
  padding-left: 0.75rem;
  padding-right: 1rem;
  padding-top: -5rem;  
  padding-bottom: -10rem;
  cursor: pointer;
  color: #333;
  transition: background-color 0.15s ease;
  font-family: 'Geist', sans-serif;
  font-size: 1rem;
  line-height: 3rem;
  white-space: nowrap;
  margin-top: -2.5rem;
  margin-bottom: -2rem;
  transform: translateY(-50%);
}


.contact-form .dropdown-menu div:hover {
  background-color: #f5f7fb;
}

.image-overlay {
  position: relative;
  display: block;
  max-width: 100%;
  overflow: hidden;
}

.image-overlay::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 20%;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(11, 49, 100, 1) 100%);
  z-index: 1;
}

.image-overlay img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: 100% center;
}

.hero-text {
  position: absolute;
  left: 5%;
  top: 20%;
  transform: translateY(-50%);
  color: rgb(255, 255, 255);
  z-index: 3;
}

.hero-text h1 {
  font-size: 3rem;
  margin: 0 0 1rem 0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
  font-family: 'Lora', serif;
  max-width: 650px;
}

.hero-text p {
  font-size: 1.5rem;
  line-height: 1.6;
  margin: 0 0 0.5rem 0;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
  max-width: 500px;
}

@media (max-width: 768px) {
  .hero-text {
    left: 5%;
    top: 25%;
    transform: translateY(-50%);
  }

  .hero-text h1 {
    font-size: 1rem;
    max-width: 260px;
  }

  .hero-text p {
    font-size: 0.65rem;
    max-width: 200px;
  }

  .image-overlay img {
  display: block;
  width: 140%;
  height: auto;
  transform: translateX(-20px);
  object-position: left center;

}

}

.overlay-text {
  position: absolute;
  top: 20px;
  left: 20px;
  color: white;
  font-size: 2rem;
  background: rgba(0, 0, 0, 0.4);
  padding: 0.5rem 1rem;
  margin: 0;
}

.link-button a {
  text-decoration: none;
  color: inherit;
}

.partner-carousel {
  position: relative;
  overflow: hidden;
  margin: 2rem 0;
  border-radius: 16px;
  background: #f7f9fb;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.carousel-track {
  display: flex;
  gap: 1rem;
  transition: transform 0.5s ease;
  padding: 1rem;
  align-items: flex-start;
}

.carousel-slide {
  display: flex;
  flex-direction: column;
  width: 260px;
  flex: 0 0 260px;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  text-decoration: none;
  outline: none;
  
}

.carousel-slide img {
  display: block;
  width: 100%;
  height: 180px;
  object-fit: contain;
  background: #fff;
}

.carousel-slide:focus,
.carousel-slide:focus-visible {
  outline: none;
  box-shadow: none;
}

.carousel-caption {
  padding: 0.75rem 0.5rem 1rem;
  text-align: left;
  font-weight: 700;
  color: #0b3164;
  background: #fff;
}

.footer-links {
  display: inline-flex;
  width: 100%;
  gap: -1rem;
  flex-wrap: wrap;
  justify-content: flex-start;
  margin: 0rem 0rem 1rem;
  border-top: 1px solid #ddd;
  box-shadow: 0 2px 6px rgba(167, 71, 71, 0.08);
}


.footer-links a {
  color: #0b3164;
  text-decoration: none;
  font-weight: 600;
  margin: 0rem 1rem 0rem;
  font-size: 1rem;
}

.footer-links a:hover {
  text-decoration: underline;
}

/* Custom section classes */
.section1 {
  position: relative;
  color: white;
}

.section1::before {
  content: '';
  position: absolute;
  top: -1rem;
  left: 50%;
  right: 50%;
  bottom: 0;
  background-color: #0b3164;
  transform: translateX(-50%);
  width: 100vw;
  z-index: -1;
}

.section1 h1 {
  color: white;
}

.section1 h2 {
  color: white;
  font-size: 2.125rem;
}

.section2 {
  position: relative;
  color: #0b3164;
}

.section2::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  right: 50%;
  bottom: 0;
  background-color: rgb(255, 255, 255);
  background: linear-gradient(to bottom, rgb(255, 255, 255) 0%, rgb(255, 255, 255) 5%);
  transform: translateX(-50%);
  width: 100vw;
  z-index: -1;
}

.section2 h1 {
  color: #0b3164;
}

.section2 h2 {
  color: #0b3164;
  font-size: 2.125rem;
  }

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.review-card {
  background: #ffffff;
  border: 1px solid #ddd;
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 240px;
}

.review-card.hidden-row {
  display: none;
}

.review-card-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
}

.review-card-header strong {
  font-size: 1rem;
  color: #0b3164;
}

.review-card-header img {
  display: block;
  width: 100px;
  height: auto;
  margin-top: 0.25rem;
}

.review-text {
  margin: 0;
  color: #333;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
  overflow: hidden;
}

.review-text.expanded {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
}

.read-more-review {
  align-self: flex-start;
  padding: 0.75rem 1.25rem;
  border: none;
  border-radius: 8px;
  background: #0b3164;
  color: #fff;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
  transform: translateX(0px);
}

.read-more-review:hover {
  background: #093151;
  transform: translateX(1px);
}

.load-more-reviews {
 align-self: flex-start;
  padding: 0.75rem 1.25rem;
  border: none;
  border-radius: 8px;
  background: #0b3164;
  color: #fff;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
  transform: translateX(24px);
}

.load-more-reviews:hover {
  background: #093151;
  transform: translateX(25px);
}

@media (max-width: 992px) {
  .reviews-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .reviews-grid {
    grid-template-columns: 1fr;
  }
}

/* Fade-in from bottom to top animation */
@keyframes fadeInFromBottom {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Initial state - elements start hidden */
.fade-in-element {
  opacity: 0;
  transform: translateY(0);
}

/* Animation applied when element enters viewport */
.fade-in-element.fade-in-on-scroll {
  animation: fadeInFromBottom 0.8s ease-out forwards;
}

/* Disable fade hidden state for no-fade sections */
.section1.no-fade .fade-in-element,
.section1.no-fade .fade-in-on-scroll,
.section1.no-fade .fade-in-element.fade-in-on-scroll {
  opacity: 1 !important;
  animation: none !important;
  transform: none !important;
}

/* Address Section Styling */
.address-section-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
  max-width: 1200px;
  margin: -7rem auto 3rem;
  padding: 0 1.5rem;
}

@media (max-width: 768px) {
  .address-section-wrapper {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.address-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem 3rem;
}

@media (max-width: 768px) {
  .address-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 2rem;
  }
}

.address-item {
  display: flex;
  flex-direction: column;
}

.address-item h3 {
  margin: 0 0 0.75rem 0;
  color: #0b3164;
  font-size: 1.1rem;
  font-weight: 600;
  font-family: 'Lora', serif;
}

.address-item p,
.address-item a {
  margin: 0;
  color: #333;
  font-size: 1rem;
  line-height: 1.6;
  text-decoration: none;
}

.address-item a {
  color: #0b3164;
}

.address-item a:hover {
  text-decoration: underline;
}

.address-image-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
}

.address-image-wrapper img {
  transform: translateY(50px) translateX(50px);
  width: 140%;
  height: auto;
  border-radius: 5px;
}

.google-bewertungen {
  display: block;
  margin: -1rem 1rem auto;
}

.review-card.fade-in {
  animation: fadeInUp 0.35s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#datenschutz-links {
  color: #ffffff;
  text-decoration: underline;
}
#datenschutz-links:hover {
  color: #e6f0ff;
}

/* Consolidated mobile font-size overrides (generated) */
@media (max-width: 768px) {
  /* Base text */
  body { font-size: 1rem; }

  /* Header */
  .header-subtext { font-size: 0.9rem; }
  .header-contact-button { font-size: 0.8rem; }

  /* Page headings */
  .page-content h1, .preserve-whitespace h1 { font-size: 1.4rem; }
  .page-content h2, .preserve-whitespace h2 { font-size: 1rem; }
  .contact-title { font-size: 1.4rem; }

  /* Hero */
  .hero-text h1 { font-size: 1.1rem; }
  .hero-text p { font-size: 0.7rem; }

  /* Overlays and small UI text */
  .overlay-text { font-size: 1.25rem; }
  .footer-links a { font-size: 0.95rem; }

  /* Forms and buttons */
  .form-heading { font-size: 1.2rem; }
  .contact-form input,
  .contact-form textarea,
  .contact-form .dropdown-trigger,
  .contact-form .dropdown-menu div { font-size: 0.95rem; }
  .privacy-checkbox { font-size: 0.9rem; }
  .contact-button { font-size: 0.95rem; }

  /* Cards, actions */
  .review-card-header strong,
  .read-more-review,
  .load-more-reviews { font-size: 0.95rem; }

  /* Section headings */
  .section1 h2,
  .section2 h2 { font-size: 1rem; }

  /* Small UI controls */
  .pdf-modal-close { font-size: 16px; }


 /* images */
  .google-bewertungen {
  display: block;
  margin: -1rem 1rem -3rem;
}

/* Carousel */
.partner-carousel {
  position: relative;
  overflow: hidden;
  margin: 2rem 0;
  border-radius: 16px;
  background: #f7f9fb;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.carousel-track {
  display: flex;
  gap: 1rem;
  transition: transform 0.5s ease;
  padding: 1rem;
  align-items: flex-start;
}

.carousel-slide {
  display: flex;
  flex-direction: column;
  width: 200px;
  flex: 0 0 200px;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  text-decoration: none;
  outline: none;
  
}

.carousel-slide img {
  display: block;
  width: 100%;
  height: 120px;
  object-fit: contain;
  background: #fff;
}

/* Popular small-phone breakpoints for common device widths */
@media (max-width: 425px) {
  body { font-size: 0.95rem; }
  .header-subtext { font-size: 0.88rem; }
  .header-contact-button { font-size: 0.75rem; }
  .page-content h1, .preserve-whitespace h1 { font-size: 1.3rem; }
  .page-content h2, .preserve-whitespace h2 { font-size: 0.95rem; }
  .contact-title { font-size: 1.3rem; }
  .hero-text h1 { font-size: 0.95rem; }
  .hero-text p { font-size: 0.65rem; }
  .overlay-text { font-size: 1.15rem; }
  .footer-links a { font-size: 0.9rem; }
  .form-heading { font-size: 1.1rem; }
  .contact-button { font-size: 0.9rem; }
  .site-header {
    justify-content: flex-start;
    align-items: center;
    padding: 0.9rem 0.9rem 0.7rem;
    gap: 0.4rem;
    padding-right: 0.2rem;
    padding-left: 0.1rem;
    width: 100vw;
    box-sizing: border-box;
    left: 0;
    right: 0;
  }
  .site-logo {
    flex: 0 0 auto;
    width: auto;
    order: 1;
    height: 38px;
    display: flex;
    align-items: center;
    padding-right: 2rem;
    padding-left: 0.4rem;
    margin-right: 0;
  }
  .site-logo img {
    height: 38px;
  }
  .header-contact {
    flex: 0 0 auto;
    width: auto;
    margin: 0;
    align-items: center;
    gap: 0.5rem;
    order: 2;
    margin-right: 0;
    margin-left: 0;
    padding-right: 0 !important;
  }
  .header-contact .contact-link img {
    width: 32px;
    height: 32px;
  }
  .header-contact-button {
    width: auto;
    margin-top: 0;
    padding: 0 0.5rem;
    font-size: 0.75rem;
    height: 31px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .header-contact-button a {
    display: inline-block;
  }
  .contact-link {
    transform: none;
    margin: 0;
    padding: 0;
  }
  .header-subtext {
    flex: 1 1 100%;
    width: 100%;
    order: 3;
    margin-left: 0;
    gap: 1.6rem;
    align-items: center;
    justify-content: flex-start;
    margin-top: 0.3rem;
    font-size: 0.85rem;
    padding-top: 0.2rem;
    padding-left: 0.4rem;
  }
  .header-subtext span {
    min-width: 0;
  }
  .site-header > * {
    box-sizing: border-box;
    margin: 0;
  }
  .site-header .header-contact {
    margin-inline-start: 0;
    margin-inline-end: 0;
  }
  .contact-section-wrapper {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  #altersvorsorge,
  #immobilien,
  #finanzierungen,
  #pkv,
  #versicherungen,
  #kapitalanlagen {
    position: static;
    left: auto;
    right: auto;
    margin-left: 0;
    margin-right: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 1rem 1rem 1.5rem;
    gap: 1.2rem;
    margin: 0 auto;
  }
  .hero-text {
    left: 5%;
    top: 25%;
    transform: translateY(-50%);
  }
  .hero-text h1 {
    font-size: 0.95rem;
    max-width: 240px;
  }
  .hero-text p {
    font-size: 0.62rem;
    max-width: 180px;
  }
  .image-overlay img {
    display: block;
    width: 150%;
    height: auto;
    transform: translateX(-18px);
    object-position: left center;
  }
  .address-section-wrapper {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .address-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem 1.5rem;
  }

  .contact-form .dropdown-trigger {
    display: block;
    width: 100%;
    padding: 0.6rem 1rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    line-height: 2.05;
    background: #fff;
    font-family: 'Geist', sans-serif;
    color: #333;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
    text-align: left;
    user-select: none;
    margin-top: -3.7rem;
    margin-bottom: -6.7rem;
    padding-right: 2.5rem;
  }

  .contact-form .dropdown-trigger::after {
    content: '';
    position: absolute;
    top: center;
    right: 1rem;
    transform: translateY(-19%);
    width: 0;
    height: 0;
    line-height: 1rem;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid #0b3164;
    pointer-events: none;
  }
}

@media (max-width: 414px) {
  body { font-size: 0.92rem; }
  .header-subtext { font-size: 0.86rem; }
  .page-content h1, .preserve-whitespace h1 { font-size: 1.2rem; }
  .page-content h2, .preserve-whitespace h2 { font-size: 0.9rem; }
  .contact-title { font-size: 1.25rem; }
  .hero-text h1 { font-size: 0.9rem; }
  .hero-text p { font-size: 0.62rem; }
  .overlay-text { font-size: 1.1rem; }
  .site-header {
    justify-content: flex-start;
    align-items: center;
    padding: 0.85rem 0.9rem 0.65rem;
    gap: 0.35rem;
    padding-right: 0.15rem;
    padding-left: 0.1rem;
    width: 100vw;
    box-sizing: border-box;
    left: 0;
    right: 0;
  }
  .site-logo {
    flex: 0 0 auto;
    width: auto;
    order: 1;
    height: 36px;
    display: flex;
    align-items: center;
    padding-right: 1.8rem;
    padding-left: 0.35rem;
    margin-right: 0;
  }
  .site-logo img {
    height: 36px;
  }
  .header-contact {
    flex: 0 0 auto;
    width: auto;
    margin: 0;
    align-items: center;
    gap: 0.48rem;
    order: 2;
    margin-right: 0;
    margin-left: 0;
    padding-right: 0 !important;
  }
  .header-contact .contact-link img {
    width: 31px;
    height: 31px;
  }
  .header-contact-button {
    width: auto;
    margin-top: 0;
    padding: 0 0.45rem;
    font-size: 0.72rem;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .header-contact-button a {
    display: inline-block;
  }
  .contact-link {
    transform: none;
    margin: 0;
    padding: 0;
  }
  .header-subtext {
    flex: 1 1 100%;
    width: 100%;
    order: 3;
    margin-left: 0;
    gap: 1.5rem;
    align-items: center;
    justify-content: flex-start;
    margin-top: 0.28rem;
    font-size: 0.84rem;
    padding-top: 0.18rem;
    padding-left: 0.35rem;
  }
  .header-subtext span {
    min-width: 0;
  }
  .site-header > * {
    box-sizing: border-box;
    margin: 0;
  }
  .site-header .header-contact {
    margin-inline-start: 0;
    margin-inline-end: 0;
  }
  .contact-section-wrapper {
    grid-template-columns: 1fr;
    gap: 1.4rem;
  }
  #altersvorsorge,
  #immobilien,
  #finanzierungen,
  #pkv,
  #versicherungen,
  #kapitalanlagen {
    position: static;
    left: auto;
    right: auto;
    margin-left: 0;
    margin-right: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 1rem 0.95rem 1.3rem;
    gap: 1.1rem;
    margin: 0 auto;
  }
  .hero-text {
    left: 5%;
    top: 24%;
    transform: translateY(-50%);
  }
  .hero-text h1 {
    font-size: 0.9rem;
    max-width: 228px;
  }
  .hero-text p {
    font-size: 0.6rem;
    max-width: 170px;
  }
  .image-overlay img {
    display: block;
    width: 147%;
    height: auto;
    transform: translateX(-17px);
    object-position: left center;
  }
  .address-section-wrapper {
    grid-template-columns: 1fr;
    gap: 1.4rem;
  }
  .address-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem 1.4rem;
  }
}

@media (max-width: 390px) {
  body { font-size: 0.9rem; }
  .header-subtext { font-size: 0.84rem; }
  .page-content h1, .preserve-whitespace h1 { font-size: 1.1rem; }
  .page-content h2, .preserve-whitespace h2 { font-size: 0.85rem; }
  .contact-title { font-size: 1.2rem; }
  .hero-text h1 { font-size: 0.85rem; }
  .hero-text p { font-size: 0.58rem; }
  .overlay-text { font-size: 1rem; }
  .site-header {
    justify-content: flex-start;
    align-items: center;
    padding: 0.85rem 0.85rem 0.6rem;
    gap: 0.33rem;
    padding-right: 0.12rem;
    padding-left: 0.1rem;
    width: 100vw;
    box-sizing: border-box;
    left: 0;
    right: 0;
  }
  .site-logo {
    flex: 0 0 auto;
    width: auto;
    order: 1;
    height: 34px;
    display: flex;
    align-items: center;
    padding-right: 1.6rem;
    padding-left: 0.3rem;
    margin-right: 0;
  }
  .site-logo img {
    height: 34px;
  }
  .header-contact {
    flex: 0 0 auto;
    width: auto;
    margin: 0;
    align-items: center;
    gap: 0.44rem;
    order: 2;
    margin-right: 0;
    margin-left: 0;
    padding-right: 0 !important;
  }
  .header-contact .contact-link img {
    width: 30px;
    height: 30px;
  }
  .header-contact-button {
    width: auto;
    margin-top: 0;
    padding: 0 0.4rem;
    font-size: 0.72rem;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .header-contact-button a {
    display: inline-block;
  }
  .contact-link {
    transform: none;
    margin: 0;
    padding: 0;
  }
  .header-subtext {
    flex: 1 1 100%;
    width: 100%;
    order: 3;
    margin-left: 0;
    gap: 1.3rem;
    align-items: center;
    justify-content: flex-start;
    margin-top: 0.26rem;
    font-size: 0.82rem;
    padding-top: 0.16rem;
    padding-left: 0.3rem;
  }
  .header-subtext span {
    min-width: 0;
  }
  .site-header > * {
    box-sizing: border-box;
    margin: 0;
  }
  .site-header .header-contact {
    margin-inline-start: 0;
    margin-inline-end: 0;
  }
  .contact-section-wrapper {
    grid-template-columns: 1fr;
    gap: 1.3rem;
  }
  #altersvorsorge,
  #immobilien,
  #finanzierungen,
  #pkv,
  #versicherungen,
  #kapitalanlagen {
    position: static;
    left: auto;
    right: auto;
    margin-left: 0;
    margin-right: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 1rem 0.9rem 1.2rem;
    gap: 1rem;
    margin: 0 auto;
  }
  .hero-text {
    left: 5%;
    top: 23%;
    transform: translateY(-50%);
  }
  .hero-text h1 {
    font-size: 0.85rem;
    max-width: 220px;
  }
  .hero-text p {
    font-size: 0.58rem;
    max-width: 160px;
  }
  .image-overlay img {
    display: block;
    width: 145%;
    height: auto;
    transform: translateX(-16px);
    object-position: left center;
  }
  .address-section-wrapper {
    grid-template-columns: 1fr;
    gap: 1.3rem;
  }
  .address-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem 1.3rem;
  }
}

@media (max-width: 375px) {
  body { font-size: 0.88rem; }
  .header-subtext { font-size: 0.82rem; }
  .page-content h1, .preserve-whitespace h1 { font-size: 1rem; }
  .page-content h2, .preserve-whitespace h2 { font-size: 0.8rem; }
  .contact-title { font-size: 1.1rem; }
  .hero-text h1 { font-size: 0.8rem; }
  .hero-text p { font-size: 0.55rem; }
  .site-header {
    justify-content: flex-start;
    align-items: center;
    padding: 0.8rem 0.8rem 0.6rem;
    gap: 0.3rem;
    padding-right: 0.1rem;
    padding-left: 0.08rem;
    width: 100vw;
    box-sizing: border-box;
    left: 0;
    right: 0;
  }
  .site-logo {
    flex: 0 0 auto;
    width: auto;
    order: 1;
    height: 32px;
    display: flex;
    align-items: center;
    padding-right: 1.4rem;
    padding-left: 0.28rem;
    margin-right: 0;
  }
  .site-logo img {
    height: 32px;
  }
  .header-contact {
    flex: 0 0 auto;
    width: auto;
    margin: 0;
    align-items: center;
    gap: 0.4rem;
    order: 2;
    margin-right: 0;
    margin-left: 0;
    padding-right: 0 !important;
  }
  .header-contact .contact-link img {
    width: 28px;
    height: 28px;
  }
  .header-contact-button {
    width: auto;
    margin-top: 0;
    padding: 0 0.35rem;
    font-size: 0.7rem;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .header-contact-button a {
    display: inline-block;
  }
  .contact-link {
    transform: none;
    margin: 0;
    padding: 0;
  }
  .header-subtext {
    flex: 1 1 100%;
    width: 100%;
    order: 3;
    margin-left: 0;
    gap: 1.2rem;
    align-items: center;
    justify-content: flex-start;
    margin-top: 0.24rem;
    font-size: 0.8rem;
    padding-top: 0.14rem;
    padding-left: 0.28rem;
  }
  .header-subtext span {
    min-width: 0;
  }
  .site-header > * {
    box-sizing: border-box;
    margin: 0;
  }
  .site-header .header-contact {
    margin-inline-start: 0;
    margin-inline-end: 0;
  }
  .contact-section-wrapper {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }
  #altersvorsorge,
  #immobilien,
  #finanzierungen,
  #pkv,
  #versicherungen,
  #kapitalanlagen {
    position: static;
    left: auto;
    right: auto;
    margin-left: 0;
    margin-right: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 1rem 0.85rem 1.1rem;
    gap: 0.95rem;
    margin: 0 auto;
  }
  .hero-text {
    left: 5%;
    top: 23%;
    transform: translateY(-50%);
  }
  .hero-text h1 {
    font-size: 0.8rem;
    max-width: 210px;
  }
  .hero-text p {
    font-size: 0.55rem;
    max-width: 150px;
  }
  .image-overlay img {
    display: block;
    width: 143%;
    height: auto;
    transform: translateX(-15px);
    object-position: left center;
  }
  .address-section-wrapper {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }
  .address-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem 1.2rem;
  }

  .contact-form .dropdown-trigger {
    display: block;
    width: 100%;
    padding: 0.6rem 1rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    line-height: 2.0;
    background: #fff;
    font-family: 'Geist', sans-serif;
    color: #333;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
    text-align: left;
    user-select: none;
    margin-top: -3.3rem;
    margin-bottom: -6.3rem;
    padding-right: 2.5rem;
  }

  .contact-form .dropdown-trigger::after {
    content: '';
    position: absolute;
    top: center;
    right: 1rem;
    transform: translateY(-20%);
    width: 0;
    height: 0;
    line-height: 1rem;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid #0b3164;
    pointer-events: none;
  }
}

@media (max-width: 360px) {
  body { font-size: 0.85rem; }
  .header-subtext { font-size: 0.8rem; }
  .page-content h1, .preserve-whitespace h1 { font-size: 0.95rem; }
  .page-content h2, .preserve-whitespace h2 { font-size: 0.75rem; }
  .contact-title { font-size: 1.05rem; }
  .hero-text h1 { font-size: 0.75rem; }
  .hero-text p { font-size: 0.5rem; }
  .site-header {
    justify-content: flex-start;
    align-items: center;
    padding: 0.75rem 0.75rem 0.6rem;
    gap: 0.25rem;
    padding-right: 0.08rem;
    padding-left: 0.06rem;
    width: 100vw;
    box-sizing: border-box;
    left: 0;
    right: 0;
  }
  .site-logo {
    flex: 0 0 auto;
    width: auto;
    order: 1;
    height: 30px;
    display: flex;
    align-items: center;
    padding-right: 1.2rem;
    padding-left: 0.25rem;
    margin-right: 0;
  }
  .site-logo img {
    height: 30px;
  }
  .header-contact {
    flex: 0 0 auto;
    width: auto;
    margin: 0;
    align-items: center;
    gap: 0.38rem;
    order: 2;
    margin-right: 0;
    margin-left: 0;
    padding-right: 0 !important;
  }
  .header-contact .contact-link img {
    width: 26px;
    height: 26px;
  }
  .header-contact-button {
    width: auto;
    margin-top: 0;
    padding: 0 0.3rem;
    font-size: 0.68rem;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .header-contact-button a {
    display: inline-block;
  }
  .contact-link {
    transform: none;
    margin: 0;
    padding: 0;
  }
  .header-subtext {
    flex: 1 1 100%;
    width: 100%;
    order: 3;
    margin-left: 0;
    gap: 1.1rem;
    align-items: center;
    justify-content: flex-start;
    margin-top: 0.22rem;
    font-size: 0.78rem;
    padding-top: 0.12rem;
    padding-left: 0.24rem;
  }
  .header-subtext span {
    min-width: 0;
  }
  .site-header > * {
    box-sizing: border-box;
    margin: 0;
  }
  .site-header .header-contact {
    margin-inline-start: 0;
    margin-inline-end: 0;
  }
  .contact-section-wrapper {
    grid-template-columns: 1fr;
    gap: 1.1rem;
  }
  #altersvorsorge,
  #immobilien,
  #finanzierungen,
  #pkv,
  #versicherungen,
  #kapitalanlagen {
    position: static;
    left: auto;
    right: auto;
    margin-left: 0;
    margin-right: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 1rem 0.8rem 1rem;
    gap: 0.85rem;
    margin: 0 auto;
  }
  .hero-text {
    left: 5%;
    top: 22%;
    transform: translateX(-50%);
  }
  .hero-text h1 {
    font-size: 0.75rem;
    max-width: 140px;
  }
  .hero-text p {
    font-size: 0.5rem;
    max-width: 140px;
  }
  .image-overlay img {
    display: block;
    width: 140%;
    height: auto;
    transform: translateX(-14px);
    object-position: left center;
  }
  .address-section-wrapper {
    grid-template-columns: 1fr;
    gap: 1.1rem;
  }
  .address-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem 1rem;
  }

  .contact-form .dropdown-trigger {
    display: block;
    width: 100%;
    padding: 0.6rem 1rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    line-height: 1.98;
    background: #fff;
    font-family: 'Geist', sans-serif;
    color: #333;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
    text-align: left;
    user-select: none;
    margin-top: -3rem;
    margin-bottom: -6rem;
    padding-right: 2.5rem;
  }

  .contact-form .dropdown-trigger::after {
    content: '';
    position: absolute;
    top: center;
    right: 1rem;
    transform: translateY(-20%);
    width: 0;
    height: 0;
    line-height: 1rem;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid #0b3164;
    pointer-events: none;
  }

  .pkv-widget .calendly-inline-widget {
    transform: translateX(-3rem) translateY(-4rem);
}

.versicherungen-widget .calendly-inline-widget {
 transform: translateX(-3rem) translateY(-3.5rem);
}

.kapitalanlagen-widget .calendly-inline-widget {
 transform: translateX(-3rem) translateY(-3.5rem);
}

.altersvorsorge-widget .calendly-inline-widget,
.immobilien-widget .calendly-inline-widget,
.finanzierungen-widget .calendly-inline-widget {
transform: translateX(-3rem) translateY(-3rem);
}

/* Contact form */
.contact-form .dropdown-trigger {
  display: block;
  width: 100%;
  padding: 0.6rem 1rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
  line-height: 2;
  background: #fff;
  font-family: 'Geist', sans-serif;
  color: #333;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
  text-align: left;
  user-select: none;
  margin-top: -3rem;
  margin-bottom: -6rem;
  padding-right: 2.5rem;
}

.contact-form .dropdown-trigger::after {
  content: '';
  position: absolute;
  top: center;
  right: 1rem;
  transform: translateY(-20%);
  width: 0;
  height: 0;
  line-height: 1rem;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid #0b3164;
  pointer-events: none;
}

.contact-form .dropdown-menu div {
  padding-left: 0.75rem;
  padding-right: 1rem;
  padding-top: -1rem;  
  padding-bottom: -2rem;
  cursor: pointer;
  color: #333;
  transition: background-color 0.15s ease;
  font-family: 'Geist', sans-serif;
  font-size: 1rem;
  line-height: 4.6rem;
  white-space: nowrap;
  margin-top: -2.5rem;
  margin-bottom: -2rem;
  transform: translateY(-20%);
}

.contact-image-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: 500px;
  border-radius: 10px;
    box-shadow: 0 0 0.75rem rgba(4, 4, 4);
    overflow: hidden; /* prevent image from overflowing and overlaying other content */
  }

  .contact-image {
    max-height: 500px; /* constrain image height on small screens */
    max-width: 100%;
    object-fit: cover;
    display: block;
    border-radius: 10px;
  }

  .address-image-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
}

.address-image-wrapper img {
  transform: translateY(-3px) translateX(0px);
  width: 100%;
  height: auto;
  border-radius: 5px;
}


}
@media (max-width: 768px) {
  .contact-form .dropdown-menu div {
    padding-left: 0.75rem;
    padding-right: 1rem;
    padding-top: -1rem;
    padding-bottom: -2rem;
    cursor: pointer;
    color: #333;
    transition: background-color 0.15s ease;
    font-family: 'Geist', sans-serif;
    font-size: 1rem;
    line-height: 4rem;
    white-space: nowrap;
    margin-top: -2.5rem;
    margin-bottom: -2rem;
    transform: translateY(-30%);
  }
}

@media (max-width: 425px) {
  .contact-form .dropdown-menu div {
    padding-left: 0.75rem;
    padding-right: 1rem;
    padding-top: -1rem;
    padding-bottom: -2rem;
    cursor: pointer;
    color: #333;
    transition: background-color 0.15s ease;
    font-family: 'Geist', sans-serif;
    font-size: 1rem;
    line-height: 4.2rem;
    white-space: nowrap;
    margin-top: -2.5rem;
    margin-bottom: -2rem;
    transform: translateY(-25%);
  }
}

@media (max-width: 414px) {
  .contact-form .dropdown-menu div {
    padding-left: 0.75rem;
    padding-right: 1rem;
    padding-top: -1rem;
    padding-bottom: -2rem;
    cursor: pointer;
    color: #333;
    transition: background-color 0.15s ease;
    font-family: 'Geist', sans-serif;
    font-size: 1rem;
    line-height: 4.3rem;
    white-space: nowrap;
    margin-top: -2.5rem;
    margin-bottom: -2rem;
    transform: translateY(-23%);
  }
}

@media (max-width: 390px) {
  .contact-form .dropdown-menu div {
    padding-left: 0.75rem;
    padding-right: 1rem;
    padding-top: -1rem;
    padding-bottom: -2rem;
    cursor: pointer;
    color: #333;
    transition: background-color 0.15s ease;
    font-family: 'Geist', sans-serif;
    font-size: 1rem;
    line-height: 4.45rem;
    white-space: nowrap;
    margin-top: -2.5rem;
    margin-bottom: -2rem;
    transform: translateY(-21%);
  }
}

@media (max-width: 375px) {
  .contact-form .dropdown-menu div {
    padding-left: 0.75rem;
    padding-right: 1rem;
    padding-top: -1rem;
    padding-bottom: -2rem;
    cursor: pointer;
    color: #333;
    transition: background-color 0.15s ease;
    font-family: 'Geist', sans-serif;
    font-size: 1rem;
    line-height: 4.55rem;
    white-space: nowrap;
    margin-top: -2.5rem;
    margin-bottom: -2rem;
    transform: translateY(-20%);
  }
}