/* Keep the product filter illustrations visible when the filter bar sticks. */
@media (min-width: 769px) {
  .page-template-products.is-fixed .cd-filters .icon-above,
  .is-fixed .page-template-products .cd-filters .icon-above {
    display: block !important;
  }
}

/* Refine the existing WordPress menu without changing its hierarchy. */
@media (min-width: 992px) {
  nav.main-navigation:not(.fixed) #menu > li {
    margin: 2px 0;
    float: none;
    width: max-content;
    max-width: 100%;
  }

  nav.main-navigation:not(.fixed) #menu > li:hover::before {
    content: none;
    margin: 0;
  }

  nav.main-navigation:not(.fixed) #menu > li > a {
    display: inline-flex;
    align-items: center;
    width: auto;
    max-width: 100%;
    min-height: 43px;
    height: auto;
    padding: 10px 14px;
    line-height: 1.25;
    border-radius: 8px;
    background: rgba(255, 255, 255, .86);
    box-shadow: 0 2px 12px rgba(32, 25, 39, .06);
  }

  nav.main-navigation:not(.fixed) #menu > li:hover > a,
  nav.main-navigation:not(.fixed) #menu > li:focus-within > a {
    color: #572989;
    background: #fff;
  }

  nav.main-navigation:not(.fixed) #menu > li > ul.dropdown-menu {
    top: 0;
    left: 100%;
    width: 244px;
    height: auto;
    margin: 0;
    padding: 8px;
    border: 1px solid rgba(75, 51, 94, .13);
    border-radius: 10px;
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 12px 30px rgba(34, 25, 43, .15);
  }

  nav.main-navigation:not(.fixed) #menu > li > ul.dropdown-menu > li {
    left: 0;
    float: none;
    width: 100%;
    background: transparent;
  }

  nav.main-navigation:not(.fixed) #menu > li > ul.dropdown-menu > li > a {
    display: block;
    width: 100%;
    height: auto;
    min-height: 42px;
    padding: 10px 14px;
    border-radius: 6px;
    color: #1b1b1b;
    line-height: 1.35;
    white-space: normal;
    background: transparent;
  }

  nav.main-navigation:not(.fixed) #menu > li > ul.dropdown-menu > li:hover > a,
  nav.main-navigation:not(.fixed) #menu > li > ul.dropdown-menu > li:focus-within > a {
    color: #572989;
    background: #f2edf7;
  }

  nav.main-navigation.fixed #menu > li > ul.dropdown-menu {
    min-width: 210px;
    height: auto;
    padding: 7px;
    border-radius: 8px;
    border-color: rgba(75, 51, 94, .13);
    box-shadow: 0 10px 25px rgba(34, 25, 43, .12);
  }

  nav.main-navigation.fixed #menu > li > ul.dropdown-menu > li > a {
    display: block;
    width: 100%;
    height: auto;
    padding: 10px 12px !important;
    border-radius: 5px;
    line-height: 1.35;
  }
}

@media (max-width: 991px) {
  #site-navigation.main-navigation #menu > li > ul.dropdown-menu {
    width: 100%;
    height: auto;
    padding: 5px 0 5px 12px;
    border: 0;
    border-left: 2px solid #dfd5e8;
    background: #fff;
    box-shadow: none;
  }

  #site-navigation.main-navigation #menu > li > ul.dropdown-menu > li {
    left: 0;
  }

  #site-navigation.main-navigation #menu > li > ul.dropdown-menu > li > a {
    display: block;
    width: 100%;
    max-width: none;
    height: auto;
    padding: 10px 14px;
    border-radius: 5px;
    color: #242126;
    line-height: 1.35;
    white-space: normal;
    background: transparent;
  }

  #site-navigation.main-navigation #menu > li > ul.dropdown-menu > li:hover > a,
  #site-navigation.main-navigation #menu > li > ul.dropdown-menu > li:focus-within > a {
    color: #572989;
    background: #f2edf7;
  }
}

/* Google Maps is loaded only after the visitor chooses to display it. */
.map-consent {
  max-width: 960px;
  margin: 0 auto 32px;
  border: 1px solid #ddd6e4;
  border-radius: 10px;
  background: #f8f6fa;
  overflow: hidden;
  text-align: center;
}

.map-consent__intro {
  padding: 38px 24px;
}

