@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* ---------- VARIABLES DE COLOR Y MEDIDAS ---------- */
:root {
  --color-principal: #2563eb;
  --color-principal-claro: #eff6ff;
  --color-acento: #38bdf8;
  --azul-oscuro: #0b1329;
  --azul-superficie: #111c38;
  --texto-principal: #0f172a;
  --texto-suave: #5b6b82;
  --color-borde: #e2e8f0;
  --fondo-gris: #f8fafc;
  --blanco: #ffffff;
  --redondeo-grande: 16px;
  --redondeo-medio: 12px;
  --sombra-suave: 0 2px 8px rgba(15, 23, 42, 0.04);
  --sombra-media: 0 12px 24px -6px rgba(15, 23, 42, 0.08);
  --alto-encabezado: 68px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  background: var(--blanco);
  color: var(--texto-principal);
  padding-top: var(--alto-encabezado);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

.contenedor {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- ENCABEZADO ---------- */
.encabezado {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(11, 19, 41, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 100;
}

.encabezado .contenedor {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.perfil {
  display: flex;
  align-items: center;
  gap: 12px;
  height: var(--alto-encabezado);
  flex: 0 0 auto;
}

.foto-perfil {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--color-acento);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

.nombre-perfil {
  font-weight: 700;
  color: var(--blanco);
  font-size: 0.95rem;
  white-space: nowrap;
}

.menu {
  display: flex;
  gap: 2px;
  height: var(--alto-encabezado);
  overflow-x: auto;
  scrollbar-width: none;
}

.menu::-webkit-scrollbar {
  display: none;
}

.menu a {
  display: flex;
  align-items: center;
  padding: 0 16px;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.menu a:hover {
  color: var(--blanco);
}

.menu a.enlace-activo {
  color: #60a5fa;
  border-bottom-color: #60a5fa;
}

/* ---------- PORTADA (HERO) ---------- */
.portada {
  padding: 88px 0 96px;
  color: var(--blanco);
  background:
    radial-gradient(circle at 85% 20%, rgba(37, 99, 235, 0.4), transparent 45%),
    linear-gradient(135deg, var(--azul-oscuro) 0%, var(--azul-superficie) 100%);
}

.portada-texto {
  max-width: 760px;
}

.etiqueta-portada {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.2);
  border: 1px solid rgba(96, 165, 250, 0.3);
  color: #93c5fd;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 18px;
}

.punto-etiqueta {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-acento);
  box-shadow: 0 0 8px var(--color-acento);
}

.portada h1 {
  font-size: clamp(2rem, 4.2vw, 3rem);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(180deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitulo-portada {
  margin-top: 16px;
  font-size: 1.1rem;
  color: #94a3b8;
  line-height: 1.6;
}

.estadisticas {
  display: flex;
  gap: 32px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.estadistica {
  display: flex;
  flex-direction: column;
}

.estadistica strong {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--blanco);
  line-height: 1;
}

.estadistica span {
  font-size: 0.78rem;
  color: #94a3b8;
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.datos-portada {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.datos-portada span {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  color: #cbd5e1;
}

.botones-portada {
  display: flex;
  gap: 12px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.boton {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--redondeo-medio);
  font-size: 0.9rem;
  font-weight: 700;
  transition: all 0.2s ease;
}

.boton-claro {
  background: var(--blanco);
  color: var(--azul-oscuro);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.15);
}

.boton-claro:hover {
  transform: translateY(-2px);
  background: #f1f5f9;
}

.boton-borde {
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--blanco);
  background: rgba(255, 255, 255, 0.05);
}

.boton-borde:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.4);
}

/* ---------- SECCIONES GENERICAS ---------- */
.seccion {
  padding: 80px 0;
}

.seccion-gris {
  background: var(--fondo-gris);
}

.titulo-seccion {
  text-align: center;
  margin-bottom: 48px;
}

.titulo-seccion small {
  display: inline-block;
  color: var(--color-principal);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.titulo-seccion h2 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  color: var(--azul-oscuro);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.titulo-seccion p {
  color: var(--texto-suave);
  margin-top: 8px;
  font-size: 1.05rem;
}

/* ---------- TARJETAS DE SECCIONES DEL SITIO ---------- */
.tarjetas {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 18px;
}

.tarjeta {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 230px;
  padding: 24px;
  border-radius: var(--redondeo-grande);
  background: var(--blanco);
  border: 1px solid var(--color-borde);
  box-shadow: var(--sombra-suave);
  transition: all 0.25s ease;
}

.tarjeta::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--color-principal);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.tarjeta:hover {
  transform: translateY(-6px);
  box-shadow: var(--sombra-media);
  border-color: #cbd5e1;
}

.tarjeta:hover::before {
  opacity: 1;
}

.numero-tarjeta {
  font-size: 2.25rem;
  font-weight: 800;
  color: #cbd5e1;
  line-height: 1;
  margin-bottom: 12px;
}

.tarjeta h3 {
  font-size: 1.1rem;
  color: var(--azul-oscuro);
  font-weight: 700;
  margin-bottom: 8px;
}

.tarjeta p {
  font-size: 0.875rem;
  color: var(--texto-suave);
  line-height: 1.5;
}

.enlace-ver-mas {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-principal);
  margin-top: 16px;
}

/* ---------- DOS COLUMNAS (SOBRE MÍ Y FORMACIÓN) ---------- */
.dos-columnas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.subtitulo {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--azul-oscuro);
  margin-bottom: 16px;
}

.subtitulo:not(:first-child) {
  margin-top: 32px;
}

.texto-presentacion p {
  font-size: 1.05rem;
  line-height: 1.7;
  color: #334155;
}

.texto-presentacion p + p {
  margin-top: 16px;
}

.etiquetas {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.etiquetas span {
  background: var(--blanco);
  color: var(--azul-oscuro);
  border: 1px solid var(--color-borde);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: var(--sombra-suave);
  transition: all 0.2s ease;
}

.etiquetas span:hover {
  border-color: var(--color-principal);
  color: var(--color-principal);
}

.dato-idioma {
  font-size: 1rem;
  color: #334155;
  font-weight: 600;
}

.dato-idioma small {
  display: block;
  color: var(--texto-suave);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

/* ---------- LÍNEA DE TIEMPO ---------- */
.linea-tiempo {
  border-left: 2px solid var(--color-borde);
  padding-left: 24px;
  margin-left: 8px;
}

.etapa {
  position: relative;
}

.etapa::before {
  content: "";
  position: absolute;
  left: -31px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-principal);
  box-shadow: 0 0 0 4px var(--color-principal-claro);
}

.etapa h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--azul-oscuro);
}

