.top-menu-mobile {
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: 100vw;
  background: #fff;
  z-index: 99999;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform 0.35s ease;
  box-shadow: 2px 0 12px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
}

.top-menu-mobile.active {
  transform: translateX(0);
}

.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease;
}

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

body.mobile-menu-open {
  overflow: hidden;
}

/* Cabecera: logo + cerrar */
.menu-mobile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  margin-bottom: 30px;
}

.menu-mobile-header img {
  max-width: 180px !important;
  width: 180px !important;
  width: auto;
  height: auto;
}

.menu-mobile-header .close-side-widget {
  width: 20px;
  height: 20px;
}

.menu-mobile-header .close-icon {
  background-image: url('https://stack.gmedia.es/wp-content/uploads/2026/07/close.svg');
  background-size: 16px 16px;
  background-repeat: no-repeat;
  width: 20px;
  height: 20px;
  color: #fff0 !important;
  font-size: 24px;
  display: block;
}

.close-side-widget {
  cursor: pointer;
  font-size: 26px;
  color: #000000;
}

/* Empuja el footer hacia abajo */
.footer-menu-mobile {
  display: flex;
  justify-content: space-between;
  position: relative;
  margin-top: auto;
  padding: 15px 20px;
  border-top: 1px solid #eee;
}
.footer-menu-mobile .weglot-dropdown ul {
  bottom: 38px;
}
.footer-menu-mobile .weglot-dropdown ul a {
  margin-bottom: 0px;
}

.footer-menu-mobile a {
  display: block;
  margin-bottom: 10px;
  text-decoration: none;
  color: #000000;
  font-size: 16px;
}

.footer-redes {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #eee;
}

.footer-redes img {
  width: 20px;
  height: 20px;
  display: block;
}

/* ==========================================================
   Menú drill-down (paneles a pantalla completa)
   ========================================================== */

.mobile-menu-viewport {
  position: relative;
  overflow: scroll;
  flex: 1 1 auto;
}

.mobile-pages-menu,
.mobile-pages-menu .sub-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Cada nivel de menú (raíz, submenú, panel externo) es un panel */
.menu-panel {
  width: 100%;
  background: #fff;
}

.menu-panel.panel-hidden {
  display: none;
}

/* Mismo estilo de enlace para TODOS los niveles: negrita, mismo tamaño */
.mobile-pages-menu .menu-link {
  display: block;
  padding: 20px;
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
  color: #000000;
  flex: 1 1 auto;
}

.mobile-pages-menu li a:hover {
  opacity: 0.7;
}