.map-consent__intro p {
  max-width: 600px;
  margin: 0 auto 18px;
  line-height: 1.5;
}

.map-consent__load,
.map-consent__close {
  border: 0;
  border-radius: 5px;
  background: #662d91;
  color: #fff;
  padding: 12px 22px;
  font: inherit;
  cursor: pointer;
}

.map-consent__load:hover,
.map-consent__close:hover {
  background: #4e2171;
}

.map-consent__frame iframe {
  display: block;
  width: 100%;
  height: min(62vw, 480px);
  min-height: 300px;
  border: 0;
}

.map-consent__close {
  margin: 14px;
}

.map-consent [hidden] {
  display: none !important;
}

.home #Reseller .wpb_gmaps_widget > .wpb_wrapper {
  padding: 32px 5px;
}

.home #Reseller .map-consent {
  margin-bottom: 0;
}

/* Join the hero image directly to the first content section. */
.home .profem_home_videobackground.widget {
  margin-bottom: 0;
}

/* Let the product gallery determine the section height after filtering. */
.home #Pessar .page-template-products.cd-main-content {
  min-height: 0;
}

/* Full-bleed section backgrounds on tablet and mobile. */
@media (max-width: 1199px) {
  .home #main.container,
  .home .profem-content-wrapper > .container {
    width: 100%;
    max-width: none;
    padding-right: 0;
    padding-left: 0;
  }

  .home #main > .row {
    margin-right: 0;
    margin-left: 0;
  }

  .home #main > .row > .col-md-12,
  .home .profem-content-wrapper > .container > .col-md-12 {
    padding-right: 0;
    padding-left: 0;
  }
}

/* Keep the back-to-top arrow visible and centered without hover. */
footer.footer .back-to-top {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  min-width: 40px;
  padding: 0;
  line-height: 1;
  opacity: 1;
  color: #662d91;
  background: transparent;
  border: 2px solid #662d91;
  border-radius: 50%;
}

footer.footer .back-to-top i.fa-angle-up {
  display: block;
  margin: 0;
  color: #662d91;
  font-size: 22px;
  line-height: 1;
  opacity: 1;
  visibility: visible;
}

footer.footer .back-to-top:hover,
footer.footer .back-to-top:focus-visible {
  color: #fff;
  background: #662d91;
}

footer.footer .back-to-top:hover i.fa-angle-up,
footer.footer .back-to-top:focus-visible i.fa-angle-up {
  color: #fff;
}

/* Keep the Klappkarte download label legible after the PDF link was visited. */
#Care a.btn.btn-primary,
#Care a.btn.btn-primary:visited,
#Care a.btn.btn-primary:hover,
#Care a.btn.btn-primary:focus,
#Care a.btn.btn-primary:active {
  color: #fff;
}

/* Match the contact section to the width and gutters of the other content. */
.home #Contact > .wpb_column > .vc_column-inner > .wpb_wrapper {
  width: 100%;
  max-width: 1170px;
  margin-right: auto;
  margin-left: auto;
  padding-right: 15px;
  padding-left: 15px;
}

@media (max-width: 767px) {
  .home #Contact > .wpb_column > .vc_column-inner > .wpb_wrapper {
    padding-right: 20px;
    padding-left: 20px;
  }
}

/* The footer is in normal document flow below desktop size, so it needs no
   space reserved beneath the page. */
@media (max-width: 991px) {
  body {
    margin-bottom: 0;
    padding-bottom: 0;
  }
}

/* Keep the reseller addresses inside the same mobile gutters as the rest of
   the page; Visual Composer's inner rows otherwise cancel the column padding. */
@media (max-width: 767px) {
  .home #Reseller > .wpb_column > .vc_column-inner > .wpb_wrapper > .vc_row.vc_inner {
    margin-right: 0;
    margin-left: 0;
    padding-right: 20px;
    padding-left: 20px;
  }

  .home #Reseller a {
    overflow-wrap: anywhere;
  }
}

/* Reduce the 200px Visual Composer gaps around P.O.P.s. Messstab. */
.home #Care {
  margin-top: 64px !important;
  margin-bottom: 0 !important;
}

.home #Care + .vc_row-full-width + #Reseller {
  margin-top: 64px !important;
}

@media (max-width: 767px) {
  .home #Care,
  .home #Care + .vc_row-full-width + #Reseller {
    margin-top: 32px !important;
  }
}

