/* Responsive Styles */
#dropdown-menu-toggle, #mobile-menu, canvas {
  display: none;
}
.sticky-header::after {
  content: "";
  display: table;
  clear: both;
}
.inner-page-title-container {
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  margin-bottom: 15px;
}
#wrap2, #pe_page_container {
  padding: 0;
}
#wrap {
  padding-bottom: 15px;
}
#pe_page_container {
  margin: 0;
}

/* Homepage Cards */
.home-card {
  background: #fff;
  border-radius: 10px;
  padding: 20px 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  margin-bottom: 20px;
}
.home-card:last-child {
  margin-bottom: 0;
}
.home-card h2,
.home-card h3,
.home-card h4 {
  margin-top: 0;
}
.home-card .side_image {
  float: left;
  margin: 0 15px 10px 0;
}
.col-460 .home-card .side_text,
.home-card .side_text {
  position: static;
  width: auto;
  float: none;
  margin-left: 0;
  overflow: hidden;
}
.home-card p img {
  width: 100% !important;
  height: auto !important;
  display: block;
}
.home-card table {
  border: none !important;
  display: table !important;
  overflow-x: visible !important;
  width: auto !important;
}
.home-card p {
  margin: 0 0 0.4em;
}

/* Google Maps Karte quadratisch mit gleichmäßigem Rand */
.implantologie-cards .home-card:first-child {
  padding: 20px;
}
.implantologie-cards .home-card:first-child iframe {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  display: block;
}

