/* ====== Estilos personalizados ====== */

/* Tipografía base y colores */
html, body {
  color: #222;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body, input, button, select, textarea {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.7;
}

/* Enlaces con color de acento coherente */
a {
  color: #0077cc;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* Contenido centrado y legible */
main.page-content .wrapper {
  max-width: 760px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* Títulos un pelín más marcados */
h1, h2, h3 {
  font-weight: 600;
  line-height: 1.25;
}

/* Footer más respirado y claro */
.site-footer {
  background: #fafafa;
  border-top: 1px solid #eee;
}
.site-footer .wrapper {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
  color: #444;
}
.site-footer a {
  color: #006bb3;
}

/* Idioma activo */
.lang-es .lang-es-link,
.lang-en .lang-en-link {
  font-weight: 700;
  color: #111111;   /* visible en header claro */
  pointer-events: none;
  text-decoration: none;
  cursor: default;
}

/* En modo oscuro sí lo ponemos blanco */
@media (prefers-color-scheme: dark) {
  .lang-es .lang-es-link,
  .lang-en .lang-en-link {
    color: #ffffff;
  }
}

/* Ajustes responsive suaves */
@media (max-width: 600px) {
  .site-header .wrapper,
  .site-footer .wrapper,
  main.page-content .wrapper {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* Footer layout */
.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 800px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* Iconos sociales */
.site-footer .social {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin-right: .75rem;
  vertical-align: middle;
}

.site-footer .icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
  position: relative;
  top: 2px; /* 👈 ajusta alineación vertical uniforme */
}

/* Separador puntual entre enlaces sociales */
.site-footer .sep {
  opacity: .4;
  margin: 0 .4rem;
}

/* Asegurar espacio “y Jekyll” / “and Jekyll” */
.site-footer .legal .nbsp {
  display: inline-block;
  width: .25rem;   /* espacio fino */
}

/* Header flexbox */
.header-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
}

/* Enlaces del header */
.site-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.95rem;
}

.site-nav a {
  color: #0077cc;
  text-decoration: none;
  font-weight: 500;
}
.site-nav a:hover {
  text-decoration: underline;
}

/* Separador vertical */
.divider {
  border-left: 1px solid #ddd;
  height: 1.2rem;
  margin: 0 0.5rem;
}
/* Selector de idioma */
.language-switch {
  white-space: nowrap;
  font-size: 0.93rem;
}

.language-switch .lang-switch-link {
  font-weight: 600;
  margin-left: 0.35rem;
  color: #0066cc;
}

.language-switch .lang-switch-link:hover {
  text-decoration: underline;
}

@media (prefers-color-scheme: dark) {
  .language-switch .lang-switch-link {
    color: #8cc4ff;
  }
}

.site-footer .social[aria-label="LinkedIn"] .icon {
  top: 1px; /* corrige el leve salto visual */
}

.site-footer {
  margin-top: 2.5rem;
}
@media (prefers-color-scheme: dark) {
  body {
    background: #111;
    color: #ddd;
  }
  header.site-header, .site-footer {
    background: #181818;
    border-color: #333;
  }
  a {
    color: #3da9fc;
  }
  a:hover {
    color: #90d1ff;
  }
  .divider { border-color: #444; }
}
/* ===== Modo oscuro mejorado ===== */
@media (prefers-color-scheme: dark) {
  /* Enlaces más suaves */
  a {
    color: #4da3ff; /* azul más tenue */
  }
  a:hover {
    color: #8cc4ff;
  }

  /* Colores generales */
  body {
    background-color: #111;
    color: #e5e5e5;
  }

  header.site-header, .site-footer {
    background-color: #181818;
    border-color: #333;
  }

  .divider { border-color: #444; }

  /* Texto y títulos */
  h1, h2, h3, strong {
    color: #ffffff;
  }

  /* Íconos sociales */
  .site-footer .social svg {
    fill: #4da3ff;
  }
  .site-footer .social:hover svg {
    fill: #8cc4ff;
  }

  /* Sutil sombra en títulos principales */
  h1 {
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
  }
}

/* Título largo del header: mantener en una línea si hay espacio */
.site-title {
  white-space: nowrap;
  max-width: clamp(280px, 40vw, 620px);
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 1.15rem;   /* un pelín más pequeño para que quepa */
  line-height: 1.2;
}

/* En pantallas pequeñas permitimos dos líneas bonitas */
@media (max-width: 640px) {
  .site-title {
    white-space: normal;
    overflow: visible;
    text-overflow: initial;
    font-size: 1.05rem;
  }
}
/* ===== Citas (>) más legibles ===== */
.page-content blockquote {
  border-left: 3px solid #444;
  margin: 1rem 0 1.6rem;
  padding: 0.6rem 0 0.6rem 1rem;
  color: #555;          /* antes súper claro */
  font-style: italic;
  font-weight: 400;
}

/* Dark mode – buena visibilidad */
@media (prefers-color-scheme: dark) {
  .page-content blockquote {
    border-left-color: #666;
    color: #ddd;
  }
}

.site-footer {
  margin-top: 2.25rem;
}
@media (prefers-color-scheme: dark) {
  .site-footer .wrapper {
    color: #d5d5d5;
  }
  .site-footer a {
    color: #8cc4ff;
  }
  .site-footer a:hover {
    color: #b8dcff;
  }
}
/* ===== Footer links: estilo consistente con el header ===== */
.site-footer a,
.site-footer a svg path {
  color: #0077cc;   /* mismo azul del header */
  fill: #0077cc;
  transition: color 0.25s ease, fill 0.25s ease;
}

.site-footer a:hover,
.site-footer a:hover svg path {
  color: #005fa3;   /* hover elegante */
  fill: #005fa3;
}

/* Modo oscuro */
@media (prefers-color-scheme: dark) {
  .site-footer a,
  .site-footer a svg path {
    color: #8cc4ff;   /* azul claro legible */
    fill: #8cc4ff;
  }

  .site-footer a:hover,
  .site-footer a:hover svg path {
    color: #b8dcff;
    fill: #b8dcff;
  }
}

/* Normalizar espaciado H1 + subtítulo (blockquote) en hero */
.page-content h1 {
  margin-top: 0.4rem;
  margin-bottom: 0.6rem;
}

/* El subtítulo es un blockquote con clase */
.page-subtitle {
  display: block;
  margin: 0.4rem 0 1.25rem;   /* distancia uniforme arriba/abajo */
  padding: 0.55rem 0 0.55rem 0.95rem;
  border-left: 3px solid #3a3a3a;
  color: #cfcfcf;
  font-style: italic;
}

/* Modo oscuro: tonos suaves y consistentes */
@media (prefers-color-scheme: dark) {
  .page-subtitle {
    border-left-color: #2f2f2f;
    color: #c8c8c8;
  }
}
/* ===== Header responsive ===== */
.header-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .75rem 0;
  flex-wrap: wrap; /* permite bajar el nav */
}

.site-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: clamp(240px, 60vw, 620px);
  line-height: 1.2;
}

/* Dos variantes del título: por defecto, larga visible */
.site-title .title-full { display: inline; }
.site-title .title-short { display: none; }

/* Menú */
.site-nav {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-wrap: wrap; /* evita solapes en móviles */
}

.divider { border-left: 1px solid #ddd; height: 1.2rem; margin: 0 .5rem; }

/* Compacto en móviles medianos */
@media (max-width: 560px) {
  .site-title { max-width: 66vw; font-size: 1.06rem; }
  .site-title .title-full { display: none; }
  .site-title .title-short { display: inline; }  /* 👈 aparece el corto */
  .divider { display: none; }                    /* quita el separador vertical */
  .site-nav { gap: .7rem; }
  .site-nav a { padding: 4px 0; }
}

/* Extra-compacto (teléfonos muy pequeños) */
@media (max-width: 360px) {
  .site-title { max-width: 64vw; font-size: 1rem; }
  .language-switch { font-size: .95rem; }
}

/* iOS Safari: quita highlight blanco al tocar */
a { -webkit-tap-highlight-color: rgba(0,0,0,0); }

@media (max-width: 560px) {
  .language-switch .label-text { display: none; } /* oculta "Idioma:" / "Language:" */
}

/* ===== Selector de idioma en header oscuro ===== */

/* Color general del texto "Language / Idioma" */
.site-header .language-switch {
  color: #f5f5f5;
}

/* Enlaces de idioma dentro del header */
.site-header .language-switch a {
  color: #f5f5f5;
  text-decoration: none;
}

/* Hover más clarito */
.site-header .language-switch a:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* Idioma activo: que se vea destacado pero CLARO */
.lang-es .lang-es-link,
.lang-en .lang-en-link {
  font-weight: 700;
  color: #ffffff !important;   /* antes #111 */
  pointer-events: none;
  text-decoration: none;
  cursor: default;
}

/* Asegurar que el divider y nav combinen */
header.site-header .divider {
  border-color: #444;
}

header.site-header .site-nav a {
  color: #4da3ff;
}
header.site-header .site-nav a:hover {
  color: #8cc4ff;
}

/* ========== Projects layout ========== */

.projects-grid {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  margin-top: 1.5rem;
}

.project-card {
  border-radius: 0.9rem;
  border: 1px solid #e2e2e2;
  padding: 1rem 1.3rem;
  background: #fcfcfc;
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.project-header {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 0.4rem;
}

.project-title {
  font-size: 1.05rem;
  margin: 0;
}

.project-title a {
  font-weight: 600;
}

.project-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.78rem;
  background: #eef6ff;
  color: #145a9d;
  letter-spacing: 0.02em;
}

.project-summary {
  margin: 0.4rem 0 0.1rem;
}

.project-detail {
  margin: 0.1rem 0 0.6rem;
  color: #666;
  font-size: 0.92rem;
}

.project-link {
  font-size: 0.9rem;
  font-weight: 500;
}

/* Nota final */
.projects-more {
  margin-top: 1.8rem;
  font-size: 0.92rem;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  .project-card {
    background: #181818;
    border-color: #333;
    box-shadow: 0 10px 24px rgba(0,0,0,0.6);
  }

  .project-pill {
    background: #12314f;
    color: #d1e5ff;
  }

  .project-detail {
    color: #b3b3b3;
  }
}

/* ==========================================
   📰 Articles grid – responsive & polished
   ========================================== */

/* Grid: 1 columna en móvil, 2 en pantallas medianas+ */
.articles-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
  margin-top: 1rem;
}

@media (min-width: 768px) {
  .articles-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Card base */
.article-card {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid rgba(0,0,0,0.06);
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0,0,0,0.03);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease,
    background-color 0.2s ease;
}

/* Hover suave estilo LinkedIn/LACNIC */
.article-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 26px rgba(0,0,0,0.10);
  border-color: rgba(0,0,0,0.12);
}