/* The desktop navigation overlays the hero; do not reserve an empty 56px row
   for its outer container. */
@media (min-width: 992px) {
  .site-header,
  .nav-container {
    height: 0;
    min-height: 0;
  }
}

/* Product modals: keep controls inside the dialog and reserve space for the
   indication icons instead of overlaying them on the product image. */
.modal .modal-dialog {
  width: calc(100% - 32px);
  max-width: 720px;
  margin: 24px auto;
}

.modal .modal-content {
  width: 100%;
}

.modal .modal-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 82px;
  padding: 12px 58px 12px 16px;
  border-bottom: 0;
}

.modal .modal-header .profem-degree {
  margin: 0 auto 0 0;
}

.modal .modal-header .icon-bar {
  position: static;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}

.modal .modal-header .icon-bar .modal-icon {
  float: none !important;
  width: 48px;
  height: 48px;
  margin: 0;
  object-fit: contain;
}

.modal .modal-header .close {
  position: absolute;
  top: 14px;
  right: 16px;
  margin: 0;
  color: #662d91;
  font-size: 42px;
  line-height: 1;
  opacity: .85;
}

.modal .modal-header .close:hover,
.modal .modal-header .close:focus {
  color: #4e2171;
  opacity: 1;
}

.modal .modal-image {
  margin-top: 0;
}

.modal .modal-body {
  margin-top: 0;
  padding: 24px;
}

@media (max-width: 767px) {
  .modal .modal-dialog {
    width: calc(100% - 20px);
    margin: 10px auto;
  }

  .modal .modal-header {
    min-height: 70px;
    padding: 10px 48px 10px 12px;
  }

  .modal .modal-header .icon-bar {
    gap: 4px;
  }

  .modal .modal-header .icon-bar .modal-icon {
    width: 38px;
    height: 38px;
  }

  .modal .modal-header .close {
    top: 10px;
    right: 12px;
    font-size: 36px;
  }

  .modal .modal-body {
    padding: 18px;
  }
}