/* Implantologie: 2-spaltiges Grid auf Desktop */
.row.fixed.implantologie-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media screen and (max-width: 1019px) {
  #wrap {
    width: auto;
    max-width: none;
    padding: 0 0 15px;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    background: #ffffff;
  }
  #wrap2 {
    width: auto;
    max-width: none;
    padding: 0 20px;
    margin: 5px 0 10px;
  }
  #pe_page_container {
    padding: 10px 20px 0;
    margin: 0;
  }
  #content {
    padding: 0;
    margin: 0;
  }
  .row {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Header */
  .sticky-header {
    position: sticky !important;
    top: 0;
    z-index: 1000;
    width: 100%;
    margin: 0;
    padding: 0;
  }
  #header {
    padding: 8px 0px 0 !important;
    background: #b30013;
  }
  #header .row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    column-gap: 1.5em;
  }
  #header .row > div {
    height: auto !important;
    margin: 0 !important;
  }
  #header .row > div[style*="float:left"],
  #header .row > div[style*="float: left"] {
    float: none !important;
    position: static !important;
  }
  #header .row > div:first-child {
    order: 1;
    flex: 0 0 auto;
    padding: 0 !important;
  }
  #header .row > div:first-child img {
    width: 52px !important;
    height: 52px !important;
    margin-bottom: -5px;
  }
  #header .row > div:nth-child(2) {
    order: 2;
    flex: 0 0 auto;
    padding: 0.5em 0 0 0 !important;
  }
  #header .row > div:nth-child(2) img {
    max-height: 41px !important;
    width: auto !important;
    margin-top: 8px;
    margin-bottom: -8px;
  }
  #header .row > div:nth-child(3) {
    order: 3;
    flex: 0 0 auto;
    display: none;
  }
  #mobile-menu {
    width: 100%;
  }
  #header a#logo {
    float: none;
    display: inline-block;
  }

  /* Hamburger Toggle */
  .nav_back {
    display: none !important;
  }
  #dropdown-menu-toggle {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    background: #38424d;
    color: #fff;
    padding: 4px 10px;
    border-top: 1px solid #fff;
    border-bottom: 1px solid #fff;
    box-shadow: 0 3px 6px rgba(0,0,0,0.4);
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    user-select: none;
  }
  #dropdown-menu-toggle .toggle-label {
    font-size: 13px;
    letter-spacing: 0.05em;
  }
  #dropdown-menu-toggle .hamburger-icon {
    font-size: 20px;
    display: inline-flex;
    align-items: center;
    margin-top: -4px;
  }

  /* Mobile Menu */
  #mobile-menu {
    display: none;
    background: #2a333c;
    border-radius: 0 0 3px 3px;
  }
  #mobile-menu.open {
    display: block;
  }

  /* Navigation inside mobile menu */
  #mobile-menu ul#dropdown-menu {
    display: block !important;
    float: none !important;
    width: 100%;
    margin: 0;
  }
  #mobile-menu ul#dropdown-menu li {
    float: none !important;
    width: 100%;
  }
  #mobile-menu ul#dropdown-menu li a.top {
    padding: 9px 14px 9px 31px !important;
    font-size: 13px !important;
    border: none !important;
    border-bottom: 1px solid #444 !important;
    background: #38424d !important;
    color: #fff !important;
  }
  #mobile-menu ul#dropdown-menu li.current > a.top,
  #mobile-menu ul#dropdown-menu li.parent-current > a.top {
    background: #4a5560 !important;
    color: #fff !important;
  }
  #mobile-menu ul#dropdown-menu ul.sub-menu {
    position: static !important;
    width: 100% !important;
    display: none !important;
    border: none !important;
    background: #2a333c !important;
  }
  #mobile-menu ul#dropdown-menu li.mobile-open > ul.sub-menu {
    display: block !important;
  }
  #mobile-menu ul#dropdown-menu ul.sub-menu li {
    width: 100% !important;
  }
  #mobile-menu ul#dropdown-menu ul.sub-menu li a {
    width: auto !important;
    display: block !important;
    padding: 8px 14px 8px 45px !important;
    border: none !important;
    border-bottom: 1px solid #3a444d !important;
    background: transparent !important;
    color: #bbb !important;
    font-size: 12px !important;
  }
  #mobile-menu ul#dropdown-menu ul.sub-menu li a:hover {
    background: #b30013 !important;
    color: #fff !important;
  }

  #mobile-menu ul#dropdown-menu li.has-submenu > a.top::after {
    content: "▸";
    float: right;
    transition: transform 0.2s;
    margin-left: 8px;
    font-size: 14px;
  }
  #mobile-menu ul#dropdown-menu li.has-submenu.mobile-open > a.top::after {
    transform: rotate(90deg);
  }

  /* Language switcher inside toggle bar */
  #dropdown-menu-toggle .toggle-lang {
    display: flex;
    align-items: center;
    gap: 9px;
  }
  #dropdown-menu-toggle .toggle-lang .lang_navi,
  #dropdown-menu-toggle .toggle-lang a.lang_navi {
    display: inline-block;
    padding: 2px 3px;
    font-size: 11px;
    border-radius: 2px;
    text-decoration: none;
    line-height: 1.5;
  }
  #dropdown-menu-toggle .toggle-lang a.lang_navi {
    background: #ddd;
    color: #000;
  }
  #dropdown-menu-toggle .toggle-lang a.lang_navi:hover {
    background: #b30013;
    color: #fff;
  }
  #dropdown-menu-toggle .toggle-lang span.lang_navi {
    background: #b30013;
    color: #fff;
  }

  /* Title Banner */
  .inner-page-title-container {
    height: auto !important;
    margin-top: 10px !important;
    margin-bottom: 15px !important;
    overflow: hidden;
    display: block !important;
  }
  .inner-page-title-container img:not([align]) {
    width: 50% !important;
    height: auto !important;
    float: left !important;
    display: block;
  }
  .inner-page-title-container img[align="right"],
  .inner-page-title-container img[align="left"] {
    width: 100% !important;
    height: auto !important;
    display: block;
  }
  .inner-page-title {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    width: auto !important;
    height: auto !important;
    padding: 15px 20px 5px !important;
    background: #38424d !important;
    min-height: auto !important;
  }
  .inner-page-title h2,
  .inner-page-title h3 {
    color: #fff !important;
    font-size: 18.7px !important;
    line-height: 23px !important;
    min-height: auto !important;
  }
  .inner-page-title h2 div,
  .inner-page-title h3 div {
    margin-top: 0 !important;
    margin-left: 0 !important;
  }

  /* Slideshow (Praxis-Seite) – Bild volle Breite, Text darunter */
  .slideshow-container {
    width: 100% !important;
    margin-top: 10px !important;
  }
  #slideshow-index {
    width: 100% !important;
  }
  #slideshow-index ul {
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
  }
  #slideshow-index ul li {
    width: 100% !important;
    height: auto !important;
  }
  #slideshow-index ul li img {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    width: 100% !important;
    height: auto !important;
    display: block;
  }
  #slideshow-index ul li .slidetext {
    display: table-row !important;
    position: relative !important;
    left: auto !important;
    bottom: auto !important;
    right: auto !important;
    width: 100% !important;
    height: auto !important;
    background: #38424d !important;
  }
  #slideshow-index ul li .slidetext h2,
  #slideshow-index ul li .slidetext p {
    padding-left: 20px;
    padding-right: 20px;
  }
  #slideshow-index ul li .slidetext h2 {
    padding-top: 15px;
  }
  #slideshow-index ul li .slidetext p {
    padding-bottom: 15px;
  }
  #index-slideshow-pager {
    position: relative !important;
    left: auto !important;
    bottom: auto !important;
    margin-top: 5px;
    padding-left: 20px;
    top: 15px;
  }
  #slidespacer {
    display: inherit;
  }

  /* Homepage Cards (Mobile) */
  .home-card {
    padding: 15px;
    margin-bottom: 15px;
  }

  /* Columns: 2-spaltig bis 649px, prozentuale Breite */
  .col-460, .col-300, .col-340, .col-280, .col-220, .col-180, .col-160,
  .col-700, .col-580, .col-520, .col-900 {
    min-height: auto !important;
  }
  .col-460 {
    width: 48.9%;
    float: left;
    margin-right: 2.2%;
  }
  .col-460.last {
    margin-right: 0;
  }

  /* Images */
  img {
    max-width: 100% !important;
    height: auto !important;
  }
  img[width] {
    height: auto !important;
  }

  /* Tables */
  table {
    max-width: 100%;
    width: 100% !important;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  table tbody {
    display: table;
    width: 100%;
  }
  table.tablo {
    display: table;
  }

  /* Iframes (Google Maps etc.) */
  iframe {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  /* Footer */
  .copyright {
    text-align: center;
  }
  .copyright span[style*="float"] {
    float: none !important;
    display: block;
    text-align: center;
    padding-left: 0 !important;
  }

  .hr {
    margin: 10px 0 !important;
  }

  input.text {
    width: 90% !important;
    max-width: 100%;
    box-sizing: border-box;
  }
  textarea {
    width: 90% !important;
    max-width: 100%;
    box-sizing: border-box;
  }
}

/* Unter 650px: Einspaltig (gestapelt) */
@media screen and (max-width: 649px) {
  .col-460, .col-300, .col-340, .col-280, .col-220, .col-180, .col-160,
  .col-700, .col-580, .col-520, .col-900 {
    width: 100% !important;
    float: none !important;
    margin-right: 0 !important;
    margin-bottom: 15px;
    min-height: auto !important;
  }

  .side_image {
    float: left !important;
    margin-right: 10px;
    margin-bottom: 5px;
  }
  .side_text {
    float: none !important;
    margin-left: 0 !important;
    overflow: hidden;
  }
  .col-460 .side_text {
    width: auto !important;
  }

  .inner-page-title-container img:not([align]) {
    width: 100% !important;
    display: block;
    float: none !important;
  }
  .inner-page-title-container img[align="right"],
  .inner-page-title-container img[align="left"] {
    width: 100% !important;
    display: block;
    float: none !important;
  }

  .row.fixed.implantologie-cards {
    display: block;
  }
  }
}
