/* ═══════════════════════════════════════════════════════
   BLOG COMPONENTS — Visual component library
   Uses site design tokens for light + dark mode.
   Prefix: bl-
   Reference: blog/erp-nube-vs-onpremise-EJEMPLO.html
   ═══════════════════════════════════════════════════════ */


/* ── Lead paragraph ─────────────────────── */
.bl-lead {
  font-size: 20px;
  line-height: 1.8;
  color: var(--text-1);
  font-weight: 500;
  margin-bottom: 24px;
}

/* ── Body paragraph ─────────────────────── */
.bl-body {
  font-size: 17px;
  line-height: 1.85;
  color: var(--text-2);
  margin-bottom: 18px;
}

/* ── Divider ────────────────────────────── */
.bl-divider {
  border: none;
  border-top: 1px solid var(--line);
  margin: 48px 0;
}


/* ═══════════════════════════════════════════
   ALERTS — red / amber / info
   ═══════════════════════════════════════════ */
.bl-alert {
  padding: 20px 24px;
  margin: 28px 0;
  border-left: 4px solid;
  border-radius: 0 12px 12px 0;
  position: relative;
}

.bl-alert-red {
  background: rgba(226,75,74,0.06);
  border-color: #E24B4A;
}
.bl-alert-amber {
  background: rgba(186,117,23,0.06);
  border-color: #D4930A;
}
.bl-alert-info {
  background: rgba(111,0,255,0.04);
  border-color: var(--indigo-soft);
}

[data-theme="dark"] .bl-alert-red   { background: rgba(226,75,74,0.10); }
[data-theme="dark"] .bl-alert-amber { background: rgba(186,117,23,0.10); }
[data-theme="dark"] .bl-alert-info  { background: rgba(111,0,255,0.08); }

.bl-alert h4 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-1);
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1.4;
}

/* Inline SVG icon placeholder via pseudo-element */
.bl-alert-red h4::before,
.bl-alert-amber h4::before {
  content: '⚠';
  font-size: 16px;
  flex-shrink: 0;
}
.bl-alert-info h4::before {
  content: 'ℹ';
  font-size: 16px;
  flex-shrink: 0;
}

.bl-alert p {
  font-size: 15px;
  color: var(--text-2);
  margin: 0;
  line-height: 1.7;
}
.bl-alert p + p { margin-top: 10px; }

.bl-alert ul {
  margin: 10px 0 0;
  padding-left: 20px;
}
.bl-alert li {
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.7;
  margin-bottom: 4px;
  list-style: disc;
}


/* ═══════════════════════════════════════════
   SIGNALS — symptoms / warning signs list
   ═══════════════════════════════════════════ */
.bl-signals {
  margin: 32px 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 14px;
}

.bl-signal {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  transition: border-color .25s;
}
.bl-signal:hover {
  border-color: var(--line-indigo);
}

.bl-signal-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(111,0,255,0.08);
  color: var(--indigo-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
}
[data-theme="dark"] .bl-signal-icon {
  background: rgba(111,0,255,0.14);
}

.bl-signal h4 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-1);
  margin: 0 0 6px;
  line-height: 1.35;
}
.bl-signal p {
  font-size: 14px;
  color: var(--text-2);
  margin: 0;
  line-height: 1.65;
}


/* ═══════════════════════════════════════════
   COMPARE — A vs B cards
   ═══════════════════════════════════════════ */
.bl-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 32px 0;
}

.bl-compare-card {
  border-radius: 18px;
  overflow: hidden;
  border: 1.5px solid var(--line);
  background: var(--bg-2);
}

.bl-compare-header {
  padding: 16px 24px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
/* "Sin ERP" / negative card header */
.bl-compare-header-neg {
  background: #2A2A2A;
  color: #FF8A89;
  border-bottom: 2px solid #E24B4A;
}
[data-theme="dark"] .bl-compare-header-neg {
  background: #1A1014;
}
/* "Con Epicor" / positive card header */
.bl-compare-header-pos {
  background: var(--indigo-deep);
  color: #C8AAFF;
  border-bottom: 2px solid var(--indigo-soft);
}
[data-theme="dark"] .bl-compare-header-pos {
  background: #1A0B38;
}

.bl-compare-body {
  padding: 20px 24px;
}

.bl-compare-card h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 14px;
  color: var(--text-1);
}

