/***************************/
/*    NAVEGACIÓN MODERNA   */
/*    Versión Desktop      */
/***************************/

/* CONTENEDOR PRINCIPAL */
.navbar-modern {
  background: #ffffff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: all 0.3s ease;
}

.navbar-modern-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 80px;
}

/* LOGO Y BRAND */
.nav-brand-modern {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
}

.nav-brand-modern img {
  height: 70px;
  width: auto;
  transition: transform 0.3s ease;
}

.nav-brand-modern:hover img {
  transform: scale(1.05);
}

.nav-brand-text {
  font-size: 1.1rem;
  font-weight: 600;
  color: #0ea5e9;
  display: none;
}

/* MENÚ PRINCIPAL */
.nav-menu-modern {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0.5rem;
  align-items: center;
}

.nav-menu-modern > li {
  position: relative;
}

.nav-menu-modern > li > a {
  display: block;
  padding: 0.75rem 1.25rem;
  color: #334155;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 3px solid transparent;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.nav-menu-modern > li > a:hover {
  color: #0ea5e9;
  border-bottom-color: #0ea5e9;
  background: rgba(14, 165, 233, 0.05);
}

/* DROPDOWN MODERNO */
.nav-dropdown-modern {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 260px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  border-radius: 8px;
  padding: 0.5rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  margin-top: 0.5rem;
  z-index: 1100;
}

