/* ============================================
   BLOG SEO · editorial system
   ============================================ */

.blog-home {
  padding: clamp(4rem, 8vw, 7rem) clamp(1rem, 4vw, 2.5rem);
  background: #fff;
}

.blog-home__inner,
.blog-shell,
.article-shell {
  max-width: var(--container);
  margin: 0 auto;
}

.blog-home__head,
.blog-index-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.5rem;
  align-items: end;
  margin-bottom: 2rem;
}

.blog-kicker {
  color: #2563eb;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: .8rem;
}

.blog-title {
  margin: 0;
  color: #0f172a;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5vw, 5.4rem);
  line-height: .88;
  letter-spacing: 0;
  text-transform: uppercase;
  text-wrap: balance;
}

.blog-copy {
  max-width: 68ch;
  color: #475569;
  font-size: 1.05rem;
  line-height: 1.75;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.blog-card {
  min-height: 320px;
  padding: 1.2rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: .9rem;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.blog-card:hover {
  transform: translateY(-4px);
  border-color: #bfdbfe;
  box-shadow: 0 22px 60px rgba(37,99,235,.12);
}

.blog-card--dark {
  background:
    radial-gradient(circle at 84% 12%, rgba(56,189,248,.28), transparent 32%),
    #0f172a;
  color: #fff;
}

.blog-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  align-items: center;
  color: #64748b;
  font-family: var(--font-mono);
  font-size: .66rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.blog-card--dark .blog-card__meta {
  color: rgba(226,232,240,.72);
}

.blog-tag {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  text-decoration: none;
  padding: .35rem .55rem;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-family: var(--font-mono);
  font-size: .65rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.blog-card--dark .blog-tag {
  background: rgba(56,189,248,.14);
  color: #7dd3fc;
}

.blog-card h3 {
  margin: 0;
  color: inherit;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3vw, 2.45rem);
  line-height: .92;
  letter-spacing: 0;
}

.blog-card p {
  margin: 0;
  color: #475569;
  line-height: 1.65;
}

.blog-card--dark p {
  color: rgba(226,232,240,.72);
}

.blog-card__link {
  margin-top: auto;
  color: #2563eb;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.blog-card--dark .blog-card__link {
  color: #7dd3fc;
}

.blog-index {
  min-height: 100vh;
  background:
    linear-gradient(180deg, #f8fafc, #eef4ff 52%, #fff);
}

.blog-index-main {
  padding: clamp(3rem, 7vw, 6rem) clamp(1rem, 4vw, 2.5rem);
}

.blog-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 1rem;
  align-items: center;
  margin: 2rem 0;
  padding: 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(12px);
}

.blog-search {
  width: 100%;
  min-height: 46px;
  border: 1px solid #dbe3ef;
  border-radius: 999px;
  padding: 0 1rem;
  color: #0f172a;
  font: inherit;
  background: #fff;
}

.blog-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .5rem;
}

.blog-filter {
  min-height: 40px;
  padding: 0 .9rem;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.blog-filter.is-active {
  background: #0f172a;
  border-color: #0f172a;
  color: #fff;
}

.blog-empty {
  display: none;
  padding: 2rem;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  color: #64748b;
  text-align: center;
}

.blog-empty.is-visible {
  display: block;
}

.blog-category-map {
  margin: 2.5rem 0;
  padding: clamp(1.2rem, 3vw, 2rem);
  border: 1px solid #dbeafe;
  border-radius: 16px;
  background: #fff;
}

.blog-category-map h2,
.blog-category-map h3,
.blog-category-map h4,
.blog-category-map h5 {
  margin: 0;
  color: #0f172a;
  font-family: var(--font-display);
  letter-spacing: 0;
}

.blog-category-map h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: .95;
}

.blog-category-map h3 {
  margin-top: 1.4rem;
  font-size: clamp(1.35rem, 2.5vw, 1.9rem);
  line-height: 1;
}

.blog-category-map h4 {
  margin-top: 1rem;
  font-size: 1rem;
  text-transform: uppercase;
}

.blog-category-map h5 {
  margin-top: .8rem;
  color: #2563eb;
  font-size: .82rem;
  text-transform: uppercase;
}

.blog-category-map p {
  max-width: 72ch;
  color: #475569;
  line-height: 1.7;
}

.article-page {
  background: #fff;
}

.article-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 4px;
  z-index: 200;
  background: linear-gradient(90deg, #38bdf8, #2563eb, #a3e635);
}

.article-hero {
  padding: clamp(3rem, 7vw, 6rem) clamp(1rem, 4vw, 2.5rem);
  color: #fff;
  background:
    radial-gradient(circle at 75% 20%, rgba(56,189,248,.2), transparent 34%),
    linear-gradient(135deg, #020617, #0f172a);
}

.article-hero__inner {
  max-width: 1080px;
  margin: 0 auto;
}

.article-breadcrumb {
  display: inline-flex;
  gap: .45rem;
  align-items: center;
  margin-bottom: 1.4rem;
  color: rgba(226,232,240,.72);
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.article-breadcrumb a {
  color: inherit;
  text-decoration: none;
}

.article-breadcrumb a:hover {
  color: #fff;
}

.article-hero h1 {
  max-width: 980px;
  margin: 0;
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 7rem);
  line-height: .84;
  letter-spacing: 0;
  text-transform: uppercase;
}

.article-excerpt {
  max-width: 760px;
  margin-top: 1.4rem;
  color: rgba(226,232,240,.78);
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  line-height: 1.75;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  margin-top: 1.5rem;
  color: rgba(226,232,240,.64);
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
  padding: clamp(3rem, 6vw, 5rem) clamp(1rem, 4vw, 2.5rem);
}

.article-content {
  max-width: 820px;
}

.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5 {
  color: #0f172a;
  font-family: var(--font-display);
  letter-spacing: 0;
  text-wrap: balance;
}

.article-content h2 {
  margin: 2.4rem 0 1rem;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: .95;
}

.article-content h3 {
  margin: 1.8rem 0 .7rem;
  font-size: clamp(1.4rem, 3vw, 2rem);
  line-height: 1;
}

.article-content h4 {
  margin: 1.4rem 0 .55rem;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.1;
  text-transform: uppercase;
}

.article-content h5 {
  margin: 1.1rem 0 .45rem;
  color: #2563eb;
  font-size: .92rem;
  line-height: 1.2;
  text-transform: uppercase;
}

.article-content p,
.article-content li {
  color: #334155;
  font-size: 1.04rem;
  line-height: 1.82;
}

.article-content ul,
.article-content ol {
  padding-left: 1.25rem;
}

.article-callout {
  margin: 2rem 0;
  padding: 1.2rem;
  border-left: 4px solid #38bdf8;
  border-radius: 10px;
  background: #eff6ff;
  color: #0f172a;
}

.article-outline {
  margin: 2rem 0;
  padding: clamp(1.2rem, 3vw, 1.8rem);
  border: 1px solid #dbeafe;
  border-radius: 16px;
  background: linear-gradient(180deg, #eff6ff, #fff);
}

.article-outline h2 {
  margin-top: 0;
}

.article-outline p:last-child {
  margin-bottom: 0;
}

.article-interlinks {
  margin: 3rem 0;
  padding: clamp(1.2rem, 3vw, 2rem);
  border: 1px solid #c7d2fe;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(37,99,235,.08), rgba(14,165,233,.05)),
    #fff;
}

.internal-links__head {
  max-width: 720px;
  margin-bottom: 1.2rem;
}

.internal-links__head span,
.internal-link-card span {
  display: inline-flex;
  color: #2563eb;
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.internal-links__head h2 {
  margin: .5rem 0 .75rem;
}

.internal-links__head p {
  margin: 0;
  color: #475569;
}

.internal-links__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .9rem;
}

.internal-link-card {
  display: grid;
  gap: .5rem;
  min-height: 170px;
  padding: 1rem;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background: #f8fafc;
  color: #0f172a;
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.internal-link-card:hover {
  transform: translateY(-3px);
  border-color: #93c5fd;
  box-shadow: 0 18px 50px rgba(37,99,235,.12);
}

.internal-link-card strong {
  color: #0f172a;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.5vw, 1.8rem);
  line-height: 1;
}

.internal-link-card p {
  margin: 0;
  color: #475569;
  font-size: .95rem;
  line-height: 1.55;
}

.article-sidebar {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  display: grid;
  gap: 1rem;
}

.article-box {
  padding: 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
}

.article-box h2,
.article-box h3 {
  margin: 0 0 .8rem;
  color: #0f172a;
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1;
}

.article-toc {
  display: grid;
  gap: .55rem;
}

.article-toc a,
.related-list a {
  color: #475569;
  font-size: .92rem;
  line-height: 1.4;
}

.article-toc .toc-h3 {
  padding-left: .75rem;
  font-size: .86rem;
}

.article-toc .toc-h4 {
  padding-left: 1.35rem;
  color: #64748b;
  font-size: .8rem;
}

.article-toc a:hover,
.related-list a:hover {
  color: #2563eb;
}

.related-list {
  display: grid;
  gap: .7rem;
}

.article-share {
  display: flex;
  gap: .5rem;
}

.article-share button,
.article-share a {
  flex: 1;
  min-height: 40px;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-family: var(--font-display);
  font-weight: 800;
  text-align: center;
}

.article-bottom-cta {
  margin-top: 3rem;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border-radius: 16px;
  background: #0f172a;
  color: #fff;
}

.article-bottom-cta h2 {
  color: #fff;
  margin-top: 0;
}

.article-bottom-cta p {
  color: rgba(226,232,240,.78);
}

@media (max-width: 1024px) {
  .blog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .article-layout {
    grid-template-columns: 1fr;
  }

  .article-sidebar {
    position: static;
  }
}

@media (max-width: 760px) {
  .blog-home__head,
  .blog-index-hero,
  .blog-toolbar {
    grid-template-columns: 1fr;
  }

  .blog-grid {
    grid-template-columns: 1fr;
  }

  .internal-links__grid {
    grid-template-columns: 1fr;
  }

  .blog-filters {
    justify-content: flex-start;
  }

  .article-hero h1 {
    font-size: clamp(2.7rem, 14vw, 4.5rem);
  }
}

/* Categorias del blog · navegacion por tema (reemplaza el mapa de URLs) */
.blog-cats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: .5rem 0 2.75rem;
}
.blog-cat {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  padding: 1.15rem 1.3rem;
  border: 1px solid #e5eaf0;
  border-radius: 14px;
  background: #fff;
  transition: transform .22s cubic-bezier(.2,.7,.3,1), border-color .2s, box-shadow .22s;
}
.blog-cat:hover {
  transform: translateY(-4px);
  border-color: #2563eb;
  box-shadow: 0 16px 38px rgba(20,42,64,.12);
}
.blog-cat strong {
  color: #0f172a;
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 800;
}
.blog-cat span {
  color: #64748b;
  font-size: .86rem;
  line-height: 1.4;
}
@media (max-width: 760px) {
  .blog-cats { grid-template-columns: 1fr 1fr; }
}
