/* CirugiaNexa — Blog público */

.blog-hero h1 {
    color: #1a202c;
}

.blog-content {
    line-height: 1.8;
    color: #2d3748;
}

.blog-content h1,
.blog-content h2,
.blog-content h3,
.blog-content h4,
.blog-content h5,
.blog-content h6 {
    margin-top: 2.2em;
    margin-bottom: 0.6em;
    color: #1a202c;
    font-weight: 700;
}

.blog-content h2 { font-size: 1.75rem; }
.blog-content h3 { font-size: 1.4rem; }
.blog-content h4 { font-size: 1.2rem; }

.blog-content p {
    margin-bottom: 1.2em;
}

.blog-content a {
    color: #00b8a9;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.blog-content a:hover {
    color: #007e74;
}

.blog-content ul,
.blog-content ol {
    padding-left: 1.5em;
    margin-bottom: 1.2em;
}

.blog-content ul li,
.blog-content ol li {
    margin-bottom: 0.4em;
}

.blog-content blockquote {
    border-left: 4px solid #00b8a9;
    padding: 0.5em 1.2em;
    margin: 1.6em 0;
    background: #f0fdfa;
    color: #2d3748;
    border-radius: 0 8px 8px 0;
    font-style: italic;
}

.blog-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5em 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.blog-content code {
    background: #f1f5f9;
    color: #be123c;
    padding: 0.15em 0.35em;
    border-radius: 4px;
    font-size: 0.9em;
}

.blog-content pre {
    background: #1a202c;
    color: #e2e8f0;
    padding: 1.2em;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5em 0;
}

.blog-content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}

.blog-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
}

.blog-content th,
.blog-content td {
    border: 1px solid #e2e8f0;
    padding: 0.6em 0.9em;
    text-align: left;
}

.blog-content th {
    background: #f8f9fa;
    font-weight: 600;
}

/* Pagination — pinta el activo en color de marca */
.pagination .page-item.active .page-link {
    background-color: #00b8a9;
    border-color: #00b8a9;
}

.pagination .page-link {
    color: #00b8a9;
}

.pagination .page-link:hover {
    color: #007e74;
    background-color: #f0fdfa;
}

/* ======================================================================
   Componentes premium del post individual (prefijo cn- para no chocar
   con Bootstrap ni con .blog-content). Inspirado estructuralmente en
   patrones de blogs profesionales (TOC, cajas de color, FAQ, CTAs),
   adaptado por completo a la identidad de marca de CirugiaNexa.
   ====================================================================== */

/* --- Barra de estadísticas del post (debajo del header) --- */
.cn-stats-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: #e2e8f0;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    margin: 28px 0;
}
.cn-stat-item {
    background: #fff;
    padding: 18px 12px;
    text-align: center;
}
.cn-stat-item__value {
    font-size: 26px;
    font-weight: 800;
    color: #00b8a9;
    line-height: 1.1;
}
.cn-stat-item__label {
    font-size: 12px;
    color: #64748b;
    margin-top: 4px;
}

