/**
 * Estilos para el contenido de artículos (clase .prose)
 * Tipografía legible y formato consistente
 */

.prose {
    color: #374151;
    line-height: 1.75;
    font-size: 1.125rem;
}

.prose > * + * {
    margin-top: 1.25em;
}

/* Encabezados */
.prose h2 {
    color: #111827;
    font-weight: 700;
    font-size: 1.5rem;
    margin-top: 2em;
    margin-bottom: 1em;
    line-height: 1.33;
    padding-bottom: 0.5em;
    border-bottom: 2px solid #fbbf24;
}

.prose h3 {
    color: #111827;
    font-weight: 600;
    font-size: 1.25rem;
    margin-top: 1.6em;
    margin-bottom: 0.6em;
    line-height: 1.6;
}

.prose h4 {
    color: #111827;
    font-weight: 600;
    font-size: 1.125rem;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

/* Párrafos */
.prose p {
    margin-top: 1.25em;
    margin-bottom: 1.25em;
}

.prose p:first-child {
    margin-top: 0;
}

/* Negritas */
.prose strong {
    color: #111827;
    font-weight: 600;
}

/* Enlaces */
.prose a {
    color: #d97706;
    text-decoration: underline;
    font-weight: 500;
    transition: color 0.2s;
}

.prose a:hover {
    color: #92400e;
}

/* Listas */
.prose ul,
.prose ol {
    margin-top: 1.25em;
    margin-bottom: 1.25em;
    padding-left: 1.625em;
}

.prose ul {
    list-style-type: disc;
}

.prose ol {
    list-style-type: decimal;
}

.prose li {
    margin-top: 0.5em;
    margin-bottom: 0.5em;
    padding-left: 0.375em;
}

.prose li::marker {
    color: #d97706;
}

/* Listas anidadas */
.prose ul ul,
.prose ol ol,
.prose ul ol,
.prose ol ul {
    margin-top: 0.75em;
    margin-bottom: 0.75em;
}

/* Citas */
.prose blockquote {
    font-style: italic;
    border-left: 4px solid #fbbf24;
    padding-left: 1em;
    margin-top: 1.6em;
    margin-bottom: 1.6em;
    color: #4b5563;
    background-color: #fffbeb;
    padding: 1em 1.5em;
    border-radius: 0 0.5rem 0.5rem 0;
}

.prose blockquote p {
    margin: 0;
}

/* Código inline */
.prose code {
    color: #111827;
    font-weight: 600;
    font-size: 0.875em;
    background-color: #f3f4f6;
    padding: 0.2em 0.4em;
    border-radius: 0.25rem;
}

/* Bloques de código */
.prose pre {
    color: #e5e7eb;
    background-color: #1f2937;
    overflow-x: auto;
    font-size: 0.875em;
    line-height: 1.7;
    margin-top: 1.7em;
    margin-bottom: 1.7em;
    border-radius: 0.5rem;
    padding: 1em 1.5em;
}

.prose pre code {
    background-color: transparent;
    border-width: 0;
    border-radius: 0;
    padding: 0;
    font-weight: 400;
    color: inherit;
    font-size: inherit;
}

/* Imágenes */
.prose img {
    margin-top: 2em;
    margin-bottom: 2em;
    border-radius: 0.5rem;
    max-width: 100%;
    height: auto;
}

.prose figure {
    margin-top: 2em;
    margin-bottom: 2em;
}

.prose figcaption {
    color: #6b7280;
    font-size: 0.875em;
    line-height: 1.4;
    margin-top: 0.85em;
    text-align: center;
}

/* Tablas */
.prose table {
    width: 100%;
    table-layout: auto;
    text-align: left;
    margin-top: 2em;
    margin-bottom: 2em;
    font-size: 0.875em;
    line-height: 1.7;
    border-collapse: collapse;
}

.prose thead {
    border-bottom: 2px solid #fbbf24;
}

.prose thead th {
    color: #111827;
    font-weight: 600;
    padding: 0.75em 1em;
    background-color: #fffbeb;
}

.prose tbody tr {
    border-bottom: 1px solid #e5e7eb;
}

.prose tbody tr:last-child {
    border-bottom-width: 0;
}

.prose tbody td {
    padding: 0.75em 1em;
}

/* Separadores */
.prose hr {
    border-color: #e5e7eb;
    border-top-width: 1px;
    margin-top: 3em;
    margin-bottom: 3em;
}

/* Primer párrafo destacado (lead) */
.prose > p:first-of-type {
    font-size: 1.25rem;
    line-height: 1.6;
    color: #4b5563;
}

/* Espaciado para móviles */
@media (max-width: 640px) {
    .prose {
        font-size: 1rem;
    }

    .prose h2 {
        font-size: 1.35rem;
    }

    .prose h3 {
        font-size: 1.15rem;
    }

    .prose > p:first-of-type {
        font-size: 1.1rem;
    }
}
