:root {
  --primary-color: #00020A;
  --secondary-color: #0a0a0a;
  --accent-color: #3b82f6;
  --text-color: #ffffff;
  --text-secondary: #cccccc;
  --border-color: transparent;
  --nav-bg-transparent: rgba(0, 2, 10, 0.15);
  --nav-blur: 5px;
  --transition-speed: 0.3s;
}


header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 15px 0;
  z-index: 100000;
  transition: all var(--transition-speed) ease;
  background: linear-gradient(to bottom, rgba(0, 2, 10, 0.15) 50%, rgba(0, 2, 10, 0.03) 90%, rgba(0, 2, 10, 0) 100%);
  backdrop-filter: blur(var(--nav-blur));
  -webkit-backdrop-filter: blur(var(--nav-blur));
  border: none;
  border-bottom: 0;
  box-shadow: none;
  outline: none;
  overflow: visible;
}


header.scrolled {
  padding: 10px 0 20px 0;
  transform: translateY(-100%);
  background: linear-gradient(to bottom, rgba(0, 2, 10, 0.15) 50%, rgba(0, 2, 10, 0.03) 90%, rgba(0, 2, 10, 0) 100%);
  box-shadow: none;
  border: none;
  border-bottom: 0;
  outline: none;
  z-index: 100000;
}


header.visible {
  transform: translateY(0);
  z-index: 100000;
}


.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 100001;
  transition: all var(--transition-speed) ease;
  border: none;
  border-bottom: 0;
  height: 40px;
}

header .container {
  border: none;
  border-bottom: 0;
  box-shadow: none;
  outline: none;
  position: relative;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}


.logo {
  font-size: 1.8rem;
  font-weight: 700;
  text-align: center;
  transition: all var(--transition-speed) ease;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 0;
  line-height: 40px;
  color: var(--text-color) !important;
}


nav {
  text-align: center;
  transition: all var(--transition-speed) ease;
  overflow: visible;
  max-height: 50px;
  opacity: 1;
  border: none;
  border-bottom: 0;
  box-shadow: none;
  outline: none;
  position: relative;
  z-index: 100001;
  margin-top: 25px;
  width: 100%;
  clear: both;
}

nav ul {
  display: flex;
  justify-content: center;
  gap: 30px;
  transition: transform var(--transition-speed) ease;
  border: none;
  border-bottom: 0;
  box-shadow: none;
  outline: none;
  margin: 0;
  padding: 0;
  position: relative;
  z-index: 100001;
}

nav ul li {
  position: relative;
  z-index: 100001;
  list-style: none;
}

nav ul li a {
  font-weight: 500;
  position: relative;
  padding: 5px 0;
  z-index: 100001;
  color: var(--text-secondary) !important;
  text-decoration: none;
  transition: color var(--transition-speed) ease;
}

nav ul li a:hover {
  color: var(--text-color) !important;
}


nav ul li a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--accent-color);
  transition: width var(--transition-speed) ease;
}

nav ul li a:hover::after,
nav ul li a.active::after {
  width: 100%;
}

nav ul li a.active {
  color: var(--accent-color) !important;
  font-weight: 600;
}


.header-icons {
  display: flex;
  gap: 25px;
  align-items: center;
  position: absolute;
  right: 20px;
  top: 0;
  height: 40px;
  transform: translateY(0);
  transition: all var(--transition-speed) ease;
}

.icon-notification,
.icon-chat,
.icon-search,
.vocci-icon-search {
  width: 24px;
  height: 24px;
  background-color: var(--text-color);
  mask-size: contain;
  -webkit-mask-size: contain;
  mask-repeat: no-repeat;
  -webkit-mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-position: center;
  transition: transform 0.3s ease, opacity 0.3s ease;
  opacity: 0.8;
  margin-top: 8px;
}

.icon-notification:hover,
.icon-chat:hover,
.icon-search:hover,
.vocci-icon-search:hover {
  background-color: var(--accent-color);
  opacity: 1;
  transform: scale(1.1);
}

.icon-notification {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 22c1.1 0 2-.9 2-2h-4c0 1.1.9 2 2 2zm6-6v-5c0-3.07-1.63-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.64 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2zm-2 1H8v-6c0-2.48 1.51-4.5 4-4.5s4 2.02 4 4.5v6z'/%3E%3C/svg%3E");
}

.icon-chat {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 14H5.17L4 17.17V4h16v12zM7 9h2v2H7zm8 0h2v2h-2zm-4 0h2v2h-2z'/%3E%3C/svg%3E");
}

.icon-search,
.vocci-icon-search {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z'/%3E%3C/svg%3E");
}


/* SISTEMA DE MENÚ DE PERFIL COMPLETAMENTE NUEVO */
.user-profile-menu {
    position: relative;
    display: inline-block;
    z-index: 99999;
    width: auto;
    max-width: fit-content;
    overflow: visible;
}

.navbar-profile-trigger {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    border-radius: 50%;
    overflow: hidden;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    outline: none;
    position: relative;
}

.navbar-profile-trigger:hover {
    transform: scale(1.05);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

.navbar-profile-trigger:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.navbar-profile-image {
    width: 40px !important;
    height: 40px !important;
    max-width: 40px !important;
    max-height: 40px !important;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    display: block;
    position: absolute;
    top: 0;
    left: 0;
}

.navbar-profile-icon {
    font-size: 20px;
    color: #fff;
}

.navbar-profile-menu {
    position: absolute;
    top: calc(100% + 15px);
    right: 0;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    width: 220px;
    max-width: 220px;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-15px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.navbar-profile-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.navbar-menu-arrow {
    position: absolute;
    top: -9px;
    right: 20px;
    width: 18px;
    height: 18px;
    background: #ffffff;
    transform: rotate(45deg);
    border-left: 1px solid rgba(0, 0, 0, 0.1);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.navbar-menu-items {
    padding: 10px 0;
    margin: 0;
    width: 100%;
    box-sizing: border-box;
}

.navbar-menu-item {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    text-decoration: none;
    color: #333;
    transition: all 0.2s ease;
    border: none;
    background: none;
    width: 100%;
    max-width: 100%;
    text-align: left;
    font-family: inherit;
    cursor: pointer;
    box-sizing: border-box;
    margin: 0;
    overflow: hidden;
}

.navbar-menu-item:hover {
    background-color: #f8f9fa;
    color: #007bff;
    padding-left: 24px;
}

.navbar-menu-item:first-child {
    border-radius: 12px 12px 0 0;
}

.navbar-menu-item:last-child {
    border-radius: 0 0 12px 12px;
}

.navbar-menu-item.logout {
    border-top: 1px solid #eee;
    margin-top: 5px;
}

.navbar-menu-item.logout:hover {
    background-color: #ffebee;
    color: #d32f2f;
}

.navbar-menu-icon {
    margin-right: 12px;
    font-size: 16px;
    width: 20px;
    text-align: center;
    color: inherit;
}

.navbar-menu-text {
    font-size: 14px;
    font-weight: 500;
    color: inherit;
}

/* Animación adicional para mejor UX */
@keyframes menuSlideIn {
    from {
        opacity: 0;
        transform: translateY(-15px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.navbar-profile-menu.active {
    animation: menuSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}


@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}


@media (max-width: 768px) {
  .header-content {
    justify-content: space-between;
  }

  .logo {
    text-align: left;
  }

  nav {
    display: none;
  }

  .header-icons {
    position: relative;
    transform: none;
  }
}