/* ==========================================================================
   RRHH SOLUTIONS S.A.S. — SUBMENÚ UNIFICADO DE 14 PRUEBAS PSICOTÉCNICAS
   Estética corporativa limpia, crawlable para SEO, responsive en desktop/móvil.
   ========================================================================== */

.nav-item-dropdown .dropdown-menu {
  overflow: visible !important;
}

.nav-item-dropdown .dropdown-menu > li {
  display: block !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.nav-subdropdown {
  position: relative;
}

.dropdown-menu .nav-subtrigger {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
}

.nav-subtrigger-left {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.tests-count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1px 6px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  color: #475569;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
}

.subtrigger-chevron {
  flex-shrink: 0;
  color: #64748b;
  transition: transform 0.16s ease, color 0.16s ease;
}

.nav-subdropdown:hover > .nav-subtrigger,
.nav-subdropdown:focus-within > .nav-subtrigger,
.nav-subdropdown > .nav-subtrigger.active {
  background: #f1f5f9;
  color: #2563eb;
}

.nav-subdropdown:hover > .nav-subtrigger .subtrigger-chevron,
.nav-subdropdown:focus-within > .nav-subtrigger .subtrigger-chevron {
  color: #2563eb;
  transform: translateX(2px);
}

.nav-subdropdown:hover > .nav-subtrigger .tests-count-pill,
.nav-subdropdown:focus-within > .nav-subtrigger .tests-count-pill {
  background: #dbeafe;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

/* Panel horizontal compacto de 3 columnas (14 pruebas por categoría) */
.tests-megamenu {
  position: absolute;
  top: -12px;
  left: calc(100% + 6px);
  width: 586px;
  max-width: calc(100vw - 380px);
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.13), 0 4px 12px rgba(15, 23, 42, 0.05);
  padding: 16px 18px 12px;
  box-sizing: border-box;
  z-index: 1250;
  display: block !important;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(6px);
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
}

/* Puente invisible para evitar cierre al mover el cursor desde "Pruebas" hacia el panel */
.tests-megamenu::before {
  content: '';
  position: absolute;
  top: -12px;
  bottom: -12px;
  left: -18px;
  width: 18px;
}

.nav-subdropdown:hover > .tests-megamenu,
.nav-subdropdown:focus-within > .tests-megamenu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0);
}

.tests-megamenu-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.92fr 1.03fr;
  gap: 16px;
}

.tests-megamenu-col {
  min-width: 0;
}

.tests-megamenu-heading {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  color: #64748b;
  padding: 0 6px 6px;
  margin-bottom: 4px;
  border-bottom: 1px solid #f1f5f9;
  white-space: nowrap;
}

.tests-megamenu-list {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tests-megamenu-list li {
  margin: 0 !important;
  padding: 0 !important;
}

.tests-megamenu .tests-megamenu-link {
  display: block !important;
  padding: 6px 8px !important;
  border-radius: 6px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1.35 !important;
  color: #1e293b !important;
  text-decoration: none !important;
  background: transparent !important;
  white-space: nowrap !important;
  transition: background 0.14s ease, color 0.14s ease !important;
}

.tests-megamenu .tests-megamenu-link:hover,
.tests-megamenu .tests-megamenu-link:focus-visible {
  background: #eff6ff !important;
  color: #2563eb !important;
}

.tests-megamenu .tests-megamenu-link.active {
  background: #eff6ff !important;
  color: #1d4ed8 !important;
  font-weight: 700 !important;
}

.tests-megamenu-footer {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tests-megamenu .tests-megamenu-all {
  font-size: 12.5px !important;
  font-weight: 700 !important;
  color: #2563eb !important;
  text-decoration: none !important;
  padding: 3px 6px !important;
  border-radius: 5px !important;
  white-space: nowrap !important;
}

.tests-megamenu .tests-megamenu-all:hover {
  background: #eff6ff !important;
  text-decoration: none !important;
}

.tests-megamenu .tests-megamenu-price {
  font-size: 12px !important;
  font-weight: 600 !important;
  color: #475569 !important;
  text-decoration: none !important;
  padding: 3px 6px !important;
  border-radius: 5px !important;
  white-space: nowrap !important;
}

.tests-megamenu .tests-megamenu-price:hover {
  color: #000a31 !important;
  background: #f8fafc !important;
}

@media (min-width: 1200px) and (max-width: 1380px) {
  .tests-megamenu {
    width: 506px;
    padding: 14px 14px 10px;
  }
  .tests-megamenu-grid {
    gap: 10px;
  }
  .tests-megamenu-heading {
    font-size: 9.5px;
    letter-spacing: 0.015em;
    padding: 0 5px 5px;
  }
  .tests-megamenu .tests-megamenu-link {
    font-size: 12.2px !important;
    padding: 5px 5px !important;
  }
}

/* ====================== ACORDEÓN MÓVIL DE 14 PRUEBAS ====================== */
.mobile-nested-dropdown {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-subtrigger {
  width: 100%;
  border: 0;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  background: #f8fafc;
}

.mobile-nav-link.mobile-subtrigger {
  background: transparent;
  border-bottom: 1px solid #f1f5f9;
  padding: 8px 0;
}

.mobile-nested-chevron {
  flex-shrink: 0;
  color: #64748b;
  transition: transform 0.18s ease, color 0.18s ease;
}

.mobile-nested-dropdown.is-open > .mobile-subtrigger {
  background: #eff6ff;
  color: #2563eb;
}

.mobile-nested-dropdown.is-open > .mobile-subtrigger .mobile-nested-chevron {
  transform: rotate(180deg);
  color: #2563eb;
}

.mobile-tests-sublist {
  display: none;
  list-style: none !important;
  margin: 6px 0 4px 10px !important;
  padding: 2px 0 2px 10px !important;
  border-left: 2px solid #cbd5e1;
  flex-direction: column;
  gap: 3px;
}

.mobile-nested-dropdown.is-open > .mobile-tests-sublist {
  display: flex;
}

.mobile-test-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  font-size: 0.84rem;
  font-weight: 600;
  color: #334155;
  text-decoration: none;
  border-radius: 6px;
  background: #ffffff;
  transition: background 0.14s ease, color 0.14s ease;
}

.mobile-test-link:hover,
.mobile-test-link.active {
  background: #eff6ff;
  color: #2563eb;
  font-weight: 700;
}
