/*******************************************************
 *  VISIBILIDAD DE CADA MENÚ
 *******************************************************/
.desktop-only { display: block; }
.mobile-only { display: none; }

@media (max-width: 1023px) {
  .desktop-only { display: none; }
  .mobile-only { display: block; }
}

/*******************************************************
 *  MENÚ PRINCIPAL - DESKTOP
 *******************************************************/
.main-navigation { width: 100%; }

/* Hover del link (solo título y subtítulo) */
.main-navigation a:hover .menu-item-title,
.main-navigation a:hover .menu-item-description {
  background: linear-gradient(0deg, #0082ED 0%, #0082ED 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.main-navigation a * {
  color: #06091C;
  font-size: 16px;
  font-weight: 400;
  font-family: 'Geist';
}

.main-menu {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-menu > li { position: relative; }

.menu-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  transition: all 0.3s ease;
  padding: 10px;
}

.menu-item-icon-wrapper {
  display: flex;
  align-items: center;
}

.menu-item-icon {
  width: 25px;
  height: 25px;
  object-fit: contain;
  object-position: center;
}

.menu-item-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.menu-item-title { font-weight: 500; }

.menu-item-description {
  display: block;
  font-family: 'Geist';
  font-size: 12px !important;
  line-height: 16px !important;
  opacity: 0.8;
  margin-top: 2px;
  color: #5F6E7C;
  text-transform: none !important;
  font-weight: 400 !important;
}

/*******************************************************
 *  SUBMENÚS (#menu2 / #menu3)
 *******************************************************/
.submenu-container {
  position: absolute;
  top: calc(100% - -10px);
  left: 0;
  display: inline-flex;
  align-items: flex-start;
  justify-content: flex-start;
  background: #fff;
  border: 1px solid rgba(0,130,237,0.15);
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 10px 20px rgba(0,0,0,.1);
  overflow: hidden;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  min-width: 360px;
  z-index: 50;
  transition: opacity 300ms ease, transform 300ms ease;
}

.submenu-container .menu-item-title {
  font-weight: 500;
  font-family: 'Geist Mono';
  color: #060910;
  text-transform: uppercase;
}

.menu-item-has-children:hover > .submenu-container,
.submenu-container:hover {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Hover gap fix */
.main-menu > li.menu-item-has-children::after {
  content: "";
  position: absolute;
  left: 0;
  top: 100%;
  width: 100%;
  height: 15px;
  background: transparent;
}
.main-menu > li.menu-item-has-children:hover::after {
  pointer-events: auto;
}

/*******************************************************
 *  MENÚ 2
 *******************************************************/
.submenu-level-1 {
  list-style: none;
  margin: 0;
  padding: 0;
  margin-left: 15px;
  min-width: 360px;
  box-sizing: border-box;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 300ms ease, transform 300ms ease;
}

.menu-item-has-children:hover > .submenu-container .submenu-level-1,
.submenu-container:hover .submenu-level-1 {
  opacity: 1;
  transform: translateY(0);
}

.submenu-level-1 > li {
  margin-bottom: 10px;
  border-radius: 5px;
  border: 0.5px solid transparent;
  transition: background-color 250ms ease, color 250ms ease, border 250ms ease;
}

.submenu-level-1 > li:last-child { margin-bottom: 0; }

/*******************************************************
 *  MENÚ 3
 *******************************************************/
.submenu-col-right {
  position: relative;
  flex: 0 0 0;
  width: 0;
  box-sizing: border-box;
  overflow: hidden;
  opacity: 0;
  transform: translateX(-10px);
  pointer-events: none;
  transition: opacity 300ms ease, transform 300ms ease;
}

.submenu-col-right.has-active {
  flex: 0 0 320px;
  width: 320px;
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.submenu-level-2-panel {
  list-style: none;
  margin: 0;
  margin-left: 15px;
  padding: 0 0 0 15px;
  background: #fff;
  border-left: 1px solid rgba(0,0,0,0.05);
  box-sizing: border-box;
  opacity: 0;
  transform: translateX(-10px);
  visibility: hidden;
  pointer-events: none;
  position: absolute;
  inset: 0;
  transition: opacity 280ms cubic-bezier(.16,1,.3,1),
              transform 300ms cubic-bezier(.16,1,.3,1),
              visibility 0s linear 280ms;
}

.submenu-level-2-panel.active.visible {
  opacity: 1;
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
  position: relative;
  transition: opacity 280ms cubic-bezier(.16,1,.3,1),
              transform 300ms cubic-bezier(.16,1,.3,1),
              visibility 0s;
}

.submenu-level-2-panel.active.anim-out,
.submenu-level-2-panel.active:not(.visible) {
  opacity: 0;
  transform: translateX(-10px);
  visibility: visible;
  pointer-events: none;
  position: absolute;
}

/*******************************************************
 *  HOVER SUAVE EN ITEMS
 *******************************************************/
.submenu-level-1 > li,
.submenu-level-2-panel > li {
  transition: background-color 250ms ease, color 250ms ease, border 250ms ease;
}

.submenu-level-1 > li:hover,
.submenu-level-2-panel > li:hover {
  border: 0.5px solid rgba(0,130,237,0.25);
  background: #EDFBFF;
  border-radius: 5px;
}

.submenu-level-1 > li:hover *,
.submenu-level-2-panel > li:hover * {
  color: #0082ED;
}

/*******************************************************
 *  MENÚ MOBILE (Shortcode [custom_mobile_menu])
 *******************************************************/
#cmm-wrapper {
  display: none;
}

@media (max-width: 1023px) {
  #cmm-wrapper {
    display: block;
    position: relative;
    z-index: 10000;
  }
}

/* Botón de hamburguesa */
#cmm-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 10000;
}

