/* ========================================
   NAVBAR MODERNO - CLASES ÚNICAS
   SPECK DEVELOPERS
   ======================================== */

/* Header principal */
.header-modern {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 99999;
  background: rgba(12, 50, 104, 0.98);
  backdrop-filter: blur(20px);
  border-bottom: 2px solid rgba(74, 144, 196, 0.4);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.9);
  padding: 15px 0;
  transition: all 0.3s ease;
}

/* Header scrolled */
.header-modern.scrolled {
  background: rgba(8, 13, 20, 1);
  padding: 10px 0;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 1);
}

/* ========================================
   LOGO MODERNO
   ======================================== */

.logo-modern {
  text-decoration: none;
  transition: all 0.3s ease;
}

.logo-modern:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 0 15px rgba(74, 144, 196, 0.6));
}

.logo-title-modern {
  font-size: 28px;
  font-weight: 900;
  margin: 0;
  font-family: 'Poppins', 'Segoe UI', sans-serif;
  letter-spacing: -1px;
  color: #ffffff;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.5),
               0 0 40px rgba(74, 144, 196, 0.4);
  line-height: 1;
}

.logo-span-modern {
  background: linear-gradient(135deg, #feffff 0%, #4A90C4 50%, #6bb8e8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 900;
  animation: gradientShiftLogo 3s ease infinite;
  background-size: 200% 200%;
  filter: drop-shadow(0 0 15px rgba(115, 193, 230, 0.8));
}

@keyframes gradientShiftLogo {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.logo-modern:hover .logo-title-modern {
  text-shadow: 0 0 30px rgba(107, 184, 232, 1),
               0 0 60px rgba(74, 144, 196, 0.8);
}

/* ========================================
   NAVBAR MODERNO
   ======================================== */

.navbar-modern {
  padding: 0;
}

.navbar-menu-modern {
  margin: 0;
  padding: 0;
  display: flex;
  list-style: none;
  align-items: center;
  gap: 5px;
}

.nav-item-modern {
  position: relative;
  list-style: none;
}

/* Links principales */
.nav-link-modern {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  font-family: 'Poppins', 'Segoe UI', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
  position: relative;
  text-decoration: none;
  border-radius: 8px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

/* Efecto underline */
.nav-link-modern::before {
  content: '';
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, #4A90C4, #6bb8e8);
  transition: width 0.3s ease;
  border-radius: 2px;
  box-shadow: 0 0 10px rgba(74, 144, 196, 0.8);
}

.nav-link-modern:hover::before,
.nav-link-modern.active::before {
  width: 70%;
}

/* Hover effect */
.nav-link-modern:hover,
.nav-link-modern.active,
.nav-item-modern:hover > .nav-link-modern {
  color: #6bb8e8;
  background: rgba(2, 127, 223, 0.2);
  transform: translateY(-2px);
  text-shadow: 0 0 20px rgba(107, 184, 232, 1),
               0 2px 10px rgba(0, 0, 0, 0.8);
  box-shadow: 0 4px 15px rgba(74, 144, 196, 0.3);
}

/* ========================================
   DROPDOWN MODERNO
   ======================================== */

.dropdown-menu-modern {
  display: block;
  position: absolute;
  left: 0;
  top: calc(100% + 15px);
  margin: 0;
  padding: 15px 0;
  z-index: 99;
  opacity: 0;
  visibility: hidden;
  background: rgba(8, 13, 20, 0.98);
  backdrop-filter: blur(20px);
  border: 2px solid rgba(74, 144, 196, 0.4);
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.9);
  transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
  border-radius: 12px;
  min-width: 220px;
  transform: translateY(-10px);
  list-style: none;
}

.dropdown-item-modern {
  min-width: 220px;
  list-style: none;
}

.dropdown-link-modern {
  display: block;
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 500;
  color: #ffffff;
  border-radius: 8px;
  margin: 0 10px;
  transition: all 0.3s ease;
  text-decoration: none;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.dropdown-link-modern::before {
  display: none;
}

.dropdown-link-modern:hover {
  background: rgba(74, 144, 196, 0.25);
  color: #6bb8e8;
  transform: translateX(8px);
  text-shadow: 0 0 15px rgba(107, 184, 232, 1);
  box-shadow: 0 4px 15px rgba(74, 144, 196, 0.3);
}

/* Mostrar dropdown */
.dropdown-modern:hover > .dropdown-menu-modern {
  opacity: 1;
  visibility: visible;
  top: calc(100% + 5px);
  transform: translateY(0);
}

/* Indicador dropdown */
.dropdown-indicator-modern {
  margin-left: 5px;
  font-size: 12px;
  transition: transform 0.3s ease;
  color: #6bb8e8;
  filter: drop-shadow(0 0 8px rgba(107, 184, 232, 0.8));
}

.dropdown-modern:hover > .nav-link-modern .dropdown-indicator-modern {
  transform: rotate(180deg);
}

/* ========================================
   MOBILE TOGGLE
   ======================================== */

.mobile-nav-toggle-modern {
  display: none;
  color: #ffffff;
  font-size: 32px;
  cursor: pointer;
  line-height: 0;
  transition: all 0.3s ease;
  padding: 8px;
  border-radius: 8px;
  background: rgba(74, 144, 196, 0.2);
  border: 2px solid rgba(107, 184, 232, 0.4);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.mobile-nav-toggle-modern:hover {
  background: rgba(74, 144, 196, 0.4);
  color: #6bb8e8;
  transform: rotate(90deg);
  box-shadow: 0 0 20px rgba(74, 144, 196, 0.8);
}

/* ========================================
   RESPONSIVE MOBILE
   ======================================== */

@media (max-width: 1279px) {
  .navbar-modern {
    position: fixed;
    top: 0;
    right: -100%;
    width: 320px;
    height: 100vh;
    background: rgba(8, 13, 20, 0.98);
    backdrop-filter: blur(20px);
    border-left: 2px solid rgba(74, 144, 196, 0.4);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    padding: 80px 0 40px 0;
    overflow-y: auto;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.3);
    z-index: 99998;
  }

  .navbar-modern.navbar-mobile-active {
    right: 0;
  }

  .navbar-menu-modern {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    gap: 0;
  }

  .nav-item-modern {
    width: 100%;
  }

  .nav-link-modern {
    width: 100%;
    padding: 15px 25px;
    border-radius: 0;
  }

  .nav-link-modern::before {
    left: 25px;
    transform: translateX(0);
  }

  .nav-link-modern:hover::before {
    width: 40px;
  }

  .dropdown-menu-modern {
    position: static;
    display: none;
    background: rgba(74, 144, 196, 0.1);
    padding: 10px 0;
    margin: 5px 15px;
    border-radius: 8px;
    box-shadow: none;
    border: 1px solid rgba(74, 144, 196, 0.2);
    transform: none;
  }

  .dropdown-item-modern {
    min-width: 100%;
  }

  .dropdown-link-modern {
    padding: 12px 20px;
    margin: 0;
  }

  .dropdown-menu-modern.dropdown-active {
    display: block;
    opacity: 1;
    visibility: visible;
  }

  .mobile-nav-toggle-modern {
    display: block !important;
  }

  .mobile-nav-show-modern {
    display: block !important;
  }

  .mobile-nav-hide-modern {
    display: none !important;
  }

  .navbar-mobile-active .mobile-nav-show-modern,
  body.mobile-nav-active .mobile-nav-show-modern {
    display: none !important;
  }

  .navbar-mobile-active .mobile-nav-hide-modern,
  body.mobile-nav-active .mobile-nav-hide-modern {
    display: block !important;
  }
}

@media (max-width: 575px) {
  .logo-title-modern {
    font-size: 22px;
  }

  .navbar-modern {
    width: 100%;
  }
}

/* ========================================
   EFECTOS ESPECIALES
   ======================================== */

/* Glow effect */
.nav-link-modern:hover {
  animation: navGlow 2s ease-in-out infinite;
}

@keyframes navGlow {
  0%, 100% {
    box-shadow: 0 0 10px rgba(74, 144, 196, 0.3);
  }
  50% {
    box-shadow: 0 0 25px rgba(107, 184, 232, 0.6);
  }
}

/* Progress bar de scroll */
.header-modern::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: var(--scroll-progress, 0%);
  background: linear-gradient(90deg, #4A90C4, #6bb8e8, #4A90C4);
  background-size: 200% 100%;
  animation: progressGlow 3s ease infinite;
  box-shadow: 0 0 10px rgba(107, 184, 232, 0.8);
}

@keyframes progressGlow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Body padding para navbar fixed */
body {
  padding-top: 80px;
}

/* Overlay mobile menu */
body.mobile-nav-active {
  overflow: hidden;
}

body.mobile-nav-active::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 99997;
  backdrop-filter: blur(5px);
}

/* ========================================
   LOGO HEXAGONAL - VERSIÓN FINAL
   SPECK DEVELOPERS
   ======================================== */

/* Contenedor del logo */
.logo-modern {
  text-decoration: none;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 20px; /* Espacio aumentado entre imagen y texto */
}

.logo-modern:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 0 15px rgba(74, 144, 196, 0.6));
}

