/* Estilos de las páginas del blog (/blog y cada artículo).
 *
 * La cabecera, el menú móvil y los botones son copia de los del <style> de
 * index.html: si cambian allá, cambiarlos acá también. Lo propio del blog —las
 * tarjetas y la tipografía del artículo— está al final.
 *
 * Se carga ANTES de tailwind.css, igual que el <style> de la portada, para que
 * el orden de la cascada sea el mismo en todo el sitio. */

body { font-family: 'Instrument Sans', sans-serif; }
.font-serif-display { font-family: 'Instrument Serif', serif; }

/* ============ CABECERA (copia de index.html) ============ */
.nav-link { position: relative; }
.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 1px;
  background-color: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.nav-link:hover::after { transform: scaleX(1); transform-origin: left; }

.btn-primary {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -10px rgba(38, 151, 165, 0.5);
}
.btn-arrow-icon { transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.btn-primary:hover .btn-arrow-icon { transform: rotate(45deg); }

.header-glass {
  background-color: rgba(238, 238, 238, 0.85);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.header-glass nav {
  transition: padding-top 0.4s cubic-bezier(0.16, 1, 0.3, 1), padding-bottom 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.site-logo { transition: height 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
header.header-compact nav {
  padding-top: 0.875rem !important;
  padding-bottom: 0.875rem !important;
}
header.header-compact .site-logo { height: 2.25rem !important; }

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 2.4s cubic-bezier(0.19, 1, 0.22, 1), transform 2.4s cubic-bezier(0.19, 1, 0.22, 1);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ============ MENU MOVIL (copia de index.html) ============ */
.nav-toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: #3a363b;
}
.nav-toggle span {
  position: absolute;
  display: block;
  width: 22px;
  height: 1.5px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.nav-toggle span:nth-child(1) { transform: translateY(-4px); }
.nav-toggle span:nth-child(2) { transform: translateY(4px); }
body.menu-open .nav-toggle span:nth-child(1) { transform: rotate(45deg); }
body.menu-open .nav-toggle span:nth-child(2) { transform: rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: #eeeeee;
  padding: 104px 24px calc(32px + env(safe-area-inset-bottom));
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.35s ease, visibility 0.35s ease, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.mobile-menu.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
.mobile-menu-inner { display: flex; flex-direction: column; }
.mobile-menu-link {
  font-family: 'Instrument Serif', serif;
  font-size: 30px;
  line-height: 1.2;
  color: #3a363b;
  padding: 16px 0;
  border-bottom: 1px solid #dcdcda;
}
.mobile-menu-link.is-active { color: #2697a5; }

@media (max-width: 899px) {
  header nav > .md\:flex { display: none !important; }
  .nav-toggle { display: flex !important; }
}

/* ============ TARJETAS (listado y portada) ============ */
/* La grilla y la tarjeta también se usan en la portada: allá estas reglas
   están repetidas en su <style>. */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 56px 40px;
}
.blog-card-img { transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1); }
.blog-card:hover .blog-card-img { transform: scale(1.05); }
.blog-card-mas svg { transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.blog-card:hover .blog-card-mas svg { transform: rotate(45deg); }
@media (max-width: 1023px) { .blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639px)  { .blog-grid { grid-template-columns: 1fr; gap: 48px; } }

/* ============ CUERPO DEL ARTÍCULO ============ */
/* El texto llega de Airtable sin clases: el estilo va por elemento. */
.articulo-cuerpo { color: #4a464b; font-size: 18px; line-height: 1.8; }
.articulo-cuerpo > * + * { margin-top: 1.4em; }
.articulo-cuerpo h2,
.articulo-cuerpo h3,
.articulo-cuerpo h4 {
  font-family: 'Instrument Serif', serif;
  color: #3a363b;
  line-height: 1.2;
  margin-top: 1.8em;
}
.articulo-cuerpo h2 { font-size: 36px; }
.articulo-cuerpo h3 { font-size: 28px; }
.articulo-cuerpo h4 { font-size: 23px; }
.articulo-cuerpo h2 + *, .articulo-cuerpo h3 + *, .articulo-cuerpo h4 + * { margin-top: 0.6em; }
.articulo-cuerpo strong { color: #3a363b; font-weight: 600; }
.articulo-cuerpo a {
  color: #2697a5;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.articulo-cuerpo a:hover { text-decoration-thickness: 2px; }
.articulo-cuerpo ul, .articulo-cuerpo ol { padding-left: 1.3em; }
.articulo-cuerpo ul { list-style: disc; }
.articulo-cuerpo ol { list-style: decimal; }
.articulo-cuerpo li + li { margin-top: 0.5em; }
.articulo-cuerpo li::marker { color: #2697a5; }
.articulo-cuerpo blockquote {
  font-family: 'Instrument Serif', serif;
  font-size: 28px;
  line-height: 1.4;
  color: #3a363b;
  border-left: 2px solid #c2ce9b;
  padding: 4px 0 4px 28px;
}

@media (max-width: 767px) {
  .articulo-cuerpo { font-size: 17px; }
  .articulo-cuerpo h2 { font-size: 30px; }
  .articulo-cuerpo h3 { font-size: 25px; }
  .articulo-cuerpo blockquote { font-size: 23px; padding-left: 20px; }
}
