/**
 * Estilos para el menú móvil RAW
 */

/* Botón hamburguesa */
.raw-hamburger-btn {
    top: 20px;
    right: 20px;
    width: 30px;
    height: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    z-index: 9998;
}

/* Iconos */
.raw-hamburger-icon,
.raw-close-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.3s ease;
}

.raw-hamburger-icon svg,
.raw-close-icon svg {
  width: 100%;
  height: auto;
  color: inherit;
}

/* Overlay */
.raw-mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0,0,0,0.5);
  z-index: 9997;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}
.raw-mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Por defecto en móviles: ancho completo */
.raw-mobile-menu-container {
  position: fixed;
  top: 0;
  left: -100%;
  width: 100%;            /* móvil al 100% */
  height: 100%;
  background-color: #fff;
  z-index: 9999;
  overflow-y: auto;
  transition: left 0.3s ease;
  box-shadow: 0 0 15px rgba(0,0,0,0.1);
}

/* Al estar activo se desplaza dentro de pantalla */
.raw-mobile-menu-container.active {
  left: 0;
}

/* A partir de tablet (ej: 768px), reducimos a 80% */
@media (min-width: 768px) {
  .raw-mobile-menu-container {
    width: 80%;
    max-width: 480px;   /* opcional, para limitar en pantallas grandes */
  }
}

/* Header */
.raw-mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 15px;
  border-bottom: 1px solid #f1f1f1;
}
.raw-mobile-menu-close { cursor: pointer; line-height: 1; }
.raw-mobile-menu-title { font-weight: 700; font-size: 16px; }
.raw-mobile-logo-container { display: flex; justify-content: center; flex-grow: 1; }
.raw-mobile-logo { height: 30px; width: auto; }

/* Contenedor nav */
.raw-mobile-menu { padding-bottom: 10px; }

/* Lista */
.raw-menu-items { list-style: none; margin: 0; padding: 0; }

/* Fila del ítem */
.raw-menu-items li {
  display: flex;
  align-items: center;
  flex-wrap: wrap;          /* para que el submenú caiga debajo */
  border-bottom: 1px solid #f1f1f1;
  position: relative;
  min-height: 58px;
  margin-bottom: 0 !important;
}

/* 1) El enlace NO llena toda la fila */
.raw-menu-items li > a.raw-item-link {
  flex: 0 1 auto;           /* antes tenías flex:1 */
  display: inline-flex;
  align-items: center;
  padding: 0px 15px;
  text-decoration: none;
  font-size: 16px;
}

/* 2) La “zona de despliegue” ocupa TODO lo demás de la fila */
.raw-menu-items li > .raw-arrow-toggle {
  flex: 1 1 auto;           /* ahora rellena el resto de la fila */
  min-width: 48px;
  height: 58px;
  display: flex;
  justify-content: flex-end;/* icono pegado a la derecha */
  align-items: center;
  padding-right: 12px;
  background: transparent;
  border: 0;
  margin: 0;
  cursor: pointer;
}

/* Evita que el SVG capture el click (que lo haga el botón entero) */
.raw-menu-items li > .raw-arrow-toggle svg { pointer-events: none; }

/* 3) El submenú en una segunda línea, a lo ancho */
.raw-menu-items li > .sub-menu {
  order: 2;
  flex-basis: 100%;
  display: none;            /* el JS lo abre/cierra */
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
}

/* Orden de la primera línea (texto + zona toggle) */
.raw-menu-items li > a.raw-item-link,
.raw-menu-items li > .raw-arrow-toggle { order: 1; }

/* =========================================================
   REALCE SUAVE DEL SUBMENÚ AL DESPLEGARSE
   ========================================================= */
.raw-menu-items ul.sub-menu {
  background-color: transparent;
  transition: background-color .2s ease-in-out;
}

/* Submenú abierto (primer nivel) */
.raw-menu-items li.active > ul.sub-menu {
  background-color: rgba(0, 0, 0, 0.03); /* gris muy sutil */
  box-shadow: inset 0 1px 0 rgba(0,0,0,.05); /* separador sutil (opcional) */
}

/* Submenú abierto (segundo nivel y siguientes) - un pelín más visible */
.raw-menu-items li.active > ul.sub-menu li.active > ul.sub-menu {
  background-color: rgba(0, 0, 0, 0.045);
}
