/* =========================================================
   PV Marketing Digital — BLOG / SINGLE POST
   Astra limpio
   No toca header global
========================================================= */


/* =========================================================
   01. SINGLE POST — RESET GENERAL
========================================================= */

/* Fondo general del single */
body.single-post,
body.single-post #page,
body.single-post .site,
body.single-post #content,
body.single-post .site-content {
    background: #ffffff !important;
}

/* Reset solo del contenido, NO del header */
body.single-post #content > .ast-container {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    background: #ffffff !important;
    box-sizing: border-box !important;
}

/* Área principal */
body.single-post #primary,
body.single-post #main,
body.single-post .site-main,
body.single-post article,
body.single-post .ast-article-single {
    width: 100% !important;
    max-width: none !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
    box-sizing: border-box !important;
}

/* Quitar sidebar */
body.single-post #secondary,
body.single-post .widget-area {
    display: none !important;
}


/* =========================================================
   02. SINGLE POST — HERO
========================================================= */

body.single-post .entry-header {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 150px 0 74px !important;
    background: linear-gradient(135deg, #061626 0%, #0A2540 58%, #061626 100%) !important;
    position: relative !important;
    box-sizing: border-box !important;
}

body.single-post .entry-header::after {
    content: "" !important;
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    height: 3px !important;
    background: linear-gradient(90deg, transparent, #5CC8FF 25%, #FF6600 55%, transparent) !important;
    opacity: 0.55 !important;
}

/* Título del post */
body.single-post .entry-header .entry-title {
    max-width: 880px !important;
    margin: 0 auto !important;
    padding: 0 32px !important;
    color: #ffffff !important;
    font-size: clamp(34px, 4vw, 58px) !important;
    line-height: 1.08 !important;
    font-weight: 700 !important;
    letter-spacing: -0.045em !important;
    text-align: left !important;
}

/* Ocultar meta y thumbnail */
body.single-post .entry-meta,
body.single-post .ast-post-meta,
body.single-post .posted-on,
body.single-post .byline,
body.single-post .entry-footer,
body.single-post .ast-article-post-meta,
body.single-post .post-thumbnail,
body.single-post .ast-post-format-wrapper {
    display: none !important;
}


/* =========================================================
   03. SINGLE POST — CONTENIDO
========================================================= */

body.single-post .entry-content {
    max-width: 880px !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 56px 32px 80px !important;
    background: #ffffff !important;
    box-sizing: border-box !important;
}

body.single-post .entry-content > *:first-child {
    margin-top: 0 !important;
}

/* Tipografía base */
body.single-post .entry-content p,
body.single-post .entry-content li,
body.single-post .entry-content td {
    color: #374151 !important;
    font-size: 18px !important;
    line-height: 1.78 !important;
}

body.single-post .entry-content p {
    margin-bottom: 24px !important;
}

/* H1 interno */
body.single-post .entry-content h1 {
    color: #0A2540 !important;
    font-size: clamp(30px, 3vw, 42px) !important;
    line-height: 1.15 !important;
    font-weight: 700 !important;
    letter-spacing: -0.04em !important;
    margin: 0 0 22px !important;
}

/* H2 */
body.single-post .entry-content h2 {
    color: #0A2540 !important;
    font-size: clamp(26px, 3vw, 36px) !important;
    line-height: 1.2 !important;
    font-weight: 700 !important;
    letter-spacing: -0.035em !important;
    margin: 48px 0 18px !important;
    padding-top: 0 !important;
    border-top: none !important;
}

/* H3 */
body.single-post .entry-content h3 {
    color: #0A2540 !important;
    font-size: clamp(22px, 2.4vw, 28px) !important;
    line-height: 1.25 !important;
    font-weight: 700 !important;
    letter-spacing: -0.025em !important;
    margin: 36px 0 14px !important;
}

/* H4 */
body.single-post .entry-content h4 {
    color: #1E3A5F !important;
    font-size: 18px !important;
    line-height: 1.35 !important;
    font-weight: 700 !important;
    margin: 28px 0 12px !important;
}

/* Links */
body.single-post .entry-content a {
    color: #2F86C4 !important;
    text-decoration: underline !important;
}

body.single-post .entry-content a:hover {
    color: #FF6600 !important;
}

/* Listas */
body.single-post .entry-content ul,
body.single-post .entry-content ol {
    margin: 0 0 24px 0 !important;
    padding-left: 26px !important;
}

body.single-post .entry-content li {
    margin-bottom: 8px !important;
}

/* Imágenes dentro del post */
body.single-post .entry-content img,
body.single-post .entry-content figure img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
    margin: 32px auto !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 24px rgba(10,37,64,0.10) !important;
}

/* Blockquote */
body.single-post .entry-content blockquote {
    margin: 34px 0 !important;
    padding: 22px 26px !important;
    background: #F9FAFB !important;
    border-left: 4px solid #FF6600 !important;
    border-radius: 0 12px 12px 0 !important;
}

body.single-post .entry-content blockquote p {
    color: #0A2540 !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    font-style: italic !important;
    margin: 0 !important;
}


/* =========================================================
   04. BLOG / ARCHIVE — RESET GENERAL
========================================================= */

/* Fondo general */
body.blog,
body.archive,
body.category,
body.tag,
body.blog #page,
body.archive #page,
body.category #page,
body.tag #page,
body.blog .site,
body.archive .site,
body.category .site,
body.tag .site,
body.blog #content,
body.archive #content,
body.category #content,
body.tag #content,
body.blog .site-content,
body.archive .site-content,
body.category .site-content,
body.tag .site-content {
    background: #ffffff !important;
}

/* Contenedor principal */
body.blog #content > .ast-container,
body.archive #content > .ast-container,
body.category #content > .ast-container,
body.tag #content > .ast-container {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    background: #ffffff !important;
    box-sizing: border-box !important;
}

