/* ============================================================
 * DBOART Blog Editorial v1.2.2
 * CSS limpio, sin reglas acumuladas de versiones anteriores.
 * ============================================================ */

:root {
    --dboart-editorial-width: 1120px;
    --dboart-image-width: 1120px;
    --dboart-mobile-width: calc(100% - 0px);
}

/* Fuentes ocultas hasta que JS las coloca */
#dboart-post-entradilla-source,
#dboart-post-topmeta-source,
#dboart-post-bottommeta-source,
#dboart-featured-caption-source {
    display: none !important;
}

.single-post .dboart-ready {
    display: block !important;
}

/* Base editorial */
.single-post .article-inner,
.single-post .article-body-container,
.single-post .entry-content,
.single-post .post-content,
.single-post .single-post-content {
    text-align: left !important;
    overflow: visible !important;
}

.single-post .entry-content,
.single-post .post-content,
.single-post .article-body-container,
.single-post .single-post-content {
    width: var(--dboart-editorial-width) !important;
    max-width: var(--dboart-mobile-width) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 0 !important;
}

/* Categoría */
.single-post .meta-post-categories,
.single-post .wd-post-cat,
.single-post .wd-post-category,
.single-post .post-categories {
    text-align: center !important;
    margin-bottom: 12px !important;
}

/* Título principal */
.single-post h1.wd-entities-title.wd-post-title.title,
.single-post .wd-entities-title.wd-post-title.title {
    width: var(--dboart-editorial-width) !important;
    max-width: var(--dboart-mobile-width) !important;
    margin: 0 auto 0px !important;
    padding: 0 !important;
    font-size: 38px !important;
    line-height: 1.16 !important;
    font-weight: 800 !important;
    color: #111 !important;
    text-align: left !important;
    letter-spacing: -.035em !important;
}

/* Entradilla */
.single-post .dboart-post-entradilla {
    width: var(--dboart-editorial-width) !important;
    max-width: var(--dboart-mobile-width) !important;
    margin: 0 auto 18px !important;
    padding: 0 !important;
    color: #111 !important;
    text-align: left !important;
}

.single-post .dboart-post-entradilla p {
    margin: 0 0 12px !important;
    padding: 0 !important;
    font-size: 21px !important;
    line-height: 1.36 !important;
    font-weight: 400 !important;
    color: #111 !important;
    text-align: left !important;
}

.single-post .dboart-post-entradilla ul {
    margin: 0 !important;
    padding: 0 0 0 22px !important;
    list-style-position: outside !important;
    text-align: left !important;
}

.single-post .dboart-post-entradilla li {
    margin: 0 0 10px !important;
    padding-left: 4px !important;
    font-size: 21px !important;
    line-height: 1.36 !important;
    font-weight: 400 !important;
    color: #111 !important;
    text-align: left !important;
}

/* Compartir */
.single-post .dboart-post-topmeta {
    width: var(--dboart-editorial-width) !important;
    max-width: var(--dboart-mobile-width) !important;
    margin: 0 auto 22px !important;
    padding: 0 !important;
    text-align: left !important;
}

.single-post .dboart-post-topmeta-border {
    display: block !important;
    width: 100% !important;
    height: 1px !important;
    margin: 0 0 10px !important;
    padding: 0 !important;
    background: #d8d8d8 !important;
}

