/* ======================================= */
/* 🌎 RESET Y CONFIGURACIÓN GLOBAL */
/* ======================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;

}

/* 🌎 Fondo con `linear-gradient` adaptado */
body {
  font-family: 'Arial', sans-serif;
  background: linear-gradient(180deg, #05203c 20%, #d7dfe4 100%);
  background-attachment: fixed; /* ✅ Fija el fondo para evitar cortes */
  background-size: cover; /* ✅ Asegura que se expanda correctamente */
  background-repeat: no-repeat; /* ✅ Evita repeticiones */
  background-position: center center; /* ✅ Centra el degradado */
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh; /* ✅ Ocupa toda la altura */
  width: 100%;
  padding-top: 100px; /* Espacio para el header */
}


/* ======================================= */
/* 🌟 HEADER Y NAVBAR */
/* ======================================= */
header {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 110px !important; /* Altura fija */
  padding: 20px 0 !important;
  display: flex !important;
  flex-direction: column !important; /* 🔥 Asegura que el título y el nav estén en columnas */
  justify-content: center !important;
  align-items: center !important;
  z-index: 1000 !important;
  font-size: 10px;
  background: url("https://images.pexels.com/photos/2119903/pexels-photo-2119903.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1") 
    no-repeat center center;
  background-size: cover;
  backdrop-filter: blur(10px) !important;
  position: relative;
}
header::before {
content: "";
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.4); /* Capa oscura con transparencia */
backdrop-filter: blur(5px); /* Difuminado extra */
z-index: -1; /* Coloca la capa detrás del contenido */
}


h1 {
  margin-bottom: 10px;
  color: #dde4e8;
  font-size: 1.8rem;
}

/* 🔥 NAVBAR DINÁMICO */
.nav-container {
  margin-top: 10px; /* Espacio entre el título y el menú */
}

nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: center;
  gap: 25px;
}



nav ul li a {
  text-decoration: none;
  color: white;
  font-weight: bold;
  font-size: 1.2rem;
  padding: 10px 15px;
  transition: color 0.3s ease-in-out, transform 0.2s;
  position: relative;
}

/* ✨ EFECTO DE SUBRAYADO */
nav ul li a::after {
  content: "";
  width: 0;
  height: 3px;
  background: #f04e23;
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  transition: width 0.3s ease-in-out;
}

nav ul li a:hover {
  color: #f04e23;
  transform: scale(1.1);
}

nav ul li a:hover::after {
  width: 100%;
}

/* ======================================= */
/* 🏗️ ESTRUCTURA GENERAL */
/* ======================================= */
main {

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 50vh;
  width: 50%;
}


section {
  background: #fff;
  padding: 20px 30px;
  border-radius: 12px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  width: 100%;
  text-align: center;
  transition: all 200ms ease-in-out;
  scale: 0.9;
  justify-content: center;
}

.section-lista-usuarios {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 80vh;
  width: 100%;
}

/* ======================================= */
/* 🎨 BOTONES Y EFECTOS */
/* ======================================= */
.toggle-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
}



/* ======================================= */
/* 📝 FORMULARIOS */
/* ======================================= */
form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

input {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
}

/* Ocultar formularios inicialmente */
.hidden {
  display: none;
}

/* Aplicar animaciones al formulario cuando se muestra */
.formulario-activo {
  display: block;
  animation: slideUp 0.5s ease-out forwards;
}

/* Efecto adicional para deslizamiento lateral */
.formulario-entrada {
  animation: fadeInLeft 0.5s ease-out forwards;
}

/* ======================================= */
/* 📌 TARJETAS DE USUARIO */
/* ======================================= */
.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  padding: 20px;
}

.usuario-card {
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 16px;
  background-color: #ffffff;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.usuario-card:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

/* ======================================= */
/* 📍 MODALES (POP-UPS) */
/* ======================================= */
.modal.hidden {
  display: none;
}

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  width: 90%;
  max-width: 400px;
  text-align: center;
}

.modal-content h2 {
  margin-bottom: 10px;
  color: #b2005e;
}

.modal-content button {
  margin-top: 15px;
  background-color: #b2005e;
}


/* ======================================= */

/* ======================================= */

/* 🔥 ANIMACIÓN DE ENTRADA: Zoom suave con subida y glow */
@keyframes zoomIn {
  from {
    transform: scale(0.7) translateY(30px);
    opacity: 0;
  }
  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.zoom-in {
  animation: zoomIn 0.6s ease-out forwards;
}

/* 💨 ANIMACIÓN DE SALIDA: Desvanecimiento con giro */
@keyframes zoomOut {
  from {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
  to {
    transform: scale(0.8) rotate(-8deg);
    opacity: 0;
  }
}

.zoom-out {
  animation: zoomOut 0.4s ease-in forwards;
}

/* ⚡ EFECTO DE DESTELLO AL APARECER */
@keyframes glowEffect {
  from {
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.9);
  }
  to {
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
  }
}

.glow {
  animation: glowEffect 0.6s ease-in-out;
}


/* 🌟 EFECTO DE BOTÓN INTERACTIVO ÉPICO */
/* 🌊 EFECTO DE LLENADO LÍQUIDO EN BOTONES */
button {
  position: relative;
  overflow: hidden;
  background: #b2005e;
  color: #fff;
  font-size: 1.1rem;
  padding: 12px 20px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.3s;
  text-transform: uppercase;
  font-weight: bold;
  letter-spacing: 1px;
}

button:hover {
  transform: scale(1.05);
  box-shadow: 0px 0px 15px rgba(255, 65, 108, 0.8);
}

/* 🌊 EFECTO INTERNO DE LLENADO LÍQUIDO */
button::before {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(247, 1, 1, 0.2);
  transition: top 0.7s ease-in-out;
}

button:hover::before {
  top: 0;
}


/* ======================================= */
/* 📱 RESPONSIVE DESIGN */
/* ======================================= */
@media screen and (max-width: 768px) {
  header {
    padding: 15px;
  }

  h1 {
    font-size: 1.5rem;
  }

  nav ul {
    flex-direction: column;
    gap: 10px;
  }

  nav ul li a {
    font-size: 1rem;
  }

  main {
    width: 95%;
  }

  section {
    padding: 15px;
    width: 100%;
  }
}

@media screen and (max-width: 480px) {
  h1 {
    font-size: 1.2rem;
  }

  nav ul {
    flex-direction: column;
    align-items: center;
  }

  nav ul li a {
    font-size: 0.9rem;
  }
}
