/* ============================================================
   UNIAMOS BLOG — Stylesheet compartido
   Dark theme · Acento verde lima · Syne + DM Sans
   ============================================================ */

:root {
  --bg: #0a0a0a;
  --bg2: #111111;
  --bg3: #181818;
  --surface: #1c1c1c;
  --surface2: #242424;
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.14);
  --accent: #b5f23d;
  --accent2: #d4ff6e;
  --text: #f0ede6;
  --text-muted: #7a7870;
  --text-mid: #b8b5ad;
  --white: #ffffff;

  /* Categorías — colores */
  --cat-auto: #b5f23d;     /* Automatización */
  --cat-chat: #3ba5ff;     /* Chatbots */
  --cat-dash: #b57dff;     /* Dashboards */
  --cat-pred: #ff5ca8;     /* IA Predictiva */
  --cat-integ: #ff9944;    /* Integraciones */
  --cat-casos: #ffcc33;    /* Casos PYMEs */
  --cat-guias: #66e6c5;    /* Guías */
}

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

html {
  scroll-behavior: smooth;
  background-color: #0a0a0a;
  color-scheme: dark;
}

body {
  background: #0a0a0a;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

/* Grain overlay — mismo que la home */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: 0.35;
}

h1, h2, h3, h4 {
  font-family: 'Syne', sans-serif;
  line-height: 1.1;
  color: var(--white);
}

a { color: var(--accent); }

/* ============ NAV (mismo patrón que la home) ============ */
nav.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0 40px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.nav-logo {
  font-family: 'Syne', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: var(--white);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.nav-logo .logo-uni { color: #fff; }
.nav-logo .logo-amos {
  color: var(--accent);
  font-size: 1.15em;
  letter-spacing: 0.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}
.nav-links a {
  color: var(--text-mid);
  text-decoration: none;
  font-size: 14px;
  font-weight: 400;
  transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--white); }

.nav-cta {
  background: var(--accent);
  color: #0a0a0a !important;
  padding: 10px 22px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 13px;
  font-family: 'Syne', sans-serif;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}
.nav-cta:hover {
  background: var(--accent2);
  transform: translateY(-1px);
}

@media (max-width: 820px) {
  nav.site-nav { padding: 0 20px; }
  .nav-links { gap: 20px; }
  .nav-links li:not(.nav-cta-li) { display: none; }
}

/* ============ HERO DEL BLOG (index) ============ */
.blog-hero {
  padding: 160px 40px 80px;
  position: relative;
  overflow: hidden;
  text-align: center;
  background: #0a0a0a;
}
.blog-hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(181, 242, 61, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(181, 242, 61, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 30%, transparent 100%);
  z-index: 0;
}
.blog-hero-glow {
  position: absolute;
  width: 700px;
  height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(181, 242, 61, 0.08) 0%, transparent 70%);
  top: -200px;
  right: -100px;
  z-index: 0;
  pointer-events: none;
}
.blog-hero-inner { position: relative; z-index: 2; max-width: 900px; margin: 0 auto; }

.blog-hero-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(181, 242, 61, 0.08);
  border: 1px solid rgba(181, 242, 61, 0.25);
  border-radius: 100px;
  padding: 6px 16px;
  margin-bottom: 32px;
  font-family: 'Syne', sans-serif;
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.08em;
}
.blog-hero-label .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s ease infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}

.blog-hero h1 {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 24px;
}
.blog-hero h1 em {
  font-style: normal;
  color: var(--accent);
  font-weight: 800;
}
.blog-hero p {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--text-mid);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.55;
}

/* ============ FILTROS DE CATEGORÍA ============ */
.cat-filters {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 960px;
  margin: 40px auto 0;
  padding: 0 20px;
}
.cat-chip {
  font-family: 'Syne', sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 8px 16px;
  border-radius: 100px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-mid);
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
}
.cat-chip:hover,
.cat-chip.active {
  color: var(--white);
  border-color: var(--accent);
  background: rgba(181, 242, 61, 0.1);
}

/* ============ LISTADO DE POSTS ============ */
.posts-section {
  padding: 80px 40px 60px;
  max-width: 1100px;
  margin: 0 auto;
}
.section-head {
  margin-bottom: 56px;
  text-align: center;
}
.section-label {
  font-family: 'Syne', sans-serif;
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 14px;
  display: block;
}
.section-head h2 {
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.02em;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.post-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 28px 28px 32px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.25s, transform 0.25s, background 0.25s;
}
.post-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--cat-auto);
}
.post-card.c-auto::before   { background: var(--cat-auto); }
.post-card.c-chat::before   { background: var(--cat-chat); }
.post-card.c-dash::before   { background: var(--cat-dash); }
.post-card.c-pred::before   { background: var(--cat-pred); }
.post-card.c-integ::before  { background: var(--cat-integ); }
.post-card.c-casos::before  { background: var(--cat-casos); }
.post-card.c-guias::before  { background: var(--cat-guias); }