.single-post .dboart-share-buttons {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 6px !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.single-post .dboart-share-btn {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 2px !important;
    color: #fff !important;
    text-decoration: none !important;
    font-size: 11px !important;
    line-height: 1 !important;
    font-weight: 800 !important;
    font-family: Arial, Helvetica, sans-serif !important;
    text-transform: uppercase !important;
    box-shadow: none !important;
    border: 0 !important;
}

.single-post .dboart-share-facebook { background: #1877f2 !important; }
.single-post .dboart-share-x { background: #111 !important; }
.single-post .dboart-share-linkedin {
    background: #0A66C2 !important;
    font-size: 9px !important;
    letter-spacing: -0.03em !important;
}
.single-post .dboart-share-email {
    background: #75a843 !important;
    font-size: 12px !important;
    text-transform: none !important;
}

/* Imagen destacada */
.single-post .post-img-wrapp,
.single-post .entry-thumbnail,
.single-post .post-thumbnail,
.single-post .single-post-image {
    width: var(--dboart-image-width) !important;
    max-width: calc(100% - 40px) !important;
    margin: 0 auto 24px !important;
    padding: 0 !important;
    text-align: center !important;
}

.single-post .post-img-wrapp img,
.single-post .entry-thumbnail img,
.single-post .post-thumbnail img,
.single-post .single-post-image img,
.single-post img.wp-post-image {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    margin: 0 auto !important;
    border-radius: 0 !important;
    transform: none !important;
}

.single-post .dboart-featured-caption.dboart-ready {
    display: block !important;
    width: var(--dboart-image-width) !important;
    max-width: calc(100% - 40px) !important;
    margin: -12px auto 0 !important;
    transform: none !important;
}

/* Fecha + autor */
.single-post .dboart-post-bottommeta {
    width: var(--dboart-editorial-width) !important;
    max-width: var(--dboart-mobile-width) !important;
    margin: 30px auto 0px !important;
    padding: 0 !important;
    text-align: left !important;
}

.single-post .dboart-post-date {
    margin: 0 0 11px !important;
    padding: 0 !important;
    font-size: 12px !important;
    line-height: 1.3 !important;
    color: #8a8a8a !important;
    text-align: left !important;
}

.single-post .dboart-post-bottommeta-line {
    display: block !important;
    width: 100% !important;
    height: 1px !important;
    margin: 0 0 16px !important;
    padding: 0 !important;
    background: #d8d8d8 !important;
}

.single-post .dboart-post-authorbox {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 12px !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: left !important;
}

.single-post .dboart-post-authoravatar,
.single-post .dboart-post-authoravatar img {
    width: 46px !important;
    height: 46px !important;
    flex: 0 0 46px !important;
    border-radius: 50% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.single-post .dboart-post-authorname {
    margin: 0 0 2px !important;
    padding: 0 !important;
    font-size: 15px !important;
    line-height: 1.15 !important;
    font-weight: 800 !important;
    color: #111 !important;
    text-align: left !important;
}

.single-post .dboart-post-authorjob {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 12px !important;
    line-height: 1.25 !important;
    color: #666 !important;
    text-align: left !important;
}

/* Índice principal */
.single-post .dboart-inline-toc {
    width: var(--dboart-editorial-width) !important;
    max-width: var(--dboart-mobile-width) !important;
    margin: 18px auto 28px !important;
    border: 1px solid #d8d8d8 !important;
    border-radius: 4px !important;
    background: #efefef !important;
    overflow: hidden !important;
}

.single-post .dboart-inline-toc-toggle {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    margin: 0 !important;
    padding: 13px 18px !important;
    border: 0 !important;
    background: transparent !important;
    color: #111 !important;
    cursor: pointer !important;
    box-shadow: none !important;
    text-align: left !important;
}

.single-post .dboart-inline-toc-toggle-left {
    display: inline-flex !important;
    align-items: center !important;
    gap: 12px !important;
    min-width: 0 !important;
}

.single-post .dboart-inline-toc-title {
    display: block !important;
    margin: 0 !important;
    font-size: 15px !important;
    line-height: 1.3 !important;
    font-weight: 800 !important;
    color: #111 !important;
}

.single-post .dboart-inline-toc-symbol {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 16px !important;
    font-size: 22px !important;
    line-height: 1 !important;
    color: #111 !important;
    font-weight: 400 !important;
}

.single-post .dboart-inline-toc-panel {
    display: none !important;
    padding: 0 18px 14px !important;
    background: #efefef !important;
}

.single-post .dboart-inline-toc.is-open .dboart-inline-toc-panel {
    display: block !important;
}

.single-post .dboart-inline-toc-list {
    list-style: none !important;
    margin: 0 !important;
    padding: 6px 0 0 !important;
}

.single-post .dboart-inline-toc-list li {
    margin: 0 !important;
    padding: 0 !important;
}

.single-post .dboart-inline-toc-link {
    position: relative !important;
    display: block !important;
    margin: 0 !important;
    padding: 8px 8px 8px 24px !important;
    color: #111 !important;
    text-decoration: none !important;
    font-size: 15px !important;
    line-height: 1.35 !important;
    border-radius: 3px !important;
}

.single-post .dboart-inline-toc-link:hover,
.single-post .dboart-inline-toc-link.is-current,
.single-post .dboart-inline-toc-link.is-current:hover {
    background: #fff !important;
}

.single-post .dboart-inline-toc-link::before {
    content: '›' !important;
    position: absolute !important;
    left: 8px !important;
    top: 7px !important;
    font-size: 19px !important;
    line-height: 1 !important;
    color: #9a9a9a !important;
}

.single-post .dboart-inline-toc-link-h3 {
    padding-left: 38px !important;
    font-size: 14px !important;
    color: #333 !important;
}

.single-post .dboart-inline-toc-link-h3::before {
    left: 20px !important;
}

/* Icono índice */
.single-post .dboart-list-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 18px !important;
    min-width: 18px !important;
    height: 14px !important;
    opacity: .72 !important;
}

.single-post .dboart-list-icon > span {
    position: relative !important;
    display: block !important;
    width: 14px !important;
    height: 10px !important;
    border-top: 2px solid #a3a3a3 !important;
    border-bottom: 2px solid #a3a3a3 !important;
}

.single-post .dboart-list-icon > span::before {
    content: '' !important;
    position: absolute !important;
    left: 0 !important;
    top: 2px !important;
    width: 14px !important;
    height: 2px !important;
    background: #a3a3a3 !important;
}

.single-post .dboart-list-icon > span::after {
    content: '' !important;
    position: absolute !important;
    left: -5px !important;
    top: -2px !important;
    width: 2px !important;
    height: 2px !important;
    border-radius: 50% !important;
    background: #a3a3a3 !important;
    box-shadow: 0 4px 0 #a3a3a3, 0 8px 0 #a3a3a3 !important;
}

/* Icono en H2/H3 */
.single-post .dboart-heading-with-toc {
    display: flex !important;
    align-items: flex-start !important;
    gap: 8px !important;
    width: var(--dboart-editorial-width) !important;
    max-width: var(--dboart-mobile-width) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 30px 0 15px 0 !important;
    text-align: left !important;
}

.single-post .dboart-heading-with-toc h2,
.single-post .dboart-heading-with-toc h3 {
    flex: 1 1 auto !important;
    width: auto !important;
    max-width: none !important;
    margin-top: 7px !important;
    margin-bottom: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 0 !important;
    text-align: left !important;
    text-indent: 0 !important;
}

.single-post .dboart-heading-toc-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 18px !important;
    min-width: 18px !important;
    height: 18px !important;
    margin: .18em 0 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    cursor: pointer !important;
}

/* Índice local al pulsar icono */
.single-post .dboart-local-toc-panel {
    width: var(--dboart-editorial-width) !important;
    max-width: var(--dboart-mobile-width) !important;
    margin: 14px auto 28px !important;
    padding: 18px 22px !important;
    background: #efefef !important;
    border: 1px solid #d8d8d8 !important;
    border-radius: 4px !important;
}

.single-post .dboart-local-toc-panel .dboart-inline-toc-list {
    padding-top: 0 !important;
}

/* Enlaces de texto en negrita */
.single-post .entry-content p a,
.single-post .post-content p a,
.single-post .single-post-content p a,
.single-post .article-body-container p a {
    font-weight: 700 !important;
}

/* Pies de foto */
.single-post .dboart-editorial-caption,
.single-post .entry-content figcaption,
.single-post .post-content figcaption,
.single-post .wp-caption .wp-caption-text,
.single-post .blocks-gallery-caption {
    width: 100% !important;
    display: block !important;
    margin: 0 !important;
    padding: 12px 0 13px !important;
    border-bottom: 1px solid #bfd4ab !important;
    color: #6d7785 !important;
    font-size: 14px !important;
    line-height: 1.45 !important;
    font-weight: 400 !important;
    text-align: left !important;
    box-sizing: border-box !important;
}

/* Letra capitular */
.single-post .dboart-first-dropcap {
    overflow: visible !important;
}

.single-post .dboart-first-dropcap::first-letter {
    float: left !important;
    font-size: 74px !important;
    line-height: .78 !important;
    font-weight: 800 !important;
    letter-spacing: -.04em !important;
    color: #111 !important;
    margin: 4px 10px 0 0 !important;
    text-transform: uppercase !important;
}

/* Citas editoriales: usar blockquote normal */
body.single-post blockquote,
body.single-post .entry-content blockquote,
body.single-post .post-content blockquote,
body.single-post .single-post-content blockquote,
body.single-post .article-body-container blockquote,
body.single-post .wpb_text_column blockquote,
body.single-post .wpb_wrapper blockquote,
body.single-post .wp-block-quote,
body.single-post .wp-block-pullquote,
body.single-post blockquote.dboart-editorial-quote {
    float: left !important;
    clear: left !important;
    width: 360px !important;
    max-width: calc(100% - 32px) !important;
    margin: 10px 50px 26px -150px !important;
    padding: 0 !important;
    border: 0 !important;
    border-left: 0 !important;
    background: transparent !important;
    text-align: left !important;
    box-shadow: none !important;
    font-size: clamp(34px, 4.4vw, 40px) !important;
    line-height: .98 !important;
    font-weight: 800 !important;
    letter-spacing: -.035em !important;
    color: #111 !important;
    font-style: normal !important;
}

body.single-post blockquote::before,
body.single-post .entry-content blockquote::before,
body.single-post .post-content blockquote::before,
body.single-post .single-post-content blockquote::before,
body.single-post .article-body-container blockquote::before,
body.single-post .wpb_text_column blockquote::before,
body.single-post .wpb_wrapper blockquote::before,
body.single-post .wp-block-quote::before,
body.single-post .wp-block-pullquote::before,
body.single-post blockquote.dboart-editorial-quote::before {
    content: '' !important;
    display: block !important;
    width: 88px !important;
    height: 30px !important;
    margin: 0 0 -20px -12px !important;
    background: #ed6990 !important;
}

body.single-post blockquote p,
body.single-post .entry-content blockquote p,
body.single-post .post-content blockquote p,
body.single-post .single-post-content blockquote p,
body.single-post .article-body-container blockquote p,
body.single-post .wpb_text_column blockquote p,
body.single-post .wpb_wrapper blockquote p,
body.single-post .wp-block-quote p,
body.single-post .wp-block-pullquote p,
body.single-post blockquote.dboart-editorial-quote p {
    margin: 0 !important;
    max-width: 14ch !important;
    font-size: clamp(34px, 4.4vw, 40px) !important;
    line-height: .98 !important;
    font-weight: 800 !important;
    letter-spacing: -.035em !important;
    color: #111 !important;
    text-decoration: underline !important;
    text-decoration-thickness: 1px !important;
    text-underline-offset: 6px !important;
    font-style: normal !important;
    border: 0 !important;
    padding: 0 !important;
}

/* Reset global de imágenes para evitar contaminar otros bloques */
body.single-post .wpb_single_image,
body.single-post .vc_single_image-wrapper,
body.single-post .vc_figure,
body.single-post .wpb_single_image figure,
body.single-post .vc_single_image-wrapper figure,
body.single-post .vc_figure figure,
body.single-post .wpb_single_image img,
body.single-post .vc_single_image-wrapper img,
body.single-post .vc_single_image-img,
body.single-post .vc_figure img {
    width: auto !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
    transform: none !important;
}

/* Imágenes ampliadas SOLO cuando están dentro de #post y son editoriales */
body.single-post #post {
    overflow: visible !important;
    --dboart-wide-media-width: min(1510px, calc(100vw - 70px));
}

body.single-post #post,
body.single-post #post .vc_row,
body.single-post #post .vc_column_container,
body.single-post #post .vc_column-inner,
body.single-post #post .wpb_wrapper,
body.single-post #post .wpb_text_column {
    overflow: visible !important;
}

