/* ---------- Variables y reset ---------- */
:root {
  --color-fondo: #0f172a;
  --color-superficie: #1e293b;
  --color-texto: #e2e8f0;
  --color-texto-suave: #94a3b8;
  --color-acento: #38bdf8;
  --color-acento-oscuro: #0ea5e9;
  --color-borde: #334155;
  --ancho-max: 900px;
  --radio: 12px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--color-fondo);
  color: var(--color-texto);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Cabecera / navegación ---------- */
.cabecera {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-borde);
}

.nav {
  max-width: var(--ancho-max);
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.logo {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--color-texto);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo span {
  color: var(--color-acento);
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.nav-links a {
  color: var(--color-texto-suave);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--color-acento);
}

/* ---------- Contenedor general ---------- */
.contenedor {
  max-width: var(--ancho-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---------- Hero ---------- */
.hero {
  text-align: center;
  padding: 5rem 1.5rem 4rem;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.25rem;
  background: linear-gradient(120deg, var(--color-texto), var(--color-acento));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.15rem;
  color: var(--color-texto-suave);
  max-width: 620px;
  margin: 0 auto 2rem;
}

.boton {
  display: inline-block;
  background: var(--color-acento);
  color: #082f49;
  font-weight: 600;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radio);
  text-decoration: none;
  transition: transform 0.15s, background 0.2s;
}

.boton:hover {
  background: var(--color-acento-oscuro);
  transform: translateY(-2px);
}

/* ---------- Tarjetas de características ---------- */
.caracteristicas {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  padding: 2rem 0 4rem;
}

.tarjeta {
  background: var(--color-superficie);
  border: 1px solid var(--color-borde);
  border-radius: var(--radio);
  padding: 1.75rem;
  transition: transform 0.15s, border-color 0.2s;
}

.tarjeta:hover {
  transform: translateY(-4px);
  border-color: var(--color-acento);
}

.tarjeta .icono {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
}

.tarjeta h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.tarjeta p {
  color: var(--color-texto-suave);
  font-size: 0.95rem;
}

/* ---------- Sección unirse a WhatsApp ---------- */
.wa-seccion {
  display: flex;
  justify-content: center;
  padding: 2rem 1.25rem 4rem;
}

.wa-tarjeta {
  width: 100%;
  max-width: 420px;
  background: var(--color-superficie);
  border: 1px solid var(--color-borde);
  border-radius: 20px;
  padding: 2.5rem 1.75rem;
  text-align: center;
  text-decoration: none;
  color: var(--color-texto);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  transition: transform 0.18s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.wa-tarjeta:hover,
.wa-tarjeta:focus-visible {
  transform: translateY(-4px);
  border-color: #25d366;
  box-shadow: 0 16px 40px rgba(37, 211, 102, 0.25);
  outline: none;
}

/* Logo FES con la insignia de WhatsApp */
.wa-logo-envoltorio {
  position: relative;
  width: 120px;
  height: 120px;
  margin-bottom: 1.25rem;
}

.wa-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
  background: #fff;
  padding: 6px;
}

.wa-badge {
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 42px;
  height: 42px;
  background: #25d366;
  color: #fff;
  border-radius: 50%;
  border: 3px solid var(--color-superficie);
  display: flex;
  align-items: center;
  justify-content: center;
}

.wa-badge svg {
  width: 22px;
  height: 22px;
}

.wa-titulo {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.15rem;
}

.wa-subtitulo {
  color: var(--color-texto-suave);
  font-size: 0.95rem;
  margin-bottom: 1.75rem;
}

/* Botón principal de unirse */
.wa-boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  background: #25d366;
  color: #0b3d1e;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 0.95rem 1.5rem;
  border-radius: 999px;
  transition: background 0.2s ease;
}

.wa-boton svg {
  width: 22px;
  height: 22px;
}

.wa-tarjeta:hover .wa-boton,
.wa-tarjeta:focus-visible .wa-boton {
  background: #1ebe5b;
}

/* Ajustes finos para móviles pequeños */
@media (max-width: 400px) {
  .wa-tarjeta {
    padding: 2rem 1.25rem;
  }
  .wa-logo-envoltorio {
    width: 104px;
    height: 104px;
  }
  .wa-titulo {
    font-size: 1.1rem;
  }
}

/* ---------- Página "Unirme al grupo" (estilo invitación de WhatsApp) ---------- */
/* Sin cabecera ni pie: fondo blanco y tarjeta blanca centrada. */
body.pagina-unirme {
  background: #ffffff;
  color: #111827;
}

.wa-pagina {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
}

/* Tarjeta blanca centrada */
.invitacion {
  width: 100%;
  max-width: 400px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 24px;
  padding: 2.75rem 1.75rem;
  text-align: center;
  box-shadow: 0 12px 32px rgba(17, 24, 39, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.invitacion .wa-logo-envoltorio {
  width: 110px;
  height: 110px;
  margin-bottom: 1.5rem;
}

/* Insignia de WhatsApp con borde blanco para la tarjeta clara */
body.pagina-unirme .wa-badge {
  border-color: #ffffff;
}

.invitacion-titulo {
  font-size: 1.3rem;
  font-weight: 700;
  color: #111827;
  line-height: 1.3;
  margin-bottom: 0.35rem;
}

.invitacion-sub {
  font-size: 1rem;
  color: #6b7280;
  margin-bottom: 2rem;
}

/* Botones tipo invitación (píldora) */
.btn-wa {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.9rem 1.5rem;
  border-radius: 999px;
  font-size: 1.05rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s;
}

.btn-wa svg {
  width: 22px;
  height: 22px;
}

.btn-wa-primario {
  background: #56c07a;
  color: #0b3d1e;
  margin-bottom: 0.85rem;
}

.btn-wa-primario:hover {
  background: #46b56b;
  transform: translateY(-1px);
}

.btn-wa-secundario {
  background: #ffffff;
  color: #111827;
  border: 1.5px solid #d1d5db;
}

.btn-wa-secundario:hover {
  border-color: #56c07a;
  color: #128a3e;
}

/* ---------- Página legal ---------- */
.legal {
  padding: 3rem 0 4rem;
}

.legal h1 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin-bottom: 0.5rem;
}

.legal .actualizado {
  color: var(--color-texto-suave);
  font-size: 0.9rem;
  margin-bottom: 2.5rem;
}

.legal section {
  margin-bottom: 2rem;
}

.legal h2 {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
  color: var(--color-acento);
}

.legal p,
.legal li {
  color: var(--color-texto);
  margin-bottom: 0.6rem;
}

.legal ul {
  padding-left: 1.5rem;
}

.legal a {
  color: var(--color-acento);
}

/* ---------- Pie de página ---------- */
.pie {
  border-top: 1px solid var(--color-borde);
  padding: 2rem 1.5rem;
  text-align: center;
  color: var(--color-texto-suave);
  font-size: 0.9rem;
}

.pie a {
  color: var(--color-texto-suave);
  text-decoration: none;
}

.pie a:hover {
  color: var(--color-acento);
}