/* Compact, single-column mobile navigation. */
@media (max-width: 991px) {
  #site-navigation.main-navigation {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1000;
    max-height: 100dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0;
    background: #fff;
    box-shadow: 0 2px 12px rgba(34, 25, 43, .08);
    height: 72px;
  }

  #site-navigation.main-navigation:has(.nav-bar.nav-open) {
    height: auto;
  }

  #site-navigation.main-navigation.fixed,
  #site-navigation.main-navigation.fixed.scrolled,
  #site-navigation.main-navigation.outOfSight {
    visibility: visible;
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }

  .site-header,
  .nav-container {
    height: 72px;
    min-height: 72px;
  }

  #site-navigation .nav-bar {
    width: 100%;
    max-height: none;
    padding-right: 24px;
    padding-left: 24px;
  }

  #site-navigation .site-title-container {
    width: calc(100% - clamp(72px, calc(8vw + 48px), 128px));
    height: 72px;
    min-height: 72px;
    padding: 10px 0;
  }

  #site-navigation .navbar-brand {
    height: auto;
    padding: 0;
  }

  #site-navigation .logo-text {
    width: 150px;
    max-width: 65vw;
    margin: 0;
  }

  #site-navigation .mobile-toggle {
    position: relative;
    width: 48px;
    height: 48px;
    margin: 12px clamp(24px, 8vw, 80px) 0 0;
    padding: 0;
    border: 0;
    text-align: right;
  }

  #site-navigation .mobile-toggle i {
    position: absolute;
    top: 22px;
    right: 0;
    display: block;
    width: 30px;
    height: 3px;
    border-radius: 2px;
    color: transparent;
    background: #662d91;
    font-size: 0;
    line-height: 1 !important;
    transition: background-color .18s ease;
  }

  #site-navigation .mobile-toggle i::before,
  #site-navigation .mobile-toggle i::after {
    content: "";
    position: absolute;
    left: 0;
    width: 30px;
    height: 3px;
    border-radius: 2px;
    background: #662d91;
    transition: top .24s ease, transform .24s ease;
    transform-origin: center;
  }

  #site-navigation .mobile-toggle i::before {
    top: -9px;
  }

  #site-navigation .mobile-toggle i::after {
    top: 9px;
  }

  #site-navigation .nav-bar.nav-open .mobile-toggle i {
    background: transparent;
  }

  #site-navigation .nav-bar.nav-open .mobile-toggle i::before {
    top: 0;
    transform: rotate(45deg);
  }

  #site-navigation .nav-bar.nav-open .mobile-toggle i::after {
    top: 0;
    transform: rotate(-45deg);
  }

  #site-navigation .module-group.right,
  #site-navigation .module-group.right > .module.left,
  #site-navigation .navbar-collapse {
    float: none;
    clear: both;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    box-shadow: none;
  }

  #site-navigation .nav-bar:not(.nav-open) .module-group.right,
  #site-navigation > .lang-switch {
    display: none !important;
  }

  #site-navigation .nav-bar.nav-open .module-group.right,
  #site-navigation .nav-open + .lang-switch {
    display: block !important;
  }

  #site-navigation #menu {
    width: 100%;
    height: auto;
    margin: 0;
    padding: 4px 0 8px;
  }

  #site-navigation #menu > li {
    float: none;
    display: block;
    width: 100%;
    min-height: 40px;
    margin: 0;
    border-bottom: 1px solid #eeeaf1;
  }

  #site-navigation #menu > li:last-child {
    border-bottom: 0;
  }

  #site-navigation #menu > li > a {
    display: block;
    width: 100%;
    min-height: 40px;
    padding: 9px 44px 8px 4px;
    color: #242126;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: 0;
    text-transform: none;
  }

  #site-navigation #menu > li > a:hover,
  #site-navigation #menu > li > a:focus {
    color: #662d91;
  }

  #site-navigation #menu > li.menu-item-has-children::after,
  #site-navigation #menu > li.menu-item-has-children > a::after {
    display: none !important;
    content: none !important;
  }

  #site-navigation #menu > li > .shapely-dropdown {
    position: absolute;
    top: 4px;
    right: 0;
    float: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    color: #662d91;
    background: #f2edf7;
    cursor: pointer;
  }

  #site-navigation #menu > li > .shapely-dropdown i {
    transition: transform .28s ease;
    transform-origin: center;
  }

  #site-navigation #menu > li > .shapely-dropdown[aria-expanded="true"] i,
  #site-navigation #menu > li:has(> ul.dropdown-menu.active) > .shapely-dropdown i {
    transform: rotate(180deg);
  }

  #site-navigation #menu > li > .shapely-dropdown:hover,
  #site-navigation #menu > li > .shapely-dropdown:focus {
    color: #fff;
    background: #662d91;
  }

  #site-navigation #menu > li > ul.dropdown-menu {
    position: static;
    display: block !important;
    float: none;
    width: 100%;
    max-height: 0;
    margin: 0;
    padding: 0 0 0 14px;
    overflow: hidden;
    opacity: 0;
    visibility: visible;
    transform: none;
    border-left: 2px solid #dfd5e8;
    pointer-events: none;
    transition: max-height .35s ease, opacity .24s ease,
      padding-top .35s ease, padding-bottom .35s ease, margin-bottom .35s ease;
  }

  #site-navigation #menu > li > ul.dropdown-menu.active {
    display: block !important;
    max-height: 260px;
    margin-bottom: 4px;
    padding-top: 4px;
    padding-bottom: 4px;
    opacity: 1;
    pointer-events: auto;
  }

  #site-navigation #menu > li > ul.dropdown-menu > li > a {
    min-height: 36px;
    padding: 8px 12px;
    font-size: 14px;
  }

  #site-navigation .nav-open + .lang-switch {
    position: static;
    float: none !important;
    clear: both;
    width: 100%;
    padding: 10px 24px 12px;
    border-top: 1px solid #eeeaf1;
    text-align: left;
  }

  #site-navigation .nav-open + .lang-switch ul {
    margin: 0;
    padding: 0;
  }

  #site-navigation .nav-open + .lang-switch img {
    width: 27px;
    margin: 2px 7px 2px 0;
    opacity: 1;
  }

  html {
    scroll-padding-top: 80px;
  }

  .home #Deployment,
  .home #Aboutus,
  .home #Therapy,
  .home #Types,
  .home #Pessar,
  .home #Sets,
  .home #Care,
  .home #Reseller,
  .home #Contact {
    scroll-margin-top: 80px;
  }
}