body.single-post #post figure.dboart-editorial-figure,
body.single-post #post figure.wp-caption,
body.single-post #post .wp-caption,
body.single-post #post .wp-block-image {
    width: var(--dboart-wide-media-width) !important;
    max-width: none !important;
    min-width: 0 !important;
    margin-top: 36px !important;
    margin-bottom: 30px !important;
    margin-left: calc((var(--dboart-editorial-width) - var(--dboart-wide-media-width)) / 2) !important;
    margin-right: calc((var(--dboart-editorial-width) - var(--dboart-wide-media-width)) / 2) !important;
    transform: none !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

body.single-post #post figure.dboart-editorial-figure img,
body.single-post #post figure.wp-caption img,
body.single-post #post .wp-caption img,
body.single-post #post .wp-block-image img {
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    display: block !important;
}

/* Las imágenes sueltas NO se amplían salvo que les pongas .dboart-wide-img */
body.single-post #post p > img {
    width: auto !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    transform: none !important;
}

body.single-post #post p > img.dboart-wide-img {
    display: block !important;
    width: var(--dboart-wide-media-width) !important;
    max-width: none !important;
    height: auto !important;
    margin: 36px 0 30px calc((var(--dboart-editorial-width) - var(--dboart-wide-media-width)) / 2) !important;
    transform: none !important;
}

