/* ============================================================
   blog.css — Site Avant Blog Shared Styles
   Paleta: #111111 noir · #FFFFFF blanc · #059669 vert · #2D3A8C indigo
   Polices: DM Serif Display (titres) + DM Sans (corps)
   ============================================================ */

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  line-height: 1.8;
  color: #111111;
  background: #FFFFFF;
}

img { max-width: 100%; height: auto; display: block; }

a { color: #2D3A8C; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Typography ───────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: 'DM Serif Display', Georgia, serif;
  line-height: 1.2;
  color: #111111;
}

/* ---- Nav ---- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0 clamp(1.25rem, 2.5vw, 2rem);
  height: 68px;
  display: flex;
  align-items: center;
  background: rgba(17,17,17,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: background 0.2s ease;
}
.nav-inner {
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  text-decoration: none;
}
.nav-logo-icon {
  width: 34px; height: 34px;
  background: #059669;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.nav-logo-text {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1;
}
.nav-logo-text span { color: #059669; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
  padding: 0; margin: 0;
}
.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255,255,255,0.7);
  transition: color 0.2s ease;
  text-decoration: none;
}
.nav-links a:hover,
.nav-links a.active { color: #ffffff; }
.nav-cta { margin-left: 0.5rem; }
.nav-cta .btn {
  display: inline-flex;
  align-items: center;
  padding: 0.6rem 1.25rem;
  font-size: 0.875rem;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-weight: 700;
  border-radius: 6px;
  text-decoration: none;
  transition: opacity 0.2s ease;
}
.btn-primary {
  background: #059669;
  color: #FFFFFF;
}
.btn-primary:hover { opacity: 0.88; }
/* Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: #ffffff;
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
/* Mobile menu */
.nav-mobile {
  display: none;
  position: fixed;
  top: 68px; left: 0; right: 0;
  background: #111111;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 1.5rem clamp(1.25rem, 2.5vw, 2rem) 2rem;
  flex-direction: column;
  gap: 1.25rem;
  z-index: 99;
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  font-size: 1.1rem;
  font-weight: 500;
  color: rgba(255,255,255,0.8);
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  text-decoration: none;
}
.nav-mobile .btn { width: 100%; justify-content: center; margin-top: 0.5rem; }
/* Body offset for fixed nav */
body { padding-top: 68px; }
@media (max-width: 640px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: flex; }
}

/* ── Article Hero ─────────────────────────────────────────── */
.article-hero {
  position: relative;
  height: 480px;
  overflow: hidden;
}

.article-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.article-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(17, 17, 17, 0.2) 0%,
    rgba(17, 17, 17, 0.85) 100%
  );
}

.article-hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2.5rem 1.5rem;
  max-width: 860px;
  margin: 0 auto;
}

.article-category-badge {
  display: inline-block;
  background: #059669;
  color: #FFFFFF;
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}

.article-hero-title {
  font-family: 'DM Serif Display', Georgia, serif;
  font-weight: 400;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  color: #FFFFFF;
  margin-bottom: 1rem;
  line-height: 1.15;
}

.article-hero-meta {
  display: flex;
  gap: 1.5rem;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
}

/* ── Article Container ────────────────────────────────────── */
.article-container {
  max-width: 780px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

/* ── TOC ──────────────────────────────────────────────────── */
.toc {
  background: #F4F6FA;
  border-left: 4px solid #2D3A8C;
  border-radius: 0 8px 8px 0;
  padding: 1.5rem 1.75rem;
  margin: 2.5rem 0;
}

.toc-title {
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #2D3A8C;
  margin-bottom: 0.75rem;
}

.toc ol {
  padding-left: 1.25rem;
}

.toc li {
  margin-bottom: 0.35rem;
}

.toc a {
  color: #111111;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
}

.toc a:hover { color: #2D3A8C; }

/* ── Article Typography ───────────────────────────────────── */
.article-lead {
  font-size: 1.2rem;
  line-height: 1.7;
  color: #333;
  font-weight: 400;
  margin-bottom: 2rem;
  border-left: none;
}

.article-body h2 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-weight: 400;
  font-size: 1.75rem;
  margin: 3rem 0 1rem;
  color: #111111;
  scroll-margin-top: 80px;
}

.article-body h3 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-weight: 400;
  font-size: 1.2rem;
  margin: 2rem 0 0.75rem;
  color: #111111;
  scroll-margin-top: 80px;
}

.article-body p {
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  line-height: 1.8;
  color: #222;
  margin-bottom: 1.25rem;
}

.article-body ul, .article-body ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.article-body li {
  margin-bottom: 0.4rem;
  line-height: 1.7;
}

/* ── Pull Quote ───────────────────────────────────────────── */
.pull-quote {
  border-left: 4px solid #059669;
  background: #ECFDF5;
  padding: 1.5rem 1.75rem;
  margin: 2.5rem 0;
  border-radius: 0 8px 8px 0;
}

