/* 3.6.116 – Mobilfooter wieder schlicht wie vor 3.6.100: keine Karten/Buttons, QR/vCard ausgeblendet. */
@media (max-width: 767px) {
  body footer#msb-site-footer.site-footer .footer-main {
    display: grid !important;
    grid-template-columns: 1fr !important;
    grid-template-areas:
      "profile"
      "contact"
      "navigation" !important;
    gap: 16px !important;
    padding: 20px 0 18px !important;
    align-items: start !important;
  }

  /* Profil mobil bewusst minimal: nur Social-Links, ohne Button-Kästen. */
  body footer#msb-site-footer.site-footer .footer-profile {
    grid-area: profile !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 0 10px !important;
    border: 0 !important;
    text-align: center !important;
  }
  body footer#msb-site-footer.site-footer .footer-profile .footer-logo-link,
  body footer#msb-site-footer.site-footer .footer-profile > p {
    display: none !important;
  }
  body footer#msb-site-footer.site-footer .footer-social {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 18px !important;
    margin: 0 !important;
  }
  body footer#msb-site-footer.site-footer .footer-social .social-icon-link {
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 2px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #edf4f7 !important;
  }
  body footer#msb-site-footer.site-footer .footer-social .social-icon-link svg {
    width: 23px !important;
    height: 23px !important;
  }

  body footer#msb-site-footer.site-footer .footer-contact {
    grid-area: contact !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
  }
  body footer#msb-site-footer.site-footer .footer-navigation {
    grid-area: navigation !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
  }
  body footer#msb-site-footer.site-footer .footer-main h2:not(.screen-reader-text) {
    margin: 0 0 8px !important;
    font-size: 1.02rem !important;
    line-height: 1.25 !important;
    text-align: center !important;
  }

  /* Kontakt wie vor den Glaskarten: reine Zeilen, keine Rahmen/Hintergründe. */
  body footer#msb-site-footer.site-footer .footer-contact .contact-list.contact-list--footer {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 0 !important;
    margin: 0 auto !important;
    padding: 0 !important;
    max-width: 360px !important;
  }
  body footer#msb-site-footer.site-footer .footer-contact .contact-list.contact-list--footer > li,
  body footer#msb-site-footer.site-footer .footer-contact .contact-list.contact-list--footer > li.ms-footer-identity-card,
  body footer#msb-site-footer.site-footer .footer-contact .contact-list.contact-list--footer > li.ms-contact-action-row {
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-columns: 20px minmax(0,1fr) !important;
    align-items: center !important;
    gap: 10px !important;
    width: 100% !important;
    min-height: 34px !important;
    margin: 0 !important;
    padding: 4px 2px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }
  body footer#msb-site-footer.site-footer .footer-contact .contact-list.contact-list--footer > li.ms-contact-action-row {
    display: block !important;
    min-height: 0 !important;
    padding: 0 !important;
  }
  body footer#msb-site-footer.site-footer .footer-contact .contact-list.contact-list--footer a.ms-contact-action {
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-columns: 20px minmax(0,1fr) !important;
    align-items: center !important;
    gap: 10px !important;
    width: 100% !important;
    min-height: 34px !important;
    margin: 0 !important;
    padding: 4px 2px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    transform: none !important;
    text-decoration: none !important;
  }
  body footer#msb-site-footer.site-footer .footer-contact .contact-icon,
  body footer#msb-site-footer.site-footer .footer-contact .ms-footer-identity-card .contact-icon {
    width: 18px !important;
    height: 18px !important;
    margin: 0 !important;
    color: #ff8739 !important;
  }
  body footer#msb-site-footer.site-footer .footer-contact .ms-footer-identity-card > span,
  body footer#msb-site-footer.site-footer .footer-contact .ms-footer-identity-card > span.contact-address,
  body footer#msb-site-footer.site-footer .footer-contact .ms-contact-action__value {
    display: block !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #dce8ee !important;
    -webkit-text-fill-color: #dce8ee !important;
    font-size: .84rem !important;
    font-weight: 400 !important;
    line-height: 1.35 !important;
    overflow-wrap: anywhere !important;
  }
  body footer#msb-site-footer.site-footer .footer-contact .ms-contact-action__copy {
    display: block !important;
    min-width: 0 !important;
  }
  body footer#msb-site-footer.site-footer .footer-contact .ms-contact-action__label,
  body footer#msb-site-footer.site-footer .footer-contact .ms-contact-action__arrow {
    display: none !important;
  }
  body footer#msb-site-footer.site-footer .footer-contact a.ms-contact-action:hover .ms-contact-action__value,
  body footer#msb-site-footer.site-footer .footer-contact a.ms-contact-action:focus-visible .ms-contact-action__value {
    color: #ffad70 !important;
    -webkit-text-fill-color: #ffad70 !important;
  }

  /* Navigation wieder als schlichte Textlinks statt Buttons. */
  body footer#msb-site-footer.site-footer .footer-navigation .menu {
    display: grid !important;
    grid-template-columns: repeat(2,minmax(0,1fr)) !important;
    gap: 0 18px !important;
    max-width: 360px !important;
    margin: 0 auto !important;
    padding: 0 !important;
    list-style: none !important;
  }
  body footer#msb-site-footer.site-footer .footer-navigation .menu li,
  body footer#msb-site-footer.site-footer .footer-navigation .menu li:last-child:nth-child(odd) {
    grid-column: auto !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }
  body footer#msb-site-footer.site-footer .footer-navigation .menu li:last-child:nth-child(odd) {
    grid-column: 1 / -1 !important;
  }
  body footer#msb-site-footer.site-footer .footer-navigation .menu li a {
    display: block !important;
    width: auto !important;
    min-height: 0 !important;
    height: auto !important;
    margin: 0 !important;
    padding: 6px 2px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #dce8ee !important;
    font-size: .84rem !important;
    font-weight: 400 !important;
    line-height: 1.3 !important;
    text-align: center !important;
    text-decoration: underline !important;
    text-decoration-color: rgba(220,232,238,.35) !important;
    text-underline-offset: 4px !important;
    transform: none !important;
  }
  body footer#msb-site-footer.site-footer .footer-navigation .menu li a::before,
  body footer#msb-site-footer.site-footer .footer-navigation .menu li a::after {
    display: none !important;
    content: none !important;
  }
  body footer#msb-site-footer.site-footer .footer-navigation .menu li a:hover,
  body footer#msb-site-footer.site-footer .footer-navigation .menu li a:focus-visible {
    color: #ffad70 !important;
    background: transparent !important;
    text-decoration-color: #ff8739 !important;
  }

  /* QR-Code und kompletter vCard-Block auf Mobil ausblenden. */
  body footer#msb-site-footer.site-footer .footer-vcard {
    display: none !important;
  }

  /* Untere Rechtslinks ebenfalls ohne Button-Kästen. */
  body footer#msb-site-footer.site-footer .footer-bottom {
    margin: 0 !important;
    padding: 10px 0 12px !important;
    border-top: 1px solid rgba(181,210,230,.14) !important;
  }
  body footer#msb-site-footer.site-footer .footer-copyright {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 0 !important;
    color: #aebfc8 !important;
    font-size: .72rem !important;
    line-height: 1.3 !important;
    text-align: center !important;
    white-space: normal !important;
  }
  body footer#msb-site-footer.site-footer .footer-legal-links {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 16px !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  body footer#msb-site-footer.site-footer .footer-legal-links a {
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #c4d1d8 !important;
    font-size: .72rem !important;
    line-height: 1.3 !important;
    text-decoration: underline !important;
    text-decoration-color: rgba(196,209,216,.35) !important;
    text-underline-offset: 3px !important;
  }
  body footer#msb-site-footer.site-footer .footer-legal-links a:hover,
  body footer#msb-site-footer.site-footer .footer-legal-links a:focus-visible {
    color: #ffad70 !important;
    text-decoration-color: #ff8739 !important;
  }

  body .back-to-top {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
  }
}

