/* ==========================================================================
   Plani Finanzas — Estilos de artículo del blog (blog/*.html)
   Requiere css/base.css cargado antes.
   ========================================================================== */

body {
  line-height: 1.7;
}

/* BREADCRUMB */
.breadcrumb {
  max-width: 760px; margin: 0 auto; padding: 1.5rem 1.5rem 0;
  font-size: 0.85rem; color: var(--gray-500);
}
.breadcrumb a { color: var(--gray-500); text-decoration: none; }
.breadcrumb a:hover { color: var(--green-dark); }
.breadcrumb .sep { margin: 0 6px; color: var(--gray-400); }
.breadcrumb .current { color: var(--gray-700); font-weight: 500; }

/* HEADER */
.article-header { max-width: 760px; margin: 0 auto; padding: 1rem 1.5rem 0; }

.article-header h1 {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-bottom: 1.1rem;
}

.article-meta {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.875rem; color: var(--gray-500);
  margin-bottom: 1.1rem; flex-wrap: wrap;
}
.article-meta a { color: var(--green-dark); font-weight: 600; text-decoration: none; }
.article-meta a:hover { text-decoration: underline; }
.meta-dot { color: var(--gray-400); }

.article-tag {
  display: inline-block;
  background: var(--green-dark);
  color: white;
  padding: 5px 14px;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 1.75rem;
}

/* COVER IMAGE */
.cover-image {
  max-width: 900px; margin: 0 auto; padding: 0 1.5rem;
}
.cover-image-inner {
  width: 100%; height: 360px; border-radius: 16px;
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green-mid) 60%, #86EFAC 100%);
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.cover-icon { font-size: 100px; opacity: 0.95; filter: drop-shadow(0 8px 20px rgba(0,0,0,0.15)); }
.cover-deco {
  position: absolute; border-radius: 50%; background: rgba(255,255,255,0.12);
}
.cover-deco.d1 { width: 200px; height: 200px; top: -60px; right: -60px; }
.cover-deco.d2 { width: 120px; height: 120px; bottom: -30px; left: -30px; }

@media (max-width: 600px) {
  .cover-image-inner { height: 220px; }
  .cover-icon { font-size: 64px; }
}

/* TOC */
.toc-wrap { max-width: 760px; margin: 2.5rem auto 0; padding: 0 1.5rem; }
.toc {
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
}
.toc summary {
  cursor: pointer; font-weight: 700; font-size: 0.95rem;
  display: flex; align-items: center; gap: 8px;
  list-style: none;
}
.toc summary::-webkit-details-marker { display: none; }
.toc summary::before { content: '▾'; font-size: 0.8rem; color: var(--green-dark); transition: transform 0.2s; }
.toc[open] summary::before { transform: rotate(0deg); }
.toc:not([open]) summary::before { transform: rotate(-90deg); }
.toc-list { list-style: none; margin-top: 1rem; display: flex; flex-direction: column; gap: 8px; }
.toc-list li a {
  color: var(--green-dark); text-decoration: none; font-size: 0.9rem; font-weight: 500;
}
.toc-list li a:hover { text-decoration: underline; }
.toc-list li.sub { padding-left: 1.25rem; }
.toc-list li.sub a { color: var(--gray-700); font-weight: 400; font-size: 0.87rem; }

/* ARTICLE BODY */
.article-body {
  max-width: 760px; margin: 0 auto; padding: 2.5rem 1.5rem 3rem;
}

.article-body h2 {
  font-size: 1.85rem; font-weight: 800; letter-spacing: -0.01em;
  margin: 2.5rem 0 1rem; scroll-margin-top: 80px;
}
.article-body h2:first-child { margin-top: 0; }

.article-body h3 {
  font-size: 1.15rem; font-weight: 700;
  margin: 1.75rem 0 0.75rem; scroll-margin-top: 80px;
}

.article-body p { color: var(--gray-700); font-size: 1rem; margin-bottom: 1.1rem; }
.article-body strong { color: var(--gray-900); font-weight: 700; }

.article-body ul, .article-body ol {
  margin: 0 0 1.25rem 1.25rem; color: var(--gray-700);
}
.article-body li { margin-bottom: 0.5rem; }

.callout {
  background: var(--green-pale);
  border-left: 4px solid var(--green-dark);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}
.callout p { margin-bottom: 0; color: var(--gray-700); }
.callout p:first-child { font-weight: 700; color: var(--green-dark); margin-bottom: 0.4rem; }

.example-table {
  width: 100%; border-collapse: collapse; margin: 1.25rem 0 1.75rem;
  font-size: 0.9rem;
}
.example-table th {
  background: var(--green-dark); color: white; text-align: left;
  padding: 10px 14px; font-weight: 700;
}
.example-table td {
  padding: 10px 14px; border-bottom: 1px solid var(--gray-200); color: var(--gray-700);
}
.example-table tr:last-child td { border-bottom: none; font-weight: 700; color: var(--gray-900); }

.divider { height: 1px; background: var(--gray-200); margin: 2.5rem 0; }

/* App CTA inline */
.app-cta {
  background: var(--green-dark);
  border-radius: 16px;
  padding: 1.75rem;
  margin: 2rem 0;
  color: white;
}
.app-cta h3 { color: white; margin-top: 0; font-size: 1.1rem; }
.app-cta p { color: rgba(255,255,255,0.8); }
.app-cta a {
  display: inline-block; margin-top: 0.5rem;
  background: white; color: var(--green-dark);
  padding: 0.7rem 1.5rem; border-radius: 8px;
  font-weight: 700; font-size: 0.9rem; text-decoration: none;
}

/* TAGS */
.tags-section {
  max-width: 760px; margin: 0 auto; padding: 0 1.5rem 3rem;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.tags-label { font-size: 0.85rem; color: var(--gray-500); font-weight: 600; }
.tag-pill {
  background: var(--white); border: 1.5px solid var(--gray-200);
  color: var(--gray-700); padding: 5px 14px; border-radius: 100px;
  font-size: 0.82rem; font-weight: 600;
}

/* RELATED */
.related-section {
  background: var(--gray-100);
  padding: 3rem 1.5rem 4rem;
}
.related-inner { max-width: 900px; margin: 0 auto; }
.related-inner h2 {
  font-size: 1.3rem; font-weight: 800; margin-bottom: 1.5rem;
}
.related-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem;
}
@media (max-width: 720px) {
  .related-grid { grid-template-columns: 1fr; }
}
.related-card {
  background: var(--white); border-radius: 16px; overflow: hidden;
  border: 1px solid var(--gray-200); text-decoration: none; color: inherit;
  display: block; transition: transform 0.2s, box-shadow 0.2s;
}
.related-card:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(0,0,0,0.08); }
.related-card-img {
  height: 110px; display: flex; align-items: center; justify-content: center; font-size: 38px;
}
.related-card-body { padding: 1.1rem; }
.related-card-tag {
  display: inline-block; font-size: 0.68rem; font-weight: 700;
  padding: 2px 9px; border-radius: 100px; margin-bottom: 0.5rem;
}
.related-card-title { font-size: 0.92rem; font-weight: 700; line-height: 1.4; margin-bottom: 0.4rem; }
.related-card-date { font-size: 0.75rem; color: var(--gray-500); }

/* FOOTER (los posts usan un padding lateral menor que index/blog.html) */
footer { padding: 3rem 1.5rem; }