/* ========================================
   LOGO HEXAGONAL CON BORDES
   ======================================== */

.logo-image-container {
  position: relative;
  width: 55px; /* Tamaño aumentado */
  height: 55px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0; /* Evita que se comprima */
}

.logo-image-modern.logo-hex {
  width: 45px; /* Tamaño aumentado */
  height: 45px;
  clip-path: polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%);
  transition: all 0.3s ease;
  filter: drop-shadow(0 0 8px rgba(107, 184, 232, 0.5));
}

.logo-image-container::before {
  content: '';
  position: absolute;
  inset: -3px;
  background: linear-gradient(135deg, #4A90C4, #6bb8e8);
  clip-path: polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%);
  z-index: -1;
  opacity: 0.5;
  transition: all 0.3s ease;
}

.logo-modern:hover .logo-image-container::before {
  opacity: 1;
  filter: blur(8px);
}

.logo-modern:hover .logo-image-modern.logo-hex {
  transform: rotate(360deg);
  filter: drop-shadow(0 0 20px rgba(107, 184, 232, 1));
}

/* ========================================
   TÍTULO DEL LOGO - SOLO "SPECK"
   ======================================== */

.logo-title-modern {
  font-size: 32px; /* Tamaño aumentado */
  font-weight: 900;
  margin: 0;
  font-family: 'Poppins', 'Segoe UI', sans-serif;
  letter-spacing: 2px; /* Más espaciado entre letras */
  line-height: 1;
  background: linear-gradient(135deg, #6bb8e8 0%, #4A90C4 50%, #6bb8e8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShiftLogo 3s ease infinite;
  background-size: 200% 200%;
  filter: drop-shadow(0 0 15px rgba(107, 184, 232, 0.8));
  text-shadow: 0 0 20px rgba(107, 184, 232, 0.5);
}

@keyframes gradientShiftLogo {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.logo-modern:hover .logo-title-modern {
  filter: drop-shadow(0 0 25px rgba(107, 184, 232, 1));
  letter-spacing: 3px;
}

/* ========================================
   VARIANTE 2: SPECK con Subtítulo pequeño
   ======================================== */

.logo-title-with-subtitle {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.logo-title-main {
  font-size: 32px;
  font-weight: 900;
  margin: 0;
  font-family: 'Poppins', 'Segoe UI', sans-serif;
  letter-spacing: 2px;
  line-height: 1;
  background: linear-gradient(135deg, #6bb8e8 0%, #4A90C4 50%, #6bb8e8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShiftLogo 3s ease infinite;
  background-size: 200% 200%;
  filter: drop-shadow(0 0 15px rgba(107, 184, 232, 0.8));
}

.logo-subtitle-small {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 3px;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  margin-top: -2px;
}

.logo-modern:hover .logo-subtitle-small {
  color: rgba(107, 184, 232, 0.8);
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
  .logo-modern {
    gap: 15px;
  }

  .logo-image-container {
    width: 48px;
    height: 48px;
  }

  .logo-image-modern.logo-hex {
    width: 38px;
    height: 38px;
  }

  .logo-title-modern,
  .logo-title-main {
    font-size: 28px;
  }
}

@media (max-width: 575px) {
  .logo-modern {
    gap: 12px;
  }

  .logo-image-container {
    width: 42px;
    height: 42px;
  }

  .logo-image-modern.logo-hex {
    width: 34px;
    height: 34px;
  }

  .logo-title-modern,
  .logo-title-main {
    font-size: 24px;
    letter-spacing: 1px;
  }

  .logo-subtitle-small {
    font-size: 9px;
    letter-spacing: 2px;
  }
}

@media (max-width: 400px) {
  .logo-modern {
    gap: 10px;
  }

  .logo-image-container {
    width: 38px;
    height: 38px;
  }

  .logo-image-modern.logo-hex {
    width: 30px;
    height: 30px;
  }

  .logo-title-modern,
  .logo-title-main {
    font-size: 20px;
  }

  .logo-subtitle-small {
    font-size: 8px;
    letter-spacing: 1.5px;
  }
}
/* ========================================
   PARCHE Z-INDEX ADICIONAL
   Asegura que el menú esté siempre visible
   ======================================== */

/* Forzar z-index del header */
.header-modern {
  z-index: 99999 !important;
}

/* Forzar z-index del navbar móvil */
@media (max-width: 1279px) {
  .navbar-modern {
    z-index: 99998 !important;
  }
  
  /* Overlay por encima del contenido */
  body.mobile-nav-active::before {
    z-index: 99997 !important;
  }
}

/* Asegurar que el contenido general esté debajo */
main,
section,
.hero-section,
#hero,
.hero-modern,
.section {
  position: relative;
  z-index: 1;
}

/* Excepto elementos que deben estar arriba del contenido pero debajo del menú */
.scroll-top {
  z-index: 9999;
}