.bl-compare-card ul {
  padding: 0;
  margin: 0;
  list-style: none;
}
.bl-compare-card li {
  font-size: 14px;
  margin-bottom: 10px;
  line-height: 1.55;
  color: var(--text-2);
  padding-left: 26px;
  position: relative;
}
/* Default icon — neutral bullet */
.bl-compare-card li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--text-3);
  font-size: 13px;
}
/* Negative list items */
.bl-compare-card li.bl-neg::before {
  content: '✕';
  color: #E24B4A;
  font-weight: 700;
  font-size: 11px;
  top: 2px;
}
/* Positive list items */
.bl-compare-card li.bl-pos::before {
  content: '✓';
  color: #1D9E75;
  font-weight: 700;
  font-size: 13px;
}


/* ═══════════════════════════════════════════
   METRICS — big number cards
   ═══════════════════════════════════════════ */
.bl-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 36px 0;
}

.bl-metric {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px 24px;
  text-align: center;
  transition: border-color .25s;
}
.bl-metric:hover {
  border-color: var(--line-indigo);
}

.bl-metric-value {
  font-family: var(--font-mono);
  font-size: clamp(40px, 5vw, 56px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--indigo-soft);
}

.bl-metric-label {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--text-2);
  margin-top: 10px;
  line-height: 1.45;
}

.bl-metric-source {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 8px;
}

/* Dark / highlight variant — indigo tinted background */
.bl-metric-dark {
  background: rgba(111,0,255,0.06);
  border-color: var(--line-indigo);
}
[data-theme="dark"] .bl-metric-dark {
  background: rgba(111,0,255,0.10);
  border-color: rgba(111,0,255,0.30);
}
.bl-metric-dark .bl-metric-value {
  background: linear-gradient(180deg, var(--indigo-soft) 0%, var(--indigo) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
[data-theme="dark"] .bl-metric-dark .bl-metric-value {
  background: linear-gradient(180deg, #C8AAFF 0%, var(--indigo-soft) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}


/* ═══════════════════════════════════════════
   STEPS — numbered phases with connector
   ═══════════════════════════════════════════ */
.bl-steps {
  margin: 32px 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

.bl-step {
  display: flex;
  gap: 20px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  position: relative;
  margin-bottom: 16px;
}
.bl-step:last-child { margin-bottom: 0; }

/* Connector line between steps */
.bl-step:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 42px;
  bottom: -17px;
  width: 2px;
  height: 16px;
  background: var(--line-indigo);
}

.bl-step-num {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(111,0,255,0.10);
  color: var(--indigo-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  flex-shrink: 0;
  line-height: 1;
}
[data-theme="dark"] .bl-step-num {
  background: rgba(111,0,255,0.18);
}

.bl-step-content {
  flex: 1;
  min-width: 0;
}
.bl-step-content h3 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--text-1);
  margin: 4px 0 8px;
  line-height: 1.3;
}
.bl-step-content p {
  font-size: 15px;
  color: var(--text-2);
  margin: 0;
  line-height: 1.7;
}


/* ═══════════════════════════════════════════
   TABLE — with styled header & pills
   ═══════════════════════════════════════════ */
.bl-table-wrap {
  overflow-x: auto;
  margin: 32px 0;
  border-radius: 16px;
  border: 1.5px solid var(--line-strong);
}

.bl-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 520px;
}

/* Header row */
.bl-table thead tr {
  background: #0F0F0F;
}
[data-theme="dark"] .bl-table thead tr {
  background: var(--bg-3);
}

.bl-table thead th {
  padding: 14px 18px;
  text-align: left;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  color: #fff;
  border-bottom: none;
}
[data-theme="dark"] .bl-table thead th {
  color: var(--text-1);
}

/* Colored header columns */
.bl-table thead th:nth-child(2) {
  background: #1A0060;
}
.bl-table thead th:nth-child(3) {
  background: var(--indigo);
}
[data-theme="dark"] .bl-table thead th:nth-child(2) {
  background: rgba(26,0,96,0.6);
}
[data-theme="dark"] .bl-table thead th:nth-child(3) {
  background: rgba(111,0,255,0.3);
}

/* Body rows */
.bl-table tbody tr {
  background: var(--bg-0);
  transition: background .15s;
}
.bl-table tbody tr:nth-child(even) {
  background: var(--bg-1);
}
.bl-table tbody tr:hover {
  background: var(--bg-2);
}

.bl-table tbody td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  line-height: 1.6;
  color: var(--text-2);
}
.bl-table tbody td:first-child {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text-1);
  font-size: 13px;
}
.bl-table tbody tr:last-child td {
  border-bottom: none;
}


