#subheader h1 {
    max-width: min(100%, 610px);
    overflow-wrap: anywhere;
}

.blog-content {
    color: #24334f;
    font-size: 1.05rem;
    line-height: 1.8;
}

.blog-content h2,
.blog-content h3,
.blog-content h4 {
    color: #15294a;
    margin-top: 1.8em;
}

.blog-content a { color: #3275e8; text-decoration: underline; }
.blog-content blockquote { border-left: 4px solid #4887ef; margin: 1.5rem 0; padding: .8rem 1.2rem; background: #f4f8ff; }

.blog-author,
.blog-post-byline {
    align-items: center;
    display: flex;
    gap: .7rem;
}

.blog-author {
    color: #40516d;
    font-size: .9rem;
    font-weight: 600;
}

.blog-post-byline {
    justify-content: space-between;
    flex-wrap: wrap;
}

.blog-author-avatar {
    align-items: center;
    background: linear-gradient(135deg, #e7f0ff, #f4f8ff);
    border-radius: 50%;
    display: inline-flex;
    height: 2.5rem;
    justify-content: center;
    overflow: hidden;
    width: 2.5rem;
}

.blog-post-byline .blog-author-avatar { height: 3rem; width: 3rem; }
.blog-author-avatar img { height: 100%; object-fit: cover; width: 100%; }

/* La barra lateral conserva una retícula estable sin depender de cada imagen o título. */
.blog-sidebar-list > li {
    position: relative;
    min-height: 6.25rem;
}

.blog-sidebar-list .d-image {
    width: 5rem;
    height: 5rem;
    border-radius: .8rem;
}

.blog-sidebar-list .d-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-sidebar-list .d-content {
    min-height: 6.25rem;
    margin-bottom: .85rem;
    padding-bottom: 1rem;
    padding-left: 6.25rem;
}

.blog-sidebar-list .d-content h4 {
    display: -webkit-box;
    min-height: 2.9em;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

/* Navegación editorial: el estado activo se distingue sin deformar el primer botón. */
.pagination {
    gap: .35rem;
    align-items: center;
}

.pagination .page-item .page-link {
    width: 2.75rem;
    height: 2.75rem;
    margin: 0;
    padding: 0;
    display: inline-grid;
    place-items: center;
    border: 1px solid #d9e4f6;
    border-radius: .8rem;
    color: #21395f;
    background: #fff;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 4px 14px rgba(40, 80, 140, .06);
    transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.pagination .page-item:not(.active):not(.disabled) .page-link:hover,
.pagination .page-item:not(.active):not(.disabled) .page-link:focus-visible {
    color: #1768db;
    border-color: #78a7ef;
    background: #f4f8ff;
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(40, 80, 140, .12);
}

.pagination .page-item.active .page-link {
    color: #fff;
    border-color: #3479e8;
    background: linear-gradient(135deg, #3479e8, #5b9af7);
    box-shadow: 0 8px 18px rgba(52, 121, 232, .25);
}

.pagination .page-item.disabled .page-link {
    width: auto;
    min-width: 2rem;
    border-color: transparent;
    background: transparent;
    box-shadow: none;
    color: #71829e;
}

@media (max-width: 991px) {
    #subheader h1 { max-width: 100%; }
}
.blog-content pre { background: #0b0d12; border: 1px solid #242a35; border-radius: 10px; color: #fff; margin: 1.75rem 0; overflow-x: auto; padding: 1.5rem 2rem; }
.blog-content pre code { color: inherit; font-size: .95rem; white-space: pre; }
.blog-content img { display:block; height:auto; margin:1.75rem auto; max-width:100%; border-radius:10px; }
.blog-video { aspect-ratio:16/9; margin:2rem 0; overflow:hidden; border-radius:10px; background:#0b0d12; }
.blog-video iframe { border:0; width:100%; height:100%; }
