/* MUNACUA header + slider hotfix 2026-07-14
   Corrige submenus cortados, header descuadrado y slider móvil. */

/* El header y sus dropdowns deben poder salir sobre el slider. */
.full-width-header,
.rs-header,
.rs-header .menu-area,
.rs-header .menu-area .container,
.rs-header .menu-area .row,
.rs-header .menu-area .rs-menu-area,
.rs-header .menu-area .main-menu,
.rs-header .menu-area .rs-menu,
.rs-header .menu-area .nav-menu {
  overflow: visible !important;
}
.full-width-header,
.rs-header,
.rs-header .menu-area {
  position: relative !important;
  z-index: 99999 !important;
}
.main-content,
.bx-wrapper,
.bx-viewport {
  position: relative;
  z-index: 1;
}

@media (min-width: 992px) {
  /* Header en una sola linea en escritorio. */
  body .full-width-header.header-style2 .rs-header .menu-area > .container {
    width: 100% !important;
    max-width: 1280px !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
  }

  body .full-width-header.header-style2 .rs-header .menu-area .row.y-middle {
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
  }

  body .full-width-header.header-style2 .rs-header .menu-area .row.y-middle > .col-lg-2 {
    flex: 0 0 205px !important;
    max-width: 205px !important;
    width: 205px !important;
  }

  body .full-width-header.header-style2 .rs-header .menu-area .row.y-middle > .col-lg-10 {
    flex: 1 1 auto !important;
    max-width: calc(100% - 205px) !important;
    width: calc(100% - 205px) !important;
    text-align: right !important;
  }

  body .full-width-header.header-style2 .rs-header .menu-area .rs-menu-area > .container,
  body .full-width-header.header-style2 .rs-header .menu-area .rs-menu-area .container {
    width: 100% !important;
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  body .full-width-header.header-style2 .rs-header .menu-area .main-menu {
    width: 100% !important;
    padding-right: 0 !important;
  }

  body .full-width-header.header-style2 .rs-header .menu-area nav.rs-menu {
    display: block !important;
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
  }

  body .full-width-header.header-style2 .rs-header .menu-area .main-menu .rs-menu ul.nav-menu {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    flex-wrap: nowrap !important;
    gap: 20px !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
  }

  body .full-width-header.header-style2 .rs-header .menu-area .main-menu .rs-menu ul.nav-menu > li {
    display: block !important;
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    position: relative !important;
    float: none !important;
  }

  body .full-width-header.header-style2 .rs-header .menu-area .main-menu .rs-menu ul.nav-menu > li > a {
    display: block !important;
    height: 110px !important;
    line-height: 110px !important;
    padding: 0 !important;
    margin: 0 !important;
    white-space: nowrap !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    font-size: 14px !important;
  }

  body .full-width-header.header-style2 .rs-header .menu-area .main-menu .rs-menu ul.nav-menu > li > span.rs-menu-parent {
    display: none !important;
  }

  /* Dropdowns de escritorio: ancho real y sin recorte. */
  body .full-width-header.header-style2 .rs-header .menu-area .main-menu .rs-menu ul.nav-menu > li > ul.sub-menu {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    width: 320px !important;
    min-width: 320px !important;
    max-width: 320px !important;
    height: auto !important;
    margin: 0 !important;
    padding: 12px 0 !important;
    overflow: visible !important;
    opacity: 0 !important;
    visibility: hidden !important;
    display: block !important;
    transform: translateY(8px) scaleY(0.98) !important;
    transform-origin: top center !important;
    z-index: 999999 !important;
  }

  body .full-width-header.header-style2 .rs-header .menu-area .main-menu .rs-menu ul.nav-menu > li:hover > ul.sub-menu,
  body .full-width-header.header-style2 .rs-header .menu-area .main-menu .rs-menu ul.nav-menu > li:focus-within > ul.sub-menu {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) scaleY(1) !important;
  }

  body .full-width-header.header-style2 .rs-header .menu-area .main-menu .rs-menu ul.nav-menu > li:nth-last-child(-n+2) > ul.sub-menu {
    left: auto !important;
    right: 0 !important;
  }

  body .full-width-header.header-style2 .rs-header .menu-area .main-menu .rs-menu ul.sub-menu li,
  body .full-width-header.header-style2 .rs-header .menu-area .main-menu .rs-menu ul.sub-menu li a {
    width: 100% !important;
    max-width: none !important;
    display: block !important;
    float: none !important;
  }

  body .full-width-header.header-style2 .rs-header .menu-area .main-menu .rs-menu ul.sub-menu li a {
    height: auto !important;
    min-height: 0 !important;
    line-height: 1.35 !important;
    padding: 11px 22px !important;
    margin: 0 !important;
    white-space: normal !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    text-align: left !important;
  }

  body .full-width-header.header-style2 .rs-header .menu-area .logo img,
  body .full-width-header.header-style2 .rs-header .menu-area .logo-cat-wrap img {
    max-width: 175px !important;
    height: auto !important;
  }
}

