/* ==========================================================================
   prose-legal.css - Tipografía premium para artículos legales
   Este archivo NO está dentro de @layer utilities, por lo que Tailwind
   no purga sus selectores. Se importa DESPUÉS de tw.css en header.php
   ========================================================================== */

/* Contenedor principal */
.prose-legal {
  color: #1E293B;
  font-size: 1.0625rem;
  line-height: 1.75;
}
.prose-legal > * + * { margin-top: 1.25rem; }

/* Headings con tipografía premium */
.prose-legal h2 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0F172A;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  line-height: 1.2;
  scroll-margin-top: 6rem;
}
.prose-legal h3 {
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: #0F172A;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  line-height: 1.3;
  scroll-margin-top: 6rem;
}

/* Texto base */
.prose-legal p { color: #334155; margin: 0; }
.prose-legal strong { color: #0F172A; font-weight: 600; }

/* Enlaces */
.prose-legal a {
  color: #1D4ED8;
  text-decoration: underline;
  text-decoration-color: rgba(29, 78, 216, 0.3);
  text-underline-offset: 3px;
  transition: all 0.2s;
}
.prose-legal a:hover {
  color: #1E3A8A;
  text-decoration-color: #1E3A8A;
}

/* Listas premium */
.prose-legal ul, .prose-legal ol {
  margin: 0;
  padding-left: 0;
  list-style: none;
}
.prose-legal ul li, .prose-legal ol li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 0.5rem;
  color: #334155;
}
.prose-legal ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10B981, #2563EB);
}
.prose-legal ol { counter-reset: proselegal-counter; }
.prose-legal ol li {
  counter-increment: proselegal-counter;
}
.prose-legal ol li::before {
  content: counter(proselegal-counter);
  position: absolute;
  left: 0;
  top: 0.1em;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #1E3A8A, #2563EB);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Blockquote elegante */
.prose-legal blockquote {
  border-left: 4px solid #2563EB;
  background: linear-gradient(90deg, #EFF6FF 0%, transparent 100%);
  padding: 1rem 1.5rem;
  border-radius: 0 1rem 1rem 0;
  font-style: italic;
  color: #1E40AF;
  margin: 1.5rem 0;
}
.prose-legal blockquote p { color: #1E40AF; }

/* Código inline */
.prose-legal code {
  background: #F1F5F9;
  color: #BE185D;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-size: 0.9em;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
}

/* Separador */
.prose-legal hr {
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, #CBD5E1, transparent);
  margin: 2.5rem 0;
}

/* Callouts */
.prose-legal .callout {
  border-radius: 1rem;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.prose-legal .callout-info { background: #EFF6FF; border: 1px solid #BFDBFE; color: #1E3A8A; }
.prose-legal .callout-warn { background: #FFFBEB; border: 1px solid #FDE68A; color: #92400E; }
.prose-legal .callout-success { background: #ECFDF5; border: 1px solid #A7F3D0; color: #065F46; }
.prose-legal .callout-icon {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
}
.prose-legal .callout-icon::before {
  content: "i";
}
.prose-legal .callout-warn .callout-icon::before { content: "!"; }
.prose-legal .callout-success .callout-icon::before { content: "✓"; }
.prose-legal .callout p { color: inherit; margin: 0; }
.prose-legal .callout strong { color: inherit; }
.prose-legal .callout > div:not(.callout-icon) { flex: 1; }

/* Lead (párrafo destacado) */
.prose-legal .lead {
  font-size: 1.25rem;
  line-height: 1.6;
  color: #475569;
  font-weight: 400;
  border-left: 3px solid #10B981;
  padding-left: 1.25rem;
  margin-top: 0;
  margin-bottom: 2rem;
  font-style: normal;
}

/* Imágenes dentro del artículo */
.prose-legal img {
  border-radius: 0.75rem;
  margin: 1.5rem auto;
  box-shadow: 0 4px 20px -4px rgba(15, 23, 42, 0.1);
  max-width: 100%;
  height: auto;
  display: block;
}
/* Figuras con caption */
.prose-legal figure {
  margin: 2rem 0;
  text-align: center;
}
.prose-legal figure img {
  margin: 0 auto 0.75rem;
}
.prose-legal figcaption {
  font-size: 0.875rem;
  color: #64748b;
  font-style: italic;
  margin-top: 0.5rem;
}

/* Línea gradient antes del primer h2/h3 */
.prose-legal h2:first-of-type::before,
.prose-legal h3:first-of-type::before {
  content: '';
  display: block;
  width: 3rem;
  height: 3px;
  background: linear-gradient(90deg, #10B981, #2563EB);
  border-radius: 2px;
  margin-bottom: 0.75rem;
}
