/* ============================================================
   ESCALIUM — Blog · Sistema visual
   Paleta y estética heredada de la landing (escalium.cl)
   ============================================================ */

:root {
  --background: 230 25% 5%;
  --foreground: 40 6% 95%;
  --hero-sub: 40 6% 78%;
  --accent: 217 91% 60%;
  --accent-purple: 270 75% 60%;
  --accent-cyan: 190 95% 55%;
  --card-bg: 230 20% 9%;
  --border: 230 15% 16%;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: 'General Sans', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
  overflow-x: clip;
  min-height: 100vh;
}

/* ── Fondo: mismo video de la landing (escalium.cl) con overlay oscuro ── */
.bg-video {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background-color: hsl(var(--background));
}
.bg-video video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
}
.bg-video .overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(3,5,14,0.35) 0%, rgba(3,5,14,0.55) 50%, rgba(3,5,14,0.75) 100%);
}

/* ── Contenedor general ── */
.container {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
}
.container-wide { max-width: 1100px; }

/* ── Texto degradado ── */
.gradient-text {
  background: linear-gradient(90deg, #3b82f6, #8b5cf6, #06b6d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Glass card ── */
.glass {
  background: hsl(var(--card-bg));
  border-radius: 18px;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.08);
  border: 1px solid hsl(var(--border));
  position: relative;
  overflow: hidden;
}

/* ── Navbar ── */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
  z-index: 20;
}
.nav a.logo { display: inline-flex; align-items: center; text-decoration: none; }
.nav a.logo img { height: 38px; width: auto; }
.nav .nav-links { display: flex; align-items: center; gap: 28px; list-style: none; }
.nav .nav-links a {
  color: hsl(var(--foreground) / 0.8);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}
.nav .nav-links a:hover { color: hsl(var(--foreground)); }
.nav .nav-cta {
  background: hsl(var(--card-bg));
  border: 1px solid hsl(var(--border));
  border-radius: 999px;
  padding: 9px 20px;
  font-size: 14px;
  font-weight: 600;
  color: hsl(var(--foreground));
  text-decoration: none;
  transition: background 0.2s;
}
.nav .nav-cta:hover { background: rgba(255,255,255,0.05); }
@media (max-width: 720px) {
  .nav .nav-links { display: none; }
}

/* ── Hero del artículo / blog ── */
.hero {
  text-align: center;
  padding: 56px 0 40px;
}
.tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: hsl(var(--accent));
  background: rgba(59, 130, 246, 0.1);
  border-radius: 999px;
  padding: 6px 16px;
  margin-bottom: 22px;
}
h1.title {
  font-weight: 600;
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}
.hero .subtitle {
  font-size: clamp(1.05rem, 2.4vw, 1.3rem);
  color: hsl(var(--hero-sub));
  max-width: 600px;
  margin: 0 auto;
  opacity: 0.9;
}
.meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 26px;
  font-size: 13px;
  color: hsl(var(--foreground) / 0.45);
}
.meta .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; }

/* ── Cuerpo del artículo ── */
article.post {
  padding: 20px 0 40px;
}
article.post h2 {
  font-weight: 600;
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 48px 0 18px;
}
article.post h3 {
  font-weight: 600;
  font-size: 1.25rem;
  margin: 32px 0 12px;
  color: hsl(var(--foreground) / 0.92);
}
article.post p {
  font-size: 1.075rem;
  color: hsl(var(--hero-sub));
  margin-bottom: 20px;
}
article.post p strong { color: hsl(var(--foreground)); font-weight: 600; }
article.post ul, article.post ol {
  margin: 0 0 22px 1.2em;
  color: hsl(var(--hero-sub));
}
article.post li { margin-bottom: 10px; font-size: 1.05rem; }
article.post a { color: hsl(var(--accent)); text-decoration: underline; text-underline-offset: 3px; }

/* Intro destacada */
.lead {
  font-size: 1.2rem !important;
  color: hsl(var(--foreground) / 0.9) !important;
  border-left: 3px solid hsl(var(--accent));
  padding-left: 20px;
  margin-bottom: 32px !important;
}

/* Quote / cita */
blockquote {
  margin: 32px 0;
  padding: 26px 28px;
  border-radius: 16px;
  background: hsl(var(--card-bg));
  border: 1px solid hsl(var(--border));
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.08);
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1.5;
  color: hsl(var(--foreground) / 0.92);
  position: relative;
}
blockquote::before {
  content: '"';
  position: absolute;
  top: -10px; left: 18px;
  font-size: 4rem;
  line-height: 1;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  opacity: 0.35;
}

/* Stat box */
.stat-box {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 28px 0;
  padding: 22px 24px;
  border-radius: 16px;
  background: hsl(var(--card-bg));
  border: 1px solid hsl(var(--border));
}
.stat-box .num {
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6, #06b6d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: nowrap;
}
.stat-box .lbl { font-size: 0.95rem; color: hsl(var(--hero-sub)); }

