/**
 * Estilos Prose para Contenido Markdown
 * 
 * Mejora la legibilidad y presentación del contenido
 * Soporta dark mode y light mode
 */

.prose {
    color: #e5e7eb;
    max-width: 100%;
}

/* Light Mode Overrides */
.light .prose {
    color: #374151;
}

.light .prose h1,
.light .prose h2,
.light .prose h3 {
    color: #111827;
}

.light .prose h4 {
    color: #1f2937;
}

.light .prose p,
.light .prose li {
    color: #4b5563;
}

.light .prose strong {
    color: #111827;
}

.light .prose em {
    color: #4b5563;
}

.light .prose h2 {
    border-bottom-color: #e5e7eb;
}

.light .prose a {
    color: #0891b2;
}

.light .prose a:hover {
    color: #9333ea;
}

.light .prose ul > li::marker {
    color: #9333ea;
}

.light .prose ol > li::marker {
    color: #0891b2;
}

.light .prose blockquote {
    color: #4b5563;
    border-left-color: #9333ea;
}

.light .prose code {
    color: #d97706;
    background: rgba(217, 119, 6, 0.1);
}

.light .prose pre {
    background: #f9fafb;
    border-color: #e5e7eb;
}

.light .prose thead {
    border-bottom-color: #e5e7eb;
}

.light .prose tbody tr {
    border-bottom-color: #f3f4f6;
}

.light .prose tbody td {
    color: #4b5563;
}

.light .prose thead th {
    color: #111827;
}

.light .prose hr {
    border-color: #e5e7eb;
}

.light .prose figcaption {
    color: #6b7280;
}

.light .prose > p:first-of-type {
    color: #374151;
}

.light .prose .highlight {
    background: rgba(147, 51, 234, 0.1);
    border-left-color: #9333ea;
}

.light .prose .info-box {
    background: rgba(8, 145, 178, 0.1);
    border-color: rgba(8, 145, 178, 0.3);
}

.light .prose .warning-box {
    background: rgba(217, 119, 6, 0.1);
    border-color: rgba(217, 119, 6, 0.3);
}