.etapa .institucion {
  color: var(--color-principal);
  font-size: 0.875rem;
  font-weight: 600;
  margin: 4px 0 8px;
}

.etapa p {
  line-height: 1.6;
  color: var(--texto-suave);
  font-size: 0.95rem;
}

/* ---------- OBJETIVOS ---------- */
.lista-objetivos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.objetivo {
  background: var(--blanco);
  border: 1px solid var(--color-borde);
  border-radius: var(--redondeo-grande);
  padding: 28px;
  box-shadow: var(--sombra-suave);
  transition: transform 0.2s ease;
}

.objetivo:hover {
  transform: translateY(-4px);
  box-shadow: var(--sombra-media);
}

.numero-objetivo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--color-principal-claro);
  color: var(--color-principal);
  font-weight: 800;
  font-size: 1rem;
  margin-bottom: 16px;
}

.objetivo p {
  line-height: 1.6;
  color: #334155;
  font-weight: 500;
}

/* ---------- PIE DE PÁGINA ---------- */
.pie-pagina {
  background: var(--azul-oscuro);
  color: #94a3b8;
  padding: 60px 0 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.pie-pagina h4 {
  color: var(--blanco);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.datos-contacto {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.datos-contacto a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #cbd5e1;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.datos-contacto a:hover {
  color: #60a5fa;
}

.datos-contacto svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.derechos {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.derechos strong {
  color: var(--blanco);
}

/* ---------- RESPONSIVO (PANTALLAS PEQUEÑAS Y MEDIANAS) ---------- */
@media (min-width: 900px) {
  .tarjetas { grid-template-columns: repeat(5, 1fr); }
}

@media (max-width: 960px) {
  .dos-columnas { grid-template-columns: 1fr; gap: 32px; }
  .lista-objetivos { grid-template-columns: 1fr; }
  .seccion { padding: 56px 0; }
  .portada { padding: 56px 0 64px; }
}

/* En celular el menú baja debajo de la foto y el nombre,
   y sus 6 enlaces se reparten el ancho de la pantalla (sin deslizar) */
@media (max-width: 820px) {
  .encabezado .contenedor { flex-wrap: wrap; justify-content: flex-start; padding: 0 8px; }
  .perfil { height: 60px; padding-left: 8px; }
  .menu {
    height: 48px;
    width: 100%;
    gap: 0;
    overflow: visible;           /* nada se sale ni se desliza */
  }
  .menu a {
    flex: 1 1 0;                 /* los 6 enlaces miden lo mismo */
    min-width: 0;
    justify-content: center;
    text-align: center;
    padding: 0 2px;
    font-size: 0.72rem;
    line-height: 1.15;
    white-space: normal;         /* "Que me gusta" y "Mi comunidad" pueden usar 2 líneas */
  }
  body { padding-top: 109px; }   /* 60 + 48 + 1 del borde del encabezado */
}

/* En celulares angostos: 3 enlaces por fila (2 filas), todos dentro de la pantalla */
@media (max-width: 480px) {
  .menu {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    height: auto;
  }
  .menu a {
    height: 40px;
    font-size: 0.8rem;
    white-space: nowrap;
  }
  body { padding-top: 141px; }   /* 60 (foto y nombre) + 80 (2 filas del menú) + 1 del borde */
}