@media (max-width: 360px) {
  body footer#msb-site-footer.site-footer .footer-navigation .menu {
    gap: 0 10px !important;
  }
  body footer#msb-site-footer.site-footer .footer-navigation .menu li a,
  body footer#msb-site-footer.site-footer .footer-contact .ms-footer-identity-card > span,
  body footer#msb-site-footer.site-footer .footer-contact .ms-contact-action__value {
    font-size: .79rem !important;
  }
}

/* Reset inherited desktop column placement and card sizing on phones. */
@media (max-width:767px) {
 body footer#msb-site-footer.site-footer .footer-main { grid-template-columns:minmax(0,1fr)!important; grid-template-rows:auto!important; width:calc(100% - 32px)!important; margin-inline:auto!important; }
 body footer#msb-site-footer.site-footer .footer-main > * { grid-column:1!important; width:100%!important; max-width:none!important; min-width:0!important; height:auto!important; background:transparent!important; box-shadow:none!important; border-radius:0!important; }
 body footer#msb-site-footer.site-footer .footer-vcard,
 body footer#msb-site-footer.site-footer .footer-qr,
 body footer#msb-site-footer.site-footer .footer-vcard-link { display:none!important; }
 body footer#msb-site-footer.site-footer .footer-contact ul.contact-list.contact-list--footer { width:100%!important; }
 body footer#msb-site-footer.site-footer .footer-contact ul.contact-list.contact-list--footer > li > a.ms-contact-action { max-width:none!important; height:auto!important; min-height:36px!important; border:0!important; border-radius:0!important; background:transparent!important; box-shadow:none!important; padding:4px 2px!important; }
 body footer#msb-site-footer.site-footer .footer-main h2::before,
 body footer#msb-site-footer.site-footer .footer-main h2::after { display:none!important; }
}

