/* ====== VARIABLES DE COLOR - TEMA AZUL OSCURO Y NEGRO ====== */
:root {
  --bg-dark: #020617; /* Negro azulado muy oscuro */
  --bg-card: #0f172a; /* Azul pizarra oscuro */
  --primary: #2563eb;   /* Azul estándar */
  --accent: #ef4444;    /* Rojo para acciones importantes */
  --text-light: #d1d5db; /* Gris claro */
  --white: #ffffff;
  --border-color: rgba(37, 99, 235, 0.2);
  --shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
}

/* ====== ESTILOS GLOBALES ====== */
body {
  font-family: 'Baloo 2', cursive;
  margin: 0;
  padding: 0;
}

/* ====== ANIMACIÓN DE FONDO ====== */
h1, h2, h3 {
  text-align: center;
  font-weight: 700;
}

p {
  line-height: 1.6;
  text-align: center;
  font-size: 1.1rem;
}

/* ====== NAVBAR ====== */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(17, 24, 39, 0.8); /* --bg-card con opacidad */
  backdrop-filter: blur(10px);
  padding: 0.8rem 2rem;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--border-color);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 15px;
}

.logo-colegio {
  border-radius: 50%;
  border: 3px solid var(--primary);
}

.logo {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary);
  text-shadow: 0 0 8px rgba(37, 99, 235, 0.5);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1rem;
  margin: 0;
  padding: 0;
}

.nav-links li {
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-btn {
  text-decoration: none;
  background: transparent;
  border: 2px solid var(--primary);
  padding: 0.6rem 1.2rem;
  border-radius: 30px;
  font-weight: 700;
  color: var(--primary);
  cursor: pointer;
  transition: all 0.3s ease;
}

.nav-btn:hover {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 0 15px var(--primary);
  transform: translateY(-2px);
}

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
}

.burger span {
  width: 25px;
  height: 4px;
  background: var(--primary);
  border-radius: 5px;
}

/* ====== HERO ====== */
.hero-section {
  padding: 4rem 2rem;
  text-align: center;
}

.hero-section h1 {
  font-size: 3rem;
  color: var(--primary);
  text-shadow: 0 0 10px rgba(37, 99, 235, 0.5);
}

.hero-section img {
  margin: 1rem 0;
  border-radius: 25px;
  box-shadow: var(--shadow);
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  padding: 1rem 2rem;
  border: none;
  border-radius: 30px;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 1rem;
  box-shadow: 0 0 15px rgba(37, 99, 235, 0.4);
}

.btn-primary:hover {
  box-shadow: 0 0 25px rgba(37, 99, 235, 0.6);
  transform: translateY(-3px);
}

/* ====== SECCIONES ====== */
main {
  padding: 2rem 1rem;
}

.cards-container {
  margin-bottom: 4rem;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 1.5rem;
}

.card {
  background: var(--bg-card);
  padding: 1.5rem;
  border-radius: 20px;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease;
  border: 1px solid var(--border-color);
}

.card:hover {
  transform: translateY(-10px) scale(1.03);
  border-color: var(--primary);
}

/* Asignar colores a las tarjetas ya no es necesario con el tema oscuro uniforme */

/* ====== FORMULARIO ====== */
.form-section {
  background: var(--bg-card);
  backdrop-filter: blur(5px);
  padding: 3rem 2rem;
  border-radius: 25px;
  text-align: center;
  box-shadow: var(--shadow);
  max-width: 700px; /* Limita el ancho máximo del contenedor */
  margin-left: auto; /* Centra el contenedor */
  margin-right: auto; /* Centra el contenedor */
}

.form-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 1.5rem;
}

form {
  background: transparent;
  padding: 2rem;
  width: 100%;
  max-width: 400px;
}

label {
  display: block;
  margin-top: 1.5rem;
  font-weight: 700;
  text-align: left;
  font-size: 1.2rem;
  color: var(--primary);
}

input {
  width: 100%;
  padding: 0.8rem;
  border-radius: 15px;
  border: 2px solid var(--border-color);
  margin-top: 0.5rem;
  background: rgba(10, 12, 16, 0.7); /* --bg-dark con opacidad */
  color: var(--text-light);
  font-family: 'Baloo 2', cursive;
  font-size: 1.1rem;
  box-sizing: border-box;
}

input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 5px var(--primary);
}

/* ====== ACERCA DE ====== */
.about-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 3rem 2rem;
  border-radius: 25px;
  box-shadow: var(--shadow);
  margin-top: 3rem;
}

/* ====== FOOTER ====== */
.footer {
  position: relative;
  background-color: var(--bg-dark);
  padding: 40px 20px;
  text-align: center;
  color: var(--white);
  margin-top: 3rem;
  border-top: 1px solid var(--border-color);
}

.footer-img {
  position: absolute;
  bottom: 10px;
  width: 60px;
  height: auto;
  background: var(--bg-card);
  border-radius: 50%;
  padding: 5px;
  border: 1px solid var(--border-color);
}

.footer-img.izquierda {
  left: 20px;
}

.footer-img.derecha {
  right: 20px;
}

/* ====== RESPONSIVE ====== */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    /* Aquí iría la lógica para mostrarlo con JS */
  }

  .burger {
    display: flex;
  }

  .hero-section h1 {
    font-size: 2.5rem;
  }
}

/* Ajuste para la sección de login que tenía un color de fondo diferente */
#login {
  margin-top: 2rem;
  /* Eliminamos el fondo, ya que ahora está en el modal-content */
  background: none;
  backdrop-filter: none;
  box-shadow: none;
  padding: 0;
  max-width: none;
}

/* ====== ESTILOS DEL MODAL ====== */
.modal {
  display: none; /* Oculto por defecto */
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.7); /* Fondo oscuro semitransparente */
  backdrop-filter: blur(5px);
  /* Añadimos flexbox para centrar el contenido */
  align-items: center;
  justify-content: center;
}

.modal-content {
  background-color: var(--bg-card);
  margin: auto; /* Eliminamos el margen superior y dejamos que flexbox se encargue */
  padding: 20px;
  border: 1px solid var(--border-color);
  width: 90%;
  max-width: 500px;
  border-radius: 20px;
  position: relative;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

body {
  /* Reemplaza 'fondo-animado.gif' si tu archivo tiene otro nombre */
  background-image: url('../img/gif.gif');
  background-size: cover; /* Cubre toda la pantalla */
  background-position: center; /* Centra el GIF */
  background-attachment: fixed; /* Mantiene el fondo fijo al hacer scroll */
  color: var(--text-light);
  h1, h2, h3 { color: var(--white); }
}

.close-btn {
  color: #aaa;
  position: absolute;
  top: 10px;
  right: 25px;
  font-size: 28px;
  font-weight: bold;
}

.close-btn:hover,
.close-btn:focus {
  color: var(--white);
  text-decoration: none;
  cursor: pointer;
}