.article-card-link {
  display: flex;
  flex-direction: column;
  text-decoration: none !important;
  color: inherit;
  height: 100%;
}

/* Miniatura (opcional) */
.article-thumb {
  width: 100%;
  height: 160px;
  overflow: hidden;
}

.article-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Cuerpo del card */
.article-body {
  padding: 1.1rem 1.3rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1;
}

/* Meta (categoría + fecha) */
.article-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
}

.article-category {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #2563eb;
}

.article-date {
  color: rgba(0,0,0,0.5);
}

/* Título */
.article-title {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.35;
}

/* Excerpt */
.article-excerpt {
  margin: 0.1rem 0 0.4rem;
  font-size: 0.9rem;
  color: rgba(0,0,0,0.68);
}

/* Footer (tiempo + CTA) */
.article-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.4rem;
  font-size: 0.86rem;
}

.article-readtime {
  color: rgba(0,0,0,0.55);
}

.article-cta {
  font-weight: 600;
  color: #2563eb;
  transition: color 0.2s ease;
}

.article-card:hover .article-cta {
  color: #1d4ed8;
}

/* Separador súper tenue y aireado */
hr {
  border: none;
  border-top: 1px solid rgba(0,0,0,0.05);
  width: 96%;
  margin: 3rem auto 2rem auto;
}

