/* ═══════════════════════════════════════════════════════
   InstaSwift Docs — article.css
   Estilos específicos para páginas de artículo
═══════════════════════════════════════════════════════ */

/* ── Hero compacto para artículos ── */
.hero.is-insta.is-article { min-height: auto; }
.hero.is-insta.is-article .hero-body { padding: 2rem 1.5rem 2.5rem; }
.hero.is-insta.is-article .hero-title { font-size: clamp(1.6rem,4vw,2.4rem); margin-bottom: .4rem; }
.hero.is-insta.is-article .hero-subtitle { font-size: .95rem; margin-bottom: 0; }

/* ── Breadcrumb bar ── */
.breadcrumb-bar {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: .65rem 0;
}
.breadcrumb-bar nav { font-size: .83rem; }
.breadcrumb-bar nav a {
  background: var(--grad-btn);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 500;
  text-decoration: none;
}
.breadcrumb-bar nav a:hover { text-decoration: underline; }
.breadcrumb-bar nav span { color: var(--text-muted); }
.breadcrumb-bar nav .sep { margin: 0 .4rem; color: var(--gray-400); }

/* ── Article wrapper ── */
.article-page-wrap {
  background: var(--gray-100);
  padding: 2.5rem 0 4rem;
}
.article-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2rem;
  align-items: start;
}

/* ── Sidebar ── */
.article-sidebar {
  position: sticky;
  top: 3.5rem;
}
.sidebar-box {
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem 1rem;
}
.sidebar-category {
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-muted);
  margin-bottom: .75rem;
  padding: 0 .35rem;
}
.sidebar-nav { list-style: none; padding: 0; margin: 0; }
.sidebar-nav li a {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .48rem .6rem;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  color: var(--text-body);
  text-decoration: none;
  transition: all var(--transition);
  line-height: 1.4;
}
.sidebar-nav li a i { font-size: .72rem; color: var(--gray-400); flex-shrink: 0; transition: color var(--transition); }
.sidebar-nav li a:hover { background: var(--gray-100); color: var(--ig-magenta); }
.sidebar-nav li a:hover i { color: var(--ig-magenta); }
.sidebar-nav li a.is-active {
  background: linear-gradient(90deg,rgba(204,35,102,.08),rgba(131,58,180,.08));
  color: var(--ig-magenta);
  font-weight: 600;
}
.sidebar-nav li a.is-active i { color: var(--ig-magenta); }
.sidebar-back {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .8rem;
  font-weight: 600;
  padding: .4rem .35rem;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: .85rem;
  transition: color var(--transition);
}
.sidebar-back:hover { color: var(--ig-magenta); }

/* ── Main article ── */
.article-main { min-width: 0; }
.article-card {
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 2.25rem 2.5rem;
  margin-bottom: 1.5rem;
}
.article-meta {
  display: flex;
  align-items: center;
  gap: .65rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.article-badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  background: var(--grad-btn);
  color: var(--white);
  font-size: .72rem;
  font-weight: 700;
  padding: .2rem .75rem;
  border-radius: var(--radius-full);
  letter-spacing: .03em;
  text-transform: uppercase;
}
.article-readtime {
  font-size: .8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: .3rem;
}
.article-title-h1 {
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  font-size: clamp(1.5rem,3.5vw,2rem);
  color: var(--text-dark);
  margin-bottom: .75rem;
  line-height: 1.2;
}
.article-lead {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 1.75rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--gray-200);
}

/* ── Typography ── */
.article-body h2 {
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text-dark);
  margin: 2rem 0 .75rem;
}
.article-body h3 {
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-dark);
  margin: 1.5rem 0 .5rem;
}
.article-body p { line-height: 1.7; margin-bottom: 1rem; color: var(--text-body); }
.article-body ul, .article-body ol { padding-left: 1.4rem; margin-bottom: 1rem; }
.article-body li { line-height: 1.7; margin-bottom: .35rem; color: var(--text-body); }
.article-body strong { color: var(--text-dark); }
.article-body a {
  background: var(--grad-btn);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 600;
  text-decoration: none;
}
.article-body a:hover { text-decoration: underline; }

