/* ==========================================================================
   ASZENDIA — Blog y artículos (v2, tema claro)
   ========================================================================== */

/* --- Cabecera del blog --- */
.blog-hero { position: relative; padding-top: 150px; padding-bottom: 20px; overflow: hidden; }
.blog-hero .hero-glow { position: absolute; z-index: 0; border-radius: 50%; }
.blog-hero .hero-glow.g1 { width: 42vw; height: 42vw; left: -14%; top: -10%; background: radial-gradient(circle, rgba(255,122,47,0.16), transparent 62%); }
.blog-hero .hero-glow.g2 { width: 42vw; height: 42vw; right: -14%; top: 0; background: radial-gradient(circle, rgba(155,63,212,0.16), transparent 62%); }
.blog-hero .container { position: relative; z-index: 2; }
.blog-hero h1 { font-size: clamp(2.4rem, 5.5vw, 4rem); margin-bottom: 20px; letter-spacing: -0.045em; }
.blog-hero p { max-width: 620px; }

/* --- Filtros --- */
.blog-filters { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 40px 0 8px; }
.blog-filter { font-size: 14px; font-weight: 500; color: var(--ink-2); padding: 9px 18px; border-radius: 100px; border: 1px solid var(--line); background: var(--card); transition: all 0.35s var(--ease); }
.blog-filter:hover { color: var(--ink); border-color: var(--line-2); }
.blog-filter.active { color: #fff; background: var(--grad); border-color: transparent; }

/* --- Rejilla de artículos --- */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.post-card { display: flex; flex-direction: column; overflow: hidden; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh-sm); transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease); }
.post-card:hover { transform: translateY(-6px); box-shadow: var(--sh); }
.post-thumb { position: relative; aspect-ratio: 16 / 10; display: grid; place-items: center; overflow: hidden; background: var(--bg-soft); }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-thumb .thumb-icon { position: relative; z-index: 2; width: 54px; height: 54px; }
.post-thumb .thumb-icon svg { width: 100%; height: 100%; }
.post-body { padding: 24px 26px 28px; display: flex; flex-direction: column; flex-grow: 1; }
.post-cat { display: inline-flex; align-self: flex-start; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--pink); margin-bottom: 14px; }
.post-card h2 { font-size: 1.22rem; line-height: 1.28; margin-bottom: 10px; letter-spacing: -0.025em; }
.post-card:hover h2 { color: var(--pink); transition: color 0.35s var(--ease); }
.post-excerpt { color: var(--ink-2); font-size: 14.5px; flex-grow: 1; }
.post-meta { display: flex; align-items: center; gap: 12px; margin-top: 20px; font-size: 13px; color: var(--ink-3); }
.post-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-3); }

