/* =====================================
   🌐 ESTILOS GENERALES Y BASE
===================================== */
body {
  font-family: 'Segoe UI', Arial, sans-serif;
  margin: 0;
  background: linear-gradient(180deg, #f5f9ff 0%, #e8f0ff 100%);
  color: #222;
  scroll-behavior: smooth;
  transition: background 0.5s, color 0.5s;
}

/* Encabezado */
header {
  text-align: center;
  background: linear-gradient(90deg, #004d99, #0066cc);
  color: white;
  padding: 25px 0;
  position: relative;
  box-shadow: 0 3px 8px rgba(0,0,0,0.25);
}

header h1 {
  margin-bottom: 15px;
  font-size: 2rem;
  letter-spacing: 1px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Imagen debajo del título */
.banner {
  width: 100%;
  max-height: 350px;
  object-fit: cover;
  display: block;
  border-bottom: 4px solid #004d99;
}

/* =====================================
   🔹 MENÚ DE NAVEGACIÓN
===================================== */
.menu {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
  background-color: #004d99;
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 10;
  transition: background-color 0.3s;
}

.menu-item {
  position: relative;
  background-color: #0073e6;
  padding: 10px 25px;
  border-radius: 10px;
  cursor: pointer;
  color: white;
  font-weight: bold;
  transition: all 0.3s ease;
  text-transform: capitalize;
  text-decoration: none;
  overflow: hidden;
}

/* Efecto hover con línea inferior animada */
.menu-item::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0%;
  height: 3px;
  background: white;
  transition: width 0.3s;
}

.menu-item:hover::after {
  width: 100%;
}

.menu-item:hover {
  background-color: #003366;
  transform: scale(1.05);
}

/* 🔹 BOTÓN DEL MENÚ (solo visible en móvil) */
.menu-toggle {
  display: none; /* Oculto en PC */
}

/* ======== MODO MÓVIL ======== */
@media (max-width: 768px) {

  /* 🔸 Botón ☰ aparece solo en móvil */
  .menu-toggle {
    display: block;
    position: fixed;
    left: 15px;
    top: 15px;
    background-color: #003366;
    color: white;
    border: none;
    font-size: 26px;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    z-index: 1001;
  }

  /* 🔹 Botón cerrar (X) oculto en PC */
.menu-close {
  display: none;
}


  /* 🔸 Menú lateral oculto */
  .menu {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 260px;
  background-color: #004080; /* Azul sólido */

  display: flex;
  flex-direction: column;
  align-items: stretch;      /* ⬅ deja de centrar */
  justify-content: flex-start; /* ⬅ se van arriba */
  padding: 70px 15px 20px;   /* ⬅ espacio superior */

  transform: translateX(-100%);
  transition: transform 0.35s ease;
  z-index: 1000;
}


  /* 🔸 Menú visible */
  .menu.activo {
    transform: translateX(0);
    box-shadow: 4px 0 10px rgba(0,0,0,0.3);
  }

  .menu-item {
  width: 100%;
  margin-bottom: 12px;     /* separación vertical */
  text-align: center;
  font-size: 1em;

  background-color: #0073e6; /* mismo azul del botón */
  border-radius: 10px;
}
.menu-close {
  display: block;          /* 👈 SOLO visible en móvil */
  position: absolute;
  top: 15px;
  right: 15px;
  background: transparent;
  border: none;
  color: white;
  font-size: 26px;
  cursor: pointer;
  z-index: 1002;
}


}


  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-15px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }


/* =====================================
   📄 SECCIONES PRINCIPALES
===================================== */
main {
  padding: 40px;
  text-align: center;
}

.seccion {
  display: none;
  animation: fadeInUp 0.8s ease forwards;
  max-width: 900px;
  margin: 0 auto;
  text-align: justify;
  line-height: 1.6;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  border-radius: 12px;
  padding: 40px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  border: 1px solid rgba(255,255,255,0.3);
}

.seccion.activa {
  display: block;
}

.seccion h2, .seccion h3 {
  text-align: center;
  color: #004d99;
  margin-bottom: 15px;
  font-weight: 700;
}

/* Animación de entrada */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =====================================
   ⚽ SECCIONES ESPECÍFICAS
===================================== */

/* Preparación */
.preparacion-bloque {
  background-color: #ffffff;
  padding: 25px;
  border-radius: 15px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  margin-bottom: 30px;
  text-align: left;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.preparacion-bloque:hover {
  transform: scale(1.01);
  box-shadow: 0 6px 14px rgba(0,0,0,0.15);
}

.preparacion-bloque h3 {
  color: #004d99;
  margin-bottom: 10px;
}

/* Torneos */
.torneo {
  margin: 40px auto;
  max-width: 800px;
  background-color: #ffffff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.torneo:hover {
  transform: scale(1.02);
}

.torneo h3 {
  color: #004d99;
  margin-bottom: 15px;
  text-align: center;
}

.torneo-img {
  width: 100%;
  max-height: 350px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 15px;
}


/* Redes sociales */
.redes a {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: transform 0.2s;
}

.redes a:hover {
  transform: scale(1.1);
}

/* ======== SECCIÓN HISTORIA ======== */
.historia-contenedor {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  background-color: #ffffff;
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  max-width: 1000px;
  margin: 0 auto;
}

.escudo {
  width: 180px;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.historia-texto {
  flex: 1;
  text-align: justify;
  line-height: 1.6;
  color: #333;
}

.historia-texto h2 {
  color: #004d99;
  margin-bottom: 15px;
  text-align: left;
}

/* 🔹 Adaptación para celular */
@media (max-width: 768px) {
  .historia-contenedor {
    flex-direction: column;
    text-align: center;
  }

  .historia-texto h2 {
    text-align: center;
  }

  .escudo {
    width: 140px;
    margin-bottom: 15px;
  }
}

/* =====================================
   🌙 MODO OSCURO AUTOMÁTICO
===================================== */
@media (prefers-color-scheme: dark) {
  body {
    background: linear-gradient(180deg, #0d1b2a 0%, #1b263b 100%);
    color: #eaeaea;
  }

  header {
    background: linear-gradient(90deg, #003366, #004d99);
  }

  .menu {
    background-color: #00264d;
  }

  .menu-item {
    background-color: #0055aa;
  }

  .seccion {
    background: rgba(30, 30, 40, 0.8);
    box-shadow: 0 0 10px rgba(255,255,255,0.05);
  }

  footer {
    background-color: #00264d;
  }
}

/* =====================================
   📱 ADAPTACIÓN A CELULARES
===================================== */

@media (max-width: 768px) {
  body { font-size: 0.95em; }

  header h1 {
    font-size: 1.4em;
    padding: 10px;
  }

  .banner { max-height: 180px; }

  .menu {
    flex-direction: column;
    align-items: center;
    gap: 10px;
    display: none;
  }

  .menu.activo { display: flex; }

  .menu-item {
    width: 80%;
    text-align: center;
    font-size: 1em;
  }

  main { padding: 20px; }

  .seccion { padding: 25px; }

  iframe {
    width: 100%;
    height: 250px;
  }

  footer {
    font-size: 0.9em;
    padding: 8px;
  }

  /* Botón del menú */
  .menu-toggle {
    display: block;
    position: fixed;
    left: 15px;
    top: 15px;
    background-color: #003366;
    color: white;
    border: none;
    font-size: 24px;
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
    z-index: 20;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  }
}

/* =====================================
   🧾 PIE DE PÁGINA
===================================== */
footer {
  background-color: #004d99;
  color: white;
  text-align: center;
  padding: 15px;
  margin-top: 30px;
  font-size: 0.9rem;
}
.equipo-contacto {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.cargo {
  background-color: #ffffff;
  padding: 18px;
  border-radius: 12px;
  text-align: center;
  width: 260px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.documentos-contenedor {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 25px;
  margin-top: 30px;
}

.documento-item {
  background: #ffffff;
  width: 100%;
  max-width: 500px;
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.documento-item h3 {
  margin-bottom: 12px;
  color: #004d99;
}

.documento-item a {
  display: inline-block;
  padding: 10px 20px;
  background-color: #004d99;
  color: #ffffff;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: transform 0.2s, box-shadow 0.2s;
}

.documento-item a:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

/* ================================
   🖥️ FORZAR OCULTAR X EN PC
================================ */
@media (min-width: 769px) {
  .menu-close {
    display: none !important;
  }
}
/* ===== Ajuste header en móvil para que no lo tape el menú ===== */
@media (max-width: 768px) {
  header h1 {
    margin-top: 45px; /* ⬅ baja el nombre */
  }
}
/* =====================================
   🌙 MEJORA MODO OSCURO (tarjetas y texto)
===================================== */
@media (prefers-color-scheme: dark) {

  body {
    background: linear-gradient(180deg, #0f172a, #020617);
    color: #e5e7eb;
  }

  /* Tarjetas de contacto / cargos */
  .cargo,
  .documento-item,
  .torneo,
  .preparacion-bloque,
  .historia-contenedor {
    background-color: #111827; /* gris oscuro */
    color: #e5e7eb;
    box-shadow: 0 4px 12px rgba(0,0,0,0.6);
    border: 1px solid rgba(255,255,255,0.05);
  }

  /* Títulos dentro de tarjetas */
  .cargo h3,
  .documento-item h3,
  .torneo h3,
  .seccion h2,
  .seccion h3 {
    color: #60a5fa; /* azul claro */
  }

  /* Teléfonos y links */
  a {
    color: #93c5fd;
  }

  a:hover {
    color: #bfdbfe;
  }

  /* Secciones principales */
  .seccion {
    background: rgba(17, 24, 39, 0.9);
  }

  /* Menú lateral en oscuro */
  .menu {
    background-color: #020617;
  }

  .menu-item {
    background-color: #1e293b;
  }

  .menu-item:hover {
    background-color: #334155;
  }
}