/* --- Tabla de contenidos --- */
.cn-toc {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px 28px;
    margin: 32px 0;
}
.cn-toc__title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #1a202c;
    margin-bottom: 14px;
}
.cn-toc__list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px 24px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.cn-toc__list a {
    display: flex;
    align-items: baseline;
    gap: 10px;
    text-decoration: none;
    color: #2d3748;
    font-size: 14px;
    padding: 4px 0;
}
.cn-toc__list a:hover { color: #00b8a9; }
.cn-toc__num {
    color: #00b8a9;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}

/* --- Cajas informativas (6 variantes) --- */
.cn-box {
    border-left: 4px solid #00b8a9;
    background: #f0fdfa;
    border-radius: 0 16px 16px 0;
    padding: 20px 24px;
    margin: 28px 0;
}
.cn-box p:last-child { margin-bottom: 0; }
.cn-box__title {
    font-weight: 700;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.cn-box--info { border-color: #3B82F6; background: #eff6ff; }
.cn-box--info .cn-box__title { color: #1d4ed8; }
.cn-box--tip { border-color: #00b8a9; background: #f0fdfa; }
.cn-box--tip .cn-box__title { color: #007e74; }
.cn-box--warning { border-color: #F59E0B; background: #fffbeb; }
.cn-box--warning .cn-box__title { color: #b45309; }
.cn-box--success { border-color: #10B981; background: #ecfdf5; }
.cn-box--success .cn-box__title { color: #047857; }
.cn-box--danger { border-color: #EF4444; background: #fef2f2; }
.cn-box--danger .cn-box__title { color: #b91c1c; }
.cn-box--highlight { border-color: #8B5CF6; background: #f5f3ff; }
.cn-box--highlight .cn-box__title { color: #6d28d9; }

/* --- Grid de estadísticas dentro del contenido --- */
.cn-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 28px 0;
}
.cn-stat-grid--4 { grid-template-columns: repeat(4, 1fr); }
.cn-stat-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
    text-align: center;
}
.cn-stat-card__number {
    font-size: 30px;
    font-weight: 800;
    color: #00b8a9;
    line-height: 1.1;
}
.cn-stat-card__label {
    font-size: 13px;
    color: #64748b;
    margin-top: 6px;
}

/* --- Grid de tarjetas de contenido (comparativas/beneficios) --- */
.cn-content-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin: 28px 0;
}
.cn-content-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 22px;
}
.cn-content-card__icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    margin-bottom: 12px;
    font-size: 16px;
}
.cn-content-card__icon--teal { background: #00b8a9; }
.cn-content-card__icon--blue { background: #3B82F6; }
.cn-content-card__icon--amber { background: #F59E0B; }
.cn-content-card__icon--purple { background: #8B5CF6; }
.cn-content-card h4 { margin-top: 0 !important; }

/* --- Lista de pasos numerada --- */
.cn-step-list {
    list-style: none;
    counter-reset: cn-step;
    margin: 28px 0;
    padding: 0;
}
.cn-step-list li {
    counter-increment: cn-step;
    position: relative;
    padding: 4px 0 4px 46px;
    margin-bottom: 18px;
}
.cn-step-list li::before {
    content: counter(cn-step);
    position: absolute;
    left: 0;
    top: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #00b8a9;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- Checklist --- */
.cn-checklist { list-style: none; margin: 28px 0; padding: 0; }
.cn-checklist li {
    position: relative;
    padding: 2px 0 10px 32px;
}
.cn-checklist li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    top: 1px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ecfdf5;
    color: #10B981;
    font-weight: 700;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- Cita destacada --- */
.cn-quote-card {
    position: relative;
    background: #f8fafc;
    border-radius: 16px;
    padding: 28px 32px;
    margin: 28px 0;
    font-size: 18px;
    font-style: italic;
    color: #1a202c;
}
.cn-quote-card::before {
    content: "\201C";
    position: absolute;
    top: -4px;
    left: 16px;
    font-size: 64px;
    color: #00b8a9;
    opacity: .25;
    font-style: normal;
    font-family: Georgia, serif;
}
.cn-quote-card cite {
    display: block;
    margin-top: 10px;
    font-size: 13px;
    font-style: normal;
    color: #64748b;
}

/* --- FAQ acordeón (CSS-only) --- */
.cn-faq-list { margin: 28px 0; }
.cn-faq-item {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 10px;
    overflow: hidden;
}
.cn-faq-question {
    margin: 0 !important;
    padding: 16px 20px !important;
    font-size: 16px !important;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #f8fafc;
}
.cn-faq-question::after {
    content: "+";
    font-size: 20px;
    color: #00b8a9;
    flex-shrink: 0;
    transition: transform .2s ease;
}
.cn-faq-item.active .cn-faq-question::after { transform: rotate(45deg); }
.cn-faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height .25s ease;
    padding: 0 20px;
}
.cn-faq-item.active .cn-faq-answer {
    max-height: 600px;
    padding: 4px 20px 18px;
}
.cn-faq-answer p:last-child { margin-bottom: 0; }

/* --- CTA dentro del artículo (intermedio y final) --- */
.cn-cta {
    background: linear-gradient(135deg, #0f172a 0%, #1a2744 100%);
    border-radius: 20px;
    padding: 36px 40px;
    margin: 40px 0;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}
.cn-cta__text h3 {
    color: #fff !important;
    margin: 0 0 6px !important;
    font-size: 22px !important;
}
.cn-cta__text p {
    color: rgba(255,255,255,.75);
    margin: 0;
    font-size: 14px;
}
.cn-cta__button {
    background: #00b8a9;
    color: #fff !important;
    border: none;
    padding: 14px 28px;
    border-radius: 999px;
    font-weight: 700;
    text-decoration: none !important;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background .2s ease;
}
.cn-cta__button:hover { background: #007e74; color: #fff !important; }

/* --- Autor del artículo --- */
.cn-author-box {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #f8fafc;
    border-radius: 16px;
    padding: 20px 24px;
    margin: 32px 0;
}
.cn-author-box__avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #00b8a9;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    flex-shrink: 0;
}
.cn-author-box__name { font-weight: 700; color: #1a202c; }
.cn-author-box__role { font-size: 13px; color: #64748b; }

/* --- Artículos relacionados (grid sin imagen, foco en el título) --- */
.cn-related { margin: 8px 0; }
.cn-related-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
.cn-related-card {
    display: block;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 22px;
    text-decoration: none;
    transition: border-color .2s ease, transform .2s ease;
}
.cn-related-card:hover {
    border-color: #00b8a9;
    transform: translateY(-2px);
}
.cn-related-card__category {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #00b8a9;
}
.cn-related-card__title {
    font-size: 16px;
    font-weight: 700;
    color: #1a202c;
    margin: 6px 0 6px;
}
.cn-related-card__excerpt {
    font-size: 13px;
    color: #64748b;
    margin: 0;
}

/* --- Navegación anterior/siguiente --- */
.cn-post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 32px 0;
}
.cn-post-nav__link {
    display: block;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 18px 20px;
    text-decoration: none;
    transition: border-color .2s ease;
}
.cn-post-nav__link:hover { border-color: #00b8a9; }
.cn-post-nav__link--next { text-align: right; }
.cn-post-nav__label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #94a3b8;
    display: block;
    margin-bottom: 4px;
}
.cn-post-nav__title {
    font-size: 14px;
    font-weight: 700;
    color: #1a202c;
}

@media (max-width: 768px) {
    .cn-stats-bar { grid-template-columns: repeat(2, 1fr); }
    .cn-toc__list { grid-template-columns: 1fr; }
    .cn-stat-grid,
    .cn-stat-grid--4,
    .cn-content-grid { grid-template-columns: 1fr; }
    .cn-related-grid { grid-template-columns: 1fr; }
    .cn-post-nav { grid-template-columns: 1fr; }
    .cn-post-nav__link--next { text-align: left; }
    .cn-cta { flex-direction: column; align-items: flex-start; text-align: left; }
    .cn-author-box { flex-direction: column; text-align: center; }
}
