/* ============================================
   NAVBAR COMPONENT STYLES
   Estilos completos para el navbar desktop y móvil
   ============================================ */

/* Variables CSS */
:root {
  --line: rgba(255, 51, 51, 0.2);
  --muted: rgba(255, 255, 255, 0.5);
  --fg: #ffffff;
  --primary: #ff3333;
  --primary-glow: rgba(255, 51, 51, 0.6);
  --bg-dark: rgba(5, 5, 5, 0.8);
}

/* Utilidades de display responsivo */
.d-none {
  display: none !important;
}

.d-md-flex {
  display: none !important;
}

.d-md-none {
  display: block !important;
}

@media (min-width: 768px) {
  .d-md-flex {
    display: flex !important;
  }
  
  .d-md-none {
    display: none !important;
  }
}

/* ============================================
   NAVBAR DESKTOP (Isla flotante)
   ============================================ */
.navbar-float {
  position: fixed;
  top: 20px;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  z-index: 300;
  pointer-events: none;
  transition: opacity .4s ease;
}

/* Desvanecer si no hay hover en el área del navbar */
.navbar-float:not(:hover) {
  opacity: 0.6;
}

.nav-island {
  pointer-events: auto;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  padding: 8px;
  border-radius: 24px;
  display: flex;
  gap: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 0 20px rgba(255, 51, 51, 0.1);
  transition: transform .3s ease, background .3s ease;
}

.navbar-float:hover .nav-island {
  background: rgba(10, 10, 10, 0.95);
  transform: translateY(0);
  box-shadow: 0 10px 40px rgba(0,0,0,0.7), 0 0 30px rgba(255, 51, 51, 0.2);
}

.nav-icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 14px;
  border-radius: 16px;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid transparent;
  transition: all .3s cubic-bezier(0.2, 0.8, 0.2, 1);
  overflow: hidden;
  white-space: nowrap;
}

.nav-icon .icon {
  font-size: 1.2rem;
  width: 1.2rem;
  height: 1.2rem;
  color: rgba(255, 255, 255, 0.7);
  fill: rgba(255, 255, 255, 0.7);
  transition: transform .4s cubic-bezier(0.34, 1.56, 0.64, 1), color .3s ease, filter .3s ease;
}

.nav-icon span {
  max-width: 0;
  opacity: 0;
  margin-left: 0;
  transition: all .3s ease;
  overflow: hidden;
  font-weight: 500;
  font-size: 0.9rem;
}

/* Hover effects */
.nav-icon:hover,
.nav-icon.active {
  background: rgba(255, 51, 51, 0.25);
  color: #fff;
  border-color: rgba(255, 51, 51, 0.5);
  box-shadow: 0 0 15px rgba(255, 51, 51, 0.3);
}

.nav-icon.active {
  background: rgba(255, 51, 51, 0.3);
  border-color: rgba(255, 51, 51, 0.6);
  box-shadow: 0 0 20px rgba(255, 51, 51, 0.4);
}

.nav-icon.active .icon {
  color: #ff5555;
  fill: #ff5555;
  filter: brightness(1.8) drop-shadow(0 0 12px rgba(255, 51, 51, 1));
}

.nav-icon:hover .icon {
  transform: rotate(15deg);
  color: #ffffff;
  fill: #ffffff;
  filter: brightness(1.5) drop-shadow(0 0 10px rgba(255, 255, 255, 0.6));
}

.nav-icon:hover span {
  max-width: 100px;
  opacity: 1;
  margin-left: 8px;
}

/* Theme Toggle Button */
.theme-toggle {
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 14px;
  border-radius: 16px;
  color: var(--muted);
  transition: all .3s cubic-bezier(0.2, 0.8, 0.2, 1);
  overflow: hidden;
  white-space: nowrap;
}

.theme-toggle .icon {
  font-size: 1.2rem;
  width: 1.2rem;
  height: 1.2rem;
  color: rgba(255, 255, 255, 0.7);
  fill: rgba(255, 255, 255, 0.7);
  transition: transform .4s cubic-bezier(0.34, 1.56, 0.64, 1), color .3s ease, filter .3s ease;
}

.theme-toggle span {
  max-width: 0;
  opacity: 0;
  margin-left: 0;
  transition: all .3s ease;
  overflow: hidden;
  font-weight: 500;
  font-size: 0.9rem;
}

