/* =====================================================================================
   MEGA MENÚ v1 · adcenter.com.mx (14-oct-2026)
   Escritorio (>880 px): "Servicios" abre un panel con 4 grupos + tarjeta de Leo.
   Celular (<=880 px): el menú lateral es un acordeón por grupos con WhatsApp fijo abajo.
   Sistema de diseño de la casa: tinta #090055, lila #A652FF, azul #1670F9, dorado #FFB03A,
   Gabarito (títulos) y Albert Sans (texto). Sin JS: el panel abre con :hover/:focus-within
   y el menú de celular con #acm-cel (:target). Nada nace invisible que el usuario deba ver.
   OJO 00-reset.css: a{color:#c36} y button:hover{background:#c36}; por eso cada enlace y
   botón declara su color también en :hover, :focus y :active.
   ===================================================================================== */
.acm, .acm-cel {
  --acm-tinta: #090055; --acm-lila: #A652FF; --acm-azul: #1670F9; --acm-dorado: #FFB03A;
  --acm-gris: #626262; --acm-micro: #6B6B85; --acm-linea: #E8E8F2; --acm-nube: #F7F6FC;
  --acm-sombra: 0 24px 54px rgba(9, 0, 85, .14);
  --acm-ease: cubic-bezier(.2, .8, .2, 1);
}
.acm-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* Tonos de los grupos (pares de las pastillas de servicio del sistema) */
.acm-t-azul    { --acm-fondo: #E4EEFF; --acm-fuerte: #0F56C4; }
.acm-t-lila    { --acm-fondo: #F1E6FF; --acm-fuerte: #7A2BD9; }
.acm-t-naranja { --acm-fondo: #FFF0D9; --acm-fuerte: #B86A00; }
.acm-t-verde   { --acm-fondo: #E3F7E6; --acm-fuerte: #1F8A3A; }
.acm-t-tinta   { --acm-fondo: #E7E6F5; --acm-fuerte: #090055; }

/* ---------- Ícono (mismo cuadro en escritorio y celular) ---------- */
.acm-ico {
  flex: none; display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px;
  background: var(--acm-fondo); color: #090055;
  transition: transform .18s var(--acm-ease), box-shadow .18s var(--acm-ease), background-color .18s;
}
.acm-ico-s { width: 36px; height: 36px; border-radius: 10px; }
.acm-svg { width: 26px; height: 26px; display: block; }
.acm-ico-s .acm-svg { width: 22px; height: 22px; }
.acm-svg-marca { width: 21px; height: 21px; }
.acm-ico-s .acm-svg-marca { width: 19px; height: 19px; }
.acm-col-marca { flex: none; width: 8px; height: 8px; border-radius: 3px; background: var(--acm-fuerte); }

/* ---------- Enlace de servicio ---------- */
.acm-lista { list-style: none; margin: 0; padding: 0; }
.acm a.acm-link, .acm a.acm-link:hover, .acm a.acm-link:focus, .acm a.acm-link:active,
.acm-cel a.acm-link, .acm-cel a.acm-link:hover, .acm-cel a.acm-link:focus, .acm-cel a.acm-link:active {
  display: flex; align-items: center; gap: 14px; padding: 10px 12px; border-radius: 14px;
  color: #090055; text-decoration: none; background: transparent; outline: none;
  transition: background-color .16s;
}
.acm-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.acm-nombre { font-family: "Gabarito", sans-serif; font-weight: 500; font-size: 16px; line-height: 20px; color: #090055; transition: color .16s; }
.acm-linea { font-family: "Albert Sans", sans-serif; font-weight: 400; font-size: 13.5px; line-height: 18px; color: var(--acm-gris); }
@media (hover: hover) {
  .acm a.acm-link:hover, .acm-cel a.acm-link:hover { background: var(--acm-nube); }
  .acm a.acm-link:hover .acm-nombre, .acm-cel a.acm-link:hover .acm-nombre { color: #A652FF; }
  .acm a.acm-link:hover .acm-ico, .acm-cel a.acm-link:hover .acm-ico {
    background: #fff; transform: translateY(-2px); box-shadow: 0 8px 18px rgba(9, 0, 85, .12), inset 0 0 0 1px var(--acm-linea);
  }
}
.acm a.acm-link:focus-visible, .acm-cel a.acm-link:focus-visible { box-shadow: 0 0 0 2px #A652FF; background: var(--acm-nube); }
.acm a.acm-link[aria-current="page"], .acm-cel a.acm-link[aria-current="page"] { background: var(--acm-nube); }
.acm a.acm-link[aria-current="page"] .acm-nombre::after, .acm-cel a.acm-link[aria-current="page"] .acm-nombre::after {
  content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 8px; vertical-align: middle; border-radius: 50%;
  background: linear-gradient(90deg, #A652FF, #FFB03A);
}

/* ---------- Botón de WhatsApp (verde de la casa, logo oficial sin círculo) ---------- */
.acm a.acm-btn-wa, .acm a.acm-btn-wa:hover, .acm a.acm-btn-wa:focus, .acm a.acm-btn-wa:active,
.acm-cel a.acm-btn-wa, .acm-cel a.acm-btn-wa:hover, .acm-cel a.acm-btn-wa:focus, .acm-cel a.acm-btn-wa:active {
  display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 12px 20px;
  border-radius: 4px; background: linear-gradient(90deg, #25D366, #128C7E); color: #fff; text-decoration: none;
  font-family: "Gabarito", sans-serif; font-weight: 600; font-size: 17px; line-height: 20px;
  box-shadow: 0 10px 24px rgba(18, 140, 126, .28); transition: transform .3s var(--acm-ease), box-shadow .3s; outline: none;
}
.acm a.acm-btn-wa:hover, .acm-cel a.acm-btn-wa:hover { transform: translateY(-3px); box-shadow: 0 14px 28px rgba(18, 140, 126, .34); }
.acm a.acm-btn-wa:focus-visible, .acm-cel a.acm-btn-wa:focus-visible { box-shadow: 0 0 0 3px #fff, 0 0 0 5px #128C7E; }
.acm-wa-logo { width: 22px; height: 22px; flex: none; }

/* =====================================================================================
   ESCRITORIO (>880 px)
   ===================================================================================== */
/* El panel se ancla al contenedor de 1280 de la barra: los envoltorios del widget dejan
   de ser "position:relative" para que el panel mida lo ancho del contenedor, no del botón. */
.elementor-location-header .elementor-element-800d930 > .e-con-inner { position: relative; }
.elementor-location-header .elementor-element-8cf4e58,
.elementor-location-header .elementor-element-9ce27ec,
.elementor-location-header .elementor-element-9ce27ec > .elementor-widget-container,
.elementor-location-header .elementor-nav-menu--main.acm,
.elementor-location-header .acm .elementor-nav-menu,
.elementor-location-header .elementor-nav-menu--main .elementor-nav-menu li.acm-item { position: static; }

/* Con el panel abierto la barra sube por encima del botón flotante de Leo (9990-9992) para que no tape
   el panel; al cerrar vuelve a su 99 de siempre. La píldora de Leo nunca se esconde. */
.elementor-15 .elementor-element.elementor-element-800d930.e-con.acm-encima,
.elementor-15 .elementor-element.elementor-element-800d930.e-con:has(.acm:not(.acm-js) .acm-item:hover),
.elementor-15 .elementor-element.elementor-element-800d930.e-con:has(.acm:not(.acm-js) .acm-item:focus-within) { --z-index: 9995; }

/* El botón "Servicios" se ve idéntico a los enlaces vecinos (mismas reglas .elementor-item) */
.elementor-location-header .acm .acm-trigger,
.elementor-location-header .acm .acm-trigger:hover,
.elementor-location-header .acm .acm-trigger:focus,
.elementor-location-header .acm .acm-trigger:active {
  display: flex; align-items: center; gap: 7px; margin: 0; border: 0; border-radius: 6px; background: transparent;
  color: #090055; fill: #090055; font-family: "Gabarito", sans-serif; font-weight: 400; line-height: 20px;
  padding-top: 13px; padding-bottom: 13px; cursor: pointer; box-shadow: none; text-transform: none; letter-spacing: normal;
  -webkit-appearance: none; appearance: none; outline: none;
}
.elementor-location-header .acm .acm-trigger:focus-visible { box-shadow: 0 0 0 2px #A652FF; }
.elementor-location-header .acm .elementor-item:focus-visible { outline: 2px solid #A652FF; outline-offset: -2px; border-radius: 6px; }
.acm-caret { width: 12px; height: 12px; flex: none; transition: transform .2s var(--acm-ease); }
.acm-item.acm-abierto .acm-caret { transform: rotate(180deg); }
.acm-trigger.acm-actual { color: #6C6B7A; }

/* El panel: cerrado = invisible y sin foco; abierto = opacity/transform (sin mover nada de la página) */
.acm-panel {
  position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; right: 0;
  visibility: hidden; opacity: 0; transform: translateY(-8px); pointer-events: none;
  transition: opacity .16s ease, transform .2s var(--acm-ease), visibility 0s linear .2s;
}
.acm-panel::before { content: ""; position: absolute; left: 0; right: 0; top: -16px; height: 16px; } /* puente: el mouse no "cae" entre barra y panel */
.acm.acm-js .acm-item.acm-abierto .acm-panel,
.acm:not(.acm-js) .acm-item:hover .acm-panel,
.acm:not(.acm-js) .acm-item:focus-within .acm-panel {
  visibility: visible; opacity: 1; transform: none; pointer-events: auto;
  transition: opacity .18s ease, transform .22s var(--acm-ease), visibility 0s;
}
.acm-panel-in {
  display: grid; grid-template-columns: minmax(0, 1fr) 292px; gap: 20px; align-items: stretch;
  max-height: calc(100vh - 150px); overflow: auto; overscroll-behavior: contain;
  padding: 22px; border-radius: 20px; background: #fff; border: 1px solid var(--acm-linea); box-shadow: var(--acm-sombra);
}
.acm-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; align-content: start; }
.acm-col { min-width: 0; padding: 4px 14px 10px 0; }
.acm-col:nth-child(even) { border-left: 1px solid var(--acm-linea); padding-left: 14px; padding-right: 0; }
.acm-col:nth-child(n+3) { border-top: 1px solid var(--acm-linea); padding-top: 12px; padding-bottom: 4px; }
/* Elementor esconde y achica cualquier <ul> dentro del menú (submenús de smartmenus): aquí no aplica */
.elementor-location-header .elementor-nav-menu--main .acm-panel ul.acm-lista { display: block; position: static; width: auto; min-width: 0; max-width: none; margin: 0; padding: 0; border: 0; background: none; box-shadow: none; }
.elementor-location-header .elementor-nav-menu--main .acm-panel li { display: block; position: static; }
.elementor-location-header .acm .acm-panel, .elementor-location-header .acm .acm-panel a { white-space: normal; }
.acm-col-h {
  display: flex; align-items: center; gap: 8px; margin: 0 0 6px; padding: 6px 12px;
  font-family: "Gabarito", sans-serif; font-weight: 600; font-size: 15px; line-height: 20px; color: #090055;
}
.acm .acm-link { align-items: flex-start; }
.acm .acm-txt { padding-top: 1px; }

/* Tarjeta de Leo (degradado del cierre de la casa) */
.acm-dest {
  position: relative; overflow: hidden; isolation: isolate; display: flex; flex-direction: column; gap: 10px;
  padding: 24px 22px 20px; border-radius: 16px; color: #fff;
  background: linear-gradient(135deg, #090055 0%, #141a8f 55%, #3b1fb0 100%);
}
.acm-dest-mancha {
  position: absolute; z-index: -1; width: 220px; height: 220px; right: -90px; top: -90px; border-radius: 50%;
  background: radial-gradient(circle, rgba(166, 82, 255, .55), rgba(166, 82, 255, 0) 70%);
}
/* Elementor estira y rellena cualquier <a> del menú (flex-grow:1; padding 13px 20px) y le quita el radio a las <img> */
.acm .acm-dest > * { flex: none; }
.elementor-location-header .acm .acm-dest a { flex-grow: 0; }
.elementor-location-header .acm .acm-dest img.acm-dest-leo { border-radius: 50%; }
.acm-dest-leo { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 3px rgba(255, 255, 255, .9), 0 0 0 6px rgba(37, 211, 102, .55); }
.acm-dest-t { margin: 6px 0 0; font-family: "Gabarito", sans-serif; font-weight: 600; font-size: 21px; line-height: 26px; color: #fff; text-wrap: balance; }
.acm-grad-dorado { background: linear-gradient(90deg, #FFB03A, #ffd58a); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: #FFB03A; }
.acm-dest-p { margin: 0; font-family: "Albert Sans", sans-serif; font-size: 14.5px; line-height: 21px; color: rgba(255, 255, 255, .82); }
.acm-dest .acm-btn-wa { margin-top: 6px; }
.acm a.acm-dest-liga, .acm a.acm-dest-liga:hover, .acm a.acm-dest-liga:focus, .acm a.acm-dest-liga:active {
  align-self: flex-start; display: inline-flex; align-items: center; min-height: 32px; color: #fff; text-decoration: underline;
  text-decoration-color: rgba(255, 176, 58, .8); text-underline-offset: 5px; text-decoration-thickness: 1.5px; padding: 0;
  font-family: "Gabarito", sans-serif; font-weight: 500; font-size: 15px; outline: none;
}
.acm a.acm-dest-liga:hover { color: #FFB03A; }
.acm a.acm-dest-liga:focus-visible { box-shadow: 0 0 0 2px #FFB03A; border-radius: 4px; }
.acm-dest-cifras { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: auto 0 0; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .16);
  font-family: "Albert Sans", sans-serif; font-size: 13px; line-height: 18px; color: rgba(255, 255, 255, .78); }
.acm-dest-cifras b { font-family: "Gabarito", sans-serif; font-weight: 600; font-size: 16px; color: #fff; margin-right: 3px; }

/* Tableta grande: Leo baja a una franja horizontal debajo de los 4 grupos */
@media (max-width: 1240px) {
  .acm-panel-in { grid-template-columns: 1fr; }
  .acm-dest { flex-direction: row; flex-wrap: wrap; align-items: center; column-gap: 18px; row-gap: 6px; padding: 16px 20px; }
  .acm-dest-leo { width: 46px; height: 46px; }
  .acm-dest-t { margin: 0; font-size: 19px; line-height: 24px; flex: 1 1 260px; }
  .acm-dest-p { flex: 1 1 300px; }
  .acm-dest .acm-btn-wa { margin: 0; }
  .acm-dest-cifras { display: none; }
}
@media (max-width: 1100px) {
  .acm-dest-p { display: none; }
  .acm a.acm-dest-liga[href="/proyectos/"] { display: none; }
}
@media (max-width: 1024px) {
  .acm-panel-in { padding: 16px; max-height: calc(100vh - 140px); }
}
@media (max-width: 880px) { .acm-panel { display: none; } }

/* =====================================================================================
   CELULAR (<=880 px) · reemplaza al popup 24 de Elementor
   ===================================================================================== */
/* Hamburguesa: área táctil de 44 sin mover nada (el dibujo sigue midiendo 24) */
.elementor-location-header a.acm-ham { position: relative; }
.elementor-location-header a.acm-ham::after { content: ""; position: absolute; left: 50%; top: 50%; width: 48px; height: 48px; transform: translate(-50%, -50%); }
.elementor-location-header a.acm-ham:focus-visible { outline: 2px solid #A652FF; outline-offset: 6px; border-radius: 4px; }

.acm-cel { position: fixed; inset: 0; z-index: 100000; visibility: hidden; pointer-events: none; transition: visibility 0s linear .26s; }
.acm-cel:target, .acm-cel.acm-cel--abierto { visibility: visible; pointer-events: auto; transition: visibility 0s; }
@media (min-width: 881px) { .acm-cel, .acm-cel:target { display: none; } }
.acm-cel a.acm-cel-fondo { position: absolute; inset: 0; background: rgba(9, 0, 85, .55); opacity: 0; transition: opacity .24s ease; cursor: default; }
.acm-cel:target .acm-cel-fondo, .acm-cel.acm-cel--abierto .acm-cel-fondo { opacity: 1; }
.acm-cel-panel {
  position: absolute; top: 0; left: 0; bottom: 0; width: min(420px, calc(100vw - 32px));
  display: flex; flex-direction: column; background: #fff; border-radius: 0 24px 24px 0;
  box-shadow: 0 0 60px rgba(9, 0, 85, .25); transform: translateX(-104%); transition: transform .26s var(--acm-ease);
  height: 100vh; height: 100dvh;
}
.acm-cel:target .acm-cel-panel, .acm-cel.acm-cel--abierto .acm-cel-panel { transform: none; }
.acm-cel-cab { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 10px 10px 20px; min-height: 64px; border-bottom: 1px solid var(--acm-linea); }
.acm-cel-logo { display: inline-flex; min-height: 44px; align-items: center; }
.acm-cel-logo img { width: 140px; height: auto; display: block; }
.acm-cel a.acm-cel-cerrar, .acm-cel a.acm-cel-cerrar:hover, .acm-cel a.acm-cel-cerrar:focus, .acm-cel a.acm-cel-cerrar:active {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; color: #090055; background: var(--acm-nube); outline: none;
}
.acm-cel a.acm-cel-cerrar:focus-visible { box-shadow: 0 0 0 2px #A652FF; }
.acm-cel-cerrar svg { width: 22px; height: 22px; }
.acm-cel-nav { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 10px 12px 16px; }
/* difuminado abajo: avisa que hay más menú al deslizar */
.acm-cel-nav { -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 22px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 22px), transparent); }
.acm-cel-lista { list-style: none; margin: 0; padding: 0; }
.acm-cel a.acm-top-cel, .acm-cel a.acm-top-cel:hover, .acm-cel a.acm-top-cel:focus, .acm-cel a.acm-top-cel:active {
  display: flex; align-items: center; gap: 14px; min-height: 52px; padding: 8px 10px; border-radius: 14px;
  font-family: "Gabarito", sans-serif; font-weight: 500; font-size: 18px; line-height: 22px; color: #090055; text-decoration: none; outline: none;
}
.acm-cel a.acm-top-cel:focus-visible { box-shadow: 0 0 0 2px #A652FF; }
.acm-cel a.acm-top-cel[aria-current="page"] { background: var(--acm-nube); }
.acm-cel-serv { margin: 8px 0 6px; padding: 12px 0 10px; border-top: 1px solid var(--acm-linea); border-bottom: 1px solid var(--acm-linea); }
.acm-cel-h { margin: 0 10px 6px; font-family: "Albert Sans", sans-serif; font-weight: 700; font-size: 13px; line-height: 18px; color: var(--acm-micro); }
.acm-grupos { display: flex; flex-direction: column; gap: 6px; }
.acm-grupo { border-radius: 16px; background: transparent; transition: background-color .2s; }
.acm-grupo[open] { background: var(--acm-nube); }
.acm-cel .acm-sum, .acm-cel .acm-sum:hover, .acm-cel .acm-sum:focus {
  display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 12px; border-radius: 16px; cursor: pointer;
  list-style: none; color: #090055; background: transparent; outline: none; -webkit-tap-highlight-color: transparent;
}
.acm-cel .acm-sum::-webkit-details-marker { display: none; }
.acm-cel .acm-sum::marker { content: ""; }
.acm-cel .acm-sum:focus-visible { box-shadow: 0 0 0 2px #A652FF; }
.acm-sum .acm-col-marca { width: 10px; height: 10px; }
.acm-sum-txt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.acm-sum-t { font-family: "Gabarito", sans-serif; font-weight: 600; font-size: 17px; line-height: 22px; color: #090055; }
.acm-sum-r { font-family: "Albert Sans", sans-serif; font-size: 13px; line-height: 18px; color: var(--acm-micro); }
.acm-sum .acm-caret { width: 16px; height: 16px; color: #090055; }
.acm-grupo[open] > .acm-sum .acm-caret { transform: rotate(180deg); }
.acm-grupo .acm-lista { padding: 0 6px 8px; }
.acm-cel a.acm-link { min-height: 56px; padding: 8px 8px; gap: 12px; }
.acm-cel .acm-ico { width: 40px; height: 40px; }
.acm-cel .acm-nombre { font-size: 16px; }
.acm-cel .acm-linea { font-size: 13px; }
/* acordeón suave donde el navegador lo sabe hacer (Chrome 131+); en los demás abre directo */
@supports (interpolate-size: allow-keywords) {
  .acm-cel { interpolate-size: allow-keywords; }
  .acm-grupo::details-content { block-size: 0; overflow: hidden; transition: block-size .24s var(--acm-ease), content-visibility .24s allow-discrete; }
  .acm-grupo[open]::details-content { block-size: auto; }
}
.acm-cel-pie { flex: none; padding: 12px 16px; padding-bottom: max(12px, env(safe-area-inset-bottom)); border-top: 1px solid var(--acm-linea); background: #fff; border-radius: 0 0 24px 0; }
.acm-cel a.acm-btn-wa-cel { width: 100%; min-height: 52px; }
@media (max-width: 360px) {
  .acm-cel a.acm-btn-wa-cel, .acm-cel a.acm-btn-wa-cel:hover, .acm-cel a.acm-btn-wa-cel:focus { font-size: 16px; padding: 12px 12px; gap: 8px; white-space: nowrap; }
}

html.acm-bloqueo, html.acm-bloqueo body { overflow: hidden; }

/* Movimiento reducido: todo aparece sin desplazarse */
@media (prefers-reduced-motion: reduce) {
  .acm-panel, .acm-cel, .acm-cel-panel, .acm-cel-fondo, .acm-ico, .acm-caret, .acm a.acm-btn-wa, .acm-cel a.acm-btn-wa { transition: none !important; }
  .acm-panel { transform: none; }
  .acm-grupo::details-content { transition: none !important; }
  .acm a.acm-link:hover .acm-ico, .acm-cel a.acm-link:hover .acm-ico, .acm a.acm-btn-wa:hover { transform: none; }
}