/* ===========================
   🌙 Dark mode automático
   =========================== */
@media (prefers-color-scheme: dark) {
  .article-card {
    background: #181818;
    border-color: rgba(255,255,255,0.06);
    box-shadow: 0 10px 32px rgba(0,0,0,0.7);
  }

  .article-card:hover {
    border-color: rgba(255,255,255,0.20);
    box-shadow: 0 16px 40px rgba(0,0,0,0.85);
    background-color: #1d1d1d;
  }

  .article-category {
    color: #8cc4ff;
  }

  .article-date,
  .article-readtime {
    color: rgba(255,255,255,0.6);
  }

  .article-excerpt {
    color: rgba(255,255,255,0.72);
  }

  .article-cta {
    color: #8cc4ff;
  }

  hr {
    border-top-color: rgba(255,255,255,0.10);
  }
}

/* ================================
   📌 Placeholder automático artículos
   ================================ */

.article-thumb.placeholder {
  width: 100%;
  height: 160px;
  background: #f6f7f9;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
}

.placeholder-content {
  display: flex;
  align-items: center;
  justify-content: center;
}

.placeholder-content .emoji {
  font-size: 3rem;
  opacity: 0.55;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  .article-thumb.placeholder {
    background: #1d1d1d;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
  .placeholder-content .emoji {
    opacity: 0.7;
  }
}
/* Talks grid */
.talks-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
  margin-top: 1.25rem;
}