.pull-quote p {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 1.3rem;
  font-weight: 400;
  line-height: 1.5;
  color: #111111;
  margin: 0;
  font-style: italic;
}

/* ── Info / Tip / Warning Boxes ───────────────────────────── */
.info-box {
  background: #EEF3FF;
  border: 1px solid #C7D7FF;
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
}

.info-box-title {
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 0.875rem;
  color: #2D3A8C;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.tip-box {
  background: #FFFBEB;
  border: 1px solid #FFE066;
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
}

.tip-box-title {
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 0.875rem;
  color: #B07D00;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.warning-box {
  background: #FFF5F5;
  border: 1px solid #FFC7C7;
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
}

.warning-box-title {
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 0.875rem;
  color: #CC2200;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

/* ── Article Images ───────────────────────────────────────── */
.article-img {
  margin: 2.5rem 0;
}

.article-img img {
  width: 100%;
  border-radius: 10px;
  display: block;
}

.article-img figcaption {
  font-size: 0.8rem;
  color: #888;
  margin-top: 0.5rem;
  text-align: center;
  font-style: italic;
}

.article-img-wide {
  margin: 2.5rem -3rem;
}

.article-img-wide img {
  width: 100%;
  border-radius: 10px;
  display: block;
}

.article-img-wide figcaption {
  font-size: 0.8rem;
  color: #888;
  margin-top: 0.5rem;
  text-align: center;
  font-style: italic;
}

/* ── Price Cards Grid ─────────────────────────────────────── */
.price-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin: 2.5rem 0;
}

