/* ============================================================
   BLOG — Estilos específicos
   Hereda de styles.css
   ============================================================ */

/* --- Blog Index --- */
.blog-hero {
  padding: 72px 0 56px;
  background: linear-gradient(180deg, var(--slate-50) 0%, transparent 100%);
  border-bottom: 1px solid var(--slate-100);
}
.blog-hero-inner {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}
.blog-hero h1 {
  font-size: clamp(36px, 4.4vw, 54px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.blog-hero p {
  font-size: clamp(16px, 1.3vw, 19px);
  color: var(--slate-700);
  max-width: 620px;
  margin: 0 auto;
  line-height: 1.55;
  text-wrap: pretty;
}

.breadcrumb {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  color: var(--slate-500);
  padding: 28px 0 0;
  font-weight: 500;
}
.breadcrumb a {
  color: var(--slate-500);
  transition: color .15s;
}
.breadcrumb a:hover { color: var(--orange); }
.breadcrumb span.sep { color: var(--slate-300); }
.breadcrumb .current { color: var(--slate-900); font-weight: 600; }

.blog-filters {
  display: flex;
  gap: 8px;
  padding: 36px 0 24px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--slate-100);
  margin-bottom: 48px;
}
.blog-filter {
  padding: 8px 16px;
  border-radius: var(--r-pill);
  font-size: 13px;
  font-weight: 600;
  background: var(--white);
  border: 1.5px solid var(--slate-200);
  color: var(--slate-700);
  cursor: pointer;
  transition: all .15s;
}
.blog-filter:hover { border-color: var(--orange); color: var(--orange); }
.blog-filter.active {
  background: var(--slate-900);
  color: white;
  border-color: var(--slate-900);
}

.blog-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 28px;
}
.blog-card {
  background: var(--white);
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--slate-100);
  display: flex;
  flex-direction: column;
  transition: transform .2s, box-shadow .2s;
  text-decoration: none;
  color: inherit;
}
.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.blog-card.featured {
  grid-row: span 2;
}
.blog-card-cover {
  aspect-ratio: 1.6;
  position: relative;
  overflow: hidden;
  background: var(--slate-50);
}
.blog-card.featured .blog-card-cover { aspect-ratio: 1.1; }

/* Photo cover variant */
.blog-card-cover-photo > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%; /* evita cortar cabezas en fotos verticales */
  transition: transform .4s ease;
}
.blog-card:hover .blog-card-cover-photo > img {
  transform: scale(1.05);
}
.blog-card-cover-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20,25,30,.18) 0%, transparent 40%, transparent 60%, rgba(20,25,30,.30) 100%);
  pointer-events: none;
}
.blog-card-cover-bg {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--c1, var(--orange)) 0%, var(--c2, var(--orange-600)) 100%);
  color: white;
  overflow: hidden;
}
.blog-card-cover-bg::before {
  content: "";
  position: absolute;
  inset: -50%;
  background:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,.2) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(0,0,0,.15) 0%, transparent 50%);
}
.blog-card-cover-bg svg {
  position: relative;
  z-index: 1;
  width: 60%; height: 60%;
  opacity: 0.92;
}
.blog-card-tag {
  position: absolute;
  top: 14px; left: 14px;
  background: rgba(255,255,255,.95);
  color: var(--slate-900);
  padding: 5px 11px;
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  z-index: 2;
}
.blog-card-body {
  padding: 22px 24px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.blog-card-meta {
  font-size: 12px;
  color: var(--slate-500);
  font-weight: 600;
  margin-bottom: 8px;
}
.blog-card-meta span + span::before {
  content: "·";
  margin: 0 8px;
  color: var(--slate-300);
}
.blog-card h2 {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.015em;
  margin: 0 0 10px;
  line-height: 1.25;
  color: var(--slate-900);
  text-wrap: balance;
}
.blog-card.featured h2 { font-size: 26px; }
.blog-card-excerpt {
  font-size: 14px;
  color: var(--slate-700);
  line-height: 1.55;
  flex: 1;
  margin: 0;
  text-wrap: pretty;
}
.blog-card.featured .blog-card-excerpt { font-size: 16px; }
.blog-card-author {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--slate-100);
}
.blog-card-author-dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--orange-100);
  color: var(--orange-700);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 11px;
}
.blog-card-author-info {
  font-size: 12px;
  color: var(--slate-500);
}
.blog-card-author-info b { color: var(--slate-900); display: block; font-size: 13px; font-weight: 600; }

