/* =========================
   NAVBAR BASE
========================= */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;

  z-index: 2000;

  background: linear-gradient(90deg, #000, #020617, #2563eb);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
}

/* =========================
   CONTAINER
========================= */

.navbar-container {
  max-width: 1200px;
  margin: auto;

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 14px 24px;
}

/* =========================
   LOGO
========================= */

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;

  text-decoration: none;

  font-size: 20px;
  font-weight: 700;
  color: #60a5fa;
}

.navbar-logo img {
  width: 42px;
  height: 42px;
}

/* =========================
   MENU DESKTOP
========================= */

.navbar-menu {
  display: flex;
  list-style: none;
  gap: 26px;
}

.navbar-menu a {
  color: white;
  font-size: 15px;
  position: relative;
  text-decoration: none;
  transition: color 0.2s ease;
}

.navbar-menu a[aria-current="page"] {
  color: #60a5fa;
}

/* hover */
.navbar-menu a:hover {
  color: #60a5fa;
}

/* underline hover */
.navbar-menu a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;

  width: 0%;
  height: 2px;

  background: #60a5fa;
  transition: width 0.3s ease;
}

.navbar-menu a:hover::after {
  width: 100%;
}

/* active page */
.navbar-menu a.active {
  color: #60a5fa;
}

.navbar-menu a.active::after {
  width: 100%;
}

.navbar-link-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(96, 165, 250, 0.4);
  background: rgba(37, 99, 235, 0.18);
  color: #dbeafe;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.18);
}

.navbar-link-cta::after {
  display: none;
}

.navbar-link-cta:hover {
  background: rgba(37, 99, 235, 0.34);
  color: #ffffff;
}

.navbar-link-cta.active,
.navbar-link-cta[aria-current="page"] {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  border-color: rgba(191, 219, 254, 0.38);
}

/* focus accesible */
.navbar-menu a:focus-visible {
  outline: 2px solid #60a5fa;
  outline-offset: 4px;
}

/* =========================
   TOGGLE MOBILE
========================= */

.navbar-toggle {
  display: none;
  font-size: 28px;
  background: none;
  color: white;
  border: none;
  cursor: pointer;
}

/* =========================
   MOBILE
========================= */
@media (max-width: 768px) {

  .navbar-toggle {
    display: block;
    cursor: pointer;
  }

  /* ESTADO BASE (CERRADO SIEMPRE) */
  .navbar-menu {
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;

    flex-direction: column;
    align-items: center;

    background: #020617;
    padding: 20px 0;

    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);

    pointer-events: none;

    transition: all 0.25s ease;
  }

  /* ESTADO ABIERTO */
  .navbar-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
  }

  .navbar-menu li {
    margin: 10px 0;
  }

  .navbar-link-cta {
    min-width: 200px;
  }
}