@media (min-width: 992px) and (max-width: 1199px) {
  body .full-width-header.header-style2 .rs-header .menu-area > .container {
    max-width: 1160px !important;
  }
  body .full-width-header.header-style2 .rs-header .menu-area .row.y-middle > .col-lg-2 {
    flex-basis: 165px !important;
    max-width: 165px !important;
    width: 165px !important;
  }
  body .full-width-header.header-style2 .rs-header .menu-area .row.y-middle > .col-lg-10 {
    max-width: calc(100% - 165px) !important;
    width: calc(100% - 165px) !important;
  }
  body .full-width-header.header-style2 .rs-header .menu-area .main-menu .rs-menu ul.nav-menu {
    gap: 13px !important;
  }
  body .full-width-header.header-style2 .rs-header .menu-area .main-menu .rs-menu ul.nav-menu > li > a {
    font-size: 12px !important;
  }
  body .full-width-header.header-style2 .rs-header .menu-area .logo img,
  body .full-width-header.header-style2 .rs-header .menu-area .logo-cat-wrap img {
    max-width: 145px !important;
  }
}

@media (max-width: 991px) {
  /* Header móvil estable. */
  body .full-width-header.header-style2 .rs-header .menu-area {
    padding: 18px 0 !important;
  }
  body .full-width-header.header-style2 .rs-header .menu-area .row.y-middle {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
  }
  body .full-width-header.header-style2 .rs-header .menu-area .row.y-middle > .col-lg-2 {
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: 70% !important;
  }
  body .full-width-header.header-style2 .rs-header .menu-area .row.y-middle > .col-lg-10 {
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: 30% !important;
  }
  body .full-width-header.header-style2 .rs-header .menu-area .logo img,
  body .full-width-header.header-style2 .rs-header .menu-area .logo-cat-wrap img {
    max-width: 205px !important;
    height: auto !important;
  }
  body .mobile-menu {
    display: block !important;
    text-align: right !important;
    margin: 0 !important;
  }
  body .mobile-menu .rs-menu-toggle {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 48px !important;
    min-height: 48px !important;
    font-size: 30px !important;
    color: #333 !important;
  }
  body .rs-menu {
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    top: 100% !important;
    width: 100% !important;
    background: #fff !important;
    z-index: 999999 !important;
    overflow: hidden !important;
  }
  body .rs-menu .nav-menu {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
  }
  body .rs-menu .nav-menu > li {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    position: relative !important;
  }
  body .rs-menu .nav-menu > li > a {
    height: auto !important;
    line-height: 1.35 !important;
    padding: 15px 58px 15px 20px !important;
    text-align: left !important;
    white-space: normal !important;
  }
  body .rs-menu .sub-menu {
    position: static !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: auto !important;
    padding: 0 !important;
    box-shadow: none !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: none !important;
  }
  body .rs-menu .sub-menu.visible {
    display: block !important;
  }
  body .rs-menu .sub-menu li a {
    height: auto !important;
    line-height: 1.35 !important;
    padding: 12px 20px 12px 34px !important;
    white-space: normal !important;
  }
}

/* Slider / bxSlider corrections */
#slider-area {
  margin: 0 !important;
  padding: 0 !important;
}
.bx-wrapper {
  border: 0 !important;
  box-shadow: none !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
.bx-wrapper .bx-viewport {
  border: 0 !important;
  box-shadow: none !important;
  left: 0 !important;
}
#slider-area li,
.bx-wrapper li {
  list-style: none !important;
}
#slider-area img,
.bx-wrapper img {
  display: block !important;
  max-width: 100% !important;
  height: auto !important;
}

@media (max-width: 767px) {
  body .main-content {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }
  body .bx-wrapper {
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: 0 !important;
    overflow: hidden !important;
  }
  body .bx-wrapper .bx-viewport {
    width: 100vw !important;
    max-width: 100vw !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }
  body #slider-area li {
    min-height: 0 !important;
  }
  body #slider-area img,
  body .bx-wrapper img {
    width: 100vw !important;
    max-width: none !important;
    min-height: 0 !important;
    height: auto !important;
    object-fit: contain !important;
    object-position: center center !important;
  }
  body .bx-wrapper .bx-controls-direction a {
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 60 !important;
  }
  body .bx-wrapper .bx-prev { left: 10px !important; }
  body .bx-wrapper .bx-next { right: 10px !important; }
}
