/* ===== BLOG-SPECIFIC STYLES ===== */

/* ---- BLOG HERO ---- */
.blog-hero {
  padding: 120px 0 64px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.blog-hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 12px 0 16px;
}

.blog-hero .blog-desc {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto;
  font-weight: 400;
  line-height: 1.75;
}

/* ---- ARTICLES SECTION ---- */
.articles-section {
  padding: 80px 0 100px;
}

.articles-section-header {
  margin-bottom: 40px;
}

.articles-section-header h2 {
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

/* ---- ARTICLE CARD ---- */
.article-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, transform 0.2s;
}

.article-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.article-card-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.article-card-image-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--border);
  font-size: 2.5rem;
}

.article-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.article-card-category {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #fff;
  background: var(--accent);
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.article-card-category.cat-ventas        { background: #54A6E5; color: #fff; }
.article-card-category.cat-marketing     { background: #5CC8A8; color: #fff; }
.article-card-category.cat-operaciones   { background: #8868C8; color: #fff; }
.article-card-category.cat-digitalizacion { background: #F09070; color: #fff; }
.article-card-category.cat-scaling       { background: #F1B619; color: #fff; }
.article-card-category.cat-puny          { background: #2ECC71; color: #fff; }

.article-card h2 {
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
  color: var(--text);
}

.article-card-excerpt {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
  font-weight: 400;
  flex: 1;
  margin-bottom: 20px;
}

.article-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-weight: 600;
}

/* ---- ARTICLE PAGE ---- */
.article-header {
  max-width: 760px;
  margin: 0 auto;
  padding: 80px 24px 48px;
  text-align: center;
}

.article-header .article-category {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 20px;
  display: block;
}

.article-header h1 {
  font-size: clamp(1.9rem, 4.5vw, 2.8rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}

.article-header .article-excerpt {
  font-size: 1.15rem;
  color: var(--text-muted);
  line-height: 1.75;
  font-weight: 400;
  margin-bottom: 32px;
}

.article-header-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 600;
}

.article-header-meta .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--border);
  display: inline-block;
  flex-shrink: 0;
}

/* Cover image */
.article-cover {
  max-width: 900px;
  margin: 0 auto 64px;
  padding: 0 24px;
}

.article-cover img {
  width: 100%;
  border-radius: var(--radius-lg);
  display: block;
  max-height: 520px;
  object-fit: cover;
}

/* Article content */
.article-body {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

.article-body p {
  font-size: 1.1rem;
  line-height: 1.9;
  color: var(--text);
  font-weight: 400;
  margin-bottom: 28px;
}

.article-body h2 {
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin: 52px 0 16px;
  line-height: 1.2;
}

.article-body h3 {
  font-size: 1.25rem;
  font-weight: 800;
  margin: 36px 0 12px;
  line-height: 1.3;
}

.article-body img {
  width: 100%;
  border-radius: var(--radius);
  margin: 36px 0;
  display: block;
}

.article-body ul,
.article-body ol {
  padding-left: 28px;
  margin-bottom: 28px;
}

.article-body li {
  font-size: 1.1rem;
  line-height: 1.8;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 8px;
}

.article-body blockquote {
  border-left: 3px solid var(--accent);
  padding: 20px 28px;
  background: var(--surface);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 36px 0;
  font-size: 1.1rem;
  font-style: italic;
  color: var(--text-muted);
  line-height: 1.8;
}

.article-body a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: var(--accent-glow);
  font-weight: 600;
  transition: color 0.2s;
}

.article-body a:hover {
  color: var(--accent-hover);
}

.article-body strong {
  font-weight: 800;
  color: var(--text);
}

.article-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 52px 0;
}

/* Callout box */
.article-callout {
  background: var(--accent-glow);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 36px 0;
  font-size: 1.05rem;
  color: var(--text);
  line-height: 1.75;
}

.article-callout strong {
  color: var(--accent);
}

/* Article footer nav */
.article-nav-footer {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 24px 80px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.article-nav-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.article-nav-back:hover {
  color: var(--text);
}

/* Category accent colors */
.cat-ventas        { color: var(--accent); }   /* blue   #54A6E5 */
.cat-marketing     { color: #5CC8A8; }         /* teal              */
.cat-operaciones   { color: #8868C8; }         /* purple            */
.cat-digitalizacion { color: #F09070; }        /* coral             */
.cat-scaling       { color: #F1B619; }         /* yellow            */
.cat-puny          { color: #2ECC71; }         /* green - Puny product - also used in article header */

/* ---- CATEGORY FILTER PILLS ---- */
.category-filter {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 48px;
}

.cat-pill {
  padding: 10px 24px;
  border-radius: 100px;
  border: 2px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 900;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
  letter-spacing: 0.01em;
}

.cat-pill:hover {
  border-color: currentColor;
  color: var(--text);
}

/* Active state - each category gets its own color */
.cat-pill[data-cat="all"].active           { background: var(--accent); border-color: var(--accent); color: #fff; }
.cat-pill[data-cat="cat-ventas"].active    { background: #54A6E5;       border-color: #54A6E5;      color: #fff; }
.cat-pill[data-cat="cat-marketing"].active { background: #5CC8A8;       border-color: #5CC8A8;      color: #fff; }
.cat-pill[data-cat="cat-operaciones"].active { background: #8868C8;     border-color: #8868C8;      color: #fff; }
.cat-pill[data-cat="cat-digitalizacion"].active { background: #F09070;  border-color: #F09070;      color: #fff; }
.cat-pill[data-cat="cat-scaling"].active   { background: #F1B619;       border-color: #F1B619;      color: #fff; }
.cat-pill[data-cat="cat-puny"].active      { background: #2ECC71;       border-color: #2ECC71;      color: #fff; }

/* Hover color hints */
.cat-pill[data-cat="cat-ventas"]:not(.active):hover    { border-color: #54A6E5; color: #54A6E5; }
.cat-pill[data-cat="cat-marketing"]:not(.active):hover { border-color: #5CC8A8; color: #5CC8A8; }
.cat-pill[data-cat="cat-operaciones"]:not(.active):hover { border-color: #8868C8; color: #8868C8; }
.cat-pill[data-cat="cat-digitalizacion"]:not(.active):hover { border-color: #F09070; color: #F09070; }
.cat-pill[data-cat="cat-scaling"]:not(.active):hover   { border-color: #F1B619; color: #F1B619; }
.cat-pill[data-cat="cat-puny"]:not(.active):hover      { border-color: #2ECC71; color: #2ECC71; }

/* Hidden card state */
.article-card.cat-hidden {
  display: none;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 1024px) and (min-width: 769px) {
  .articles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .blog-hero {
    padding: 100px 0 48px;
  }

  .articles-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .article-header {
    padding: 60px 24px 36px;
  }

  .article-cover {
    margin-bottom: 40px;
  }

  .article-body h2 {
    font-size: 1.4rem;
    margin-top: 40px;
  }

  .article-nav-footer {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }
}

/* ── Related Articles ───────────────────────── */
.related-articles {
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

.related-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 24px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.related-grid .article-card-image {
  aspect-ratio: 4 / 3;
  border-radius: 0;
  margin: 0;
}

.related-grid .article-card-body {
  padding: 14px 16px 16px;
}

.related-grid .article-card-body h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
  margin: 0;
}

@media (max-width: 768px) {
  .related-grid {
    grid-template-columns: 1fr;
  }
}