/* Móvil */
@media (max-width: 1279px) {
    body.single-post #post {
        --dboart-wide-media-width: calc(100vw - 40px);
    }
}

@media (max-width: 1023px) {
    body.single-post blockquote,
    body.single-post .entry-content blockquote,
    body.single-post .post-content blockquote,
    body.single-post .single-post-content blockquote,
    body.single-post .article-body-container blockquote,
    body.single-post .wpb_text_column blockquote,
    body.single-post .wpb_wrapper blockquote,
    body.single-post .wp-block-quote,
    body.single-post .wp-block-pullquote,
    body.single-post blockquote.dboart-editorial-quote {
        float: none !important;
        clear: both !important;
        width: var(--dboart-editorial-width) !important;
        max-width: var(--dboart-mobile-width) !important;
        margin: 34px auto 26px !important;
    }
}

@media (max-width: 767px) {
    :root {
        --dboart-mobile-width: calc(100% - 28px);
    }

    .single-post h1.wd-entities-title.wd-post-title.title,
    .single-post .wd-entities-title.wd-post-title.title {
        font-size: 30px !important;
        line-height: 1.16 !important;
    }

    .single-post .dboart-post-entradilla p,
    .single-post .dboart-post-entradilla li {
        font-size: 18px !important;
        line-height: 1.42 !important;
    }

    .single-post .post-img-wrapp,
    .single-post .entry-thumbnail,
    .single-post .post-thumbnail,
    .single-post .single-post-image,
    .single-post .dboart-featured-caption.dboart-ready {
        max-width: var(--dboart-mobile-width) !important;
    }

    .single-post .dboart-post-authoravatar,
    .single-post .dboart-post-authoravatar img {
        width: 42px !important;
        height: 42px !important;
        flex-basis: 42px !important;
    }

    .single-post .dboart-first-dropcap::first-letter {
        font-size: 58px !important;
        line-height: .84 !important;
        margin: 2px 8px 0 0 !important;
    }

    body.single-post #post {
        --dboart-wide-media-width: calc(100vw - 20px);
    }

    body.single-post #post figure.dboart-editorial-figure,
    body.single-post #post figure.wp-caption,
    body.single-post #post .wp-caption,
    body.single-post #post .wp-block-image,
    body.single-post #post p > img.dboart-wide-img {
        margin-left: calc((100% - var(--dboart-wide-media-width)) / 2) !important;
        margin-right: calc((100% - var(--dboart-wide-media-width)) / 2) !important;
    }
}


