/* ══════════════════════════════════════════════
   Gestión Ventas — Blog shared styles
   ══════════════════════════════════════════════ */

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

:root {
  --c-bg: #fafaf9;
  --c-surface: #ffffff;
  --c-text: #1c1917;
  --c-text-secondary: #57534e;
  --c-brand: #2563eb;
  --c-brand-dark: #1d4ed8;
  --c-border: #e7e5e4;
  --c-border-light: #f5f5f4;
  --c-green: #16a34a;
  --c-green-bg: #f0fdf4;
  --c-red: #dc2626;
  --c-amber-bg: #fffbeb;
  --c-amber-border: #fbbf24;
  --c-code-bg: #f5f5f4;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
  --radius: 8px;
  --max-w: 740px;
}

html {
  font-size: 17px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Manrope', system-ui, -apple-system, sans-serif;
  color: var(--c-text);
  background-color: var(--c-bg);
  line-height: 1.7;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.4;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  background-size: 256px 256px;
  pointer-events: none;
}

/* ── Header ── */
.site-header {
  background: linear-gradient(135deg, #0050C3 0%, #003c8f 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-header__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #ffffff;
  font-weight: 600;
  font-size: 1.05rem;
}

.site-header__brand img {
  width: 32px;
  height: 32px;
  border-radius: 6px;
}

.site-header__nav {
  display: flex;
  gap: 24px;
  align-items: center;
}

.site-header__nav a {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.88rem;
  font-weight: 500;
  transition: color 0.15s;
}

.site-header__nav a:hover {
  color: #ffffff;
}

.site-header__cta {
  background: #ffffff;
  color: #0050C3 !important;
  padding: 7px 16px;
  border-radius: 6px;
  font-weight: 700;
  transition: background 0.15s, transform 0.15s;
}

.site-header__cta:hover {
  background: #f0f4ff;
  transform: translateY(-1px);
}

/* ── Breadcrumb ── */
.breadcrumb {
  max-width: var(--max-w);
  margin: 24px auto 0;
  padding: 0 24px;
  font-size: 0.82rem;
  color: var(--c-text-secondary);
}

.breadcrumb a {
  color: var(--c-brand);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb span {
  margin: 0 6px;
  opacity: 0.5;
}

/* ── Article ── */
.article {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 32px 24px 80px;
}

.article h1 {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.article__meta {
  font-size: 0.82rem;
  color: var(--c-text-secondary);
  margin-bottom: 28px;
}

/* ── TLDR ── */
.tldr {
  background: var(--c-green-bg);
  border-left: 4px solid var(--c-green);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 20px 24px;
  margin-bottom: 40px;
}

.tldr__title {
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--c-green);
  margin-bottom: 10px;
}

.tldr ul {
  list-style: none;
  padding: 0;
}

.tldr li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 6px;
  font-size: 0.95rem;
}

.tldr li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: var(--c-green);
  font-weight: 700;
}

/* ── Headings ── */
.article h2 {
  font-size: 1.45rem;
  font-weight: 700;
  margin-top: 48px;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--c-border-light);
}

.article h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-top: 32px;
  margin-bottom: 12px;
}

.article p {
  margin-bottom: 16px;
}

.article ul,
.article ol {
  margin-bottom: 16px;
  padding-left: 24px;
}

.article li {
  margin-bottom: 6px;
}

.article strong {
  font-weight: 700;
}

.article em {
  font-style: italic;
}

/* ── Problem callout ── */
.problem-list {
  background: var(--c-amber-bg);
  border-left: 4px solid var(--c-amber-border);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 20px 24px;
  margin: 16px 0 24px;
}

.problem-list ul {
  list-style: disc;
  padding-left: 20px;
  margin: 0;
}

.problem-list li {
  margin-bottom: 6px;
  font-size: 0.95rem;
}

/* ── Tables ── */
.table-wrap {
  overflow-x: auto;
  margin: 20px 0 28px;
  border-radius: var(--radius);
  border: 1px solid var(--c-border);
  box-shadow: var(--shadow-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

thead {
  background: #f8fafc;
}

th {
  text-align: left;
  padding: 12px 16px;
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--c-text-secondary);
  border-bottom: 2px solid var(--c-border);
  white-space: nowrap;
}

td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--c-border-light);
  vertical-align: top;
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr:nth-child(even) {
  background: #fafaf9;
}

