/* ==========================================================
   dSoft Blog · estilos propios del blog
   (se cargan después de dsoft.css, que es el mismo del sitio)
   ========================================================== */

/* ---------- Encabezados ---------- */
.blog-hero .lead { margin-left: auto; margin-right: auto }
.blog-hero .finder { margin: 22px auto 0 }
.blog-hero .eyebrow { margin-bottom: 4px }
.blog-hero .prod-cta { justify-content: center }
.blog-banner { padding-bottom: 0 }
.blog-banner .slider { display: block }

.cat-chip { text-decoration: none }
.cat-chip.on {
    color: #fff;
    background: var(--btn-primary);
    border-color: var(--btn-primary)
}
.cat-chip.on span { color: #fff; background: rgba(255,255,255,.2) }

/* ---------- Tarjetas de artículo ---------- */
.pc {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    transition: transform .3s, box-shadow .3s, border-color .3s
}
.pc:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: color-mix(in srgb, var(--blue) 40%, var(--border))
}
.pc-im {
    display: block;
    aspect-ratio: 16/9;
    background: var(--bg-alt);
    overflow: hidden
}
.pc-im img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s
}
.pc:hover .pc-im img { transform: scale(1.05) }
.pc-sin-img {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    color: var(--link);
    background: var(--soft)
}
.pc-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 16px 18px
}
.pc-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    font-size: .75rem;
    color: var(--muted)
}
.pc-cat {
    padding: 2px 10px;
    border-radius: 999px;
    background: var(--soft);
    color: var(--link);
    font-weight: 600
}
.pc-cat:hover { background: var(--blue); color: #fff }
.pc-tit {
    font-size: .98rem;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: -.005em
}
.pc-tit a::after { content: ""; position: absolute; inset: 0 } /* toda la tarjeta es clic */
.pc-cat, .pc-meta a { position: relative; z-index: 1 }
.pc-res { color: var(--muted); font-size: .9rem }

/* Destacada (el más reciente) */
.pc-dest .pc-body { padding: 20px 24px 24px; gap: 10px }
.pc-dest .pc-tit { font-size: clamp(1.25rem, 2vw, 1.55rem); font-weight: 700; line-height: 1.25 }

/* En lista (los otros recientes) */
.pc-lista { flex-direction: row; align-items: stretch }
.pc-lista .pc-im { flex: 0 0 38%; aspect-ratio: auto; min-height: 110px }
.pc-lista .pc-body { justify-content: center }

/* Rejillas */
.pc-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px
}
.pc-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) }
.rec-grid {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 16px
}
.rec-lista { display: grid; gap: 12px }

@media (max-width:1199px) {
    .pc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) }
}
@media (max-width:991px) {
    .pc-grid, .pc-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)) }
    .rec-grid { grid-template-columns: 1fr }
}
@media (max-width:600px) {
    .pc-grid, .pc-grid-3 { grid-template-columns: 1fr }
    .pc-lista .pc-im { flex-basis: 34% }
}

