/* AEC Global — grouped main menu (Oct 2026).
   Desktop: one capsule with Servicios ▾ · Cómo funciona · Recursos ▾ · Empresa ▾.
   Dropdowns open on hover/focus (no script needed) and on click (aec-nav.js).
   Phone: the drawer from aec-mobile-nav.js, full screen, navy, with accordions. */

header nav.aec-nav { margin-left: auto; flex: none; }
.aec-nav-pill {
  display: flex; align-items: center; gap: 2px; margin: 0; padding: 5px; list-style: none;
  background: #F4F7FA; border: 1px solid #DCE5EE; border-radius: 9999px;
}
.aec-nav-item { position: relative; list-style: none; }
.aec-nav-top {
  display: flex; align-items: center; gap: 6px; white-space: nowrap;
  font: 600 14.5px Inter, system-ui, sans-serif; color: #3D5468 !important;
  background: transparent; border: 0; border-radius: 9999px; padding: 9px 15px;
  cursor: pointer; text-decoration: none !important; line-height: 1.2;
}
.aec-nav-top:hover { color: #032750 !important; background: #fff; }
.aec-nav-top.is-current, .aec-nav-top[aria-current="page"] { color: #04707B !important; }
.aec-nav-item.is-open > .aec-nav-top,
.aec-nav-item:hover > button.aec-nav-top,
.aec-nav-item:focus-within > button.aec-nav-top { background: #032750; color: #fff !important; }
.aec-nav-chev {
  width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px); transition: transform .18s;
}
.aec-nav-item.is-open .aec-nav-chev,
.aec-nav-item:hover .aec-nav-chev,
.aec-nav-item:focus-within .aec-nav-chev { transform: rotate(-135deg) translate(-2px,-1px); }

.aec-nav-drop {
  position: absolute; top: calc(100% + 12px); left: 0; z-index: 95; min-width: 270px;
  background: #032750; border-radius: 16px; padding: 10px;
  box-shadow: 0 22px 44px rgba(3,39,80,.32);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s;
}
.aec-nav-drop::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px; }
.aec-nav-item:hover > .aec-nav-drop,
.aec-nav-item:focus-within > .aec-nav-drop,
.aec-nav-item.is-open > .aec-nav-drop { opacity: 1; visibility: visible; transform: none; }
.aec-nav-item.is-closed > .aec-nav-drop { opacity: 0 !important; visibility: hidden !important; }
.aec-nav-drop a {
  display: block; padding: 10px 14px; border-radius: 10px; white-space: normal;
  color: #E7EEF6 !important; text-decoration: none !important; font: 500 15px/1.35 Inter, system-ui, sans-serif;
}
.aec-nav-drop a small { display: block; margin-top: 2px; color: #9FB7CB; font-size: 12.5px; font-weight: 400; }
.aec-nav-drop a:hover, .aec-nav-drop a:focus-visible { background: rgba(255,255,255,.1); color: #fff !important; }
.aec-nav-drop a[aria-current="page"] { background: rgba(255,255,255,.08); color: #7ED8DF !important; }
.aec-nav-drop a.aec-nav-all { border-top: 1px solid rgba(255,255,255,.14); margin-top: 6px; padding-top: 12px; color: #7ED8DF !important; font-weight: 600; }

/* the request button carries the same orange edge as the hero button */
header [data-action="goAsk"], header > div > a[href*="request-a-quote"] {
  box-shadow: inset 5px 0 0 #F2600C !important; border-radius: 9999px !important; padding-left: 26px !important;
}

/* tight desktop widths */
@media (min-width: 901px) and (max-width: 1240px) {
  .aec-nav-top { padding: 8px 11px; font-size: 13.5px; }
}

/* ---------------- phone drawer: full screen, navy ---------------- */
.aec-mnav-panel {
  width: 100vw !important; background: #032750 !important; color: #fff;
  padding: 0 0 calc(24px + env(safe-area-inset-bottom)) !important; box-shadow: none !important;
}
.aec-mnav-head { padding: 10px 18px !important; min-height: 76px; border-bottom: 1px solid rgba(255,255,255,.14) !important; }
.aec-mnav-head .aec-logo-lockup > span { color: #fff !important; }
.aec-mnav-head .aec-logo-lockup > span span { color: #059BA9 !important; }
.aec-mnav-title { color: #9FB7CB !important; }
.aec-mnav-close { color: #fff !important; }
.aec-mnav-links { padding: 0 !important; }
.aec-mnav-links > a, .aec-mnav-acc > button {
  display: flex !important; align-items: center; justify-content: space-between; width: 100%;
  min-height: 60px; padding: 0 22px !important; background: transparent; border: 0 !important;
  border-bottom: 1px solid rgba(255,255,255,.14) !important;
  font: 600 17px Inter, system-ui, sans-serif !important; color: #fff !important; text-align: left; cursor: pointer; text-decoration: none;
}
.aec-mnav-links > a[aria-current="page"], .aec-mnav-acc.is-current > button { color: #7ED8DF !important; }
.aec-mnav-acc > button .aec-nav-chev { width: 9px; height: 9px; }
.aec-mnav-acc.is-open > button .aec-nav-chev { transform: rotate(-135deg) translate(-2px,-1px); }
.aec-mnav-sub { display: none; padding: 6px 0 12px; border-bottom: 1px solid rgba(255,255,255,.14); }
.aec-mnav-acc.is-open > .aec-mnav-sub { display: block; }
.aec-mnav-sub a {
  display: block !important; min-height: 0 !important; border: 0 !important; padding: 11px 22px 11px 44px !important;
  font: 500 15.5px Inter, system-ui, sans-serif !important; color: #D3DFE8 !important; text-decoration: none;
}
.aec-mnav-sub a[aria-current="page"] { color: #7ED8DF !important; }
.aec-mnav-sub a.aec-nav-all { color: #7ED8DF !important; font-weight: 600 !important; }
.aec-mnav-actions { padding: 22px 22px 8px !important; }
.aec-mnav-cta { background: #fff !important; color: #032750 !important; border-radius: 9999px !important; box-shadow: inset 6px 0 0 #F2600C !important; }
.aec-mnav-wa { border-color: rgba(255,255,255,.4) !important; color: #fff !important; }
.aec-mnav-langs { border-top: 0 !important; padding: 14px 22px 0 !important; text-align: center; }
.aec-mnav-langs .aec-mnav-title { display: none; }
.aec-mnav-langrow { justify-content: center; }
.aec-mnav-langrow a { flex: 0 0 auto !important; min-width: 52px; min-height: 42px !important; border-radius: 9999px !important; background: transparent !important; border: 1px solid rgba(255,255,255,.22); color: #D3DFE8 !important; }
.aec-mnav-langrow a[aria-current="page"], .aec-mnav-langrow a[aria-current="true"] { background: #04707B !important; border-color: #04707B; color: #fff !important; }

/* Sub-pages used to push the long menu to a second row between 901 and 1340px.
   The grouped menu fits on one row, and dropdowns must not be clipped. */
@media (min-width: 901px) and (max-width: 1340px) {
  .hdr { flex-wrap: nowrap !important; }
  .hdr nav.aec-nav { order: 0 !important; width: auto !important; overflow: visible !important; }
}
/* the WhatsApp bubble stays behind the open phone menu */
html:has(.aec-mnav-panel[data-open="1"]) .aec-wa-float { display: none !important; }

/* Recursos: the seven portal entries (9 Oct 2026). Two columns on desktop, the portal on top. */
@media (min-width: 901px) {
  .aec-nav-drop--res { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 4px; width: 560px; left: 50%; margin-left: -280px; }
  .aec-nav-item:hover > .aec-nav-drop--res, .aec-nav-item:focus-within > .aec-nav-drop--res, .aec-nav-item.is-open > .aec-nav-drop--res { transform: none; }
  .aec-nav-drop--res a.aec-nav-portal { grid-column: 1 / -1; background: rgba(255,255,255,.07); border-left: 4px solid #F2600C; margin-bottom: 4px; }
}