.nav-menu-modern > li:hover .nav-dropdown-modern {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-modern a {
  display: block;
  padding: 0.75rem 1.25rem;
  color: #64748b;
  font-size: 15px;
  font-weight: normal;
  text-decoration: none;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.nav-dropdown-modern a:hover {
  background: #f8fafc;
  color: #0ea5e9;
  border-left-color: #0ea5e9;
  padding-left: 1.5rem;
}

/* Enlaces bloqueados (con candado) en dropdown */
.nav-dropdown-modern a.locked,
.nav-dropdown-modern a.locked *,
.nav-dropdown-modern a.locked .lock-icon {
  color: #64748b !important;
  font-weight: normal !important;
  font-family: "Source", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

.nav-dropdown-modern a.locked {
  cursor: not-allowed;
}

.nav-dropdown-modern a.locked:hover {
  color: #94a3b8 !important;
}

/* Submenú anidado (ul dentro de dropdown) */
.nav-dropdown-modern ul {
  list-style: none;
  padding: 0;
  margin: 0;
  padding-left: 1rem;
  border-left: 2px solid #e5e7eb;
  margin-left: 1.25rem;
  margin-top: 0.25rem;
  margin-bottom: 0.5rem;
}

.nav-dropdown-modern ul li a {
  font-size: 14px;
  color: #94a3b8;
  padding: 0.5rem 1rem;
}

.nav-dropdown-modern ul li a:hover {
  color: #0ea5e9;
}

/* Separador visual para items principales en dropdown */
.nav-dropdown-modern > a:first-child {
  border-top: none;
}

.nav-dropdown-modern > a + a {
  border-top: 1px solid #f1f5f9;
}

/* ICONOS EN ENLACES DEL MENÚ PRINCIPAL */
.nav-menu-modern > li > a .menu-icon {
  width: 18px;
  height: 18px;
  margin-right: 0.5rem;
  vertical-align: middle;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.nav-menu-modern > li > a:hover .menu-icon {
  opacity: 1;
}

/* BOTÓN HAMBURGUESA (MOBILE) */
.menu-toggle-modern {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 2100;
}

.menu-toggle-modern span {
  width: 28px;
  height: 3px;
  background: #0ea5e9;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.menu-toggle-modern.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.menu-toggle-modern.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle-modern.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}


/***************************/
/*    NAVEGACIÓN MOBILE    */
/***************************/

@media screen and (max-width: 1175px) {
  
  /* Logo más grande en mobile */
  .nav-brand-modern img {
    height: 55px;
  }
  
  /* Mostrar hamburguesa en mobile */
  .menu-toggle-modern {
    display: flex;
  }

  /* Drawer lateral */
  .mobile-drawer-modern {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 400px;
    height: 100vh;
    background: #ffffff;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.2);
    transition: right 0.3s ease;
    overflow-y: auto;
    z-index: 2000;
  }

  .mobile-drawer-modern.active {
    right: 0;
  }

  /* Header del drawer */
  .drawer-header-modern {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 2px solid #e5e7eb;
    background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
  }

  .drawer-header-modern h3 {
    color: #ffffff !important;
    margin: 0 !important;
    font-size: 1.7rem !important;
    font-weight: 600 !important;
    font-family: "Source-B", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    text-shadow: none !important;
    text-align: left !important;
  }

  .drawer-close-modern {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #ffffff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
  }

  .drawer-close-modern:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
  }

  /* Overlay oscuro */
  .drawer-overlay-modern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1500;
  }

  .drawer-overlay-modern.active {
    opacity: 1;
    visibility: visible;
  }

  /* Items del menú mobile */
  .mobile-menu-modern {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .mobile-menu-item-modern {
    border-bottom: 1px solid #e5e7eb;
  }

  .mobile-menu-item-modern > a,
  .mobile-menu-item-modern > button {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 1rem 1.5rem;
    color: #1e293b;
    font-size: 17px;
    font-weight: 500;
    text-decoration: none;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s ease;
  }

  .mobile-menu-item-modern > a:hover,
  .mobile-menu-item-modern > button:hover {
    background: #f8fafc;
  }

  .mobile-menu-item-modern > button.active {
    background: #f1f5f9;
    color: #0ea5e9;
  }

  /* Iconos en items del menú mobile */
  .mobile-menu-icon {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    vertical-align: middle;
    filter: brightness(0) saturate(100%) invert(35%) sepia(94%) saturate(2846%) hue-rotate(180deg) brightness(98%) contrast(101%);
  }

  .mobile-menu-item-modern > a span {
    display: flex;
    align-items: center;
  }

  /* Icono de flecha para items con submenú */
  .mobile-menu-arrow {
    font-size: 12px;
    transition: transform 0.3s ease;
    color: #94a3b8;
  }

  .mobile-menu-item-modern > button.active .mobile-menu-arrow {
    transform: rotate(180deg);
    color: #0ea5e9;
  }

  /* Submenú mobile */
  .mobile-submenu-modern {
    max-height: 0;
    overflow: hidden;
    background: #f8fafc;
    transition: max-height 0.3s ease;
  }

  .mobile-submenu-modern.active {
    max-height: 800px;
  }

  .mobile-submenu-modern a {
    display: block;
    padding: 0.75rem 1.5rem 0.75rem 2.5rem;
    color: #64748b;
    font-size: 15px;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
  }

  .mobile-submenu-modern a:hover {
    background: #ffffff;
    border-left-color: #0ea5e9;
    color: #0ea5e9;
  }

  /* Items bloqueados (con candado) */
  .mobile-submenu-modern a.locked {
    color: #cbd5e1;
    cursor: not-allowed;
  }

  .mobile-submenu-modern a.locked:hover {
    background: #f8fafc;
    border-left-color: transparent;
    color: #cbd5e1;
  }

  /* Submenú anidado en mobile */
  .mobile-submenu-modern ul {
    list-style: none;
    padding: 0;
    margin: 0;
    background: #eff6ff;
  }

  .mobile-submenu-modern ul a {
    padding-left: 3.5rem;
    font-size: 14px;
    color: #94a3b8;
  }

  /* Estilos removidos: mobile-actions-modern ya no existe */

  .btn-mobile-action .action-icon {
    width: 20px;
    height: 20px;
  }

  /* Ajustar altura del navbar en mobile */
  .navbar-modern-container {
    min-height: 70px;
    padding: 0 1rem;
  }

  .nav-brand-modern img {
    height: 50px;
  }
}


/***************************/
/*   NAVEGACIÓN DESKTOP    */
/*   (pantallas grandes)   */
/***************************/

@media screen and (min-width: 1176px) {
  
  /* Mostrar menú horizontal en desktop */
  .nav-menu-modern {
    display: flex;
  }

  /* Mostrar botones de acceso en desktop */
  .nav-actions-modern {
    display: flex;
  }

  /* Ocultar elementos mobile en desktop */
  .menu-toggle-modern,
  .mobile-drawer-modern,
  .drawer-overlay-modern {
    display: none;
  }

  /* Mostrar texto del brand en pantallas grandes */
  .nav-brand-text {
    display: block;
  }
}


/***************************/
/*   ANIMACIONES SUAVES    */
/***************************/

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

.mobile-drawer-modern.active {
  animation: slideInRight 0.3s ease;
}


/***************************/
/*   SCROLLBAR PERSONALIZADO */
/***************************/

.mobile-drawer-modern::-webkit-scrollbar {
  width: 6px;
}

.mobile-drawer-modern::-webkit-scrollbar-track {
  background: #f1f5f9;
}

.mobile-drawer-modern::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.mobile-drawer-modern::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}


/***************************/
/*   ICONOS DE CANDADO SVG */
/***************************/

/* Estilos generales para el icono de candado */
.lock-icon {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 8px;
  vertical-align: middle;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

/* En dropdown desktop */
.nav-dropdown-modern a.locked .lock-icon {
  width: 14px;
  height: 14px;
  opacity: 0.5;
}

/* En botón área de socios desktop */
.btn-area-socios-modern .lock-icon {
  width: 16px;
  height: 16px;
  margin-right: 8px;
  opacity: 0.9;
}

/* En menú mobile */
.mobile-submenu-modern a.locked .lock-icon {
  width: 14px;
  height: 14px;
  opacity: 0.4;
}

/* En botón área de socios mobile */
.btn-area-socios-mobile-modern .lock-icon {
  width: 16px;
  height: 16px;
  margin-right: 8px;
  opacity: 0.9;
}
