/*==============================================
    Header mejorado — main-header-five
===============================================*/

.main-header-five {
  top: 16px;
  overflow: visible;
}

.main-menu-five__wrapper-inner {
  padding: 8px 28px 8px 20px;
  background: var(--white);
  border: 1px solid rgba(33, 76, 110, 0.12);
  border-radius: 5px 5px 16px 16px;
  box-shadow:
    0 4px 24px rgba(33, 76, 110, 0.1),
    0 1px 3px rgba(0, 0, 0, 0.04);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
  overflow: visible;
}

.main-menu-five__main-menu-box {
  position: relative;
  overflow: visible;
}

.main-menu-five__wrapper-inner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--color1);
  z-index: 2;
}

.main-menu-five__logo {
  padding: 10px 0;
}

.main-menu-five__logo .logo-w {
  width: 157px;
  max-height: 90px;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.main-menu-five__logo a:hover .logo-w {
  transform: scale(1.03);
}

.main-menu-five .main-menu__list > li {
  padding-top: 22px;
  padding-bottom: 22px;
}

.main-menu-five .main-menu__list > li + li {
  margin-left: 36px;
}

.main-menu-five .main-menu__list > li > a,
.stricky-header.main-menu-five .main-menu__list > li > a {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--color1);
  padding: 6px 4px;
  transition: color 0.25s ease;
}

.main-menu-five .main-menu__list > li.dropdown > a {
  padding-right: 18px;
}

.main-menu-five .main-menu__list > li > a::before,
.stricky-header.main-menu-five .main-menu__list > li > a::before {
  height: 2px;
  bottom: 0;
  border-radius: 2px;
  background-color: var(--color1);
  opacity: 0;
  width: 0;
  transition: width 0.3s ease, opacity 0.3s ease;
}

.main-menu-five .main-menu__list > li.current > a,
.main-menu-five .main-menu__list > li:hover > a,
.stricky-header.main-menu-five .main-menu__list > li.current > a,
.stricky-header.main-menu-five .main-menu__list > li:hover > a {
  color: var(--color1);
}

.main-menu-five .main-menu__list > li.current > a::before,
.main-menu-five .main-menu__list > li:hover > a::before,
.stricky-header.main-menu-five .main-menu__list > li.current > a::before,
.stricky-header.main-menu-five .main-menu__list > li:hover > a::before {
  opacity: 1;
  width: 100%;
}

.main-menu-five .main-menu__list > li.dropdown > a:after {
  color: var(--color1);
  font-size: 12px;
  right: -2px;
}

/* Dropdown servicios */
.main-menu-five .main-menu__list > li.dropdown {
  position: relative;
}

.main-menu-five .main-menu__list > li > ul.scrollable-dropdown {
  display: flex !important;
  flex-direction: column;
  align-items: stretch;
  min-width: 300px;
  max-height: 360px;
  overflow-y: auto;
  border-radius: 12px;
  border: 1px solid rgba(33, 76, 110, 0.12);
  box-shadow: 0 12px 40px rgba(33, 76, 110, 0.18);
  padding: 8px 0;
  margin-top: 0;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) scaleY(0);
  transform-origin: top center;
  opacity: 0;
  visibility: hidden;
  z-index: 1000;
  background-color: var(--white);
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

.main-menu-five .main-menu__list > li.dropdown:hover > ul.scrollable-dropdown,
.main-menu-five .main-menu__list > li.dropdown:focus-within > ul.scrollable-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) scaleY(1) !important;
}

.stricky-header .main-menu-five .main-menu__list > li > ul.scrollable-dropdown {
  display: flex !important;
  flex-direction: column;
  align-items: stretch;
}

.stricky-header .main-menu-five .main-menu__list > li.dropdown:hover > ul.scrollable-dropdown,
.stricky-header .main-menu-five .main-menu__list > li.dropdown:focus-within > ul.scrollable-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) scaleY(1) !important;
}

.main-menu-five .main-menu__list > li > ul.scrollable-dropdown > li {
  width: 100%;
  border-bottom: 1px solid rgba(33, 76, 110, 0.08);
}

.main-menu-five .main-menu__list > li > ul.scrollable-dropdown > li:last-child {
  border-bottom: none;
}

.main-menu-five .main-menu__list > li > ul.scrollable-dropdown > li > a {
  display: block;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  padding: 12px 22px;
  color: var(--careon-gray);
  white-space: normal;
  transition: background 0.2s ease, color 0.2s ease, padding-left 0.2s ease;
}

