/* ==========================================================
   Asociación Deportiva Integral KG — estilos compartidos
   Lo que va aquí se aplica a todas las páginas del sitio.
   Lo propio de cada página va dentro de su index.html.
   ========================================================== */

/* ---------- Paleta ---------- */
:root {
  /* Azul institucional (encabezado, títulos) */
  --azul-claro: #2f66a3;
  --azul-corp: #15385f;
  --azul-corp-oscuro: #0c2440;

  /* Fondos */
  --bg-cima: #faf8f2;   /* blanco hueso */
  --bg-base: #eeebe2;
  --card: #ffffff;
  --line: #e2ddd0;

  /* Texto */
  --text: #1d2126;
  --text-secundario: #5b6066;
  --text-claro: #f5f3ec;

  /* Tres saberes: Saber Ser, Saber, Saber Hacer */
  --azul-acento: #3d6fd6;
  --amarillo: #fdd700;
  --rojo: #ed1d2e;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
}

body {
  background: radial-gradient(ellipse 1200px 600px at 50% -10%, var(--bg-cima) 0%, var(--bg-base) 70%);
}

/* ---------- Banner: degradado azul que se disuelve en blanco hueso ---------- */
.banner {
  position: relative;
  background: linear-gradient(180deg, var(--azul-claro) 0%, var(--azul-corp) 32%, var(--bg-cima) 100%);
  color: var(--text-claro);
}

.banner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.22), transparent);
  background-size: 160% 160%;
  background-repeat: no-repeat;
  animation: brillo-suave 14s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes brillo-suave {
  0% { background-position: 10% -20%; }
  100% { background-position: 90% 10%; }
}

/* ---------- Encabezado con menú (lo dibuja assets/js/menu.js) ---------- */
.sitio {
  position: sticky;
  top: 0;
  z-index: 50;
}

/* Al bajar por la página, el encabezado se vuelve azul sólido y más bajo */
.sitio::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(180deg, var(--azul-corp) 0%, var(--azul-corp-oscuro) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sitio.compacta::after { opacity: 1; }
.sitio.compacta { box-shadow: 0 10px 24px -16px rgba(12, 36, 64, 0.6); }

.sitio-barra {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 18px 24px 52px;
  transition: padding 0.3s ease;
}

.sitio.compacta .sitio-barra { padding: 10px 24px; }

.sitio-marca {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--text-claro);
  text-decoration: none;
}

.sitio-logo {
  position: relative;
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.4);
  font-size: 0.72rem;
  font-weight: 700;
  transition: width 0.3s ease, height 0.3s ease;
}

.sitio-logo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #ffffff;
}

.sitio.compacta .sitio-logo { width: 34px; height: 34px; }

.sitio-nombre {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sitio-nav { display: flex; gap: 26px; }

.sitio-nav a {
  position: relative;
  padding: 4px 0;
  color: var(--text-claro);
  text-decoration: none;
  font-size: 0.92rem;
  white-space: nowrap;
  opacity: 0.88;
  transition: opacity 0.2s ease;
}

.sitio-nav a:hover,
.sitio-nav a.activo { opacity: 1; }

/* Subrayado con los tres colores de los saberes */
.sitio-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--azul-acento) 0 33%, var(--amarillo) 33% 66%, var(--rojo) 66% 100%);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.sitio-nav a:hover::after,
.sitio-nav a.activo::after { transform: scaleX(1); }

/* Botón ☰ (solo en celular) */
.sitio-hamb {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  background: none;
  border: 0;
  color: var(--text-claro);
  cursor: pointer;
}

.sitio-hamb span {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

/* Menú desplegable en celular */
.sitio-movil {
  display: none;
  position: absolute;
  left: 12px;
  right: 12px;
  top: 68px;
  z-index: 3;
  padding: 6px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 18px 34px -18px rgba(21, 56, 95, 0.45);
}

.sitio.compacta .sitio-movil { top: 58px; }

.sitio-movil.abierto {
  display: block;
  animation: desplegar 0.2s ease-out;
}

.sitio-movil a {
  display: block;
  padding: 12px 14px;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
}

.sitio-movil a.activo {
  background: #f1f4fa;
  color: var(--azul-corp);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--azul-acento);
}