@media (max-width: 1000px) {
  .blog-grid { grid-template-columns: 1fr 1fr; }
  .blog-card.featured { grid-row: span 1; grid-column: 1 / -1; }
  .blog-card.featured .blog-card-cover { aspect-ratio: 2.2; }
}
@media (max-width: 640px) {
  .blog-grid { grid-template-columns: 1fr; }
  .blog-card.featured h2 { font-size: 22px; }
}

/* Newsletter band */
.newsletter {
  margin: 96px 0 48px;
  background: var(--slate-900);
  border-radius: var(--r-xl);
  padding: 56px 48px;
  color: white;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.newsletter::before {
  content: "";
  position: absolute;
  top: -100px; right: -100px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, var(--orange) 0%, transparent 60%);
  opacity: 0.2;
}
.newsletter h2 { color: white; font-size: 30px; }
.newsletter p { color: var(--slate-300); margin: 12px 0 0; font-size: 16px; }
.newsletter-form {
  display: flex;
  gap: 10px;
  position: relative;
}
.newsletter-form input {
  flex: 1;
  background: rgba(255,255,255,.08);
  border: 1.5px solid rgba(255,255,255,.12);
  color: white;
  padding: 16px 18px;
  border-radius: var(--r-pill);
  font-size: 15px;
  font-weight: 500;
}
.newsletter-form input:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(246,115,0,.35);
}
.newsletter-form input::placeholder { color: var(--slate-300); }
.newsletter-form button {
  background: var(--orange);
  color: white;
  padding: 16px 28px;
  border-radius: var(--r-pill);
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
  box-shadow: var(--shadow-orange);
  transition: background .15s, transform .15s;
}
.newsletter-form button:hover { background: var(--orange-600); transform: translateY(-1px); }
.newsletter-form button:active { transform: translateY(0) scale(.985); }
.newsletter-form button:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; }

@media (max-width: 840px) {
  .newsletter { grid-template-columns: 1fr; padding: 40px 28px; }
  .newsletter-form { flex-direction: column; }
}

/* ============================================================
   ARTICLE
   ============================================================ */
.article-hero {
  padding: 48px 0 56px;
  background: linear-gradient(180deg, var(--slate-50) 0%, transparent 100%);
  border-bottom: 1px solid var(--slate-100);
}
.article-hero-inner {
  max-width: 800px;
  margin: 0 auto;
}
.article-tag {
  display: inline-block;
  background: var(--orange-50);
  color: var(--orange-700);
  padding: 5px 12px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.article-title {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 20px;
  text-wrap: balance;
}
.article-deck {
  font-size: clamp(17px, 1.4vw, 20px);
  color: var(--slate-700);
  line-height: 1.55;
  margin: 0 0 28px;
  text-wrap: pretty;
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  color: var(--slate-500);
  padding-top: 24px;
  border-top: 1px solid var(--slate-100);
}
.article-meta-author {
  display: flex;
  align-items: center;
  gap: 10px;
}
.article-meta-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--orange-100);
  color: var(--orange-700);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
}
.article-meta-author b { color: var(--slate-900); font-size: 14px; font-weight: 600; display: block; }
.article-meta-author span { font-size: 12px; }
.article-meta-divider {
  width: 1px; height: 26px;
  background: var(--slate-200);
}

.article-cover {
  max-width: 1000px;
  margin: 0 auto 56px;
  aspect-ratio: 2.5;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: linear-gradient(135deg, var(--c1, var(--orange)) 0%, var(--c2, var(--orange-600)) 100%);
  display: grid;
  place-items: center;
  color: white;
  position: relative;
}
.article-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,.18) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(0,0,0,.15) 0%, transparent 50%);
}
.article-cover svg {
  width: 30%; height: 60%;
  position: relative; z-index: 1;
  opacity: 0.95;
}

/* Photo variant */
.article-cover-photo {
  background: var(--slate-100);
}
.article-cover-photo::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20,25,30,0) 65%, rgba(20,25,30,.15) 100%);
  z-index: 1;
  pointer-events: none;
}
.article-cover-photo > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%; /* reencuadre para franja apaisada */
  z-index: 0;
}