/* Imagen */
.talk-thumb img {
  width: 100%;
  height: 190px;
  object-fit: cover;
}

/* Body */
.talk-body {
  padding: 1rem 1.3rem;
}

.talk-title {
  margin: 0 0 .3rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.talk-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: #666;
  margin-bottom: .5rem;
}

.talk-link {
  font-weight: 600;
  color: #2563eb;
}

/* 2 columnas en desktop */
@media (min-width: 760px) {
  .talks-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.talk-card {
  border-radius: 18px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
  display: flex;
  flex-direction: column;
}

.talk-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.talk-thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.talk-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.talk-body {
  padding: 1.25rem 1.5rem 1.4rem;
}

.talk-footer {
  margin-top: 0.75rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: #2563eb; /* parecido al azul del enlace "Leer artículo" */
}

.talk-cta {
  white-space: nowrap;
}

/* ===== Talks: dark mode ===== */
@media (prefers-color-scheme: dark) {
  .talk-card {
    background: #181818;
    border: 1px solid #333;
    box-shadow: 0 10px 32px rgba(0,0,0,0.75);
  }

  .talk-body {
    color: #e5e5e5;
  }

  .talk-meta {
    color: rgba(255,255,255,0.7);
  }

  .talk-title {
    color: #ffffff;
  }

  .talk-link,
  .talk-footer {
    color: #8cc4ff;
  }
}

/* ===============================
   🌐 Language Switch (Talks pages)
   =============================== */

.page-lang-switch {
  text-align: right;
  margin: 0.2rem 0 1.2rem;
}

.page-lang-switch .lang-switch-btn {
  font-size: 0.9rem;
  color: #2563eb;
  font-weight: 500;
  text-decoration: none;
}

.page-lang-switch .lang-switch-btn:hover {
  text-decoration: underline;
}

@media (prefers-color-scheme: dark) {
  .page-lang-switch .lang-switch-btn {
    color: #8cc4ff;
  }
}

/* Hero de la página de charlas */
.talks-hero {
  max-width: 680px;
  margin: 1.5rem auto 2.75rem;
}

.talks-hero-title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: clamp(1.9rem, 3vw, 2.3rem);
  letter-spacing: -0.03em;
  margin: 0 0 0.6rem;
}

.talks-hero-title .emoji {
  font-size: 1.6rem;
}

.talks-hero-lead {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.6;
  color: #4b5563; /* gris suave tipo texto secundario */
}

/* Opcional: que el wrapper general no quede tan ancho en escritorio */
.page-content .wrapper {
  max-width: 980px;
}
/* ============================================
   🧱 Header: se adapta a light / dark y sin tarjeta blanca
   ============================================ */

/* Header en modo claro (por defecto) */
header.site-header {
  position: static;                 /* que no sea sticky */
  top: auto;
  z-index: 10;
  background-color: #ffffff;        /* claro, como el footer */
  color: #222222;
  border: 0;
  outline: 0;
  box-shadow: none;
}

/* El wrapper NO debe tener fondo ni borde de "tarjeta" */
header.site-header .wrapper {
  max-width: 960px;
  margin: 0 auto;
  padding: 0.6rem 1rem;
  background-color: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* Layout del contenido del header */
header.site-header .header-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Título */
header.site-header .site-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: clamp(240px, 60vw, 620px);
  line-height: 1.2;
  font-size: 1.06rem;
  color: inherit;
  text-decoration: none;
}
header.site-header .site-title:hover {
  color: #000000;
}

/* Menú */
header.site-header .site-nav {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-wrap: wrap;
  font-size: 0.95rem;
}
header.site-header .site-nav a {
  color: #0066cc;
  font-weight: 500;
  text-decoration: none;
}
header.site-header .site-nav a:hover {
  text-decoration: underline;
}

