/* ACMP global nav — dropdown desktop + mobile overlay (rules/menu.json) */

/* ---- Barra desktop: fondo naranja + links blancos ---- */
.acmp-nav {
  background: var(--acmp-orange, #f74604);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.acmp-nav .acmp-logo img {
  filter: brightness(0) invert(1);
}

.acmp-nav-link,
.acmp-nav-dropdown-toggle {
  color: #fff;
}

.acmp-nav-link:hover,
.acmp-nav-dropdown-toggle:hover {
  color: rgba(255, 255, 255, 0.88);
}

.acmp-nav-link.is-active {
  color: #fff;
  opacity: 0.95;
}

.acmp-nav-burger {
  color: #fff;
}

.acmp-nav-burger:hover {
  background: rgba(255, 255, 255, 0.12);
}

.acmp-nav .acmp-nav-cta.acmp-btn-primary {
  background: #fff;
  color: var(--acmp-orange, #f74604);
  box-shadow: none;
}

.acmp-nav .acmp-nav-cta.acmp-btn-primary:hover {
  background: rgba(255, 255, 255, 0.92);
  color: var(--acmp-orange-700, #c93803);
}

/* ---- Desktop dropdown ---- */
.acmp-nav-dropdown {
  position: relative;
}
.acmp-nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  color: inherit;
  padding: 0;
}
.acmp-nav-chevron {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}
.acmp-nav-dropdown.is-open .acmp-nav-dropdown-toggle .acmp-nav-chevron,
.acmp-nav-dropdown:hover .acmp-nav-dropdown-toggle .acmp-nav-chevron {
  transform: rotate(180deg);
}
.acmp-nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 280px;
  max-height: 70vh;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--acmp-gray-200, #e6e6e6);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(34, 43, 73, 0.14);
  padding: 8px 0;
  z-index: 60;
}
.acmp-nav-dropdown:hover .acmp-nav-dropdown-menu,
.acmp-nav-dropdown.is-open .acmp-nav-dropdown-menu {
  display: block;
}
.acmp-nav-dropdown-link {
  display: block;
  padding: 10px 18px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--acmp-navy, #222b49);
  text-decoration: none;
  white-space: nowrap;
}
.acmp-nav-dropdown-link:hover {
  background: var(--acmp-gray, #f2f2f2);
  color: var(--acmp-orange, #f74604);
}

/* ---- Mobile: full-screen overlay (hidden on desktop) ---- */
.acmp-nav-mobile {
  display: none;
}

@media (max-width: 900px) {
  .acmp-nav-mobile {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0;
    z-index: 200;
    background: var(--acmp-orange, #f74604);
    overflow: hidden;
    animation: acmp-mobile-in 0.2s ease-out;
  }
  @keyframes acmp-mobile-in {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  .acmp-logo--inverted img {
    filter: brightness(0) invert(1);
  }

  .acmp-nav-mobile-header {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  }

  .acmp-nav-mobile-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
    cursor: pointer;
    border-radius: 10px;
  }
  .acmp-nav-mobile-close:hover {
    background: rgba(255, 255, 255, 0.12);
  }

  .acmp-nav-mobile-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 0 20px;
  }

  .acmp-nav-mobile-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 0;
    font-family: var(--font-section, 'Poppins', sans-serif);
    font-weight: 600;
    font-size: 17px;
    color: #fff;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  }

  .acmp-nav-mobile-badge {
    flex-shrink: 0;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 4px 8px;
    border-radius: 6px;
    background: #ffe066;
    color: var(--acmp-navy, #222b49);
  }

  .acmp-nav-mobile-accordion {
    border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  }

  .acmp-nav-mobile-accordion-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 16px 0;
    font-family: var(--font-section, 'Poppins', sans-serif);
    font-weight: 600;
    font-size: 17px;
    color: #fff;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
  }
  .acmp-nav-mobile-accordion-toggle .acmp-nav-chevron {
    width: 14px;
    height: 14px;
    transition: transform 0.2s ease;
  }
  .acmp-nav-mobile-accordion.is-open .acmp-nav-mobile-accordion-toggle .acmp-nav-chevron {
    transform: rotate(180deg);
  }

  .acmp-nav-mobile-accordion-body {
    padding-bottom: 8px;
  }

  .acmp-nav-mobile-sublink {
    display: block;
    padding: 11px 0 11px 4px;
    font-family: var(--font-body, 'Inter', sans-serif);
    font-size: 15px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.92);
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  }
  .acmp-nav-mobile-sublink:last-child {
    border-bottom: 0;
  }
  .acmp-nav-mobile-sublink:active {
    color: #fff;
    opacity: 0.85;
  }

  .acmp-nav-mobile-footer {
    flex-shrink: 0;
    padding: 16px 20px calc(16px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid rgba(255, 255, 255, 0.22);
  }

  .acmp-nav-mobile-cta {
    display: flex;
    width: 100%;
    justify-content: center;
    align-items: center;
    padding: 16px 22px;
    border-radius: 14px;
    background: #fff !important;
    color: var(--acmp-orange, #f74604) !important;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 16px;
    text-decoration: none;
    box-shadow: none;
  }
  .acmp-nav-mobile-cta:hover {
    background: rgba(255, 255, 255, 0.92) !important;
    color: var(--acmp-orange-700, #c93803) !important;
  }
}
