/* =========================================================
   NAVBAR
========================================================= */

.main-navbar {
  position: fixed;
  top: 18px;
  left: 50%;
  width: calc(100% - 40px);
  max-width: 1820px;
  z-index: 9999;

  opacity: 0;
  transform: translate(-50%, -18px);
  pointer-events: none;

  padding: 16px 28px;
  border-radius: 28px;

  background: rgba(255, 255, 255, 0.12);

  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);

  border: 1px solid rgba(255, 255, 255, 0.18);

  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);

  transition:
    background 0.35s ease,
    border-color 0.35s ease,
    box-shadow 0.35s ease,
    transform 0.35s ease;
}

.nav-inner {
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 40px;
}

/* =========================================================
   BRAND
========================================================= */

.nav-brand {
  display: flex;
  align-items: center;
  gap: 16px;

  text-decoration: none;
  min-width: 0;
}

.nav-logo-target {
  width: 48px;
  height: 48px;

  position: relative;

  display: flex;
  align-items: center;
  justify-content: center;

  flex-shrink: 0;
}

.nav-logo-img {
  width: 100%;
  height: 100%;

  object-fit: contain;
  display: block;

  filter: drop-shadow(0 4px 12px rgba(255, 255, 255, 0.12));

  opacity: 0;
}

.nav-brand-text {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;

  color: #ffffff;
  text-transform: uppercase;

  opacity: 0.95;
  white-space: nowrap;
}

/* =========================================================
   MENU
========================================================= */

.nav-menu {
  display: flex;
  align-items: center;
  gap: 34px;
}

.nav-menu a {
  position: relative;

  text-decoration: none;

  color: rgba(255, 255, 255, 0.92);

  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: -0.01em;

  transition:
    color 0.3s ease,
    opacity 0.3s ease,
    transform 0.3s ease;
}

.nav-menu a::after {
  content: '';

  position: absolute;
  left: 0;
  bottom: -8px;

  width: 0%;
  height: 2px;

  border-radius: 999px;

  background: linear-gradient(
    90deg,
    #f2a7d8,
    #b58ce6,
    #8ad4ff
  );

  transition: width 0.35s ease;
}

.nav-menu a:hover {
  color: #ffffff;
}

.nav-menu a:hover::after {
  width: 100%;
}

/* CTA móvil dentro del menú.
   Se mantiene oculto en escritorio.
   Su diseño visible se controla desde responsive.css.
*/

.nav-mobile-cta {
  display: none;
}

/* =========================================================
   CTA DESKTOP
========================================================= */

.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  height: 50px;
  padding: 0 26px;

  border-radius: 999px;

  text-decoration: none;

  color: #173c69;
  font-weight: 800;
  font-size: 0.95rem;

  background: #ffffff;

  border: 1px solid rgba(255, 255, 255, 0.95);

  box-shadow:
    0 12px 34px rgba(255, 255, 255, 0.34),
    0 8px 22px rgba(23, 60, 105, 0.12);

  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease,
    background 0.35s ease,
    color 0.35s ease;
}

.nav-cta:hover {
  transform: translateY(-2px);

  background: #ffffff;
  color: #0f315c;

  box-shadow:
    0 18px 42px rgba(255, 255, 255, 0.46),
    0 10px 26px rgba(23, 60, 105, 0.16);
}

/* =========================================================
   HAMBURGUESA
   Oculta por defecto. Se activa desde responsive.css
========================================================= */

.nav-toggle {
  display: none;

  width: 44px;
  height: 44px;

  border: 0;
  border-radius: 999px;

  background: rgba(255, 255, 255, 0.18);

  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;

  cursor: pointer;

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 10px 24px rgba(0, 0, 0, 0.08);

  transition:
    background 0.3s ease,
    transform 0.3s ease;
}

.nav-toggle span {
  display: block;

  width: 20px;
  height: 2px;

  border-radius: 999px;

  background: #ffffff;

  transition:
    transform 0.3s ease,
    opacity 0.25s ease;
}

.nav-toggle:hover {
  background: rgba(255, 255, 255, 0.26);
  transform: translateY(-1px);
}

.main-navbar.is-menu-open .nav-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.main-navbar.is-menu-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

.main-navbar.is-menu-open .nav-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* =========================================================
   SCROLLED
========================================================= */

.main-navbar.scrolled {
  background: rgba(255, 255, 255, 0.10);

  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);

  border: 1px solid rgba(255, 255, 255, 0.16);

  box-shadow:
    0 10px 38px rgba(0, 0, 0, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}