.theme-toggle:hover {
  background: rgba(255, 51, 51, 0.25);
  color: #fff;
  border-color: rgba(255, 51, 51, 0.5);
  box-shadow: 0 0 15px rgba(255, 51, 51, 0.3);
}

.theme-toggle:hover .icon {
  transform: rotate(180deg);
  color: #ffffff;
  fill: #ffffff;
  filter: brightness(1.5) drop-shadow(0 0 10px rgba(255, 255, 255, 0.6));
}

.theme-toggle:hover span {
  max-width: 100px;
  opacity: 1;
  margin-left: 8px;
}

/* Language Dropdown */
.lang-dropdown {
  position: relative;
}

.lang-dropdown > button {
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 14px;
  border-radius: 16px;
  color: var(--muted);
  transition: all .3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.lang-dropdown:hover > button {
  background: rgba(255, 51, 51, 0.25);
  color: #fff;
  border-color: rgba(255, 51, 51, 0.5);
  box-shadow: 0 0 15px rgba(255, 51, 51, 0.3);
}

.lang-dropdown > button .icon {
  font-size: 1.2rem;
  width: 1.2rem;
  height: 1.2rem;
  color: rgba(255, 255, 255, 0.7);
  fill: rgba(255, 255, 255, 0.7);
  transition: transform .3s ease, color .3s ease;
}

.lang-dropdown:hover > button .icon {
  transform: scale(1.1);
  color: #ffffff;
  fill: #ffffff;
}

.lang-dropdown > button span {
  margin-left: 8px;
  font-weight: 600;
  font-size: 0.9rem;
}

.lang-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 51, 51, 0.2);
  border-radius: 12px;
  padding: 8px;
  min-width: 160px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all .3s cubic-bezier(0.2, 0.8, 0.2, 1);
  z-index: 1000;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7), 0 0 20px rgba(255, 51, 51, 0.1);
}

.lang-dropdown:hover .lang-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-option {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  transition: all .2s ease;
  font-size: 0.9rem;
  font-weight: 500;
}

.lang-option:hover {
  background: rgba(255, 51, 51, 0.25);
  color: #fff;
  box-shadow: 0 0 10px rgba(255, 51, 51, 0.2);
}

.lang-option.active {
  background: rgba(255, 51, 51, 0.3);
  color: #ff5555;
  box-shadow: 0 0 15px rgba(255, 51, 51, 0.3);
}

.lang-option .icon {
  margin-right: 10px;
  font-size: 1rem;
  width: 1rem;
  height: 1rem;
  color: rgba(255, 255, 255, 0.6);
  fill: rgba(255, 255, 255, 0.6);
  transition: color .3s ease;
}

.lang-option.active .icon {
  color: #ff5555;
  fill: #ff5555;
  filter: brightness(1.5) drop-shadow(0 0 8px rgba(255, 51, 51, 0.8));
}

/* ============================================
   NAVBAR MOBILE
   ============================================ */

/* Mobile Nav Toggle Button */
.mobile-nav-toggle {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 350;
}

.btn-toggle {
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 51, 51, 0.2);
  color: var(--fg);
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  transition: all .3s ease;
  padding: 0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3), 0 0 10px rgba(255, 51, 51, 0.1);
}

.btn-toggle:hover {
  background: rgba(10, 10, 10, 0.95);
  border-color: rgba(255, 51, 51, 0.4);
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5), 0 0 15px rgba(255, 51, 51, 0.2);
}

.btn-toggle .bar {
  width: 24px;
  height: 2px;
  background: var(--fg);
  border-radius: 2px;
  transition: all .3s ease;
}

.btn-toggle.active .bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.btn-toggle.active .bar:nth-child(2) {
  opacity: 0;
}

.btn-toggle.active .bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  z-index: 320;
  opacity: 0;
  pointer-events: none;
  transition: opacity .4s ease;
}

.mobile-menu-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu-panel {
  position: absolute;
  top: 0;
  left: 0;
  width: 75%;
  max-width: 320px;
  height: 100vh;
  background: rgba(5, 5, 5, 0.95);
  backdrop-filter: blur(20px);
  border-right: 1px solid rgba(255, 51, 51, 0.2);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(60px, 10vh, 100px) 30px 40px 30px;
  transform: translateX(-100%);
  transition: transform .4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 2px 0 30px rgba(0, 0, 0, 0.7), 2px 0 20px rgba(255, 51, 51, 0.1);
}

