/* Novedades de los centros (feeds RSS de sus sitios, ver NovedadesCentrosService) */

.novedades-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
    gap: 1.5rem;
}

.novedad {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.novedad:hover,
.novedad:focus-visible {
    border-color: #b9cbe2;
    box-shadow: 0 8px 20px rgba(40, 74, 116, 0.12);
    transform: translateY(-2px);
}

.novedad:focus-visible {
    outline: 2px solid #284a74;
    outline-offset: 2px;
}

.novedad__imagen {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #eef2f7;
}

.novedad__imagen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Muchas entradas traen flyers con el título arriba: recortar desde arriba lo conserva */
    object-position: center top;
    transition: transform 0.3s;
}

.novedad:hover .novedad__imagen img {
    transform: scale(1.03);
}

/* Sin imagen en el feed (p. ej. IDH): la sigla del centro sobre el azul del portal */
.novedad__imagen--vacia {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #284a74 0%, #3d6a9e 100%);
}

.novedad__imagen--vacia span {
    font-family: "Playfair Display", Georgia, serif;
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.85);
}

.novedad__centro {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.15rem 0.6rem;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: #284a74;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 9999px;
}

.novedad__cuerpo {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 0.4rem;
    padding: 1rem 1.1rem 1.1rem;
}

.novedad__fecha {
    font-size: 11px;
    color: #6b7280;
}

.novedad__titulo,
.novedad__resumen {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.novedad__titulo {
    -webkit-line-clamp: 3;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    color: #1f2937;
}

.novedad:hover .novedad__titulo {
    color: #284a74;
}

.novedad__resumen {
    -webkit-line-clamp: 3;
    font-size: 13px;
    line-height: 1.5;
    color: #4b5563;
}

.novedad__leer {
    margin-top: auto;
    padding-top: 0.5rem;
    font-size: 13px;
    font-weight: 500;
    color: #284a74;
}

/* Listado de centros: introducción y tarjetas con el logo arriba */
.centros-intro {
    max-width: 48rem;
    margin-bottom: 2.5rem;
    font-size: 16px;
    line-height: 1.7;
    color: #374151;
}

.centros-intro p + p {
    margin-top: 0.75rem;
}

.centro-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.centro-card:hover,
.centro-card:focus-visible {
    border-color: #b9cbe2;
    box-shadow: 0 8px 20px rgba(40, 74, 116, 0.12);
    transform: translateY(-2px);
}

.centro-card:focus-visible {
    outline: 2px solid #284a74;
    outline-offset: 2px;
}

.centro-card__logo {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 11rem;
    padding: 1.5rem 2rem;
    background: #fff;
    border-bottom: 1px solid #f0f2f5;
}

.centro-card__logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.centro-card__cuerpo {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 1.4rem 1.6rem 1.5rem;
}

.centro-card__rotulo {
    margin-bottom: 0.4rem;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #284a74;
}

.centro-card__nombre {
    font-family: "Playfair Display", Georgia, serif;
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.3;
    color: #1f2937;
}

.centro-card:hover .centro-card__nombre {
    color: #284a74;
}

.centro-card__descripcion {
    margin-top: 0.75rem;
    font-size: 14px;
    line-height: 1.6;
    color: #4b5563;
}

.centro-card__mas {
    margin-top: auto;
    padding-top: 1rem;
    font-size: 13px;
    font-weight: 500;
    color: #284a74;
}

/* Última novedad dentro de la tarjeta de cada centro en el listado */
.centro-ultima {
    display: block;
    margin-top: 1rem;
    padding-top: 0.85rem;
    border-top: 1px solid #f0f2f5;
    text-align: left;
}

.centro-ultima__etiqueta {
    display: block;
    margin-bottom: 0.2rem;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #9ca3af;
}

.centro-ultima__titulo {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 13px;
    line-height: 1.4;
    color: #374151;
}
