/**
 * ==========================================================
 * SIDV Theme — Single Post Styles (single.css)
 * ----------------------------------------------------------
 * Estilos optimizados para la lectura, soporte Gutenberg,
 * tipografía fluida y tarjetas de navegación.
 * ==========================================================
 */

/* ----------------------------------------------------------
   1. CONTENEDOR PRINCIPAL Y ESTRUCTURA
   ---------------------------------------------------------- */
.sidv-single-container {
    max-width: 880px;
    margin: 0 auto;
    padding: 2.5rem 1.25rem 5rem;
}

.sidv-single-article {
    background-color: #ffffff;
    border-radius: 16px;
}

/* ----------------------------------------------------------
   2. CABECERA Y METADATOS
   ---------------------------------------------------------- */
.sidv-single-header {
    margin-bottom: 2.5rem;
}

.sidv-single-badge {
    display: inline-flex;
    align-items: center;
    background-color: rgba(2, 86, 114, 0.08);
    color: #025672;
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.4rem 0.9rem;
    border-radius: 50px;
    letter-spacing: 0.6px;
    margin-bottom: 1.25rem;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.sidv-single-badge:hover {
    background-color: #025672;
    color: #ffffff;
}

.sidv-single-title {
    font-size: clamp(1.85rem, 4vw, 2.65rem);
    line-height: 1.2;
    color: #0f172a;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 1.25rem;
}

.sidv-single-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
}

.sidv-single-meta__item {
    display: inline-flex;
    align-items: center;
}

.sidv-single-meta__divider {
    color: #cbd5e1;
    font-weight: 400;
}

/* Imagen Destacada */
.sidv-single-featured-image {
    width: 100%;
    margin-top: 2rem;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 12px 32px -8px rgba(2, 86, 114, 0.12);
}

.sidv-single-img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

/* ----------------------------------------------------------
   3. CUERPO DEL ARTÍCULO (Lectura & Gutenberg)
   ---------------------------------------------------------- */
.sidv-single-content {
    font-size: 1.125rem;
    line-height: 1.85;
    color: #334155;
}

.sidv-single-content p {
    margin-bottom: 1.75rem;
}

/* Encabezados internos */
.sidv-single-content h2,
.sidv-single-content h3,
.sidv-single-content h4,
.sidv-single-content h5,
.sidv-single-content h6 {
    color: #025672;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.sidv-single-content h2 {
    font-size: 1.75rem;
    margin-top: 3rem;
    margin-bottom: 1.25rem;
    padding-left: 1rem;
    border-left: 4px solid #f09700;
}

.sidv-single-content h3 {
    font-size: 1.4rem;
    margin-top: 2.25rem;
    margin-bottom: 1rem;
}

.sidv-single-content h4 {
    font-size: 1.2rem;
    margin-top: 2rem;
    margin-bottom: 0.85rem;
}

/* Enlaces dentro del texto */
.sidv-single-content a {
    color: #025672;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: rgba(240, 151, 0, 0.5);
    text-underline-offset: 3px;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.sidv-single-content a:hover {
    color: #f09700;
    text-decoration-color: #f09700;
}

/* Listas */
.sidv-single-content ul,
.sidv-single-content ol {
    margin-bottom: 1.75rem;
    padding-left: 1.75rem;
}

.sidv-single-content li {
    margin-bottom: 0.65rem;
}

.sidv-single-content li::marker {
    color: #f09700;
    font-weight: bold;
}

/* Citas destacadas (Blockquotes) */
.sidv-single-content blockquote,
.wp-block-quote {
    position: relative;
    border-left: 4px solid #025672;
    background-color: #f8fafc;
    margin: 2.5rem 0;
    padding: 1.5rem 1.75rem;
    border-radius: 0 12px 12px 0;
    font-style: italic;
    color: #1e293b;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
}

.sidv-single-content blockquote p {
    margin-bottom: 0;
}

.sidv-single-content blockquote cite {
    display: block;
    margin-top: 0.75rem;
    font-size: 0.875rem;
    font-style: normal;
    font-weight: 600;
    color: #64748b;
}

/* Imágenes e incrustaciones Gutenberg */
.sidv-single-content img,
.sidv-single-content figure {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 2rem 0;
}

.sidv-single-content figcaption {
    text-align: center;
    font-size: 0.875rem;
    color: #64748b;
    margin-top: 0.5rem;
}

/* Tablas */
.sidv-single-content table,
.wp-block-table table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 0.95rem;
}

.sidv-single-content th,
.sidv-single-content td {
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    text-align: left;
}

.sidv-single-content th {
    background-color: #025672;
    color: #ffffff;
    font-weight: 600;
}

.sidv-single-content tr:nth-child(even) {
    background-color: #f8fafc;
}

/* Código y Preformateado */
.sidv-single-content pre {
    background-color: #0f172a;
    color: #f8fafc;
    padding: 1.25rem 1.5rem;
    border-radius: 10px;
    overflow-x: auto;
    font-size: 0.9rem;
    margin: 2rem 0;
}

.sidv-single-content :not(pre) > code {
    background-color: #f1f5f9;
    color: #025672;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.875em;
}

/* ----------------------------------------------------------
   4. NAVEGACIÓN ENTRE ARTÍCULOS (Tarjetas)
   ---------------------------------------------------------- */
.sidv-single-footer {
    margin-top: 4rem;
    padding-top: 2.5rem;
    border-top: 1px solid #e2e8f0;
}

.sidv-single-navigation {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.sidv-single-nav-prev,
.sidv-single-nav-next {
    display: flex;
}

.sidv-single-nav-prev a,
.sidv-single-nav-next a {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    padding: 1.25rem 1.5rem;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    color: #1e293b;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.4;
    transition: all 0.25 ease;
}

.sidv-single-nav-prev a:hover,
.sidv-single-nav-next a:hover {
    background-color: #ffffff;
    border-color: #025672;
    color: #025672;
    box-shadow: 0 10px 20px -5px rgba(2, 86, 114, 0.1);
    transform: translateY(-2px);
}

.sidv-single-nav-next {
    text-align: right;
}

/* ----------------------------------------------------------
   5. ADAPTABILIDAD RESPONSIVA
   ---------------------------------------------------------- */
@media (max-width: 768px) {
    .sidv-single-container {
        padding-top: 1.5rem;
        padding-bottom: 3rem;
    }

    .sidv-single-content {
        font-size: 1.05rem;
    }

    .sidv-single-content h2 {
        font-size: 1.5rem;
    }

    .sidv-single-navigation {
        grid-template-columns: 1fr;
    }

    .sidv-single-nav-next {
        text-align: left;
    }
}