/* 3.6.118: Center the complete contact block; align icons and text in columns. */
@media (max-width:767px) {
 body footer#msb-site-footer.site-footer .footer-contact ul.contact-list.contact-list--footer {
  width:max-content!important;
  max-width:100%!important;
  margin-inline:auto!important;
 }
 body footer#msb-site-footer.site-footer .footer-contact ul.contact-list.contact-list--footer > li.ms-footer-identity-card,
 body footer#msb-site-footer.site-footer .footer-contact ul.contact-list.contact-list--footer > li.ms-contact-action-row > a.ms-contact-action {
  display:grid!important;
  grid-template-columns:20px minmax(0,1fr)!important;
  justify-content:start!important;
  align-items:center!important;
  gap:10px!important;
  text-align:left!important;
 }
 body footer#msb-site-footer.site-footer .footer-contact .ms-contact-action__copy,
 body footer#msb-site-footer.site-footer .footer-contact .ms-contact-action__value,
 body footer#msb-site-footer.site-footer .footer-contact .ms-footer-identity-card > span {
  text-align:left!important;
 }
}


/* 3.6.120: Contact and navigation side by side, one column each. */
@media(max-width:767px){
 body footer#msb-site-footer.site-footer .footer-main {
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  grid-template-areas:"profile profile" "contact navigation"!important;
  gap:16px 24px!important;
 }
 body footer#msb-site-footer.site-footer .footer-main > .footer-profile {grid-column:1 / -1!important;}
 body footer#msb-site-footer.site-footer .footer-main > .footer-contact {grid-column:1!important;}
 body footer#msb-site-footer.site-footer .footer-main > .footer-navigation {grid-column:2!important;}
 body footer#msb-site-footer.site-footer .footer-contact ul.contact-list.contact-list--footer {
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  width:100%!important;
  max-width:100%!important;
  gap:4px!important;
 }
 body footer#msb-site-footer.site-footer .footer-contact ul.contact-list.contact-list--footer > li.ms-footer-identity-card,
 body footer#msb-site-footer.site-footer .footer-contact ul.contact-list.contact-list--footer > li.ms-contact-action-row > a.ms-contact-action {
  grid-template-columns:16px minmax(0,1fr)!important;
  gap:6px!important;
  padding:4px 0!important;
 }
 body footer#msb-site-footer.site-footer .footer-contact .contact-icon {width:16px!important;height:16px!important;}
 body footer#msb-site-footer.site-footer .footer-contact .ms-contact-action__value,
 body footer#msb-site-footer.site-footer .footer-contact .ms-footer-identity-card > span {
  font-size:.8rem!important;
  overflow-wrap:anywhere!important;
 }
 body footer#msb-site-footer.site-footer .footer-navigation .menu {
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  gap:4px!important;
  width:100%!important;
 }
 body footer#msb-site-footer.site-footer .footer-navigation .menu li,
 body footer#msb-site-footer.site-footer .footer-navigation .menu li:last-child:nth-child(odd) {grid-column:1!important;}
 body footer#msb-site-footer.site-footer .footer-navigation .menu li a {min-height:34px!important;box-sizing:border-box!important;}
}