/* ── Info boxes ── */
.info-box {
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
  display: flex;
  gap: .85rem;
  align-items: flex-start;
}
.info-box i { font-size: 1rem; flex-shrink: 0; margin-top: .12rem; }
.info-box .info-content { flex: 1; font-size: .9rem; line-height: 1.6; }
.info-box .info-content strong { display: block; margin-bottom: .25rem; }
.info-box.is-info    { background: rgba(204,35,102,.07); border-left: 3px solid var(--ig-magenta); }
.info-box.is-info i  { color: var(--ig-magenta); }
.info-box.is-warning { background: rgba(230,104,60,.1); border-left: 3px solid var(--ig-yellow); }
.info-box.is-warning i { color: var(--ig-yellow); }
.info-box.is-success { background: rgba(72,199,142,.1); border-left: 3px solid #48c78e; }
.info-box.is-success i { color: #48c78e; }
.info-box.is-tip     { background: rgba(131,58,180,.08); border-left: 3px solid var(--ig-purple); }
.info-box.is-tip i   { color: var(--ig-purple); }

/* ── Steps ── */
.steps-list { list-style: none; padding: 0; margin: 1rem 0 1.5rem; counter-reset: step-counter; }
.steps-list li {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.25rem;
  counter-increment: step-counter;
  align-items: flex-start;
}
.steps-list li::before {
  content: counter(step-counter);
  display: inline-flex;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--grad-btn);
  color: var(--white);
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  font-size: .9rem;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(188,24,136,.3);
}
.steps-list li .step-content { flex: 1; padding-top: .35rem; }
.steps-list li .step-content strong { display: block; font-size: .95rem; color: var(--text-dark); margin-bottom: .2rem; }
.steps-list li .step-content p { font-size: .9rem; margin: 0; }

/* ── Code ── */
.code-block {
  background: var(--gray-800);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin: 1rem 0;
  overflow-x: auto;
}
.code-block code {
  font-family: 'Courier New', Consolas, monospace;
  font-size: .88rem;
  color: #f8f8f2;
  white-space: pre;
}
.code-inline {
  font-family: 'Courier New', Consolas, monospace;
  font-size: .85em;
  background: var(--gray-200);
  color: var(--ig-magenta);
  padding: .1rem .4rem;
  border-radius: 4px;
  font-weight: 700;
}

/* ── Plan badge ── */
.plan-required {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  background: var(--grad-btn);
  color: var(--white);
  font-size: .72rem;
  font-weight: 700;
  padding: .15rem .65rem;
  border-radius: var(--radius-full);
  letter-spacing: .03em;
  text-transform: uppercase;
  vertical-align: middle;
}

/* ── Table ── */
.article-table { width: 100%; border-collapse: collapse; margin: 1rem 0 1.5rem; font-size: .88rem; }
.article-table th {
  background: var(--gray-100);
  padding: .65rem .85rem;
  text-align: left;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-muted);
  border-bottom: 2px solid var(--gray-200);
}
.article-table td {
  padding: .65rem .85rem;
  border-bottom: 1px solid var(--gray-200);
  color: var(--text-body);
  vertical-align: top;
}
.article-table tr:last-child td { border-bottom: none; }
.article-table tr:hover td { background: var(--gray-100); }
.check-yes { color: #48c78e; font-weight: 700; }
.check-no  { color: var(--gray-400); }

/* ── Related articles ── */
.related-section {
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem 2rem;
}
.related-title {
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 1rem;
  color: var(--text-dark);
  margin-bottom: 1rem;
  padding-bottom: .65rem;
  border-bottom: 1px solid var(--gray-200);
}
.related-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(200px,1fr)); gap: .75rem; }
.related-card {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .75rem .85rem;
  background: var(--gray-100);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all var(--transition);
  border: 1px solid transparent;
}
.related-card:hover {
  background: var(--white);
  border-color: var(--gray-200);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}
.related-card i {
  font-size: .8rem;
  background: var(--grad-btn);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  flex-shrink: 0;
}
.related-card span {
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.3;
}
.related-card:hover span { color: var(--ig-magenta); }

/* ── Responsive ── */
@media (max-width: 900px) {
  .article-layout { grid-template-columns: 1fr; }
  .article-sidebar { position: static; }
  .sidebar-box { margin-bottom: 1rem; }
}
@media (max-width: 768px) {
  .article-card { padding: 1.5rem 1.25rem; }
  .related-grid { grid-template-columns: 1fr; }
  .article-page-wrap { padding: 1.5rem 0 3rem; }
}