/* Títulos */
.prose h1 {
    color: #fff;
    font-weight: 800;
    font-size: 2.25em;
    margin-top: 0;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

.prose h2 {
    color: #fff;
    font-weight: 700;
    font-size: 1.875em;
    margin-top: 3rem;
    margin-bottom: 1.25rem;
    line-height: 1.3;
    letter-spacing: -0.025em;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #252525;
}

.prose h3 {
    color: #fff;
    font-weight: 600;
    font-size: 1.5em;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.prose h4 {
    color: #d1d5db;
    font-weight: 600;
    font-size: 1.25em;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

/* Párrafos */
.prose p {
    margin-top: 0;
    margin-bottom: 1.5rem;
    line-height: 1.75;
    font-size: 1.125rem;
    color: #d1d5db;
}

.prose p:last-child {
    margin-bottom: 0;
}

/* Strong/Bold */
.prose strong {
    color: #fff;
    font-weight: 600;
}

/* Em/Italic */
.prose em {
    color: #d1d5db;
    font-style: italic;
}

/* Links */
.prose a {
    color: #06b6d4;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.prose a:hover {
    color: #a855f7;
    text-decoration: underline;
}

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

.prose li {
    margin-top: 0.75rem;
    margin-bottom: 0.75rem;
    line-height: 1.75;
    color: #d1d5db;
    font-size: 1.125rem;
}

.prose ul > li {
    padding-left: 0.375rem;
    position: relative;
}

.prose ul > li::marker {
    color: #a855f7;
    font-weight: bold;
}

.prose ol > li::marker {
    color: #06b6d4;
    font-weight: 600;
}

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

/* Blockquotes */
.prose blockquote {
    font-weight: 500;
    font-style: italic;
    color: #d1d5db;
    border-left: 4px solid #a855f7;
    padding-left: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
    quotes: "\201C""\201D""\2018""\2019";
}

.prose blockquote p:first-of-type::before {
    content: open-quote;
}

.prose blockquote p:last-of-type::after {
    content: close-quote;
}

/* Code */
.prose code {
    color: #fbbf24;
    font-weight: 600;
    font-size: 0.875em;
    background: rgba(251, 191, 36, 0.1);
    padding: 0.2em 0.4em;
    border-radius: 0.25rem;
}

.prose pre {
    background: #141414;
    border: 1px solid #252525;
    border-radius: 0.5rem;
    padding: 1.5rem;
    overflow-x: auto;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.prose pre code {
    background: transparent;
    border-width: 0;
    border-radius: 0;
    padding: 0;
    font-weight: 400;
    color: inherit;
    font-size: 0.875em;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

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

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

.prose thead th {
    color: #fff;
    font-weight: 600;
    vertical-align: bottom;
    padding: 0.75rem;
}

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

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

.prose tbody td {
    vertical-align: baseline;
    padding: 0.75rem;
    color: #d1d5db;
}

/* Imágenes */
.prose img {
    margin-top: 2rem;
    margin-bottom: 2rem;
    border-radius: 0.5rem;
}

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

.prose figure > * {
    margin-top: 0;
    margin-bottom: 0;
}

.prose figcaption {
    color: #9ca3af;
    font-size: 0.875em;
    line-height: 1.4285714;
    margin-top: 0.75rem;
    text-align: center;
}

/* HR */
.prose hr {
    border-color: #252525;
    border-top-width: 1px;
    margin-top: 3rem;
    margin-bottom: 3rem;
}

/* Video embeds */
.prose iframe {
    margin-top: 2rem;
    margin-bottom: 2rem;
    border-radius: 0.5rem;
}

/* Responsive video container */
.prose .video-embed {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    margin-top: 2rem;
    margin-bottom: 2rem;
    border-radius: 0.5rem;
    background: #000;
}

.prose .video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    border-radius: 0.5rem;
}

/* Responsive styles for videos on mobile */
@media (max-width: 640px) {
    .prose .video-embed {
        margin-top: 1.5rem;
        margin-bottom: 1.5rem;
    }
}

/* Lead paragraph (primer párrafo después del título) */
.prose > p:first-of-type {
    font-size: 1.25rem;
    line-height: 1.6;
    color: #e5e7eb;
    margin-bottom: 2rem;
}

/* Mejoras de legibilidad */
.prose > * {
    margin-left: auto;
    margin-right: auto;
}

/* Secciones con highlights */
.prose .highlight {
    background: rgba(168, 85, 247, 0.1);
    border-left: 4px solid #a855f7;
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    border-radius: 0.25rem;
}

/* Info boxes */
.prose .info-box {
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.3);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 0.5rem;
}

/* Warning boxes */
.prose .warning-box {
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 0.5rem;
}

/* Archive Section Light Mode Overrides */
.light .archive-section {
    background: #f9fafb !important;
}

.light .archive-title {
    color: #111827 !important;
}

.light .archive-description {
    color: #4b5563 !important;
}

.light .archive-stats-label {
    color: #6b7280 !important;
}

.light .archive-empty-state {
    color: #6b7280 !important;
}

.light .archive-card {
    background: #ffffff !important;
    border-color: #e5e7eb !important;
}

.light .archive-card:hover {
    border-color: #9333ea !important;
}

.light .archive-card-image-bg {
    background: linear-gradient(to bottom right, #f9fafb, #f3f4f6) !important;
}

.light .archive-card-date {
    color: #9ca3af !important;
}

.light .archive-card-title {
    color: #111827 !important;
}

.light .archive-card-excerpt {
    color: #6b7280 !important;
}

.light .archive-card-footer {
    border-color: #e5e7eb !important;
}

.light .archive-card-price {
    color: #111827 !important;
}

.light .archive-pagination {
    background: #ffffff !important;
    border-color: #e5e7eb !important;
    color: #111827 !important;
}

.light .archive-pagination:hover {
    border-color: #9333ea !important;
}

/* Compare Section Light Mode Overrides */
.light .compare-section {
    background: #f9fafb !important;
}

.light .compare-title {
    color: #111827 !important;
}

.light .compare-description {
    color: #4b5563 !important;
}

.light .compare-selector-box {
    background: #ffffff !important;
    border-color: #e5e7eb !important;
}

.light .compare-selector-title {
    color: #111827 !important;
}

.light .compare-product-option {
    background: #f9fafb !important;
    border-color: #e5e7eb !important;
}

.light .compare-product-option:hover {
    border-color: #06b6d4 !important;
}

.light .compare-checkbox {
    background: #ffffff !important;
    border-color: #d1d5db !important;
}

.light .compare-product-name {
    color: #111827 !important;
}

.light .compare-counter {
    color: #6b7280 !important;
}

.light .compare-results-box {
    background: #ffffff !important;
    border-color: #9333ea !important;
}

.light .compare-results-title {
    color: #111827 !important;
}

.light .compare-table-header {
    background: #f9fafb !important;
}

.light .compare-table-th {
    background: #f9fafb !important;
    border-color: #e5e7eb !important;
    color: #111827 !important;
}

.light .compare-product-title {
    color: #111827 !important;
}

.light .compare-table-row {
    background: transparent;
}

.light .compare-table-row:hover {
    background: #f9fafb !important;
}

.light .compare-table-td-label {
    background: #ffffff !important;
    border-color: #e5e7eb !important;
    color: #111827 !important;
}

.light .compare-table-td {
    background: transparent;
    border-color: #e5e7eb !important;
    color: #4b5563 !important;
}

.light .compare-button-secondary {
    background: #f9fafb !important;
}

.light .compare-new-button {
    background: #f9fafb !important;
    border-color: #9333ea !important;
    color: #111827 !important;
}

.light .compare-new-button:hover {
    background: #9333ea !important;
    color: #ffffff !important;
}

.light .compare-error {
    color: #6b7280 !important;
}

.light .compare-empty-state {
    background: linear-gradient(to bottom right, rgba(147, 51, 234, 0.05), rgba(6, 182, 212, 0.05)) !important;
}

.light .compare-empty-title {
    color: #111827 !important;
}

.light .compare-empty-text {
    color: #4b5563 !important;
}

/* Review Page Light Mode Overrides */
.light .review-breadcrumbs {
    color: #6b7280 !important;
}

.light .review-breadcrumb-link {
    color: #6b7280 !important;
}

.light .review-breadcrumb-link:hover {
    color: #9333ea !important;
}

.light .review-breadcrumb-current {
    color: #111827 !important;
}

.light .review-price-box {
    background: #ffffff !important;
    border-color: #e5e7eb !important;
}

.light .review-price-title {
    color: #111827 !important;
}

.light .review-price-updated {
    color: #6b7280 !important;
}

.light .review-pros-box {
    background: rgba(34, 197, 94, 0.1) !important;
    border-color: rgba(34, 197, 94, 0.3) !important;
}

.light .review-pros-list li {
    color: #374151 !important;
}

.light .review-cons-box {
    background: rgba(239, 68, 68, 0.1) !important;
    border-color: rgba(239, 68, 68, 0.3) !important;
}

.light .review-cons-list li {
    color: #374151 !important;
}

.light .review-cta-box {
    background: linear-gradient(to right, rgba(147, 51, 234, 0.1), rgba(6, 182, 212, 0.1)) !important;
    border-color: rgba(147, 51, 234, 0.3) !important;
}

.light .review-cta-title {
    color: #111827 !important;
}

.light .review-cta-text {
    color: #4b5563 !important;
}

.light .review-specs-box {
    background: #ffffff !important;
    border-color: #e5e7eb !important;
}

.light .review-specs-title {
    color: #111827 !important;
}

.light .review-spec-item {
    border-color: #e5e7eb !important;
}

.light .review-spec-label {
    color: #6b7280 !important;
}

.light .review-spec-value {
    color: #111827 !important;
}

.light .review-related-box {
    background: #ffffff !important;
    border-color: #e5e7eb !important;
}

.light .review-related-title {
    color: #111827 !important;
}

.light .review-related-product {
    color: #111827 !important;
}

/* Blog Post Light Mode Overrides */
.light .blog-post-section {
    background: #f9fafb !important;
}

.light .blog-post-category {
    background: rgba(147, 51, 234, 0.1) !important;
    color: #9333ea !important;
}

.light .blog-post-title {
    color: #111827 !important;
}

.light .blog-post-meta {
    color: #6b7280 !important;
}

.light .blog-post-excerpt {
    background: #ffffff !important;
    border-color: #9333ea !important;
}

.light .blog-post-excerpt-text {
    color: #4b5563 !important;
}

.light .blog-post-footer {
    border-color: #e5e7eb !important;
}

.light .blog-post-share-title {
    color: #6b7280 !important;
}

.light .blog-post-share-btn {
    background: #ffffff !important;
    border-color: #e5e7eb !important;
    color: #111827 !important;
}

.light .blog-related-section {
    background: linear-gradient(to bottom right, #ffffff, #f9fafb) !important;
}

.light .blog-related-title {
    color: #111827 !important;
}

.light .blog-related-card {
    background: #ffffff !important;
    border-color: #e5e7eb !important;
}

.light .blog-related-card:hover {
    border-color: #9333ea !important;
}

.light .blog-related-card-title {
    color: #111827 !important;
}

.light .blog-related-card-excerpt {
    color: #6b7280 !important;
}

/* Search Page Light Mode Overrides */
.light .search-title {
    color: #111827 !important;
}

.light .search-input {
    background: #ffffff !important;
    border-color: #e5e7eb !important;
    color: #111827 !important;
}

.light .search-input:focus {
    border-color: #9333ea !important;
}

.light .search-input::placeholder {
    color: #9ca3af !important;
}

.light .search-button {
    color: #6b7280 !important;
}

.light .search-button:hover {
    color: #111827 !important;
}

.light .search-loading-text {
    color: #6b7280 !important;
}

.light .search-empty-state {
    color: #6b7280 !important;
}

.light .search-empty-icon {
    color: #6b7280 !important;
}

.light .search-no-results-text {
    color: #6b7280 !important;
}

.light .search-no-results-hint {
    color: #9ca3af !important;
}

.light .search-results-count {
    color: #6b7280 !important;
}

.light .search-result-card {
    background: #ffffff !important;
    border-color: #e5e7eb !important;
}

.light .search-result-card:hover {
    border-color: #9333ea !important;
}

.light .search-result-image-bg {
    background: #f9fafb !important;
}

.light .search-result-title {
    color: #111827 !important;
}

.light .search-result-excerpt {
    color: #6b7280 !important;
}

.light .search-result-price {
    color: #9333ea !important;
}

/* CTA Section Light Mode Overrides */
.light .cta-section {
    background: linear-gradient(to bottom right, rgba(147, 51, 234, 0.05), rgba(6, 182, 212, 0.05)) !important;
}

.light .cta-title {
    color: #111827 !important;
}

.light .cta-text {
    color: #4b5563 !important;
}

.light .cta-button-secondary {
    background: #ffffff !important;
    border-color: #d1d5db !important;
    color: #111827 !important;
}

.light .cta-button-secondary:hover {
    border-color: #06b6d4 !important;
}

/* Responsive */
@media (max-width: 640px) {
    .prose {
        font-size: 1rem;
    }
    
    .prose h1 {
        font-size: 1.875em;
    }
    
    .prose h2 {
        font-size: 1.5em;
        margin-top: 2rem;
    }
    
    .prose h3 {
        font-size: 1.25em;
        margin-top: 1.5rem;
    }
    
    .prose p,
    .prose li {
        font-size: 1rem;
    }
}