/* Selector de idioma */
header.site-header .language-switch {
  white-space: nowrap;
  font-size: 0.93rem;
  color: #0066cc;
}
header.site-header .language-switch a {
  color: #0066cc;
}
header.site-header .language-switch a:hover {
  text-decoration: underline;
}
header.site-header .language-switch strong {
  color: #111111;
  font-weight: 700;
}

/* ==============================
   📱 Versión móvil centrada
   ============================== */
@media (max-width: 640px) {
  header.site-header .wrapper {
    padding: 0.6rem 1rem;
  }

  header.site-header .header-flex {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.45rem;
  }

  header.site-header .site-title {
    max-width: 80vw;
    font-size: 1.02rem;
  }

  header.site-header nav.site-nav {
    width: 100%;
    justify-content: center;
    text-align: center;
    gap: 0.7rem;
  }

  header.site-header .language-switch {
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 0.3rem;
  }
}

/* =========================
   🌙 Modo oscuro del header
   ========================= */
@media (prefers-color-scheme: dark) {
  header.site-header {
    background-color: #181818;      /* oscuro, igual que el resto del sitio */
    color: #f5f5f5;
  }

  header.site-header .site-title:hover {
    color: #ffffff;
  }

  header.site-header .site-nav a {
    color: #4da3ff;
  }
  header.site-header .site-nav a:hover {
    color: #8cc4ff;
  }

  header.site-header .language-switch,
  header.site-header .language-switch a {
    color: #4da3ff;
  }
  header.site-header .language-switch strong {
    color: #ffffff;
  }

  /* Asegura que el wrapper NO vuelva a ser tarjeta blanca en dark mode */
  header.site-header .wrapper {
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }
}
/* ===========================
   🍔 Botón hamburguesa elegante
   =========================== */
.menu-toggle {
  display: none;              /* oculto por defecto en desktop */
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0.4rem;
  margin-left: auto;
  color: #111111;             /* líneas negras / gris oscuro */
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* ya no necesitamos margin-top si usamos gap */
.menu-toggle span + span {
  margin-top: 0;
}

/* Estado abierto → forma una X */
.menu-toggle.is-open span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.menu-toggle.is-open span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.is-open span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Modo oscuro: líneas blancas */
@media (prefers-color-scheme: dark) {
  .menu-toggle {
    color: #f5f5f5;
  }
}

/* 📱 Móvil: mostramos el botón y apilamos las rayas */
@media (max-width: 768px) {
  .menu-toggle {
    display: inline-flex;
    flex-direction: column;          /* 👈 apila los spans */
    justify-content: center;
    align-items: center;
    gap: 4px;                        /* separación vertical entre líneas */
    background-color: #f2f2f2;
    border-radius: 10px;
  }
}
/* ===========================
   📱 Comportamiento en móvil
   =========================== */
@media (max-width: 768px) {
  /* Header actúa como contenedor del menú desplegable */
  header.site-header {
    position: relative;
  }

  /* Mostrar botón hamburguesa en móvil */
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* Menú colapsado por defecto */
  header.site-header .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;              /* oculto por defecto */
    flex-direction: column;
    align-items: flex-start;
    padding: 0.35rem 1rem 0.4rem;   /* 👈 menos padding */
    gap: 0.1rem;                     /* 👈 menos separación entre filas */
    background: #ffffff;
    border-top: 1px solid rgba(0,0,0,0.08);
    z-index: 20;
  }

  /* Ajuste del espaciado en el menú móvil */
  header.site-header .site-nav a {
    padding: 0.15rem 0 !important;  /* 👈 antes 0.35rem */
    margin: 0 !important;
    font-size: 1rem;
    line-height: 1.3;
  }

  header.site-header .language-switch {
    padding: 0.15rem 0 !important;  /* 👈 igual que los links */
    margin: 0 !important;
    line-height: 1.3;
  }

  /* Ancho completo y alineación a la izquierda */
  header.site-header .site-nav a,
  header.site-header .language-switch {
    width: 100%;
    text-align: left;
  }

  header.site-header .divider {
    display: none;
  }

  /* Estado abierto → se muestra el menú */
  header.site-header .site-nav.is-open {
    display: flex;
  }
}

/* Dark mode: fondo consistente del menú desplegado en móvil */
@media (prefers-color-scheme: dark) and (max-width: 768px) {
  header.site-header .site-nav {
    background-color: #181818;
    border-top-color: #333;
  }
}