/* v1.2.1: centrado real de imágenes ampliadas y texto móvil a 16px */

/* Centra las imágenes ampliadas respecto al contenedor real, no respecto a una anchura teórica */
body.single-post #post figure.dboart-editorial-figure,
body.single-post #post figure.wp-caption,
body.single-post #post .wp-caption,
body.single-post #post .wp-block-image {
    width: var(--dboart-wide-media-width) !important;
    max-width: none !important;
    margin-left: calc((100% - var(--dboart-wide-media-width)) / 2) !important;
    margin-right: calc((100% - var(--dboart-wide-media-width)) / 2) !important;
    transform: none !important;
}

/* Imágenes sueltas ampliadas manualmente */
body.single-post #post p > img.dboart-wide-img {
    width: var(--dboart-wide-media-width) !important;
    max-width: none !important;
    margin-left: calc((100% - var(--dboart-wide-media-width)) / 2) !important;
    margin-right: calc((100% - var(--dboart-wide-media-width)) / 2) !important;
    transform: none !important;
}

/* Texto en móvil: 16px en lugar de 18px */
@media (max-width: 767px) {
    .single-post .entry-content,
    .single-post .post-content,
    .single-post .single-post-content,
    .single-post .article-body-container,
    .single-post .entry-content p,
    .single-post .post-content p,
    .single-post .single-post-content p,
    .single-post .article-body-container p,
    .single-post .entry-content li,
    .single-post .post-content li,
    .single-post .single-post-content li,
    .single-post .article-body-container li {
        font-size: 16px !important;
        line-height: 1.55 !important;
    }

    .single-post .dboart-post-entradilla p,
    .single-post .dboart-post-entradilla li {
        font-size: 16px !important;
        line-height: 1.55 !important;
    }
}