/* Gradientes de miniatura (definidos también en styles.css) */
.thumb-ia   { background: linear-gradient(135deg, #7c3aed, #b06bff); }
.thumb-seo  { background: linear-gradient(135deg, #f5417e, #ff86ac); }
.thumb-ads  { background: linear-gradient(135deg, #ff7a2f, #ffb06b); }
.thumb-social { background: linear-gradient(135deg, #e5308a, #ff6bc0); }
.thumb-web  { background: linear-gradient(135deg, #6d5cff, #9b3fd4); }
.thumb-estrategia { background: linear-gradient(135deg, #ff5e6c, #ff9e5c); }

/* ==========================================================================
   Artículo
   ========================================================================== */
.article-wrap { padding-top: 120px; }
.back-bar { position: sticky; top: 88px; z-index: 40; padding: 14px 0; margin-bottom: 8px; }
.back-link { display: inline-flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 600; color: var(--ink-2); padding: 9px 18px 9px 14px; border-radius: 100px; background: rgba(255,255,255,0.8); border: 1px solid var(--line); backdrop-filter: blur(12px); box-shadow: var(--sh-sm); transition: all 0.35s var(--ease); }
.back-link:hover { color: var(--ink); border-color: var(--line-2); transform: translateX(-4px); }
.back-link svg { transition: transform 0.35s var(--ease); }
.back-link:hover svg { transform: translateX(-3px); }

.article { max-width: 760px; margin-inline: auto; }
.article-header { margin-bottom: 44px; }
.article-header .post-cat { margin-bottom: 20px; font-size: 12px; }
.article-header h1 { font-size: clamp(2rem, 4.6vw, 3.1rem); line-height: 1.1; letter-spacing: -0.04em; margin-bottom: 22px; }
.article-lead { font-size: clamp(1.1rem, 1.8vw, 1.3rem); color: var(--ink-2); line-height: 1.6; }
.article-meta { display: flex; align-items: center; gap: 14px; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-3); }
.article-meta .avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--grad); display: grid; place-items: center; font-weight: 700; color: #fff; font-size: 14px; }
.article-meta .author-name { color: var(--ink); font-weight: 600; }
.article-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-3); }

.article-cover { aspect-ratio: 21 / 9; border-radius: var(--r-lg); overflow: hidden; margin-bottom: 48px; display: grid; place-items: center; background: var(--bg-soft); }
.article-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.article-cover .thumb-icon { width: 78px; height: 78px; }
.article-cover .thumb-icon svg { width: 100%; height: 100%; }

/* Foto dentro del artículo */
.article-figure { margin: 42px 0; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--sh-sm); }
.article-figure img { width: 100%; display: block; }
.article-figure figcaption { font-size: 13px; color: var(--ink-3); text-align: center; padding: 12px 16px; background: var(--bg-soft); }

/* Cuerpo */
.article-body { font-size: 17.5px; line-height: 1.75; color: var(--ink-2); }
.article-body > * + * { margin-top: 26px; }
.article-body h2 { font-size: clamp(1.5rem, 3vw, 2rem); color: var(--ink); margin-top: 52px; letter-spacing: -0.03em; scroll-margin-top: 120px; }
.article-body h3 { font-size: 1.3rem; color: var(--ink); margin-top: 38px; letter-spacing: -0.02em; }
.article-body p { color: var(--ink-2); }
.article-body strong { color: var(--ink); font-weight: 650; }
.article-body a { color: var(--pink); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(245,65,126,0.35); transition: text-decoration-color 0.3s; }
.article-body a:hover { text-decoration-color: var(--pink); }
.article-body ul, .article-body ol { padding-left: 4px; display: flex; flex-direction: column; gap: 12px; }
.article-body li { position: relative; padding-left: 30px; color: var(--ink-2); }
.article-body ul li::before { content: ""; position: absolute; left: 4px; top: 11px; width: 8px; height: 8px; border-radius: 50%; background: var(--grad); }
.article-body ol { counter-reset: li; }
.article-body ol li { counter-increment: li; }
.article-body ol li::before { content: counter(li); position: absolute; left: 0; top: 2px; width: 22px; height: 22px; font-size: 12px; font-weight: 700; color: #fff; border-radius: 50%; display: grid; place-items: center; background: var(--grad); }
.article-body blockquote { border-left: 3px solid var(--pink); padding: 6px 0 6px 24px; margin-left: 4px; font-family: var(--serif); font-style: italic; font-size: 1.4rem; color: var(--ink); font-weight: 400; letter-spacing: -0.01em; line-height: 1.45; }

/* Callout */
.callout { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--r); padding: 26px 28px; position: relative; overflow: hidden; }
.callout::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--grad); }
.callout .callout-title { display: flex; align-items: center; gap: 10px; font-weight: 650; color: var(--ink); margin-bottom: 10px; font-size: 1.05rem; }
.callout .callout-title svg { color: var(--orange); }
.callout p { margin: 0; font-size: 15.5px; color: var(--ink-2); }

/* Takeaways */
.takeaways { background: var(--ink-bg); color: var(--on-dark); border-radius: var(--r); padding: 30px 32px; }
.takeaways h3 { margin-top: 0 !important; color: #fff; font-size: 1.15rem; }
.takeaways ul li { color: var(--on-dark-2); }

/* CTA en artículo */
.article-cta { margin-top: 60px; border-radius: var(--r-lg); padding: 48px 40px; text-align: center; position: relative; overflow: hidden; background: var(--ink-bg); color: var(--on-dark); }
.article-cta::before { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 30% 20%, rgba(255,122,47,0.26), transparent 55%), radial-gradient(ellipse at 75% 90%, rgba(155,63,212,0.32), transparent 55%); }
.article-cta > * { position: relative; z-index: 2; }
.article-cta h3 { color: #fff; font-size: 1.6rem; margin: 0 0 12px; letter-spacing: -0.03em; }
.article-cta p { color: var(--on-dark-2); max-width: 460px; margin: 0 auto 26px; }

/* Compartir */
.article-share { display: flex; align-items: center; gap: 14px; margin-top: 50px; padding-top: 30px; border-top: 1px solid var(--line); }
.article-share span { font-size: 14px; color: var(--ink-3); font-weight: 500; }
.article-share a { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; border: 1px solid var(--line); background: var(--card); transition: all 0.35s var(--ease); }
.article-share a:hover { border-color: var(--pink); background: rgba(245,65,126,0.07); transform: translateY(-3px); }
.article-share svg { width: 17px; height: 17px; color: var(--ink-2); }

/* Relacionados */
.related { border-top: 1px solid var(--line); background: var(--bg-soft); }
.related h2 { text-align: center; margin-bottom: 44px; }

@media (max-width: 940px) { .blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) {
  .blog-grid { grid-template-columns: 1fr; }
  .back-bar { top: 64px; }
  .article-body { font-size: 16.5px; }
}

/* Tablas comparativas en artículos */
.table-wrap { overflow-x: auto; margin: 32px 0; border-radius: var(--r); border: 1px solid var(--line); }
.asz-table { width: 100%; border-collapse: collapse; font-size: 15px; background: #fff; }
.asz-table th { background: var(--bg-soft); font-weight: 700; color: var(--ink); text-align: left; padding: 14px 16px; border-bottom: 2px solid var(--line); white-space: nowrap; }
.asz-table td { padding: 13px 16px; border-bottom: 1px solid var(--line); color: var(--ink-2); vertical-align: top; }
.asz-table tbody tr:last-child td { border-bottom: none; }
.asz-table tbody tr:hover { background: var(--bg-soft); }
@media (max-width: 640px) { .asz-table { font-size: 14px; } .asz-table th, .asz-table td { padding: 11px 12px; } }