.post-card:hover {
  border-color: var(--border-strong);
  background: var(--bg3);
  transform: translateY(-3px);
}

.post-category {
  display: inline-block;
  font-family: 'Syne', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 16px;
  color: var(--accent);
}
.post-card.c-chat  .post-category { color: var(--cat-chat); }
.post-card.c-dash  .post-category { color: var(--cat-dash); }
.post-card.c-pred  .post-category { color: var(--cat-pred); }
.post-card.c-integ .post-category { color: var(--cat-integ); }
.post-card.c-casos .post-category { color: var(--cat-casos); }
.post-card.c-guias .post-category { color: var(--cat-guias); }

.post-title {
  font-family: 'Syne', sans-serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 14px;
}
.post-title a {
  color: var(--white);
  text-decoration: none;
  transition: color 0.2s;
}
.post-title a:hover { color: var(--accent); }

.post-excerpt {
  color: var(--text-mid);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 22px;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-muted);
  font-family: 'Syne', sans-serif;
  letter-spacing: 0.04em;
  margin-bottom: 18px;
}
.post-meta .dot {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--text-muted);
}

.post-link {
  font-family: 'Syne', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent);
  text-decoration: none;
  transition: gap 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.post-link:hover { gap: 10px; }

/* ============ NEWSLETTER ============ */
.newsletter {
  max-width: 720px;
  margin: 100px auto 0;
  padding: 56px 40px;
  background: linear-gradient(135deg, rgba(181, 242, 61, 0.05), rgba(181, 242, 61, 0.02));
  border: 1px solid rgba(181, 242, 61, 0.15);
  border-radius: 14px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.newsletter::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg,
    var(--cat-auto), var(--cat-chat), var(--cat-dash),
    var(--cat-pred), var(--cat-integ), var(--cat-casos));
}
.newsletter h3 {
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--white);
}
.newsletter p {
  color: var(--text-mid);
  font-size: 16px;
  margin-bottom: 28px;
  line-height: 1.55;
}
.newsletter .btn-primary {
  display: inline-block;
  background: var(--accent);
  color: #0a0a0a;
  padding: 14px 32px;
  border-radius: 6px;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}
.newsletter .btn-primary:hover {
  background: var(--accent2);
  transform: translateY(-1px);
}

/* ============ ARTÍCULO (post individual) ============ */
.reading-progress {
  position: fixed;
  top: 68px; left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg,
    var(--cat-auto), var(--cat-chat), var(--cat-dash),
    var(--cat-pred), var(--cat-integ), var(--cat-casos));
  z-index: 90;
  transition: width 0.15s ease;
}

.article-hero {
  padding: 140px 32px 60px;
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
  position: relative;
}
.article-breadcrumbs {
  font-family: 'Syne', sans-serif;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 28px;
}
.article-breadcrumbs a {
  color: var(--text-mid);
  text-decoration: none;
  transition: color 0.2s;
}
.article-breadcrumbs a:hover { color: var(--accent); }
.article-breadcrumbs span { color: var(--text-muted); margin: 0 8px; }

.article-category {
  display: inline-block;
  font-family: 'Syne', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
  opacity: 0;
  animation: fadeUp 0.8s ease forwards 0.2s;
}
.article-category.cat-chat  { color: var(--cat-chat); }
.article-category.cat-dash  { color: var(--cat-dash); }
.article-category.cat-pred  { color: var(--cat-pred); }
.article-category.cat-integ { color: var(--cat-integ); }
.article-category.cat-casos { color: var(--cat-casos); }
.article-category.cat-guias { color: var(--cat-guias); }

.article-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(26px, 3.6vw, 42px);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.1;
  color: var(--white);
  max-width: 820px;
  margin: 0 auto 22px;
  opacity: 0;
  animation: fadeUp 0.8s ease forwards 0.4s;
}

.article-subtitle {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(16px, 2.2vw, 20px);
  color: var(--text-mid);
  max-width: 640px;
  margin: 0 auto 32px;
  line-height: 1.5;
  opacity: 0;
  animation: fadeUp 0.8s ease forwards 0.6s;
}

.article-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  font-family: 'Syne', sans-serif;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.8s ease forwards 0.8s;
}
.article-meta .dot {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--text-muted);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.article-body {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 32px 60px;
  color: var(--text);
}
.article-body .lead {
  font-size: clamp(18px, 2.3vw, 22px);
  line-height: 1.55;
  color: var(--text);
  margin-bottom: 36px;
  font-weight: 400;
}
.article-body p {
  font-size: 17px;
  line-height: 1.8;
  color: var(--text-mid);
  margin-bottom: 22px;
}
.article-body p strong { color: var(--white); font-weight: 600; }
.article-body h2 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 700;
  letter-spacing: -0.005em;
  color: var(--white);
  line-height: 1.2;
  margin: 48px 0 18px;
}
.article-body h3 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(18px, 2.8vw, 22px);
  font-weight: 600;
  color: var(--white);
  margin: 36px 0 14px;
}
.article-body ul, .article-body ol { margin: 0 0 24px 22px; }
.article-body li {
  font-size: 17px;
  line-height: 1.75;
  color: var(--text-mid);
  margin-bottom: 10px;
}
.article-body a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.2s;
}
.article-body a:hover { color: var(--accent2); }