.article-body {
  max-width: 720px;
  margin: 0 auto;
  padding-bottom: 80px;
}
.article-body p {
  font-size: 17px;
  line-height: 1.75;
  color: var(--slate-700);
  margin: 0 0 22px;
  text-wrap: pretty;
}
.article-body p strong { color: var(--slate-900); font-weight: 700; }
.article-body h2 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.015em;
  margin: 48px 0 18px;
  color: var(--slate-900);
  line-height: 1.2;
}
.article-body h3 {
  font-size: 21px;
  font-weight: 700;
  margin: 32px 0 14px;
  color: var(--slate-900);
}
.article-body ul, .article-body ol {
  font-size: 17px;
  line-height: 1.7;
  color: var(--slate-700);
  margin: 0 0 22px;
  padding-left: 22px;
}
.article-body li { margin-bottom: 10px; }
.article-body li::marker { color: var(--orange); font-weight: 700; }
/* :not(.btn) evita que los botones (.btn) dentro del artículo hereden el
   estilo de enlace de texto (naranja + subrayado), que los volvía ilegibles */
.article-body a:not(.btn) {
  color: var(--orange);
  text-decoration: underline;
  text-decoration-color: var(--orange-100);
  text-underline-offset: 3px;
  font-weight: 600;
  transition: text-decoration-color .15s;
}
.article-body a:not(.btn):hover { text-decoration-color: var(--orange); }

.callout {
  background: var(--orange-50);
  border-left: 4px solid var(--orange);
  padding: 20px 24px;
  border-radius: 0 var(--r-md) var(--r-md) 0;
  margin: 28px 0;
}
.callout-title {
  font-weight: 800;
  color: var(--orange-700);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.callout p { margin: 0; font-size: 15px; color: var(--slate-900); line-height: 1.6; }

.article-body blockquote {
  margin: 36px 0;
  padding: 0 0 0 28px;
  border-left: 4px solid var(--orange);
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  font-style: italic;
  color: var(--slate-900);
  line-height: 1.4;
}

.data-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 32px 0;
}
.data-item {
  background: var(--slate-50);
  border-radius: var(--r-md);
  padding: 18px 20px;
  border: 1px solid var(--slate-100);
}
.data-item b {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  color: var(--orange);
  letter-spacing: -0.02em;
  display: block;
  line-height: 1;
}
.data-item span {
  font-size: 12px;
  color: var(--slate-500);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: block;
  margin-top: 6px;
}
@media (max-width: 640px) { .data-grid { grid-template-columns: 1fr; } }

.table-scroll {
  margin: 28px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--r-md);
}
.compare-table {
  width: 100%;
  min-width: 520px; /* el scroll ocurre dentro de .table-scroll, no en toda la página */
  border-collapse: collapse;
  margin: 0;
  font-size: 15px;
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--slate-100);
}
.compare-table th, .compare-table td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--slate-100);
}
.compare-table th {
  background: var(--slate-50);
  font-weight: 700;
  color: var(--slate-900);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.compare-table tr:last-child td { border-bottom: none; }
.compare-table tr:nth-child(even) { background: rgba(247,248,250,.5); }

/* Article CTA box */
.article-cta {
  background: var(--slate-900);
  border-radius: var(--r-xl);
  padding: 36px;
  color: white;
  margin: 48px 0;
  position: relative;
  overflow: hidden;
}
.article-cta::before {
  content: "";
  position: absolute;
  top: -100px; right: -100px;
  width: 320px; height: 320px;
  background: radial-gradient(circle, var(--orange) 0%, transparent 60%);
  opacity: 0.2;
}
.article-cta h3 {
  font-size: 22px;
  color: white;
  margin-bottom: 8px;
  position: relative;
}
.article-cta p {
  color: var(--slate-300);
  font-size: 15px;
  margin: 0 0 22px;
  position: relative;
}
.article-cta .btn { position: relative; }

/* Related articles */
.related-section {
  background: var(--slate-50);
  padding: 64px 0;
  border-top: 1px solid var(--slate-100);
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 32px;
}
@media (max-width: 840px) { .related-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .related-grid { grid-template-columns: 1fr; } }

/* Share */
.article-share {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 0;
  border-top: 1px solid var(--slate-100);
  border-bottom: 1px solid var(--slate-100);
  margin: 48px 0;
}
.article-share span {
  font-size: 13px;
  font-weight: 700;
  color: var(--slate-500);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-right: 6px;
}
.article-share a {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--slate-100);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--slate-700);
  transition: all .15s;
}
.article-share a:hover { background: var(--orange); color: white; transform: translateY(-2px); }
