/* =============================================
   VS LOGISTICS — blog.css
   Estilos para el indice del blog y los articulos
   Reutiliza las variables de styles.css (dark mode automatico)
   ============================================= */

/* ---------- Hero del blog ---------- */
.blog-hero {
  background: linear-gradient(140deg, var(--navy) 0%, var(--navy-mid) 100%);
  color: #fff;
  padding: 7rem 0 5rem;
  text-align: center;
  position: relative;
}
.blog-hero .breadcrumb { justify-content: center; margin-bottom: 1.5rem; }
.blog-hero h1 {
  font-family: 'Exo 2', sans-serif;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 1rem;
}
.blog-hero p {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.6;
}
.blog-hero-wave { position: absolute; bottom: -1px; left: 0; width: 100%; line-height: 0; }
.blog-hero-wave svg { width: 100%; height: 50px; display: block; }
.blog-hero-wave path { fill: var(--bg-page); }

/* ---------- Grid de tarjetas (indice) ---------- */
.blog-list { padding: 4.5rem 0 6rem; background: var(--bg-page); }
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 2rem;
}
.blog-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radio-lg);
  overflow: hidden;
  box-shadow: var(--sombra-sm);
  transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease);
}
.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--sombra-lg);
  border-color: var(--teal);
}
.blog-card-thumb {
  height: 170px;
  background: linear-gradient(135deg, var(--teal) 0%, var(--navy) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.92);
}
.blog-card-thumb svg { width: 56px; height: 56px; }
.blog-card-body { padding: 1.6rem 1.6rem 1.8rem; display: flex; flex-direction: column; flex: 1; }
.blog-card-tag {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--teal);
  background: rgba(43, 114, 96, 0.1);
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  margin-bottom: 0.9rem;
}
.blog-card h2 {
  font-family: 'Exo 2', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
  margin: 0 0 0.7rem;
}
.blog-card p { color: var(--text-soft); font-size: 0.98rem; line-height: 1.6; margin: 0 0 1.3rem; flex: 1; }
.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: var(--text-soft);
  margin-top: auto;
}
.blog-card-link {
  margin-top: 1.1rem;
  font-weight: 700;
  color: var(--teal);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: gap var(--ease);
}
.blog-card:hover .blog-card-link { gap: 0.75rem; }
.blog-card a.blog-card-cover { text-decoration: none; color: inherit; display: flex; flex-direction: column; flex: 1; }

/* ---------- Articulo ---------- */
.article-hero {
  background: linear-gradient(140deg, var(--navy) 0%, var(--navy-mid) 100%);
  color: #fff;
  padding: 6.5rem 0 4rem;
  position: relative;
}
.article-hero .container { max-width: 820px; }
.article-hero .breadcrumb { margin-bottom: 1.6rem; }
.article-tag {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--menta);
  background: rgba(135, 196, 160, 0.14);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  margin-bottom: 1.2rem;
}
.article-hero h1 {
  font-family: 'Exo 2', sans-serif;
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 1.3rem;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.3rem;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.92rem;
}
.article-meta span { display: inline-flex; align-items: center; gap: 0.45rem; }
.article-meta svg { width: 16px; height: 16px; opacity: 0.85; }

/* Cuerpo del articulo: columna de lectura comoda */
.article-body { background: var(--bg-page); padding: 3.5rem 0 4.5rem; }
.article-body .container { max-width: 760px; }
.article-content { color: var(--text); font-size: 1.12rem; line-height: 1.8; }
.article-content > p:first-of-type { font-size: 1.22rem; color: var(--text); line-height: 1.7; }
.article-content p { margin: 0 0 1.5rem; }
.article-content h2 {
  font-family: 'Exo 2', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 3rem 0 1.1rem;
  scroll-margin-top: 90px;
}
.article-content h3 {
  font-family: 'Exo 2', sans-serif;
  font-size: 1.32rem;
  font-weight: 700;
  color: var(--text);
  margin: 2.2rem 0 0.9rem;
}
.article-content ul, .article-content ol { margin: 0 0 1.5rem; padding-left: 1.4rem; }
.article-content li { margin-bottom: 0.6rem; line-height: 1.7; }
.article-content a { color: var(--teal); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.article-content a:hover { color: var(--teal-light); }
.article-content strong { color: var(--text); font-weight: 700; }
.article-content img { max-width: 100%; height: auto; border-radius: var(--radio); margin: 1.5rem 0; }

/* Indice / tabla de contenidos */
.article-toc {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-left: 4px solid var(--teal);
  border-radius: var(--radio);
  padding: 1.5rem 1.8rem;
  margin: 0 0 2.5rem;
}
.article-toc h2 {
  font-family: 'Exo 2', sans-serif;
  font-size: 1rem !important;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-soft);
  margin: 0 0 0.9rem !important;
}
.article-toc ol { margin: 0; padding-left: 1.2rem; }
.article-toc li { margin-bottom: 0.45rem; }
.article-toc a { color: var(--text); font-weight: 600; text-decoration: none; }
.article-toc a:hover { color: var(--teal); }

/* Caja destacada / callout */
.article-callout {
  background: rgba(43, 114, 96, 0.08);
  border: 1px solid rgba(43, 114, 96, 0.25);
  border-radius: var(--radio);
  padding: 1.4rem 1.6rem;
  margin: 2rem 0;
  font-size: 1.04rem;
  line-height: 1.7;
}
.article-callout strong { color: var(--teal); }
.article-callout.warning {
  background: rgba(130, 9, 18, 0.06);
  border-color: rgba(130, 9, 18, 0.22);
}
.article-callout.warning strong { color: var(--rojo); }

/* Tabla comparativa de incoterms */
.article-table-wrap { overflow-x: auto; margin: 2rem 0; border-radius: var(--radio); border: 1px solid var(--border); }
.article-table { width: 100%; border-collapse: collapse; font-size: 0.96rem; min-width: 560px; }
.article-table th, .article-table td { padding: 0.85rem 1rem; text-align: left; border-bottom: 1px solid var(--border); }
.article-table thead th {
  background: var(--navy);
  color: #fff;
  font-family: 'Exo 2', sans-serif;
  font-weight: 700;
  font-size: 0.92rem;
}
.article-table tbody tr:nth-child(even) { background: var(--bg-subtle); }
.article-table td:first-child { font-weight: 700; color: var(--text); }

/* CTA final del articulo */
.article-cta {
  background: linear-gradient(135deg, var(--navy) 0%, var(--teal) 100%);
  border-radius: var(--radio-lg);
  padding: 2.6rem 2.2rem;
  text-align: center;
  color: #fff;
  margin: 3.5rem 0 1rem;
}
.article-cta h2 {
  font-family: 'Exo 2', sans-serif;
  font-size: 1.7rem;
  font-weight: 800;
  color: #fff !important;
  margin: 0 0 0.7rem !important;
}
.article-cta p { color: rgba(255, 255, 255, 0.9); margin: 0 0 1.6rem; font-size: 1.05rem; }
.article-cta-actions { display: flex; gap: 0.9rem; justify-content: center; flex-wrap: wrap; }

/* Pie del articulo: volver al blog */
.article-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2.5rem;
  font-weight: 700;
  color: var(--teal);
  text-decoration: none;
}
.article-back:hover { gap: 0.8rem; }

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  .blog-grid { grid-template-columns: 1fr; }
  .article-cta { padding: 2rem 1.4rem; }
  .article-content { font-size: 1.06rem; }
}