.article-body blockquote {
  border-left: 3px solid var(--accent);
  padding: 20px 28px;
  margin: 36px 0;
  background: rgba(181, 242, 61, 0.04);
  border-radius: 0 6px 6px 0;
}
.article-body blockquote p {
  font-family: 'Syne', sans-serif;
  font-size: 18px;
  line-height: 1.55;
  color: var(--white);
  font-style: italic;
  margin: 0;
}

.article-body code {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
  font-family: 'SF Mono', Menlo, monospace;
  font-size: 0.9em;
  color: var(--accent);
}
.article-body pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  overflow-x: auto;
  margin: 28px 0;
}
.article-body pre code {
  background: transparent;
  border: none;
  padding: 0;
  color: var(--text);
}

.accent-line {
  width: 60px;
  height: 3px;
  border-radius: 2px;
  background: var(--accent);
  margin: 48px 0;
}

.step-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin: 30px 0;
}
.step-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 22px 26px;
  position: relative;
  overflow: hidden;
}
.step-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent);
}
.step-card.c1::before { background: var(--cat-auto); }
.step-card.c2::before { background: var(--cat-chat); }
.step-card.c3::before { background: var(--cat-dash); }
.step-card.c4::before { background: var(--cat-pred); }
.step-card.c5::before { background: var(--cat-integ); }
.step-card.c6::before { background: var(--cat-casos); }
.step-card .step-num {
  font-family: 'Syne', sans-serif;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: block;
}
.step-card h4 {
  font-family: 'Syne', sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 8px;
}
.step-card p {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--text-mid);
  margin: 0;
}

.cta-box {
  margin: 64px auto 20px;
  max-width: 640px;
  background: linear-gradient(135deg, #111, #171717);
  color: var(--white);
  padding: 48px 40px;
  text-align: center;
  border: 1px solid rgba(181, 242, 61, 0.2);
  border-radius: 14px;
  position: relative;
  overflow: hidden;
}
.cta-box::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent);
}
.cta-box h3 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(22px, 4vw, 30px);
  font-weight: 700;
  color: var(--white);
  margin-bottom: 12px;
}
.cta-box p {
  color: var(--text-mid);
  font-size: 16px;
  line-height: 1.55;
  margin-bottom: 26px;
}
.cta-box .btn-primary {
  display: inline-block;
  background: var(--accent);
  color: #0a0a0a;
  padding: 14px 32px;
  border-radius: 6px;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}
.cta-box .btn-primary:hover {
  background: var(--accent2);
  transform: translateY(-1px);
}

.share-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
  margin: 40px 0 0;
  flex-wrap: wrap;
}
.share-row span {
  font-family: 'Syne', sans-serif;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-right: 6px;
}
.share-row a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  color: var(--text-mid);
  text-decoration: none;
  transition: all 0.25s ease;
}
.share-row a:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}
.share-row a svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.article-footer {
  max-width: 720px;
  margin: 80px auto 0;
  padding: 40px 32px 60px;
  text-align: center;
  border-top: 1px solid var(--border);
}
.article-footer p {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 22px;
  font-family: 'Syne', sans-serif;
  letter-spacing: 0.06em;
}
.back-to-blog {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Syne', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--accent);
  text-decoration: none;
  padding: 10px 20px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  transition: all 0.25s;
}
.back-to-blog:hover {
  border-color: var(--accent);
  background: rgba(181, 242, 61, 0.08);
}

/* ============ FOOTER GLOBAL ============ */
footer.blog-footer {
  background: #0a0a0a;
  padding: 60px 40px 30px;
  border-top: 1px solid var(--border);
  margin-top: 80px;
}
footer.blog-footer .foot-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
footer.blog-footer h4 {
  font-family: 'Syne', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 16px;
}
footer.blog-footer a {
  display: block;
  color: var(--text-mid);
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 8px;
  transition: color 0.2s;
}
footer.blog-footer a:hover { color: var(--accent); }
footer.blog-footer .foot-bottom {
  max-width: 1100px;
  margin: 0 auto;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: 13px;
  flex-wrap: wrap;
  gap: 12px;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 720px) {
  .blog-hero { padding: 130px 20px 60px; }
  .posts-section { padding: 50px 20px 40px; }
  .posts-grid { grid-template-columns: 1fr; }
  .article-hero { padding: 120px 22px 40px; }
  .article-body { padding: 30px 22px 40px; }
  .cta-box { padding: 38px 26px; }
  .newsletter { padding: 40px 24px; margin: 60px 20px 0; }
  footer.blog-footer { padding: 50px 20px 24px; }
  footer.blog-footer .foot-inner { grid-template-columns: 1fr; gap: 28px; }
  .article-meta { gap: 8px; font-size: 11px; }
  .reading-progress { top: 68px; }
}