#cmm-toggle img {
  width: 35px;
  height: 35px;
}

/* Botones sin sombra ni borde redondeado */
#cmm-wrapper button {
  box-shadow: none;
  border-radius: 0;
}

/* Overlay del menú */
#cmm-overlay {
  position: fixed;
  top: -20px;               /* 🔴 CAMBIO */
  left: 0;              /* 🔴 CAMBIO */
  right: 0;             /* 🔴 CAMBIO */
  width: 110%;          /* 🔴 CAMBIO: evitamos 100vw */
  height: 100vh;
  background-color: #fff;
  z-index: 10010;
  transform: translateX(100%);
  transition: transform 0.25s ease-in-out;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

#cmm-overlay.is-open {
  transform: translateX(-5%);
}

/* Header */
#cmm-overlay-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  transition: opacity 0.25s ease-in-out;
}

#cmm-overlay-header #cmm-logo img {
  width: 120px;
  height: auto;
}

/* Botón cerrar */
#cmm-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
}

#cmm-close img {
  width: 15px;
  height: 15px;
}

/* Botón Atrás */
#cmm-back-button {
  display: none;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  color: #000;
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Geist', sans-serif;
  padding: 0;
}

#cmm-back-button img {
  width: 18px;
  height: 18px;
  transform: rotate(180deg);
}

/* Contenedor principal */
#cmm-nav-container {
  padding: 30px 20px;
  overflow-x: hidden;
  width: 100%;
  flex-grow: 1;
  position: relative;
}

/* Menú principal */
#cmm-main-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

#cmm-main-list .sub-menu {
  list-style: none;
  margin: 0;
}

#cmm-main-list li {
  margin-bottom: 10px;
}

#cmm-main-list li a,
.cmm-link {
  display: block;
  font-size: 18px;
  text-decoration: none;
  color: #06091c;
  padding: 12px 0;
  position: relative;
  transition: color 0.15s ease-in-out;
  font-family: 'Geist', sans-serif;
}

#cmm-main-list li a:hover {
  color: #000;
}

/* Flechas */
.cmm-arrow {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  padding: 10px;
  pointer-events: none;
}

.cmm-arrow .cmm-arrow-img {
  width: 20px;
  height: 20px;
  display: block;
  transition: transform 0.2s ease;
}

/* ===== Submenús ===== */
.sub-menu {
  position: fixed;
  top: 80px;
  left: 100%;
  width: 100%;
  height: calc(100vh - 80px);
  background-color: #fff;
  visibility: hidden;
  transform: translateX(0);
  transition: transform 0.25s ease-in-out, visibility 0.25s ease-in-out;
  z-index: 20;
  overflow-y: auto;
  padding: 40px 30px;
}

.sub-menu li a {
  padding: 12px 0;
}

.sub-menu.is-open {
  visibility: visible;
  transform: translateX(-100%);
  z-index: 30;
}

/* Subniveles más profundos */
.sub-menu .sub-menu {
  top: 0;
  height: 100vh;
  padding: 40px 30px;
  background-color: #fff;
  z-index: 40;
}

/* Íconos y descripciones */
.cmm-link {
  display: flex !important;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.cmm-item-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cmm-item-icon img {
  width: 24px;
  height: 24px;
  display: block;
}

.cmm-item-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.cmm-item-title {
  font-weight: 600;
  color: #06091c;
}

.cmm-item-description {
  font-size: 13px;
  color: #666;
  line-height: 1.2;
}
