/* ============================================================
   Página: Blog
   Colores institucionales: #00C1D7, #005481, #FFC700, #FFFFFF
   ============================================================ */

body {
    background-color: #F8F9FA;
}

/* ------- Artículo destacado (Hero) ------- */
.blog-featured {
    position: relative;
    color: #ffffff;
    min-height: 380px;
    display: flex;
    align-items: flex-end;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.blog-featured-media,
.blog-featured-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.blog-featured-media {
    display: block;
    pointer-events: none;
}

.blog-featured-media img {
    display: block;
    object-fit: cover;
    object-position: center;
}

.blog-featured::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 32, 55, 0.15) 0%, rgba(0, 40, 70, 0.85) 100%);
}

.blog-featured .blog-featured-inner {
    position: relative;
    z-index: 1;
    padding: 3rem 1.25rem 2.5rem;
    width: 100%;
}

.blog-featured .blog-hero-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.9rem;
}

.blog-featured .blog-hero-link {
    color: #ffffff;
    text-decoration: none;
}

.blog-featured .blog-hero-link:hover {
    color: #FFC700;
}

.blog-hero-more {
    color: #FFC700;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.blog-hero-more:hover {
    color: #ffffff;
}

.blog-post-title-link {
    color: #005481;
    text-decoration: none;
}

.blog-post-title-link:hover {
    color: #00C1D7;
}

.blog-featured .blog-hero-cat {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: #FFC700;
    color: #005481;
    font-weight: 700;
    font-size: 0.78rem;
    padding: 0.25rem 0.85rem;
    border-radius: 30px;
}

.blog-featured h1 {
    font-weight: 800;
    font-size: 2.2rem;
    max-width: 820px;
    line-height: 1.2;
    margin-bottom: 0.75rem;
}

.blog-featured p {
    max-width: 720px;
    opacity: 0.95;
    margin-bottom: 0.75rem;
}

.blog-readtime {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 600;
    opacity: 0.92;
}

/* ------- Barra de categorías ------- */
.blog-categories {
    background: #ffffff;
    border-bottom: 1px solid #eef2f6;
    padding: 1.25rem 0;
    box-shadow: 0 4px 16px rgba(0, 84, 129, 0.05);
    position: relative;
    z-index: 2;
}

.blog-cat-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: center;
}

.blog-cat-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #005481;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.blog-cat-btn i {
    color: #FFC700;
    font-size: 1.05rem;
}

.blog-cat-btn:hover {
    border-color: #00C1D7;
    background: #f0fbfd;
}

.blog-cat-btn.active {
    background: #005481;
    border-color: #005481;
    color: #ffffff;
}

.blog-cat-btn.active i {
    color: #FFC700;
}

/* ------- Sección listado ------- */
.blog-section {
    padding: 2.5rem 0 3.5rem;
}

.blog-list-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.75rem;
}

.blog-list-head h2 {
    color: #005481;
    font-weight: 800;
    font-size: 1.7rem;
    margin: 0;
}

.blog-search {
    position: relative;
    min-width: 280px;
    flex: 0 1 340px;
}

.blog-search input {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 0.7rem 2.6rem 0.7rem 1rem;
    font-size: 0.92rem;
    color: #334155;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.blog-search input:focus {
    border-color: #00C1D7;
    box-shadow: 0 0 0 3px rgba(0, 193, 215, 0.18);
}

.blog-search .blog-search-icon {
    position: absolute;
    right: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1.1rem;
}

/* ------- Tarjeta de artículo ------- */
.blog-post {
    background: #ffffff;
    border: 1px solid #eef2f6;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 84, 129, 0.07);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.blog-post:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 38px rgba(0, 84, 129, 0.15);
}

.blog-post-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.blog-post-body {
    padding: 1.35rem 1.4rem 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-post-body .blog-cat-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.7rem;
}

.blog-post-body .blog-cat-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(0, 193, 215, 0.12);
    color: #005481;
    font-weight: 700;
    font-size: 0.72rem;
    padding: 0.2rem 0.7rem;
    border-radius: 30px;
}

.blog-post-body h3 {
    color: #005481;
    font-weight: 700;
    font-size: 1.12rem;
    line-height: 1.35;
    margin-bottom: 0.6rem;
}

.blog-post-body p {
    color: #5b6675;
    font-size: 0.92rem;
    line-height: 1.65;
    margin-bottom: 1rem;
}

.blog-post-body .blog-post-meta {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 600;
    border-top: 1px solid #eef2f6;
    padding-top: 0.85rem;
}

.blog-post-body .blog-post-meta a {
    color: #005481;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.blog-post-body .blog-post-meta a:hover {
    color: #00C1D7;
}

/* ------- Sin resultados ------- */
.blog-empty {
    display: none;
    text-align: center;
    color: #64748b;
    padding: 3rem 1rem;
}

.blog-empty i {
    font-size: 2.5rem;
    color: #cbd5e1;
    display: block;
    margin-bottom: 0.5rem;
}

/* ------- Cargar más ------- */
.blog-load-more-wrap {
    text-align: center;
    margin-top: 2.25rem;
}

.blog-load-more {
    border: 1px solid #005481;
    background: #005481;
    color: #ffffff;
    border-radius: 999px;
    padding: 0.75rem 2.4rem;
    font-weight: 700;
    font-size: 0.95rem;
    transition: background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.blog-load-more:hover:not(:disabled) {
    background: #00C1D7;
    border-color: #00C1D7;
}

.blog-load-more:disabled {
    opacity: 0.65;
    cursor: wait;
}

.blog-load-more[hidden] {
    display: none;
}

/* Responsive */
@media (max-width: 767.98px) {
    .blog-featured h1 {
        font-size: 1.35rem;
    }

    .blog-list-head {
        flex-direction: column;
        align-items: stretch;
    }

    .blog-search {
        flex: 1 1 100%;
    }
}

@media (max-width: 575.98px) {
    .blog-featured h1 {
        font-size: 1.15rem;
        line-height: 1.25;
    }

    .blog-featured {
        min-height: 300px;
    }
}
