/* RESET GENERAL */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background: linear-gradient(to right, #0f2027, #203a43, #2c5364);
  color: #f0f0f0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  line-height: 1.6;
  overflow-x: hidden;
}

/* HEADER */
header {
  padding: 3rem 1rem;
  background: linear-gradient(120deg, #111827, #1e3a8a);
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

header::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(96,165,250,0.15) 0%, transparent 70%);
  animation: pulse 8s linear infinite;
}

@keyframes pulse {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

header h1 {
  font-size: 2.8rem;
  color: #60a5fa;
  z-index: 2;
  position: relative;
}

/* NAV */
nav {
  margin-top: 1.5rem;
  z-index: 2;
  position: relative;
  display: flex;
  justify-content: center;
  gap: 20px;
}

nav a {
  color: #cbd5e1;
  text-decoration: none;
  padding: 10px 18px;
  font-weight: 500;
  border-radius: 8px;
  transition: 0.3s ease;
}

nav a:hover {
  background-color: #60a5fa;
  color: #111;
  transform: scale(1.05);
  box-shadow: 0 0 12px #60a5fa;
}

/* MAIN */
main {
  max-width: 1000px;
  margin: 2rem auto;
  padding: 2rem;
  background-color: rgba(17, 24, 39, 0.95);
  border-radius: 18px;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* FORMULARIOS */
form label {
  display: block;
  margin-top: 1rem;
  font-weight: bold;
  color: #9ca3af;
}

form input,
form select,
form textarea {
  width: 100%;
  padding: 12px;
  margin-top: 0.5rem;
  border: none;
  border-radius: 6px;
  background-color: #1f2937;
  color: #f0f0f0;
  transition: background 0.3s ease, box-shadow 0.3s;
}

form input:focus,
form select:focus,
form textarea:focus {
  background-color: #374151;
  outline: none;
  box-shadow: 0 0 0 2px #60a5fa;
}

form textarea {
  resize: vertical;
  height: 120px;
}

/* BOTÓN */
button {
  margin-top: 1.5rem;
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 12px;
  background-color: #60a5fa;
  color: #0f172a;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
  position: relative;
  overflow: hidden;
}

button::after {
  content: "";
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: rgba(255, 255, 255, 0.1);
  transform: skewX(-30deg);
  transition: left 0.5s ease;
}

button:hover::after {
  left: 100%;
}

button:hover {
  background-color: #3b82f6;
  transform: scale(1.03);
}

/* TABLAS */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5rem;
  background-color: #1f2937;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.3);
}

table th, table td {
  padding: 14px;
  border-bottom: 1px solid #374151;
  text-align: left;
}

table th {
  background-color: #60a5fa;
  color: #0f172a;
  font-weight: bold;
}

/* FOOTER */
footer {
  text-align: center;
  background-color: #111827;
  padding: 2rem 1rem;
  color: #64748b;
  font-size: 0.9rem;
  margin-top: auto;
}

/* EFECTO HOVER EN SECCIONES */
section, article, .contacto, .bloque, .card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-radius: 12px;
}

section:hover,
article:hover,
.contacto:hover,
.bloque:hover,
.card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 8px 20px rgba(96, 165, 250, 0.3);
}

/* RESPONSIVE */
@media (max-width: 768px) {
  main {
    padding: 1.5rem;
    margin: 1rem;
  }

  nav a {
    display: inline-block;
    margin: 10px auto;
    width: fit-content;
  }

  header h1 {
    font-size: 2rem;
  }
}
