/* ============================================================
   CRECE A TU RITMO — Blog Styles
   Shared by blog/index.html and all article pages
============================================================ */

/* ---- Blog header ---- */
.blog-hero {
  background: var(--slate-900);
  padding: 8rem 0 5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.blog-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgb(255 255 255 / .025) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / .025) 1px, transparent 1px);
  background-size: 60px 60px;
}
.blog-hero__content { position: relative; z-index: 1; }
.blog-hero__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  color: #fff;
  margin: 0.75rem 0 1rem;
}
.blog-hero__subtitle { color: var(--slate-400); font-size: 1.0625rem; }

/* ---- Breadcrumbs ---- */
.breadcrumb {
  padding: 1rem 0;
  border-bottom: 1px solid var(--slate-200);
  margin-bottom: 3rem;
}
.breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  align-items: center;
  font-size: 0.875rem;
  color: var(--slate-500);
}
.breadcrumb__list a { color: var(--green-600); transition: color var(--transition-base); }
.breadcrumb__list a:hover { color: var(--green-700); }
.breadcrumb__sep { color: var(--slate-400); }
.breadcrumb__current { color: var(--slate-700); font-weight: 500; }

/* ---- Blog listing ---- */
.blog-listing { padding: 4rem 0 6rem; }
.blog-listing__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
}
.filter-btn {
  padding: 0.375rem 1rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--slate-300);
  background: #fff;
  color: var(--slate-600);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-base);
}
.filter-btn:hover, .filter-btn.active {
  background: var(--green-600);
  border-color: var(--green-600);
  color: #fff;
}
.blog-listing__grid {
  display: grid;
  gap: 2rem;
}
@media (min-width: 640px) { .blog-listing__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .blog-listing__grid { grid-template-columns: repeat(3, 1fr); } }

/* ---- Article page layout ---- */
.article-page { padding: 0 0 5rem; }
.article-layout {
  display: grid;
  gap: 3rem;
  max-width: 1100px;
  margin: 0 auto;
}
@media (min-width: 1024px) {
  .article-layout { grid-template-columns: 1fr 300px; align-items: start; }
}

/* ---- Article header ---- */
.article-header { margin-bottom: 2.5rem; }
.article-header__tags { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.article-header__title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  color: var(--slate-900);
  line-height: 1.2;
  margin-bottom: 1rem;
}
.article-header__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  color: var(--slate-500);
  font-size: 0.875rem;
  align-items: center;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--slate-200);
  margin-bottom: 2rem;
}
.article-header__meta-item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}
.article-hero-img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: var(--radius-xl);
  margin-bottom: 2.5rem;
  display: block;
}
@media (min-width: 768px) { .article-hero-img { height: 460px; } }

/* ---- Article body typography ---- */
.article-body {
  font-size: 1.0625rem;
  color: var(--slate-700);
  line-height: 1.8;
}
.article-body h2 {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 3vw, 1.625rem);
  font-weight: 700;
  color: var(--slate-900);
  margin: 2.5rem 0 1rem;
  padding-top: 0.5rem;
}
.article-body h3 {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--slate-800);
  margin: 2rem 0 0.75rem;
}
.article-body p { margin-bottom: 1.25rem; }
.article-body ul, .article-body ol {
  margin: 1rem 0 1.5rem;
  padding-left: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.article-body li { padding-left: 0.25rem; }
.article-body ul li { list-style: disc; }
.article-body ol li { list-style: decimal; }
.article-body strong { color: var(--slate-900); font-weight: 600; }
.article-body blockquote {
  border-left: 4px solid var(--green-500);
  padding: 1rem 1.5rem;
  background: var(--green-50);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 1.5rem 0;
  color: var(--slate-700);
  font-style: italic;
}
.article-body .highlight-box {
  background: var(--slate-900);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  color: var(--slate-300);
  margin: 1.5rem 0;
}
.article-body .highlight-box strong { color: var(--green-400); }

/* Intro lead paragraph */
.article-body .lead {
  font-size: 1.1875rem;
  color: var(--slate-600);
  line-height: 1.75;
  font-weight: 400;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--slate-200);
}

/* ---- Sidebar ---- */
.article-sidebar { position: sticky; top: 6rem; display: flex; flex-direction: column; gap: 1.5rem; }

.toc-card {
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
}
.toc-card h4 {
  font-weight: 700;
  color: var(--slate-900);
  margin-bottom: 1rem;
  font-size: 0.9375rem;
}
.toc-card ol {
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}
.toc-card a {
  font-size: 0.875rem;
  color: var(--slate-600);
  transition: color var(--transition-base);
  line-height: 1.4;
}
.toc-card a:hover { color: var(--green-600); }

.sidebar-cta {
  background: var(--slate-900);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  text-align: center;
}
.sidebar-cta__icon { font-size: 2rem; margin-bottom: 0.75rem; }
.sidebar-cta h4 { color: #fff; font-weight: 700; margin-bottom: 0.5rem; }
.sidebar-cta p { color: var(--slate-400); font-size: 0.875rem; margin-bottom: 1.25rem; }
.sidebar-cta .btn { font-size: 0.875rem; padding: 0.625rem 1.25rem; }

/* ---- Author bio ---- */
.author-bio {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.5rem;
  background: var(--slate-50);
  border-radius: var(--radius-xl);
  border: 1px solid var(--slate-200);
  margin-top: 3rem;
}
.author-bio__avatar {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--green-500), var(--green-700));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}
.author-bio strong { display: block; color: var(--slate-900); margin-bottom: 0.25rem; }
.author-bio p { font-size: 0.875rem; color: var(--slate-500); }

/* ---- Article CTA ---- */
.article-cta {
  background: linear-gradient(135deg, var(--slate-900), var(--green-900));
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  text-align: center;
  margin-top: 3rem;
}
.article-cta h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.75rem;
}
.article-cta p { color: var(--slate-400); margin-bottom: 1.5rem; }

/* ---- Related articles ---- */
.related-articles { margin-top: 4rem; padding-top: 3rem; border-top: 1px solid var(--slate-200); }
.related-articles h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--slate-900);
  margin-bottom: 1.5rem;
}
.related-articles__grid {
  display: grid;
  gap: 1.25rem;
}
@media (min-width: 640px) { .related-articles__grid { grid-template-columns: repeat(2, 1fr); } }
