
/* =========================
   NAV
   ========================= */
header {
  border-bottom: 1px solid var(--border);
  top: 0;
  background: #fff;
  z-index: 100;
  user-select: none;
  position: fixed;
}

nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem var(--padding);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  color: rgb(56, 56, 56);
}

.logo-nav{
  width: 8rem;
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
nav ul li a{
  list-style: none;
  margin: 5px;
  width: max-content;
}
/* BOTÓN */
.nav-toggle {
  font-size: 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
}


/* MOBILE MENU */
@media (max-width: 899px) {
  nav ul {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: #ffffff;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    padding: 2rem var(--padding);
    transform: translateX(-120%);
    box-shadow: #0304053b 0px 10px 10px;
    transition: transform 0.25s ease;
    z-index: 100;
  }

  nav.open ul {
    transform: translateX(0);
  }

  nav ul li {
    font-size: 1.1rem;
  }
}

/* DESKTOP */
@media (min-width: 900px) {
  .nav-toggle {
    display: none;
  }

  nav ul {
    display: flex;
    gap: 2.5rem;
  }
  nav ul li a:hover{
    color: black;
  }
}

nav a.active {
  font-weight: 500;
  color: var(--text-main);
  position: relative;
}

nav a.active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 1px;
  background: var(--text-main);
}


/* =========================
   NAV BASE
   ========================= */

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.nav-item {
  width: 100%;
}

.nav-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-row a {
  font-size: 1rem;
  color: var(--text-main);
}

/* toggle */
.submenu-toggle {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--text-muted);
}

/* =========================
   SUBMENU
   ========================= */

.submenu {
  display: none;
  margin-top: 0.75rem;
  padding-left: 1rem;
  width: 90vw;
  list-style: none;
}

.submenu li a {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* abierto */
.nav-item.open .submenu {
  display: block;
}
@media (min-width: 900px) {
  .nav-list {
    flex-direction: row;
    gap: 2.5rem;
    align-items: center;
  }

  .submenu {
    position: absolute;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.75rem 0;
    min-width: 220px;
    z-index: 100;
  }

  .submenu li a {
    padding: 0.6rem 1rem;
    display: block;
  }

  .nav-item {
    position: relative;
  }
}

.submenu-toggle{
    color: black;
    font-size: 8px;
    margin-left: -5px;
}