/* ============ ESTILOS UNIVERSALES DE NAVEGACIÓN ============ */

nav {
  background: #ff6b35;
  color: white;
  padding: 15px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  flex-wrap: wrap;
  gap: 15px;
}

.logo-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-mark {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.35);
  border: 2px solid #e74c3c;
  background: #fff;
}

.logo {
  color: #222222;
  font-size: 20px;
  font-weight: bold;
  border-right: 3px solid #e74c3c;
  padding-right: 15px;
  text-shadow: 0 0 3px rgba(0, 0, 0, 0.8), 0 0 5px rgba(0, 0, 0, 0.6);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-right {
  display: flex;
  gap: 15px;
}

.nav-links {
  display: flex;
  gap: 15px;
}

.user-name {
  color: #222222;
  font-weight: 600;
  text-shadow: 0 0 3px rgba(0, 0, 0, 0.5);
  display: none;
  cursor: pointer;
  position: relative;
  padding: 8px 12px;
  border-radius: 5px;
  transition: background 0.3s;
  border: 2px solid #e74c3c;
}

.user-name:hover {
  background: rgba(0, 0, 0, 0.1);
}

.user-name-wrapper {
  position: relative;
}

nav a {
  color: #222222;
  text-decoration: none;
  margin-left: 20px;
  transition: color 0.3s;
  text-shadow: 0 0 3px rgba(0, 0, 0, 0.8), 0 0 5px rgba(0, 0, 0, 0.6);
}

nav a:hover {
  color: #e74c3c;
}

.nav-dropdown {
  position: relative;
  display: inline-block;
}

.nav-dropdown > a {
  cursor: pointer;
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: #ff6b35;
  min-width: 180px;
  border-radius: 5px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  margin-top: 8px;
  display: none;
  z-index: 1000;
  flex-direction: column;
}

.nav-dropdown-menu.active {
  display: flex;
}

.nav-dropdown-menu a {
  padding: 12px 20px;
  color: #222222;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.2s;
  border: none;
  margin-left: 0;
  text-shadow: none;
}

.nav-dropdown-menu a:hover {
  background: #e74c3c;
}

#adminLink {
  display: none;
}

/* Menú hamburguesa */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: #222222;
  border-radius: 2px;
  transition: 0.3s;
}

/* Media Queries para Móviles */
@media (max-width: 768px) {
  nav {
    padding: 10px 15px;
    position: relative;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .logo {
    font-size: 16px;
    padding-right: 10px;
  }

  .user-name {
    font-size: 12px;
    padding: 6px 10px;
  }

  .hamburger {
    display: flex;
  }

  .nav-links,
  .nav-right {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ff6b35;
    padding: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 999;
  }

  .nav-links.active,
  .nav-right.active {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
  }

  .nav-links a,
  .nav-right a {
    margin-left: 0;
    text-shadow: none;
    padding: 12px 15px;
    color: #222222;
    font-size: 14px;
  }

  .nav-links a:last-child,
  .nav-right a:last-child {
    border-bottom: none;
  }

  .nav-left {
    flex-basis: auto;
  }

  .search-container {
    flex-basis: 100%;
    width: 100%;
  }

  .hamburger {
    flex-basis: auto;
  }

  .nav-dropdown > a {
    display: block;
    padding: 12px 15px;
    color: #222222;
    font-size: 14px;
    margin: 0;
  }

  .nav-dropdown-menu {
    position: static;
    background: transparent;
    min-width: auto;
    border-radius: 0;
    box-shadow: none;
    margin-top: 0;
    border: none;
    display: none !important;
  }

  .nav-dropdown-menu.active {
    display: flex !important;
    flex-direction: column;
  }

  .nav-dropdown-menu a {
    padding: 12px 15px 12px 30px;
    color: #222222;
    font-size: 14px;
  }

  .nav-dropdown-menu a:last-child {
    border-bottom: none;
  }

  #adminLink {
    display: block;
    margin: 0;
    padding: 0;
  }

  #adminLink a {
    display: block;
    padding: 12px 15px;
    color: #222222;
    font-size: 14px;
  }
}