/* Área principal */
body.blog #primary,
body.archive #primary,
body.category #primary,
body.tag #primary,
body.blog #main,
body.archive #main,
body.category #main,
body.tag #main,
body.blog .site-main,
body.archive .site-main,
body.category .site-main,
body.tag .site-main {
    width: 100% !important;
    max-width: none !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
    display: block !important;
    box-sizing: border-box !important;
}

/* Quitar sidebar */
body.blog #secondary,
body.archive #secondary,
body.category #secondary,
body.tag #secondary,
body.blog .widget-area,
body.archive .widget-area,
body.category .widget-area,
body.tag .widget-area {
    display: none !important;
}


/* =========================================================
   05. BLOG / ARCHIVE — HERO
========================================================= */

/* Hero simulado para /blog cuando Astra no imprime page-header */
body.blog .site-main::before {
    content: "Blog";
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 150px calc((100% - 880px) / 2) 74px !important;
    background: linear-gradient(135deg, #061626 0%, #0A2540 58%, #061626 100%) !important;
    color: #ffffff !important;
    font-size: clamp(34px, 4vw, 58px) !important;
    line-height: 1.08 !important;
    font-weight: 700 !important;
    letter-spacing: -0.045em !important;
    box-sizing: border-box !important;
    border-bottom: 3px solid transparent !important;
    background-image:
        linear-gradient(135deg, #061626 0%, #0A2540 58%, #061626 100%),
        linear-gradient(90deg, transparent, #5CC8FF 25%, #FF6600 55%, transparent) !important;
    background-origin: border-box !important;
    background-clip: padding-box, border-box !important;
}

/* Ocultar page-header nativo si aparece duplicado */
body.blog .page-header {
    display: none !important;
}

/* Archives/categorías si tienen page-header */
body.archive .page-header,
body.category .page-header,
body.tag .page-header {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 150px 0 74px !important;
    background: linear-gradient(135deg, #061626 0%, #0A2540 58%, #061626 100%) !important;
    position: relative !important;
    box-sizing: border-box !important;
}

body.archive .page-header::after,
body.category .page-header::after,
body.tag .page-header::after {
    content: "" !important;
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    height: 3px !important;
    background: linear-gradient(90deg, transparent, #5CC8FF 25%, #FF6600 55%, transparent) !important;
    opacity: 0.55 !important;
}

body.archive .page-title,
body.category .page-title,
body.tag .page-title {
    max-width: 880px !important;
    margin: 0 auto !important;
    padding: 0 32px !important;
    color: #ffffff !important;
    font-size: clamp(34px, 4vw, 58px) !important;
    line-height: 1.08 !important;
    font-weight: 700 !important;
    letter-spacing: -0.045em !important;
    text-align: left !important;
}


/* =========================================================
   06. BLOG / ARCHIVE — GRID
========================================================= */

/* Grid */
body.blog .site-main .ast-row,
body.archive .site-main .ast-row,
body.category .site-main .ast-row,
body.tag .site-main .ast-row {
    width: 100% !important;
    max-width: 1320px !important;
    margin: 0 auto !important;
    padding: 72px 32px 90px !important;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 32px !important;
    background: #ffffff !important;
    box-sizing: border-box !important;
}

/* Reset de columnas Astra */
body.blog .site-main .ast-row > article,
body.archive .site-main .ast-row > article,
body.category .site-main .ast-row > article,
body.tag .site-main .ast-row > article,
body.blog .ast-grid-common-col,
body.archive .ast-grid-common-col,
body.category .ast-grid-common-col,
body.tag .ast-grid-common-col,
body.blog .ast-width-md-4,
body.archive .ast-width-md-4,
body.category .ast-width-md-4,
body.tag .ast-width-md-4,
body.blog .ast-width-sm-6,
body.archive .ast-width-sm-6,
body.category .ast-width-sm-6,
body.tag .ast-width-sm-6 {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    float: none !important;
    clear: none !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

/* Card */
body.blog .ast-article-post,
body.archive .ast-article-post,
body.category .ast-article-post,
body.tag .ast-article-post {
    width: 100% !important;
    min-width: 0 !important;
    background: #ffffff !important;
    border: 1px solid #E5E7EB !important;
    border-radius: 18px !important;
    box-shadow: 0 10px 32px rgba(10,37,64,0.08) !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease !important;
}

body.blog .ast-article-post:hover,
body.archive .ast-article-post:hover,
body.category .ast-article-post:hover,
body.tag .ast-article-post:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 18px 48px rgba(10,37,64,0.14) !important;
    border-color: rgba(92,200,255,0.35) !important;
}

/* Reset internos */
body.blog .ast-article-inner,
body.archive .ast-article-inner,
body.category .ast-article-inner,
body.tag .ast-article-inner,
body.blog .blog-layout-4,
body.archive .blog-layout-4,
body.category .blog-layout-4,
body.tag .blog-layout-4,
body.blog .post-content,
body.archive .post-content,
body.category .post-content,
body.tag .post-content {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    display: block !important;
    background: transparent !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

/* Evitar texto vertical */
body.blog .entry-title,
body.archive .entry-title,
body.category .entry-title,
body.tag .entry-title,
body.blog .entry-title a,
body.archive .entry-title a,
body.category .entry-title a,
body.tag .entry-title a,
body.blog .ast-excerpt-container,
body.archive .ast-excerpt-container,
body.category .ast-excerpt-container,
body.tag .ast-excerpt-container {
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
}


/* =========================================================
   07. BLOG / ARCHIVE — IMAGEN DESTACADA
========================================================= */

/* Ocultar imagen si el post no tiene destacada */
body.blog .ast-no-thumb .ast-blog-featured-section,
body.archive .ast-no-thumb .ast-blog-featured-section,
body.category .ast-no-thumb .ast-blog-featured-section,
body.tag .ast-no-thumb .ast-blog-featured-section {
    display: none !important;
}

/* Bloque superior de la card */
body.blog #content .ast-blog-featured-section,
body.archive #content .ast-blog-featured-section,
body.category #content .ast-blog-featured-section,
body.tag #content .ast-blog-featured-section {
    display: block !important;
    position: relative !important;
    width: 100% !important;
    height: 300px !important;
    max-height: 300px !important;
    padding: 18px !important;
    margin: 0 !important;
    overflow: hidden !important;
    background: linear-gradient(135deg, #061626 0%, #0A2540 65%, #10283d 100%) !important;
    border-radius: 18px 18px 0 0 !important;
    border-bottom: 1px solid rgba(92,200,255,0.32) !important;
    box-sizing: border-box !important;
}

/* Link / wrapper interno */
body.blog #content .ast-blog-featured-section > a,
body.archive #content .ast-blog-featured-section > a,
body.category #content .ast-blog-featured-section > a,
body.tag #content .ast-blog-featured-section > a,
body.blog #content .ast-blog-featured-section .post-thumb,
body.archive #content .ast-blog-featured-section .post-thumb,
body.category #content .ast-blog-featured-section .post-thumb,
body.tag #content .ast-blog-featured-section .post-thumb,
body.blog #content .ast-blog-featured-section .post-thumb-img-content,
body.archive #content .ast-blog-featured-section .post-thumb-img-content,
body.category #content .ast-blog-featured-section .post-thumb-img-content,
body.tag #content .ast-blog-featured-section .post-thumb-img-content {
    display: block !important;
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: #ffffff !important;
    border-radius: 14px !important;
    border: 2px solid rgba(92,200,255,0.42) !important;
    box-shadow: 0 14px 36px rgba(0,0,0,0.22) !important;
    box-sizing: border-box !important;
}

/* Imagen */
body.blog #content .ast-blog-featured-section img,
body.archive #content .ast-blog-featured-section img,
body.category #content .ast-blog-featured-section img,
body.tag #content .ast-blog-featured-section img,
body.blog #content .post-thumb-img-content img,
body.archive #content .post-thumb-img-content img,
body.category #content .post-thumb-img-content img,
body.tag #content .post-thumb-img-content img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    min-width: 100% !important;
    min-height: 100% !important;
    object-fit: cover !important;
    object-position: center center !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 12px !important;
    box-shadow: none !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Separación limpia entre imagen y contenido */
body.blog #content .ast-blog-featured-section + .post-content,
body.archive #content .ast-blog-featured-section + .post-content,
body.category #content .ast-blog-featured-section + .post-content,
body.tag #content .ast-blog-featured-section + .post-content {
    margin-top: 0 !important;
}


/* =========================================================
   08. BLOG / ARCHIVE — CONTENIDO DE CARDS
========================================================= */

/* Categoría */
body.blog .ast-taxonomy-container,
body.archive .ast-taxonomy-container,
body.category .ast-taxonomy-container,
body.tag .ast-taxonomy-container {
    padding: 22px 24px 0 !important;
    margin: 0 !important;
}

body.blog .ast-taxonomy-container a,
body.archive .ast-taxonomy-container a,
body.category .ast-taxonomy-container a,
body.tag .ast-taxonomy-container a {
    display: inline-flex !important;
    color: #2F86C4 !important;
    background: rgba(47,134,196,0.10) !important;
    border-radius: 999px !important;
    padding: 4px 10px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.08em !important;
    text-decoration: none !important;
}

/* Título */
body.blog h2.entry-title,
body.archive h2.entry-title,
body.category h2.entry-title,
body.tag h2.entry-title {
    margin: 0 !important;
    padding: 16px 24px 10px !important;
    color: #0A2540 !important;
    font-size: 22px !important;
    line-height: 1.25 !important;
    font-weight: 700 !important;
    letter-spacing: -0.03em !important;
}

body.blog h2.entry-title a,
body.archive h2.entry-title a,
body.category h2.entry-title a,
body.tag h2.entry-title a {
    color: #0A2540 !important;
    text-decoration: none !important;
}

body.blog h2.entry-title a:hover,
body.archive h2.entry-title a:hover,
body.category h2.entry-title a:hover,
body.tag h2.entry-title a:hover {
    color: #2F86C4 !important;
}

/* Meta */
body.blog .entry-meta,
body.archive .entry-meta,
body.category .entry-meta,
body.tag .entry-meta,
body.blog .ast-blog-meta-container,
body.archive .ast-blog-meta-container,
body.category .ast-blog-meta-container,
body.tag .ast-blog-meta-container {
    display: none !important;
}

/* Extracto */
body.blog .ast-excerpt-container,
body.archive .ast-excerpt-container,
body.category .ast-excerpt-container,
body.tag .ast-excerpt-container {
    padding: 0 24px 24px !important;
    margin: 0 !important;
}

body.blog .ast-excerpt-container p,
body.archive .ast-excerpt-container p,
body.category .ast-excerpt-container p,
body.tag .ast-excerpt-container p {
    color: #4B5563 !important;
    font-size: 16px !important;
    line-height: 1.68 !important;
    margin: 0 !important;
}

/* Leer más */
body.blog .more-link,
body.archive .more-link,
body.category .more-link,
body.tag .more-link {
    display: inline-flex !important;
    margin: 0 24px 26px !important;
    padding: 9px 18px !important;
    border-radius: 999px !important;
    background: rgba(255,102,0,0.08) !important;
    color: #FF6600 !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
}

body.blog .more-link:hover,
body.archive .more-link:hover,
body.category .more-link:hover,
body.tag .more-link:hover {
    background: rgba(255,102,0,0.16) !important;
    color: #e05500 !important;
}


/* =========================================================
   09. RESPONSIVE
========================================================= */

@media (max-width: 1024px) {
    body.blog .site-main .ast-row,
    body.archive .site-main .ast-row,
    body.category .site-main .ast-row,
    body.tag .site-main .ast-row {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 768px) {
    /* Single post */
    body.single-post .entry-header {
        padding: 120px 0 50px !important;
    }

    body.single-post .entry-header .entry-title {
        padding: 0 20px !important;
        font-size: clamp(30px, 9vw, 42px) !important;
    }

    body.single-post .entry-content {
        padding: 40px 20px 64px !important;
    }

    body.single-post .entry-content p,
    body.single-post .entry-content li {
        font-size: 17px !important;
    }

    /* Blog hero */
    body.blog .site-main::before {
        padding: 120px 20px 50px !important;
        font-size: clamp(30px, 9vw, 42px) !important;
    }

    body.archive .page-header,
    body.category .page-header,
    body.tag .page-header {
        padding: 120px 0 50px !important;
    }

    body.archive .page-title,
    body.category .page-title,
    body.tag .page-title {
        padding: 0 20px !important;
        font-size: clamp(30px, 9vw, 42px) !important;
    }

    /* Blog grid */
    body.blog .site-main .ast-row,
    body.archive .site-main .ast-row,
    body.category .site-main .ast-row,
    body.tag .site-main .ast-row {
        grid-template-columns: 1fr !important;
        padding: 48px 20px 72px !important;
        gap: 24px !important;
    }

    /* Imagen destacada */
    body.blog #content .ast-blog-featured-section,
    body.archive #content .ast-blog-featured-section,
    body.category #content .ast-blog-featured-section,
    body.tag #content .ast-blog-featured-section {
        height: 240px !important;
        max-height: 240px !important;
        padding: 14px !important;
    }
}