/* ===========================
   CONVENIOS – estilo general
   =========================== */
:root {
    --cv-primary: #1b4fd6;
    --cv-primary-900: #122a63;
    --cv-ink: #101323;
    --cv-muted: #5b667d;
    --cv-card: #fff;
    --cv-brd: rgba(20, 20, 43, .08);
    --cv-bg: #f7f8fb;
    --cv-shadow: 0 18px 50px rgba(0, 0, 0, .08);
}

/* Container más ancho SOLO aquí */
.cv-wrap .container {
    max-width: 1500px;
    /* antes 1140px */
    margin: 0 auto;
    padding: 0 16px;
}

/* ===== HERO ===== */
.cv-hero {
    position: relative;
    color: #fff;
    padding: clamp(56px, 7vw, 96px) 0;
    overflow: hidden;
    background: none;
}

.cv-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(1200px 400px at -10% -20%, rgba(255, 255, 255, .10), transparent 60%),
        linear-gradient(135deg, var(--cv-primary-900), var(--cv-primary));
}

.cv-hero .container {
    position: relative;
    z-index: 1;
}

.cv-title {
    font-weight: 900;
    font-size: clamp(32px, 5vw, 52px);
    margin: 0 0 .4rem;
}

.cv-lead {
    color: #eaf2ff;
    max-width: 70ch;
    margin: 0;
}

/* ===== SECTION ===== */
.cv-section {
    background: var(--cv-bg);
    padding: clamp(28px, 5vw, 56px) 0;
}

.cv-head h2 {
    margin: .1rem 0 .75rem;
    font-weight: 900;
    font-size: 1.8rem;
}

.cv-head p {
    color: var(--cv-muted);
    margin: 0 0 1.2rem;
    font-size: 1rem;
}

/* ===== GRID 1→2→3→4→5 ===== */
.cv-grid {
    display: grid;
    grid-template-columns: 1fr;
    /* móvil */
    gap: 22px;
}

@media (min-width:576px) {
    .cv-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width:900px) {
    .cv-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width:1200px) {
    .cv-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width:1400px) {
    .cv-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* ===== CARD ===== */
.cv-card {
    background: var(--cv-card);
    border: 1px solid var(--cv-brd);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--cv-shadow);
    display: grid;
    grid-template-rows: auto 1fr;
    transition: transform .2s ease, box-shadow .2s ease;
}

.cv-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 22px 60px rgba(0, 0, 0, .12);
}

/* Thumbnail más alto (mejor presencia visual) */
.cv-thumb {
    aspect-ratio: 4 / 3;
    /* antes 16/9 */
    overflow: hidden;
    background: #f0f3fa;
}

.cv-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* fotos */
    display: block;
}

/* Logos sin recorte */
.cv-thumb--logo {
    background: #122a63;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cv-thumb--logo img {
    width: 90%;
    height: 90%;
    object-fit: contain;
    /* mantiene proporciones del logo */
    padding: 8px;
}

/* Cuerpo de la tarjeta */
.cv-body {
    padding: 16px;
}

.cv-badge {
    display: inline-block;
    padding: .22rem .5rem;
    border-radius: 999px;
    font-weight: 800;
    font-size: .72rem;
    color: #fff;
    background: var(--cv-primary);
    margin-bottom: .35rem;
}

.cv-badge--local {
    background: #0f7a00;
}

.cv-card__title {
    margin: .1rem 0 .25rem;
    font-weight: 700;
    font-size: 1.1rem;
    line-height: 1.25;
}

.cv-meta {
    margin: 0 0 .5rem;
    color: #7a8397;
    font-size: .92rem;
}

.cv-text {
    margin: 0 0 .55rem;
    color: #364057;
    font-size: .98rem;
}

.cv-link {
    display: inline-block;
    font-weight: 800;
    color: var(--cv-primary);
    text-decoration: none;
}

.cv-link:hover {
    text-decoration: underline;
}

/* Opcional: un pelín más de ancho en ultra-wide */
@media (min-width:1600px) {
    .cv-wrap .container {
        max-width: 1600px;
    }
}