.mobile-pages-menu .menu-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Botón flecha que abre el submenú / panel externo */
.mobile-pages-menu .submenu-toggle {
  background: none;
  border: none;
  padding: 0 20px;
  height: 56px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Cabecera "Volver" inyectada al inicio de cada submenú/panel externo */
.menu-panel-back {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px;
  font-weight: 700;
  font-size: 16px;
  color: #000;
  cursor: pointer;
  background: #fff;
}

/* ==========================================================
   Menú drill-down — selectores anclados a .top-menu-mobile
   ========================================================== */

.mobile-menu-viewport {
  position: relative;
  overflow: scroll;
  flex: 1 1 auto;
}

/* Reset de listas en TODOS los niveles */
.top-menu-mobile ul,
.top-menu-mobile .menu-panel,
.top-menu-mobile .sub-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.top-menu-mobile li {
  list-style: none;
}

/* Cada nivel es un panel */
.top-menu-mobile .menu-panel {
  width: 100%;
  background: #fff;
}

.top-menu-mobile .menu-panel.panel-hidden {
  display: none;
}

.top-menu-mobile .menu-panel.panel-active {
  display: block;
}

.top-menu-mobile .menu-panel > .menu-item:last-child {
  border-bottom: none;
}

/* Mismo estilo de enlace en TODOS los niveles */
.top-menu-mobile .menu-link {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 0 20px;
  text-decoration: none;
  font-weight: 500;
  font-size: 18px;
  color: #000000;
  flex: 1 1 auto;
}

.top-menu-mobile .menu-link:hover,
.top-menu-mobile .menu-link:focus,
.top-menu-mobile .menu-link:visited {
  color: #000000;
  opacity: 0.7;
}

.top-menu-mobile .menu-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Botón flecha — reset agresivo para anular el estilo de botón de Astra */
.top-menu-mobile .submenu-toggle,
.top-menu-mobile .submenu-toggle:hover,
.top-menu-mobile .submenu-toggle:focus,
.top-menu-mobile .submenu-toggle:active {
  background: none !important;
  background-color: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: inherit !important;
  padding: 0 20px !important;
  margin: 0 !important;
  height: 56px;
  min-height: 0;
  width: 60px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  appearance: none;
  -webkit-appearance: none;
}

.top-menu-mobile .submenu-toggle::before {
  content: '';
  width: 10px;
  height: 10px;
  border-right: 1.5px solid #000000;
  border-bottom: 1.5px solid #000000;
  transform: rotate(-45deg);
  display: block;
}

/* Cabecera "Volver" */
.top-menu-mobile .menu-panel-back {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px;
  font-weight: 700;
  font-size: 20px;
  color: #000;
  cursor: pointer;
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 2;
}

.top-menu-mobile .menu-panel-back:hover {
  opacity: 0.7;
}
/**/
.top-menu-mobile .menu-panel-back {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px;
  font-weight: 700;
  font-size: 20px;
  color: #000;
  cursor: pointer;
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 2;
}

/* La flecha pasa a ser el SVG y se va al final de la fila */
.top-menu-mobile .menu-panel-back .back-arrow {
  order: 2;
  margin-left: auto;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  /* anulamos los bordes de la versión anterior */
  border: none;
  transform: none;
  background-image: url('https://stack.gmedia.es/wp-content/uploads/2026/09/arrow-left.svg');
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

/* El texto se queda pegado a la izquierda */
.top-menu-mobile .menu-panel-back > span:not(.back-arrow) {
  order: 1;
}

/* .footer-phone::before {
  content: url('https://stack.gmedia.es/wp-content/uploads/2026/09/phone.svg');
  width: 30px;
  height: 30px;
  margin-right: 10px;
}
.footer-tel::before {
  content: url('https://stack.gmedia.es/wp-content/uploads/2026/09/smartphone-device.svg');
  width: 30px;
  height: 30px;
  margin-right: 10px;
}
.footer-email::before {
  content: url('https://stack.gmedia.es/wp-content/uploads/2026/09/mail.svg');
  width: 30px;
  height: 30px;
  margin-right: 12px;
} */

.footer-email,
.footer-phone,
.footer-tel {
  display: flex;
  align-items: center;
  align-items: flex-start;
  font-weight: 600;
  color: black;
  font-size: 14px;
  font-weight: normal;
}

.footer-menu-mobile-phone {
  margin-top: auto;
  padding: 20px;
  flex-direction: column;
}

.footer-menu-mobile-phone {
  opacity: 1;
  max-height: 200px;
  overflow: hidden;
  transition:
    opacity 0.25s ease,
    max-height 0.35s ease;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

.footer-menu-mobile-phone.is-hidden {
  opacity: 0;
  max-height: 0;
  pointer-events: none;
}

.footer-menu-mobile-phone .social-icons {
  justify-content: space-between;
}

.footer-menu-mobile-phone .social-icons a img {
  width: 24px;
  height: 24px;
}

.footer-menu-mobile .weglot-dropdown .wgcurrent .wglanguage-name {
  font-size: 14px;
}
.footer-menu-mobile .country-selector .wg-li a {
  font-size: 14px !important;
}

.footer-menu-mobile .ast-builder-layout-element {
  border: 1px solid #e1e1e1;
  border-radius: 10px;
  padding: 0px 10px;
  width: 150px;
}
.footer-menu-mobile .ast-builder-layout-element div {
  width: 150px;
}
.footer-menu-mobile .ast-builder-layout-element a {
  display: flex;
  flex-direction: row;
  align-items: center;
  width: 150px;
  margin-bottom: 0px;
  gap: 10px;
}
.footer-menu-mobile .ast-builder-layout-element a p {
  margin-bottom: 0px;
  font-size: 14px;
  font-weight: normal;
}
