/* ============================================================
   1. ESTRUCTURA PRINCIPAL (FIJA Y ESTABLE)
   ============================================================ */
.main-navbar {
  position: absolute;
  top: 20px;
  left: 0;
  width: 100%;
  z-index: 999;
  padding: 0;
  margin: 0;
  height: 80px;
  display: flex;
  align-items: center;
  background: rgba(18, 18, 18, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}


body {
  padding-top: 0px;
}

.main-navbar .container-fluid {
  width: 100%;
  padding: 0 32px;
  display: flex;
  align-items: center;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 0;
  width: 100%;
}

/* ============================================================
   2. MENÚ DE NAVEGACIÓN (LINKS)
   ============================================================ */
.nav-items-right {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.nav-item {
  padding: 0 0.5rem !important; /* Bajamos de 1rem a 0.5rem */
  display: flex;
  align-items: center;
}
.nav-link {
  color: #ffffff !important;
  font-weight: 500;
  font-size: 1.55rem;
  text-decoration: none;

  transition:
    color 0.25s ease,
    text-shadow 0.25s ease;
}
.nav-divider {
  color: rgba(255, 255, 255, 0.3);
  font-size: 1.4rem; /* Un poco más pequeña para que no se vea tan dominante */
  padding: 0 0.2rem; /* Espacio mínimo lateral para la barrita */
  user-select: none;
}
/* ✅ Hover GRIS con glow tenue */
.nav-link:hover {
  color: #cfcfcf !important;
  text-shadow:
    0 0 4px rgba(255, 255, 255, 0.35),
    0 0 10px rgba(255, 255, 255, 0.2);
}

.nav-divider {
  color: rgba(255, 255, 255, 0.3);
  font-size: 1.8rem;
}


/* ============================================================

   3. BOTÓN DE CONTACTO 

   ============================================================ */


 .contact-group {
  display: flex;
  align-items: center;
 justify-content: flex-start; /* Alineado a la izquierda */
  flex: 0 1 auto; /* Ya no ocupa todo el espacio central */
   /* margin-left: -100px;!!!!!!!!!!!!!!!! *  /
  /* 1. Aseguramos que el contenedor no corte el resplandor */
  overflow: visible !important; 
  margin-left: 3rem !important; 

}

.contact-wrapper {
  display: flex;
  align-items: center;
  gap: 3rem;
  /* 2. Espacio extra arriba y abajo para que el resplandor respire */

}

.flex-spacer {
  flex: 1;
}


/* Enlace de contacto */
.contact-wrapper a.contact-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;

  color: #ffffff !important;
  font-size: 1.3rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  
  /* 3. Padding lateral para que el resplandor de las letras en las esquinas no se corte */
  padding: 5px 12px; 
  margin: -5px -12px; /* Margen negativo para no mover los elementos vecinos */
  
  transition:
    color 0.25s ease,
    text-shadow 0.25s ease,
    transform 0.25s ease; /* Añadimos transform a la transición */
}

/* Ícono */
.contact-wrapper a.contact-link i {
  font-size: 1rem;
  color: inherit !important;
  display: inline-block;
  transform-origin: center;
}

/* 🔥 HOVER VERDE NEÓN MEJORADO */
.contact-wrapper a.contact-link:hover {
  color: #49ad33 !important;
  /* Movimiento ligero hacia arriba para que se note más la libertad de espacio */
  transform: translateY(-2px); 
}







.social-item {
  display: flex;
  align-items: center;
  padding-right: 1.5rem !important;
  padding-left: 0 !important;
}

.social-item .topbar-social {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin: 0;
}

.social-item .topbar-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  color: #aaa;
  text-decoration: none;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.social-item .topbar-social a i {
  font-size: 1.1rem;
  transition: transform 0.3s ease;
}

/* Hover redes */
.social-item .topbar-social a[href*="facebook"]:hover {
  background: rgba(24, 119, 242, 0.15);
  border-color: #1877f2;
  color: #1877f2;
  transform: translateY(-3px);
}

.social-item .topbar-social a[href*="instagram"]:hover {
  background: linear-gradient(
    45deg,
    rgba(131, 58, 180, 0.15),
    rgba(253, 29, 29, 0.15)
  );
  border-color: #e1306c;
  color: #e1306c;
  transform: translateY(-3px);
}

.social-item .topbar-social a[href*="linkedin"]:hover {
  background: rgba(0, 119, 181, 0.15);
  border-color: #0077b5;
  color: #0077b5;
  transform: translateY(-3px);
}

.social-item .topbar-social a:hover i {
  transform: scale(1.15);
}






/* ==========================================================================
   RESPONSIVE FINAL: Estilo Blanco, Menú Flotante y Animación Stagger
   ========================================================================== */

/* 1. ESTILO DEL BOTÓN HAMBURGUESA (Blanco Puro) */
.navbar-toggler {
    border: 2px solid rgba(255, 255, 255, 0.8) !important; /* Borde blanco sutil */
    border-radius: 8px;
    padding: 0.4rem 0.6rem;
}

.navbar-toggler-icon {
    /* SVG forzado a blanco puro */
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255,255,255,1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2.5' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
    width: 28px;
    height: 28px;
}

/* 2. COMPORTAMIENTO PARA TABLETS Y MÓVILES */
@media (max-width: 991px) {
    
    .main-navbar {
        height: 70px;
        top: 0;
        left: 0;
        background: rgba(18, 18, 18, 0.72);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }

    /* EL SECRETO: Posicionamiento absoluto para que NO empuje el contenido */
    .navbar-collapse {
        position: absolute;
        top: 100%; /* Aparece justo debajo de la barra */
        left: 10px;
        right: 10px;
        z-index: 9999; /* Por encima de todo */
        
        background: rgba(10, 10, 10, 0.98); 
        padding: 40px 20px;
        border-radius: 15px;
        border: 1px solid rgba(255, 255, 255, 0.15);
        box-shadow: 0 15px 40px rgba(0,0,0,0.8);
        
        /* Centrado de contenido vertical */
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        
        /* Ocultar por defecto para la animación */
        visibility: hidden;
        pointer-events: none;
    }

    /* Mostrar cuando se activa */
    .navbar-collapse.show {
        visibility: visible;
        pointer-events: auto;
    }

    /* RESET de elementos para alineación vertical */
    .navbar-nav, .nav-items-right, .contact-wrapper, .contact-group {
        flex-direction: column !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .social-item { margin-bottom: 2rem !important; }
    .contact-group { margin-bottom: 2rem !important; }
    .contact-wrapper { gap: 1.5rem !important; }
    .nav-item { padding: 10px 0 !important; }

    .contact-link { font-size: 1.35rem !important; }
    .nav-link { font-size: 1.5rem !important; }
    .nav-divider { display: none !important; }

    /* ------------------------------------------------------------
       ANIMACIÓN ESCALONADA (FADE-IN STAGGER)
       ------------------------------------------------------------ */
    .navbar-collapse .social-item,
    .navbar-collapse .contact-group,
    .navbar-collapse .nav-item {
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.4s ease, transform 0.4s ease;
    }

    .navbar-collapse.show .social-item,
    .navbar-collapse.show .contact-group,
    .navbar-collapse.show .nav-item {
        opacity: 1;
        transform: translateY(0);
    }

    /* Delays */
    .navbar-collapse.show .social-item { transition-delay: 0.1s; }
    .navbar-collapse.show .contact-group { transition-delay: 0.2s; }
    .navbar-collapse.show .nav-item:nth-child(1) { transition-delay: 0.3s; }
    .navbar-collapse.show .nav-item:nth-child(2) { transition-delay: 0.35s; }
    .navbar-collapse.show .nav-item:nth-child(3) { transition-delay: 0.4s; }
    .navbar-collapse.show .nav-item:nth-child(4) { transition-delay: 0.45s; }
    .navbar-collapse.show .nav-item:nth-child(5) { transition-delay: 0.5s; }
}

/* 3. OPTIMIZACIÓN MÓVILES PEQUEÑOS */
@media (max-width: 480px) {
    .navbar-collapse { padding: 30px 15px; }
    .contact-link { font-size: 1.15rem !important; }
    .nav-link { font-size: 1.3rem !important; }
}