.mobile-menu-overlay.is-open .mobile-menu-panel {
  transform: translateX(0);
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 3vh, 25px);
  height: 100%;
}

.mobile-nav-links a {
  font-size: clamp(0.95rem, 2.5vw, 1rem);
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  transition: color .3s ease, transform .3s ease;
  padding: 8px 10px 8px 0;
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
}

.mobile-nav-links a .icon {
  font-size: clamp(1rem, 2.8vw, 1.05rem);
  width: clamp(1rem, 2.8vw, 1.05rem);
  height: clamp(1rem, 2.8vw, 1.05rem);
  color: rgba(255, 255, 255, 0.7);
  fill: rgba(255, 255, 255, 0.7);
  transition: transform .3s ease, color .3s ease, filter .3s ease;
}

.mobile-nav-links a span {
  flex: 1;
}

.mobile-nav-links a::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60%;
  height: 2px;
  background: linear-gradient(90deg, rgba(255, 51, 51, 0.8), transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s ease;
}

.mobile-nav-links a:hover {
  color: #fff;
  transform: translateX(10px);
}

.mobile-nav-links a:hover .icon {
  transform: rotate(15deg);
  color: #ffffff;
  fill: #ffffff;
  filter: brightness(1.5) drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
}

.mobile-nav-links a.active {
  color: #ff5555;
  text-shadow: 0 0 15px rgba(255, 51, 51, 1);
}

.mobile-nav-links a.active .icon {
  color: #ff5555;
  fill: #ff5555;
  filter: brightness(1.8) drop-shadow(0 0 12px rgba(255, 51, 51, 1));
}

.mobile-nav-links a.active::before {
  background: linear-gradient(90deg, rgba(255, 51, 51, 0.8), transparent);
  transform: scaleX(1);
}

.mobile-nav-links a:hover::before {
  transform: scaleX(1);
}

/* Mobile Language Links */
.mobile-lang-links {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-lang-links .lang-option {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all .3s ease;
}

.mobile-lang-links .lang-option .icon {
  width: 1rem;
  height: 1rem;
  color: rgba(255, 255, 255, 0.6);
  fill: rgba(255, 255, 255, 0.6);
  transition: color .3s ease;
}

.mobile-lang-links .lang-option:hover {
  background: rgba(255, 51, 51, 0.25);
  color: #fff;
  border-color: rgba(255, 51, 51, 0.5);
  box-shadow: 0 0 10px rgba(255, 51, 51, 0.3);
}

.mobile-lang-links .lang-option.active {
  background: rgba(255, 51, 51, 0.3);
  color: #ff5555;
  border-color: rgba(255, 51, 51, 0.6);
  box-shadow: 0 0 15px rgba(255, 51, 51, 0.4);
}

/* Mobile Theme Toggle */
.theme-toggle-mobile {
  background: transparent;
  border: none;
  font-size: clamp(0.95rem, 2.5vw, 1rem);
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  transition: color .3s ease, transform .3s ease;
  padding: 8px 0;
  margin-top: 20px;
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  width: 100%;
  text-align: left;
}

.theme-toggle-mobile::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60%;
  height: 2px;
  background: linear-gradient(90deg, rgba(255, 51, 51, 0.8), transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s ease;
}

.theme-toggle-mobile:hover {
  color: #fff;
  transform: translateX(10px);
}

.theme-toggle-mobile:hover::before {
  transform: scaleX(1);
}

.theme-toggle-mobile .icon {
  font-size: clamp(1rem, 2.8vw, 1.05rem);
  width: clamp(1rem, 2.8vw, 1.05rem);
  height: clamp(1rem, 2.8vw, 1.05rem);
  transition: transform .3s ease;
}

.theme-toggle-mobile:hover .icon {
  transform: rotate(180deg);
}

/* Estado inactivo cuando el menú móvil está abierto */
#app-content.is-inactive {
  filter: blur(4px) brightness(.6);
  pointer-events: none;
  user-select: none;
}



/* ============================================
   LIGHT MODE STYLES
   ============================================ */
body.light-mode {
  background: #f5f7fa;
  color: #1e293b;
}