@keyframes desplegar {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 760px) {
  .sitio-nav { display: none; }
  .sitio-hamb { display: flex; }
  .sitio-barra { padding: 14px 16px 46px; }
  .sitio.compacta .sitio-barra { padding: 10px 16px; }
  .sitio-nombre { font-size: 0.7rem; line-height: 1.35; white-space: normal; }
}

@media (min-width: 761px) {
  .sitio-movil { display: none !important; }
}

/* ---------- Franja de acentos (tres saberes) ---------- */
.acentos {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.acentos span {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  display: inline-block;
  animation: pulso 3s ease-in-out infinite;
}

.acentos .az { background: var(--azul-acento); animation-delay: 0s; }
.acentos .am { background: var(--amarillo); animation-delay: 0.15s; }
.acentos .ro { background: var(--rojo); animation-delay: 0.3s; }

@keyframes pulso {
  0%, 100% { transform: scaleY(1); opacity: 1; }
  50% { transform: scaleY(1.7); opacity: 0.8; }
}

/* ---------- Página de aviso ("en construcción" / "próximamente") ---------- */
body.pagina-aviso {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.aviso-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  margin-top: -40px;
}

.aviso {
  width: 100%;
  max-width: 560px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 48px 32px;
  text-align: center;
  box-shadow: 0 18px 40px -22px rgba(21, 56, 95, 0.35);
  opacity: 0;
  animation: aparecer 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.aviso:hover {
  transform: translateY(-6px);
  box-shadow: 0 26px 52px -22px rgba(21, 56, 95, 0.45);
}

@keyframes aparecer {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.aviso .acentos { margin-bottom: 28px; }

.aviso h1 {
  font-size: 1.4rem;
  line-height: 1.3;
  margin: 0 0 8px;
  color: var(--azul-corp);
}

.aviso .estado {
  font-size: 0.95rem;
  color: var(--text-secundario);
  margin: 0 0 32px;
}

.aviso .ejes {
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--text-secundario);
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

.aviso .ejes span { white-space: nowrap; }

@media (max-width: 420px) {
  .aviso { padding: 36px 20px; }
  .aviso h1 { font-size: 1.2rem; }
}

/* ---------- Pie de página (lo dibuja assets/js/menu.js) ---------- */
.pie {
  border-top: 1px solid var(--line);
  padding: 28px 20px 32px;
  text-align: center;
}

/* Lema: cada palabra lleva debajo su color (Ser azul, Saber amarillo, Hacer rojo) */
.pie-lema {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 12px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--azul-corp);
}

.pie-lema .palabra {
  padding-bottom: 5px;
  background-repeat: no-repeat;
  background-size: 100% 2px;
  background-position: 0 100%;
}

.pie-lema .ser { background-image: linear-gradient(var(--azul-acento), var(--azul-acento)); }
.pie-lema .saber { background-image: linear-gradient(var(--amarillo), var(--amarillo)); }
.pie-lema .hacer { background-image: linear-gradient(var(--rojo), var(--rojo)); }

.pie-lema .sep {
  color: var(--text-secundario);
  opacity: 0.6;
  letter-spacing: 0;
}

.pie-correo {
  font-size: 0.85rem;
  color: var(--text-secundario);
  text-decoration: none;
}

.pie-correo:hover {
  color: var(--azul-corp);
  text-decoration: underline;
}

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  .banner::before,
  .acentos span,
  .sitio-movil.abierto { animation: none; }
  .sitio::after,
  .sitio-barra,
  .sitio-logo,
  .sitio-nav a::after { transition: none; }
  .aviso { animation: none; opacity: 1; transition: none; }
  .aviso:hover { transform: none; }
}
