/* Blog: reutiliza los tokens de styles.css */

/* Cabecera de las páginas del blog */
.blog-top { background: var(--white); border-bottom: 1px solid var(--gray); position: sticky; top: 0; z-index: 30; }
.blog-top .wrap { height: var(--nav-h); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.blog-top nav { display: flex; align-items: center; gap: 24px; }
.blog-top nav a:not(.btn) { color: var(--text-body); text-decoration: none; font-weight: 500; font-size: 0.9375rem; transition: color .2s ease; }
.blog-top nav a:not(.btn):hover { color: var(--navy); }
.blog-top .btn--cta { min-height: 44px; padding: 0 18px; font-size: 0.9375rem; box-shadow: none; }
@media (max-width: 640px) {
  .blog-top nav a:not(.btn) { display: none; }
}

/* Portada del blog */
.blog-hero { padding: 72px 0 40px; }
.blog-hero .lead { margin-top: 16px; }
.posts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; padding-bottom: 96px; }
.post-card {
  display: flex; flex-direction: column; gap: 12px; padding: 28px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--gray); border-radius: var(--radius-panel);
  transition: border-color .2s ease, transform .25s var(--ease-out), box-shadow .25s ease;
}
.post-card:hover { border-color: var(--blue); }
.post-card:active { transform: scale(.99); }
/* Se levanta solo con ratón; en táctil el hover se queda pegado */
@media (hover: hover) and (pointer: fine) {
  .post-card:hover { transform: translateY(-4px); box-shadow: 0 18px 36px -20px rgba(11,31,58,.35); }
  .post-card:hover:active { transform: translateY(-2px) scale(.99); }
}
.post-card h2, .post-card h3 { font-family: var(--font-title); font-size: 1.5rem; line-height: 1.2; color: var(--navy); }
.post-card p { font-size: 1rem; color: var(--text-body); }
.post-card__meta { font-size: 0.8125rem; color: var(--text-muted); }
/* Firma de autor: círculo azul marino con la Z blanca (50 % de su altura) + «ZOPE Agency» */
.byline { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-body); font-weight: 600; font-size: 14px; color: var(--text-muted); }
.byline__avatar { width: 28px; height: 28px; flex: none; border-radius: 50%; background: var(--navy); display: grid; place-items: center; }
.byline__avatar::before {
  content: ""; height: 14px; width: 12.05px; background: var(--white); /* 14 × 692/804 */
  -webkit-mask: url("../assets/brand/isotipo-z.svg") center / contain no-repeat;
          mask: url("../assets/brand/isotipo-z.svg") center / contain no-repeat;
}
.post__byline { margin-top: 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.post__byline .post__meta { margin-top: 0; }
.post .post__intro { margin-top: 28px; }
.post-card__more { margin-top: auto; font-weight: 700; color: var(--blue); font-size: 0.9375rem; }
@media (max-width: 760px) { .posts { grid-template-columns: 1fr; } }

/* Artículo */
.post { max-width: 740px; margin: 0 auto; padding: 64px var(--gutter) 40px; }
.post__back { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 28px; font-weight: 600; font-size: 0.9375rem; text-decoration: none; }
/* Flecha dibujada, no un carácter de texto */
.post__back::before { content: ""; width: 7px; height: 7px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .2s var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .post__back:hover::before { transform: translateX(-3px) rotate(45deg); } }
.post h1 { font-size: clamp(2.25rem, 5vw, 3.25rem); line-height: 1.1; }
.post__meta { margin-top: 20px; font-size: 0.9375rem; color: var(--text-muted); }
.post__intro { margin-top: 28px; font-size: 1.25rem; line-height: 1.6; color: var(--navy); }
.post h2 { font-size: clamp(1.5rem, 3vw, 1.875rem); line-height: 1.2; margin: 48px 0 14px; }
.post h3 { font-size: 1.1875rem; margin: 28px 0 8px; }
.post p { margin: 0 0 16px; line-height: 1.75; }
.post ul, .post ol { margin: 0 0 20px; padding-left: 1.3em; }
.post li { margin-bottom: 8px; line-height: 1.7; }
.post strong { color: var(--navy); }
.post__example { margin: 20px 0 24px; padding: 18px 22px; background: #EEF4FC; border: 1px solid #C9DAF0; border-radius: 12px; }
.post__example p:last-child { margin-bottom: 0; }

/* Llamada a la acción al final del artículo */
.post-cta { margin: 56px 0 24px; padding: 32px; background: var(--navy); border-radius: var(--radius-panel); color: rgba(255,255,255,.82); }
.post-cta h2 { color: var(--white); margin: 0 0 10px; }
.post-cta p { line-height: 1.6; }
.post-cta .btn { margin-top: 12px; }

.post-related { max-width: 740px; margin: 0 auto; padding: 0 var(--gutter) 96px; }
.post-related h2 { font-size: 1.25rem; margin-bottom: 16px; font-family: var(--font-body); font-weight: 700; }

/* Bloque "Del blog" en la página principal */
.blogstrip { background: var(--surface); }
.blogstrip__head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 32px; }
.blogstrip__head a { font-weight: 700; text-decoration: none; }
.blogstrip .posts { padding-bottom: 0; }
.blogstrip .post-card { background: var(--white); }