body.light-mode .nav-island {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

body.light-mode .navbar-float:hover .nav-island {
  background: rgba(255, 255, 255, 0.95);
}

body.light-mode .nav-icon {
  color: #64748b;
}

body.light-mode .nav-icon:hover,
body.light-mode .nav-icon.active {
  background: rgba(154, 46, 53, 0.1);
  color: #9a2e35;
  border-color: rgba(154, 46, 53, 0.2);
}

body.light-mode .nav-icon.active {
  background: rgba(154, 46, 53, 0.15);
  border-color: rgba(154, 46, 53, 0.3);
}

body.light-mode .nav-icon.active .icon {
  color: #9a2e35;
  filter: brightness(1) drop-shadow(0 0 8px rgba(154, 46, 53, 0.4));
}

body.light-mode .lang-dropdown:hover > button {
  background: rgba(154, 46, 53, 0.1);
  color: #9a2e35;
  border-color: rgba(154, 46, 53, 0.2);
}

body.light-mode .lang-dropdown-menu {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

body.light-mode .lang-option {
  color: #64748b;
}

body.light-mode .lang-option:hover {
  background: rgba(154, 46, 53, 0.1);
  color: #9a2e35;
}

body.light-mode .lang-option.active {
  background: rgba(154, 46, 53, 0.15);
  color: #9a2e35;
}

body.light-mode .lang-option.active .icon {
  color: #9a2e35;
}

body.light-mode .btn-toggle {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(0, 0, 0, 0.1);
}

body.light-mode .btn-toggle:hover {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(0, 0, 0, 0.15);
}

body.light-mode .btn-toggle .bar {
  background: #1e293b;
}

body.light-mode .mobile-menu-panel {
  background: rgba(255, 255, 255, 0.95);
  border-right-color: rgba(0, 0, 0, 0.1);
}

body.light-mode .mobile-nav-links a {
  color: #64748b;
}

body.light-mode .mobile-nav-links a:hover {
  color: #9a2e35;
}

body.light-mode .mobile-nav-links a.active {
  color: #9a2e35;
  text-shadow: 0 0 10px rgba(154, 46, 53, 0.3);
}

body.light-mode .mobile-nav-links a::before,
body.light-mode .mobile-nav-links a.active::before {
  background: linear-gradient(90deg, rgba(154, 46, 53, 0.8), transparent);
}

body.light-mode .mobile-lang-links .lang-option {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.1);
  color: #64748b;
}

body.light-mode .mobile-lang-links .lang-option:hover {
  background: rgba(154, 46, 53, 0.1);
  color: #9a2e35;
  border-color: rgba(154, 46, 53, 0.2);
}

body.light-mode .mobile-lang-links .lang-option.active {
  background: rgba(154, 46, 53, 0.15);
  color: #9a2e35;
  border-color: rgba(154, 46, 53, 0.3);
}

body.light-mode .theme-toggle-mobile {
  color: #64748b;
}

body.light-mode .theme-toggle-mobile:hover {
  color: #9a2e35;
}

/* Light mode icon color fixes */
body.light-mode .nav-icon .icon {
  color: rgba(0, 0, 0, 0.7) !important;
  fill: rgba(0, 0, 0, 0.7) !important;
}

body.light-mode .nav-icon:hover .icon {
  color: #9a2e35 !important;
  fill: #9a2e35 !important;
}

body.light-mode .theme-toggle .icon {
  color: rgba(0, 0, 0, 0.7) !important;
  fill: rgba(0, 0, 0, 0.7) !important;
}

body.light-mode .theme-toggle:hover .icon {
  color: #9a2e35 !important;
  fill: #9a2e35 !important;
}

body.light-mode .lang-dropdown > button .icon {
  color: rgba(0, 0, 0, 0.7) !important;
  fill: rgba(0, 0, 0, 0.7) !important;
}

body.light-mode .lang-dropdown:hover > button .icon {
  color: #9a2e35 !important;
  fill: #9a2e35 !important;
}

body.light-mode .mobile-nav-links a .icon {
  color: rgba(0, 0, 0, 0.7) !important;
  fill: rgba(0, 0, 0, 0.7) !important;
}

body.light-mode .mobile-nav-links a:hover .icon {
  color: #9a2e35 !important;
  fill: #9a2e35 !important;
}

body.light-mode .mobile-nav-links a.active .icon {
  color: #9a2e35 !important;
  fill: #9a2e35 !important;
}

body.light-mode .mobile-lang-links .lang-option .icon {
  color: rgba(0, 0, 0, 0.6) !important;
  fill: rgba(0, 0, 0, 0.6) !important;
}