.price-card {
  background: #F4F6FA;
  border: 2px solid #E5E9F0;
  border-radius: 12px;
  padding: 1.5rem 1.25rem;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.price-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.price-card.featured {
  background: #2D3A8C;
  border-color: #2D3A8C;
  color: #FFFFFF;
  transform: scale(1.04);
}

.price-card-name {
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.price-card.featured .price-card-name { color: #FFFFFF; }

.price-card-price {
  font-family: 'DM Serif Display', Georgia, serif;
  font-weight: 400;
  font-size: 1.75rem;
  color: #2D3A8C;
  margin-bottom: 0.5rem;
}

.price-card.featured .price-card-price { color: #FFFFFF; }

.price-card-desc {
  font-size: 0.85rem;
  color: #555;
  line-height: 1.5;
}

.price-card.featured .price-card-desc { color: rgba(255, 255, 255, 0.8); }

/* ── Comparison Table ─────────────────────────────────────── */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  margin: 2.5rem 0;
  font-size: 0.9rem;
  overflow-x: auto;
  display: block;
}

.compare-table th {
  background: #111111;
  color: #FFFFFF;
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  padding: 0.85rem 1rem;
  text-align: left;
}

.compare-table th:first-child { border-radius: 8px 0 0 0; }
.compare-table th:last-child { border-radius: 0 8px 0 0; }

.compare-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #E5E9F0;
  color: #333;
}

.compare-table tr:last-child td { border-bottom: none; }
.compare-table tr:nth-child(even) td { background: #F9FAFB; }

/* si/dep eran italianos (heredados de Primasito -> Siteavant -> aqui).
   Renombrados a yes/depends. Los alias .si/.dep se mantienen por si queda
   algun articulo antiguo sin migrar; se pueden borrar cuando se confirme. */
.compare-table .yes, .compare-table .si { color: #16A34A; font-weight: 600; }
.compare-table .no { color: #DC2626; font-weight: 600; }
.compare-table .depends, .compare-table .dep { color: #D97706; font-weight: 600; }

/* ── Check List ───────────────────────────────────────────── */
.check-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.check-list li {
  padding: 0.4rem 0 0.4rem 2rem;
  position: relative;
  font-size: 0.95rem;
  line-height: 1.6;
}

.check-list li::before {
  position: absolute;
  left: 0;
  font-weight: 700;
  font-size: 1rem;
}

.check-list li.check::before {
  content: "✓";
  color: #16A34A;
}

.check-list li.cross::before {
  content: "✗";
  color: #DC2626;
}

/* ── Numbered Cards ───────────────────────────────────────── */
.numbered-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 2rem 0;
}

.numbered-card {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  background: #F4F6FA;
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
}

.numbered-card-num {
  font-family: 'DM Serif Display', Georgia, serif;
  font-weight: 400;
  font-size: 2rem;
  color: #2D3A8C;
  line-height: 1;
  min-width: 48px;
  text-align: center;
  opacity: 0.9;
}

.numbered-card-content h4 {
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.35rem;
  color: #111111;
}

.numbered-card-content p {
  font-size: 0.9rem;
  color: #555;
  margin: 0;
  line-height: 1.6;
}

/* ── CTA Box ──────────────────────────────────────────────── */
.cta-box {
  background: #111111;
  border-radius: 16px;
  padding: 3rem 2.5rem;
  text-align: center;
  margin: 3.5rem 0;
}

.cta-box-title {
  font-family: 'DM Serif Display', Georgia, serif;
  font-weight: 400;
  font-size: 1.75rem;
  color: #FFFFFF;
  margin-bottom: 0.75rem;
  line-height: 1.25;
}

.cta-box-sub {
  color: #999;
  font-size: 0.95rem;
  margin-bottom: 1.75rem;
  line-height: 1.6;
}

.cta-box-btn {
  display: inline-block;
  background: #059669;
  color: #FFFFFF;
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.9rem 2.25rem;
  border-radius: 8px;
  text-decoration: none;
  transition: transform 0.15s, background 0.2s;
  letter-spacing: 0.01em;
}

.cta-box-btn:hover {
  background: #047857;
  transform: translateY(-2px);
  text-decoration: none;
}

/* ── Related Articles ─────────────────────────────────────── */
.related-section {
  border-top: 2px solid #E5E9F0;
  padding-top: 3rem;
  margin-top: 3rem;
}

.related-title {
  font-family: 'DM Serif Display', Georgia, serif;
  font-weight: 400;
  font-size: 1.4rem;
  margin-bottom: 1.75rem;
  color: #111111;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.related-card {
  border: 1px solid #E5E9F0;
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  display: block;
  background: #FFFFFF;
}

.related-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  text-decoration: none;
}

.related-card-img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}

.related-card-body {
  padding: 0.875rem 1rem;
}

.related-card-cat {
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #2D3A8C;
  margin-bottom: 0.35rem;
}

.related-card-title {
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  color: #111111;
  line-height: 1.35;
}

/* ── Footer ───────────────────────────────────────────────── */
.footer {
  background: #111111;
  padding: 2.5rem 1.5rem;
  text-align: center;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.footer p {
  color: #666;
  font-size: 0.875rem;
  line-height: 1.7;
}

.footer a {
  color: #999;
  text-decoration: none;
  transition: color 0.2s;
}

.footer a:hover { color: #FFFFFF; }

/* ── Blog Index Hero ──────────────────────────────────────── */
.blog-hero {
  background: #111111;
  padding: 5rem 1.5rem 4rem;
  text-align: center;
}

.blog-hero-inner {
  max-width: 700px;
  margin: 0 auto;
}

.blog-hero-title {
  font-family: 'DM Serif Display', Georgia, serif;
  font-weight: 400;
  font-size: clamp(2rem, 5vw, 3.25rem);
  color: #FFFFFF;
  line-height: 1.15;
  margin-bottom: 1.25rem;
}

.blog-hero-title span { color: #059669; }

.blog-hero-sub {
  color: #999;
  font-size: 1.1rem;
  line-height: 1.7;
  max-width: 560px;
  margin: 0 auto;
}

/* ── Blog Index Grid ──────────────────────────────────────── */
.blog-grid-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 5rem;
}

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

.blog-card {
  border: 1px solid #E5E9F0;
  border-radius: 14px;
  overflow: hidden;
  background: #FFFFFF;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

.blog-card-img-wrap {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.blog-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.blog-card:hover .blog-card-img { transform: scale(1.04); }

.blog-card-body {
  padding: 1.25rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.blog-card-cat {
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #2D3A8C;
  margin-bottom: 0.5rem;
  background: #EEF3FF;
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
}

.blog-card-title {
  font-family: 'DM Serif Display', Georgia, serif;
  font-weight: 400;
  font-size: 1.1rem;
  color: #111111;
  margin-bottom: 0.6rem;
  line-height: 1.3;
}

.blog-card-excerpt {
  font-size: 0.875rem;
  color: #666;
  line-height: 1.65;
  flex: 1;
  margin-bottom: 1.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #F0F0F0;
  padding-top: 0.875rem;
}

.blog-card-date {
  font-size: 0.8rem;
  color: #999;
}

.blog-card-link {
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  color: #2D3A8C;
  text-decoration: none;
  transition: color 0.2s;
}

.blog-card-link:hover { color: #1a2a6c; text-decoration: none; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 600px) {
  .article-hero { height: 360px; }

  .article-hero-title { font-size: 1.5rem; }

  .article-img-wide { margin: 2rem -0.5rem; }

  .related-grid {
    grid-template-columns: 1fr;
  }

  .price-grid {
    grid-template-columns: 1fr 1fr;
  }

  .compare-table { font-size: 0.8rem; }

  .cta-box { padding: 2rem 1.25rem; }
  .cta-box-title { font-size: 1.35rem; }

  .blog-grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .article-img-wide { margin: 2rem -0.5rem; }
  .related-grid { grid-template-columns: 1fr 1fr; }
}