/* Comparativa antes/después */
.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 28px 0;
}
@media (max-width: 560px) { .compare { grid-template-columns: 1fr; } }
.compare .col {
  padding: 20px;
  border-radius: 16px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card-bg));
}
.compare .col .col-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.compare .col.bad .col-label { color: #f87171; }
.compare .col.good .col-label { color: #c084fc; }
.compare .col p { font-size: 0.98rem !important; margin: 0 !important; }

/* ── CTA final ── */
.cta-block {
  margin: 56px 0 20px;
  padding: 40px 32px;
  border-radius: 24px;
  text-align: center;
  background: linear-gradient(135deg, rgba(59,130,246,0.12), rgba(139,92,246,0.12));
  border: 1px solid hsl(var(--border));
}
.cta-block h2 { margin: 0 0 12px; font-size: 1.7rem; font-weight: 600; }
.cta-block p { color: hsl(var(--hero-sub)); margin-bottom: 24px; }
.cta-pill,
article.post a.cta-pill {
  display: inline-block;
  background: linear-gradient(to right, #3b82f6, #8b5cf6);
  color: #fff !important;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none !important;
  padding: 15px 32px;
  border-radius: 999px;
  transition: opacity 0.2s;
}
.cta-pill:hover { opacity: 0.9; }

/* ── Índice del blog: grid de tarjetas ── */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 22px;
  padding: 20px 0 40px;
}
.post-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  border-radius: 18px;
  overflow: hidden;
  background: hsl(var(--card-bg));
  border: 1px solid hsl(var(--border));
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.08);
  transition: transform 0.25s, border-color 0.25s;
}
.post-card:hover { transform: translateY(-4px); border-color: rgba(59,130,246,0.4); }
.post-card .card-top {
  padding: 22px 22px 0;
}
.post-card .card-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: hsl(var(--accent));
}
.post-card h2 {
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.25;
  margin: 12px 0;
  color: hsl(var(--foreground));
}
.post-card p {
  font-size: 0.95rem;
  color: hsl(var(--hero-sub));
  padding: 0 22px;
  margin-bottom: 18px;
}
.post-card .card-foot {
  margin-top: auto;
  padding: 14px 22px;
  border-top: 1px solid hsl(var(--border));
  font-size: 13px;
  font-weight: 600;
  color: hsl(var(--accent));
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ── Breadcrumb ── */
.crumb {
  font-size: 13px;
  color: hsl(var(--foreground) / 0.4);
  padding: 8px 0 0;
}
.crumb a { color: hsl(var(--foreground) / 0.6); text-decoration: none; }
.crumb a:hover { color: hsl(var(--accent)); }

/* ── Footer ── */
.foot {
  border-top: 1px solid hsl(var(--border));
  margin-top: 60px;
  padding: 36px 24px;
  text-align: center;
}
.foot img { height: 34px; margin-bottom: 14px; }
.foot p { font-size: 13px; color: hsl(var(--foreground) / 0.4); margin-bottom: 6px; }
.foot .foot-links { display: flex; gap: 20px; justify-content: center; margin-top: 14px; flex-wrap: wrap; }
.foot .foot-links a { color: hsl(var(--foreground) / 0.55); text-decoration: none; font-size: 13px; }
.foot .foot-links a:hover { color: hsl(var(--accent)); }

/* ── Botón flotante WhatsApp ── */
.wa-float {
  position: fixed;
  bottom: 2rem; right: 2rem;
  z-index: 9100;
  width: 3.5rem; height: 3.5rem;
  border-radius: 50%;
  background: #25d366;
  display: flex; align-items: center; justify-content: center;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  transition: transform 0.2s;
}
.wa-float:hover { transform: scale(1.12); }

/* ── Artículos relacionados ── */
.related-posts {
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid hsl(var(--border));
}
.related-posts h2 {
  font-size: 1.1rem;
  font-weight: 600;
  color: hsl(var(--foreground) / 0.7);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 20px;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.related-card {
  display: block;
  background: hsl(var(--card-bg));
  border: 1px solid hsl(var(--border));
  border-radius: 12px;
  padding: 20px;
  text-decoration: none;
  transition: border-color 0.2s, transform 0.2s;
}
.related-card:hover {
  border-color: hsl(var(--accent) / 0.5);
  transform: translateY(-2px);
}
.related-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: hsl(var(--accent));
  margin-bottom: 10px;
}
.related-card p {
  font-size: 0.95rem;
  color: hsl(var(--foreground) / 0.85);
  line-height: 1.45;
  margin: 0;
}

/* -- Fuente de estadísticas -- */
.source {
  font-size: 11px;
  color: hsl(var(--foreground) / 0.35);
  margin-top: 6px;
  margin-bottom: 16px;
  font-style: italic;
}