/* v1.2.2: ajuste final de citas editoriales */
body.single-post blockquote,
body.single-post .entry-content blockquote,
body.single-post .post-content blockquote,
body.single-post .single-post-content blockquote,
body.single-post .article-body-container blockquote,
body.single-post .wpb_text_column blockquote,
body.single-post .wpb_wrapper blockquote,
body.single-post .wp-block-quote,
body.single-post .wp-block-pullquote,
body.single-post blockquote.dboart-editorial-quote {
    float: left !important;
    clear: left !important;
    width: 360px !important;
    max-width: calc(100% - 32px) !important;
    margin: 40px 60px 55px -150px !important;
    padding: 0 !important;
    border: 0 !important;
    border-left: 0 !important;
    background: transparent !important;
    text-align: left !important;
    box-shadow: none !important;
    font-size: clamp(34px, 4.4vw, 40px) !important;
    line-height: .98 !important;
    font-weight: 800 !important;
    letter-spacing: -.035em !important;
    color: #111 !important;
    font-style: normal !important;
}

body.single-post blockquote::before,
body.single-post .entry-content blockquote::before,
body.single-post .post-content blockquote::before,
body.single-post .single-post-content blockquote::before,
body.single-post .article-body-container blockquote::before,
body.single-post .wpb_text_column blockquote::before,
body.single-post .wpb_wrapper blockquote::before,
body.single-post .wp-block-quote::before,
body.single-post .wp-block-pullquote::before,
body.single-post blockquote.dboart-editorial-quote::before {
    content: '' !important;
    display: block !important;
    width: 88px !important;
    height: 30px !important;
    margin: 0 0 -25px -22px !important;
    background: #ed5a6bb5 !important;
}