.main-menu-five .main-menu__list > li > ul.scrollable-dropdown > li:hover > a {
  background-color: rgba(190, 225, 230, 0.35);
  color: var(--color1);
  padding-left: 24px;
}

/* CTA Agendar cita */
.main-menu-five__call {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 10px 18px 10px 12px;
  margin: 8px 0;
  background: linear-gradient(135deg, var(--color1) 0%, #1a5f8a 100%);
  border-radius: 50px;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(33, 76, 110, 0.25);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.main-menu-five__call:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(33, 76, 110, 0.3);
  text-decoration: none;
}

.main-menu-five__call-icon {
  flex-shrink: 0;
}

.main-menu-five__call-icon-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: var(--white);
  font-size: 18px;
}

.main-menu-five__call-number {
  display: flex;
  flex-direction: column;
  margin-left: 0;
  text-align: left;
}

.main-menu-five__call-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.2;
  margin-bottom: 2px;
}

.main-menu-five__call-phone {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
  white-space: nowrap;
}

/* Header sticky al hacer scroll */
.stricky-header.main-menu-five {
  background-color: var(--color1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.stricky-header.main-menu-five.stricky-fixed {
  visibility: visible;
}

.stricky-header.main-menu-five .main-menu-five__wrapper-inner,
.stricky-header .main-menu-five__wrapper-inner {
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  padding: 0 20px;
}

.stricky-header.main-menu-five .main-menu-five__wrapper-inner::before,
.stricky-header .main-menu-five__wrapper-inner::before {
  display: none;
}

.stricky-header.main-menu-five .main-menu__list > li > a,
.stricky-header .main-menu-five .main-menu__list > li > a {
  color: var(--white);
}

.stricky-header.main-menu-five .main-menu__list > li > a::before,
.stricky-header .main-menu-five .main-menu__list > li > a::before {
  background-color: var(--careon-primary);
}

.stricky-header.main-menu-five .main-menu__list > li.current > a,
.stricky-header.main-menu-five .main-menu__list > li:hover > a,
.stricky-header .main-menu-five .main-menu__list > li.current > a,
.stricky-header .main-menu-five .main-menu__list > li:hover > a {
  color: var(--careon-primary);
}

.stricky-header.main-menu-five .main-menu__list > li.dropdown > a:after,
.stricky-header .main-menu-five .main-menu__list > li.dropdown > a:after {
  color: var(--white);
}

.stricky-header.main-menu-five .main-menu__list > li.current > a::after,
.stricky-header.main-menu-five .main-menu__list > li:hover > a::after,
.stricky-header .main-menu-five .main-menu__list > li.current > a::after,
.stricky-header .main-menu-five .main-menu__list > li:hover > a::after {
  color: var(--careon-primary);
}

.stricky-header.main-menu-five .main-menu-five__call,
.stricky-header .main-menu-five .main-menu-five__call {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: none;
}

.stricky-header.main-menu-five .main-menu-five__call:hover,
.stricky-header .main-menu-five .main-menu-five__call:hover {
  background: rgba(255, 255, 255, 0.22);
}

/* Botón menú móvil — solo en pantallas pequeñas */
@media (max-width: 1199px) {
  .main-menu-five .mobile-nav__toggler {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--color1);
    color: var(--white);
    border-radius: 10px;
    font-size: 18px;
    transition: background 0.25s ease, transform 0.25s ease;
  }

  .main-menu-five .mobile-nav__toggler:hover {
    background: #1a5f8a;
    color: var(--white);
    transform: scale(1.05);
  }
}

@media (min-width: 1200px) {
  .main-menu-five .mobile-nav__toggler {
    display: none !important;
  }
}

/* Menú móvil */
.mobile-nav__logo-img {
  background-color: var(--white);
  padding: 10px;
  border-radius: 8px;
  max-width: 160px;
}

.mobile-nav__content .main-menu__list > li > a {
  font-weight: 600;
  color: var(--white);
}

@media (max-width: 1399px) {
  .main-menu-five .main-menu__list > li + li {
    margin-left: 28px;
  }

  .main-menu-five .main-menu__list > li > a {
    font-size: 14px;
  }

  .main-menu-five__call-phone {
    font-size: 14px;
  }
}

@media (max-width: 1199px) {
  .main-menu-five__wrapper-inner {
    padding: 10px 16px;
  }

  .main-menu-five__logo .logo-w {
    width: 135px;
    max-height: 78px;
  }
  .main-menu-five__wrapper-inner::before{
    background:none;
  }
}