/* ═══════════════════════════════════════════
   PILLS — severity / status tags
   ═══════════════════════════════════════════ */
.bl-pill {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.bl-pill-green { background: rgba(29,158,117,0.10); color: #0A7A52; }
.bl-pill-amber { background: rgba(210,160,30,0.10); color: #8A5A00; }
.bl-pill-red   { background: rgba(226,75,74,0.10); color: #A01010; }
.bl-pill-blue  { background: rgba(55,138,221,0.10); color: #0A4A80; }

[data-theme="dark"] .bl-pill-green { background: rgba(29,158,117,0.18); color: #4AE0A0; }
[data-theme="dark"] .bl-pill-amber { background: rgba(210,160,30,0.18); color: #F0C44A; }
[data-theme="dark"] .bl-pill-red   { background: rgba(226,75,74,0.18); color: #FF8A89; }
[data-theme="dark"] .bl-pill-blue  { background: rgba(55,138,221,0.18); color: #6AB8FF; }


/* ═══════════════════════════════════════════
   QUESTION — reader question / highlight box
   ═══════════════════════════════════════════ */
.bl-question {
  background: linear-gradient(135deg, rgba(111,0,255,0.05) 0%, rgba(111,0,255,0.01) 100%);
  border-left: 3px solid var(--indigo-soft);
  border-radius: 0 16px 16px 0;
  padding: 24px 28px;
  margin: 36px 0;
}
[data-theme="dark"] .bl-question {
  background: linear-gradient(135deg, rgba(111,0,255,0.10) 0%, rgba(111,0,255,0.03) 100%);
}

.bl-question p {
  font-family: var(--font-serif);
  font-size: 20px;
  font-style: italic;
  color: var(--text-1);
  line-height: 1.6;
  margin: 0;
  font-weight: 400;
}


/* ═══════════════════════════════════════════
   BLOCKQUOTE — conclusion / key point
   ═══════════════════════════════════════════ */
.bl-blockquote {
  border-left: 4px solid var(--indigo-soft);
  padding: 20px 28px;
  margin: 36px 0;
  background: transparent;
}

.bl-blockquote p {
  font-family: var(--font-serif);
  font-size: 22px;
  font-style: italic;
  color: var(--text-1);
  line-height: 1.5;
  margin: 0;
}

.bl-blockquote cite {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 14px;
  display: block;
  font-style: normal;
}


/* ═══════════════════════════════════════════
   CTA — dark call-to-action box (always dark)
   ═══════════════════════════════════════════ */
.bl-cta {
  background: #0F0F0F;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 24px;
  padding: 48px 40px;
  margin: 52px 0 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}
[data-theme="dark"] .bl-cta {
  background: #0A0A12;
  border-color: rgba(111,0,255,0.25);
}

.bl-cta-eyebrow,
.article-body .bl-cta-eyebrow {
  display: inline-block;
  background: rgba(111,0,255,0.25);
  border-radius: 10px;
  padding: 6px 14px;
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: 600;
  color: #C8AAFF !important;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.bl-cta h3,
.article-body .bl-cta h3 {
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 800;
  color: #FFFFFF !important;
  margin: 0;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.bl-cta p,
.article-body .bl-cta p {
  font-size: 16px;
  color: #AAAAAA !important;
  margin: 0;
  line-height: 1.7;
}

.bl-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--indigo);
  color: #FFFFFF !important;
  padding: 14px 32px;
  text-decoration: none !important;
  border-radius: 50px;
  font-weight: 700;
  font-family: var(--font-display);
  font-size: 15px;
  transition: all .3s ease;
  box-shadow:
    0 0 0 1px var(--indigo),
    0 8px 32px -6px rgba(111,0,255,0.45);
  margin-top: 4px;
}
.bl-cta-btn:hover {
  background: var(--indigo-deep);
  transform: translateY(-2px);
  box-shadow:
    0 0 0 1px var(--indigo-deep),
    0 14px 44px -6px rgba(111,0,255,0.65);
}


/* ═══════════════════════════════════════════
   COST BARS — side-by-side cost comparison
   ═══════════════════════════════════════════ */
.bl-cost-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 32px 0;
}

.bl-cost-col {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}

.bl-cost-header {
  padding: 14px 20px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.bl-cost-header-cloud {
  background: #1A0060;
  color: #C8AAFF;
}
.bl-cost-header-onprem {
  background: #2A2A2A;
  color: #ddd;
}
[data-theme="dark"] .bl-cost-header-cloud { background: rgba(26,0,96,0.7); }
[data-theme="dark"] .bl-cost-header-onprem { background: rgba(42,42,42,0.7); }

.bl-cost-body {
  padding: 18px 20px;
}

.bl-cost-row {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.bl-cost-row:last-child { border-bottom: none; }

.bl-cost-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-3);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.bl-bar-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bl-bar-track {
  flex: 1;
  height: 8px;
  background: var(--bg-3);
  border-radius: 4px;
  overflow: hidden;
}

.bl-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width .6s ease;
}

.bl-bar-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  min-width: 65px;
  text-align: right;
}


/* ═══════════════════════════════════════════
   FACTOR BLOCKS — side-by-side analysis
   ═══════════════════════════════════════════ */
.bl-factor {
  background: var(--bg-2);
  border-radius: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  margin-bottom: 14px;
}

.bl-factor-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.bl-factor-header span.bl-factor-emoji {
  font-size: 22px;
  flex-shrink: 0;
}
.bl-factor-header strong {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-1);
}

.bl-factor-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.bl-factor-col {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.6;
}
.bl-factor-col strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.bl-factor-col strong.bl-label-cloud { color: #378ADD; }
[data-theme="dark"] .bl-factor-col strong.bl-label-cloud { color: #6AB8FF; }
.bl-factor-col strong.bl-label-onprem { color: var(--indigo-soft); }


/* ═══════════════════════════════════════════
   HIGHLIGHT BOX — hybrid / third option
   ═══════════════════════════════════════════ */
.bl-highlight {
  background: linear-gradient(135deg, rgba(111,0,255,0.05) 0%, rgba(111,0,255,0.02) 100%);
  border: 1.5px solid rgba(111,0,255,0.20);
  border-radius: 18px;
  padding: 28px;
  margin: 36px 0;
}
[data-theme="dark"] .bl-highlight {
  background: linear-gradient(135deg, rgba(111,0,255,0.10) 0%, rgba(111,0,255,0.04) 100%);
  border-color: rgba(111,0,255,0.30);
}

.bl-highlight-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}
.bl-highlight-icon {
  width: 44px;
  height: 44px;
  background: rgba(111,0,255,0.12);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
[data-theme="dark"] .bl-highlight-icon { background: rgba(111,0,255,0.20); }

.bl-highlight h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--indigo-soft);
  margin: 0;
  line-height: 1.3;
}

.bl-highlight p {
  font-size: 16px;
  color: var(--text-2);
  margin: 0 0 12px;
  line-height: 1.7;
}
.bl-highlight p:last-child { margin-bottom: 0; }

/* Trend / stat callout inside highlight */
.bl-trend {
  background: rgba(29,158,117,0.08);
  border-radius: 12px;
  padding: 14px 18px;
  margin-top: 16px;
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.6;
}
[data-theme="dark"] .bl-trend { background: rgba(29,158,117,0.12); }
.bl-trend strong { color: #1D9E75; }
[data-theme="dark"] .bl-trend strong { color: #4AE0A0; }


/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */
@media (max-width: 700px) {
  .bl-compare,
  .bl-cost-grid,
  .bl-factor-cols {
    grid-template-columns: 1fr;
  }
  .bl-metrics {
    grid-template-columns: 1fr 1fr;
  }
  .bl-signals {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .bl-metrics {
    grid-template-columns: 1fr;
  }
  .bl-step {
    flex-direction: column;
    gap: 12px;
  }
  .bl-step:not(:last-child)::after {
    display: none;
  }
  .bl-cta {
    padding: 32px 24px;
  }
  .bl-question {
    padding: 20px 22px;
  }
  .bl-blockquote {
    padding: 16px 22px;
  }
  .bl-blockquote p {
    font-size: 19px;
  }
}