/* 3.6.121: Align contact heading with text and separate footer columns. */
@media(max-width:767px){
 body footer#msb-site-footer.site-footer .footer-main .footer-contact > h2:not(.screen-reader-text) {
  text-align:left!important;
  padding-left:22px!important;
  margin-left:0!important;
 }
 body footer#msb-site-footer.site-footer .footer-main > .footer-navigation {
  position:relative!important;
  align-self:stretch!important;
 }
 body footer#msb-site-footer.site-footer .footer-main > .footer-navigation::before {
  content:""!important;
  display:block!important;
  position:absolute!important;
  top:0!important;
  bottom:0!important;
  left:-12px!important;
  right:auto!important;
  width:1px!important;
  height:auto!important;
  margin:0!important;
  background:rgba(255,135,57,.55)!important;
  border:0!important;
  box-shadow:none!important;
  transform:none!important;
  pointer-events:none!important;
 }
}

/* 3.6.122: Matching heading/text axes; equal column widths. */
@media(max-width:767px){
 body footer#msb-site-footer.site-footer .footer-main .footer-contact > h2:not(.screen-reader-text),
 body footer#msb-site-footer.site-footer .footer-main .footer-navigation > h2:not(.screen-reader-text) {
  box-sizing:border-box!important;
  width:100%!important;
  text-align:left!important;
  margin:0 0 10px!important;
  padding:0!important;
  font-size:1rem!important;
  line-height:1.3!important;
 }
 body footer#msb-site-footer.site-footer .footer-main .footer-contact > h2:not(.screen-reader-text) {padding-left:22px!important;}
 body footer#msb-site-footer.site-footer .footer-main .footer-navigation .menu li a {
  text-align:left!important;
  justify-content:flex-start!important;
  padding:4px 0!important;
  font-size:.8rem!important;
  line-height:1.35!important;
  min-height:36px!important;
 }
 body footer#msb-site-footer.site-footer .footer-main .footer-contact ul.contact-list.contact-list--footer > li.ms-footer-identity-card,
 body footer#msb-site-footer.site-footer .footer-main .footer-contact ul.contact-list.contact-list--footer > li.ms-contact-action-row > a.ms-contact-action {
  align-items:start!important;
  min-height:36px!important;
  box-sizing:border-box!important;
 }
 body footer#msb-site-footer.site-footer .footer-main .footer-contact .contact-icon {margin-top:1px!important;}
}

/* 3.6.123: Center heading and links within the right mobile column. */
@media(max-width:767px){
 body footer#msb-site-footer.site-footer .footer-main .footer-navigation > h2:not(.screen-reader-text),
 body footer#msb-site-footer.site-footer .footer-main .footer-navigation .menu li a {
  text-align:center!important;
  justify-content:center!important;
 }
}
