/* =============================================================
   BLOG — NAI Gaviria
   ============================================================= */

:root {
    --blog-rojo:   #E30723;
    --blog-titulo: 'CentenialLT', 'Georgia', serif;
    --blog-texto:  'Open Sans', sans-serif;
}

.cr-blog,
.cr-blog * {
    box-sizing: border-box;
}

/* Full bleed — rompe el contenedor de Elementor */
.cr-blog {
    font-family: var(--blog-texto);
    font-size: 16px;
    color: #111;
    line-height: normal;
    width: 100vw;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    overflow-x: hidden;
}

.elementor-widget-shortcode .elementor-widget-container {
    padding: 0 !important;
    margin:  0 !important;
    line-height: 0;
    font-size: 0;
}

/* ── BANNER ─────────────────────────────────────────────────── */
.cr-blog-banner {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 560px;
    background-color: #111;
    background-size: cover;
    background-position: center center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cr-blog-banner__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.38);
}

.cr-blog-banner__content {
    position: relative;
    z-index: 1;
    padding: 0 8%;
    text-align: center;
}

.cr-blog-banner__titulo-wrap {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
}

.cr-blog-banner__titulo {
    font-family: var(--blog-titulo);
    font-weight: 100;
    font-size: clamp(56px, 8vw, 100px);
    color: #fff;
    margin: 0 0 16px;
    line-height: 1.05;
    letter-spacing: -0.5px;
    white-space: nowrap;
}

.cr-blog-banner__linea {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--blog-rojo);
}

/* ── CUERPO ─────────────────────────────────────────────────── */
.cr-blog-body {
    background: #fff;
    padding-bottom: 80px;
}

.cr-blog-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 64px 48px 0;
}

/* ── GRID ───────────────────────────────────────────────────── */
.cr-blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 36px 28px;
}

/* ── CARD ───────────────────────────────────────────────────── */
.cr-blog-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    background: #fff;
    border: 1px solid #ebebeb;
    border-radius: 4px;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
}

.cr-blog-card:hover {
    box-shadow: 0 8px 28px rgba(0,0,0,0.10);
    transform: translateY(-3px);
    text-decoration: none;
    color: inherit;
}

.cr-blog-card__img {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f0f0f0;
    flex-shrink: 0;
}

.cr-blog-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.cr-blog-card:hover .cr-blog-card__img img {
    transform: scale(1.04);
}

.cr-blog-card__sin-img {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cr-blog-card__body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 20px 22px 22px;
    gap: 10px;
}

.cr-blog-card__titulo {
    font-family: var(--blog-titulo);
    font-weight: 400;
    font-size: 17px;
    line-height: 1.35;
    margin: 0;
    color: #111;
}

.cr-blog-card:hover .cr-blog-card__titulo {
    color: var(--blog-rojo);
}

.cr-blog-card__extracto {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    margin: 0;
    flex-grow: 1;
}

.cr-blog-card__leer {
    font-size: 13px;
    font-weight: 600;
    color: var(--blog-rojo);
    letter-spacing: 0.03em;
    text-transform: uppercase;
    margin-top: auto;
}

/* ── PAGINACIÓN ─────────────────────────────────────────────── */
.cr-blog-paginacion {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 56px;
}

.cr-blog-paginacion .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 14px;
    font-family: var(--blog-texto);
    color: #333;
    text-decoration: none;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.cr-blog-paginacion .page-numbers:hover,
.cr-blog-paginacion .page-numbers.current {
    background: var(--blog-rojo);
    color: #fff;
    border-color: var(--blog-rojo);
    text-decoration: none;
}

.cr-blog-vacio {
    color: #777;
    font-size: 15px;
    padding: 40px 0;
}

/* ── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 960px) {
    .cr-blog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 28px 20px;
    }
    .cr-blog-inner {
        padding: 48px 32px 0;
    }
}

@media (max-width: 600px) {
    .cr-blog-banner {
        height: 50vh;
        min-height: 280px;
    }
    .cr-blog-banner__content {
        padding: 0 6% 8%;
    }
    .cr-blog-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .cr-blog-inner {
        padding: 36px 20px 0;
    }
}