.col-traditional {
  color: var(--c-red);
  font-weight: 600;
}

.col-system {
  color: var(--c-green);
  font-weight: 600;
}

/* ── Steps ── */
.step {
  margin: 28px 0;
  padding: 24px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.step__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--c-brand);
  color: #fff;
  font-weight: 800;
  font-size: 0.9rem;
  border-radius: 50%;
  margin-right: 12px;
  flex-shrink: 0;
}

.step h3 {
  display: inline;
  margin: 0;
  font-size: 1.1rem;
  vertical-align: middle;
}

.step p,
.step ul {
  margin-top: 12px;
}

/* ── FAQ ── */
.faq-item {
  margin: 20px 0;
  padding: 20px 24px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
}

.faq-item dt {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 8px;
}

.faq-item dd {
  margin: 0;
  font-size: 0.95rem;
  color: var(--c-text-secondary);
}

/* ── CTA block ── */
.cta-block {
  margin-top: 48px;
  background: linear-gradient(135deg, #1e3a5f 0%, #1e40af 100%);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  color: #fff;
}

.cta-block p {
  margin-bottom: 20px;
  font-size: 1.05rem;
  opacity: 0.92;
}

.cta-block a {
  display: inline-block;
  background: #fff;
  color: var(--c-brand-dark);
  padding: 12px 28px;
  border-radius: 6px;
  font-weight: 700;
  text-decoration: none;
  font-size: 0.95rem;
  transition: transform 0.15s, box-shadow 0.15s;
}

.cta-block a:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--c-border);
  padding: 32px 24px;
  text-align: center;
  font-size: 0.82rem;
  color: var(--c-text-secondary);
}

.site-footer a {
  color: var(--c-brand);
  text-decoration: none;
}

.site-footer__social {
  margin-top: 10px;
}

.site-footer__social a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--c-text-secondary);
  transition: color 0.15s;
}

.site-footer__social a:hover {
  color: var(--c-brand);
}

.site-footer__social svg {
  width: 18px;
  height: 18px;
  vertical-align: middle;
}

/* ── Blog index page ── */
.page {
  max-width: 900px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.page h1 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.page__subtitle {
  color: var(--c-text-secondary);
  font-size: 1.05rem;
  margin-bottom: 40px;
}

.articles {
  display: grid;
  gap: 20px;
}

.article-card {
  display: block;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 28px;
  text-decoration: none;
  color: var(--c-text);
  transition: box-shadow 0.2s, border-color 0.2s;
}

.article-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--c-brand);
}

.article-card__tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--c-brand);
  background: #eff6ff;
  padding: 3px 10px;
  border-radius: 4px;
  margin-bottom: 12px;
}

.article-card__title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 8px;
}

.article-card__excerpt {
  font-size: 0.92rem;
  color: var(--c-text-secondary);
  margin-bottom: 12px;
}

.article-card__meta {
  font-size: 0.8rem;
  color: var(--c-text-secondary);
  opacity: 0.7;
}

/* ── Screenshot images ── */
.article img {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--c-border);
  margin-top: 16px;
  cursor: zoom-in;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.article img:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

/* ── Image lightbox (CSS-only) ── */
.img-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 24px;
  cursor: zoom-out;
}

.img-lightbox.active {
  display: flex;
}

.img-lightbox img {
  max-width: 95vw;
  max-height: 92vh;
  border-radius: 8px;
  border: none;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
  cursor: zoom-out;
  margin: 0;
}

.img-lightbox__close {
  position: fixed;
  top: 16px;
  right: 20px;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  font-size: 2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  line-height: 1;
}

.img-lightbox__close:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ── Responsive ── */
@media (max-width: 640px) {
  html {
    font-size: 16px;
  }

  .article h1 {
    font-size: 1.55rem;
  }

  .article h2 {
    font-size: 1.25rem;
  }

  .site-header__nav .hide-mobile {
    display: none;
  }

  th, td {
    padding: 10px 12px;
    font-size: 0.82rem;
  }

  .step {
    padding: 18px;
  }

  .page h1 {
    font-size: 1.55rem;
  }

  .article-card {
    padding: 20px;
  }
}