/* ---------- Categorías destacadas ---------- */
.cat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px
}
@media (max-width:991px) { .cat-grid { grid-template-columns: 1fr } }
.cat-card {
    padding: 20px 22px 10px;
    border-radius: 22px;
    background: var(--surface);
    border: 1px solid var(--border)
}
.cat-card-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 10px
}
.cat-card-head h3 { flex: 1; font-size: 1.15rem; font-weight: 700 }
.cat-card-head > a { font-size: .8rem; font-weight: 600; color: var(--link); white-space: nowrap }
.cat-ic {
    flex: none;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, #0a80e6, var(--blue))
}
.cat-ic.verde { background: linear-gradient(135deg, #4cc65b, #2c9a3c) }
.cat-ic.rosa { background: linear-gradient(135deg, #fc4ceb, #8a2be2) }
.cat-card li a {
    display: block;
    padding: 10px 0;
    border-top: 1px solid var(--border)
}
.cat-card li a:hover strong { color: var(--link) }
.cat-card li strong { display: block; font-size: .9rem; font-weight: 600; line-height: 1.4 }
.cat-card li small { font-size: .75rem; color: var(--muted) }

/* ---------- Paginación ---------- */
.pag { margin-top: 28px }
.pag ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px }
.pag a, .pag span {
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    font-weight: 600;
    font-size: .9rem
}
.pag a:hover { border-color: var(--blue); color: var(--link) }
.pag .current { background: var(--btn-primary); border-color: var(--btn-primary); color: #fff }
.pag .dots { border: 0; background: none }
.pag svg { width: 18px; height: 18px }

/* ---------- Artículo ---------- */
.post-hero h1 { font-size: clamp(1.9rem, 3.6vw, 2.8rem) }
.post-hero .chip.live { margin-bottom: 14px }
.post-img {
    margin: 0;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border)
}
.post-img img { width: 100%; height: auto }

.post-wrap:has(.toc[hidden]) { grid-template-columns: minmax(0, 1fr) }
.toc[hidden] { display: none !important }
.toc a.sub { padding-left: 22px; font-size: .82rem }
.post-col { min-width: 0; display: grid; gap: 24px; max-width: 860px }

.post-body {
    padding: 32px 36px;
    border-radius: 26px;
    background: var(--surface);
    border: 1px solid var(--border);
    overflow-wrap: break-word
}
@media (max-width:640px) { .post-body { padding: 22px 18px } }
.post-body h2, .post-body h3, .post-body h4 {
    font-weight: 700;
    letter-spacing: -.01em;
    line-height: 1.3;
    scroll-margin-top: calc(var(--nav-h) + 30px)
}
.post-body h2 { font-size: 1.35rem; margin-top: 32px }
.post-body h3 { font-size: 1.15rem; margin-top: 26px }
.post-body img { border-radius: 16px; height: auto }
.post-body figure { margin: 20px 0 }
.post-body figcaption { font-size: .8rem; color: var(--muted); text-align: center; margin-top: 6px }
.post-body ol { list-style: decimal; margin-left: 22px }
.post-body ol li { margin-top: 6px }
.post-body ul ul, .post-body ol ul { margin-top: 6px }
.post-body blockquote {
    margin: 20px 0;
    padding: 18px 22px;
    border-radius: 18px;
    background: var(--soft);
    border-left: 4px solid var(--blue)
}
.post-body table {
    width: 100%;
    border-collapse: collapse;
    font-size: .9rem;
    display: block;
    overflow-x: auto
}
.post-body th, .post-body td { padding: 10px 12px; border: 1px solid var(--border); text-align: left }
.post-body th { background: var(--bg-alt) }
.post-body strong, .post-body b { font-weight: 600 }
.post-body iframe { max-width: 100%; border-radius: 16px }
.post-body.pagina { max-width: 900px; margin: 0 auto }

.post-tags { display: flex; flex-wrap: wrap; gap: 8px }
.post-tags a {
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    font-size: .8rem;
    font-weight: 500
}
.post-tags a:hover { color: var(--link); border-color: var(--blue) }

.post-cta { grid-template-columns: 1.4fr auto }
.post-cta-btns { display: flex; flex-direction: column; gap: 10px }
.post-cta-btns .btn { margin-top: 0 }

.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 12px }
.post-nav .sig { grid-column: 2; justify-content: flex-end; text-align: right }
@media (max-width:640px) {
    .post-nav { grid-template-columns: 1fr }
    .post-nav .sig { grid-column: auto }
}

/* Mientras Elementor siga instalado: que su contenido respete los colores del tema */
.post-body .elementor-heading-title, .post-body .elementor-widget-text-editor { color: inherit; font-family: var(--font) }
.post-body .elementor-section-boxed > .elementor-container { max-width: 100% }
.post-cta .btn-glass { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.45) }

/* Tarjeta del sistema (API de dsoft.mx) */
.post-sis + .post-sis { margin-top: 14px }
.post-sis-info { display: flex; gap: 18px; align-items: center }
.post-sis-logo { flex: 0 0 76px; width: 76px; height: 76px; border-radius: 18px; background: #fff; display: grid; place-items: center; box-shadow: 0 6px 18px rgba(0,0,0,.15) }
.post-sis-logo img { width: 58px; height: 58px; object-fit: contain }
@media (max-width:640px) { .post-sis-info { flex-direction: column; align-items: flex-start } }
