/* Noticias Grid para Elementor Clásico — cada widget maneja sus propios estilos de instancia. */
.nepg-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 24px;
    width: 100%;
}

.nepg-grid *, .nepg-grid *::before, .nepg-grid *::after {
    box-sizing: border-box;
}

.nepg-grid .nepg-card {
    min-width: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid #f2f4f6;
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 9px 24px rgba(18, 29, 42, 0.11);
    transition: transform .2s ease, box-shadow .2s ease;
}

.nepg-grid .nepg-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 13px 28px rgba(18, 29, 42, 0.14);
}

.nepg-grid .nepg-card__media {
    position: relative;
    flex: 0 0 auto;
    width: 100%;
    height: 132px;
    overflow: hidden;
    background: #e9f0f5;
}

.nepg-grid .nepg-card__image-link,
.nepg-grid .nepg-card__image,
.nepg-grid .nepg-card__image-placeholder {
    display: block;
    width: 100%;
    height: 100%;
}

.nepg-grid .nepg-card__image {
    max-width: none;
    object-fit: cover;
    object-position: center;
    border: 0;
    border-radius: 0;
}

.nepg-grid .nepg-card__image-placeholder {
    background: linear-gradient(135deg, #c8dced, #f0f4f8);
}

.nepg-grid .nepg-card__badge {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 1;
    max-width: calc(100% - 32px);
    padding: 3px 11px;
    border-radius: 30px;
    background: #fff;
    color: #0874bd;
    box-shadow: 0 1px 5px rgba(0, 0, 0, .08);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 10px;
    line-height: 1.25;
    font-weight: 400;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nepg-grid .nepg-card__badge:hover,
.nepg-grid .nepg-card__badge:focus {
    text-decoration: underline;
    color: #0874bd;
}

.nepg-grid .nepg-card__badge--inline {
    position: static;
    display: inline-block;
    align-self: flex-start;
    max-width: 100%;
    margin-bottom: 14px;
    background: #f1f7fc;
}

.nepg-grid .nepg-card__content {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
    padding: 16px 12px 17px;
}

.nepg-grid .nepg-card__title {
    margin: 0 0 22px;
    padding: 0;
    color: #061d3d;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 20px;
    font-weight: 400;
    line-height: 1.23;
    letter-spacing: -.35px;
    text-transform: none;
    overflow-wrap: break-word;
}

.nepg-grid .nepg-card__title a {
    color: inherit;
    text-decoration: none;
}

.nepg-grid .nepg-card__title a:hover,
.nepg-grid .nepg-card__title a:focus {
    color: #0874bd;
    text-decoration: none;
}

.nepg-grid .nepg-card__excerpt {
    margin: -10px 0 18px;
    padding: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: #4b5563;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.5;
}

.nepg-grid .nepg-card__more {
    display: inline-block;
    align-self: flex-start;
    margin: auto 0 0;
    padding: 0;
    color: #09111c;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 10px;
    line-height: 1.4;
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 0;
}

.nepg-grid .nepg-card__more:hover,
.nepg-grid .nepg-card__more:focus {
    color: #0874bd;
    text-decoration: underline;
}

.nepg-grid .nepg-card a:focus-visible {
    outline: 2px solid #0874bd;
    outline-offset: 3px;
}

.nepg-empty {
    border: 1px dashed #cbd5e1;
    padding: 18px;
    color: #5b6677;
    border-radius: 8px;
    font: 13px/1.5 Arial, sans-serif;
}

@media (max-width: 1024px) {
    .nepg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
    .nepg-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
    .nepg-grid .nepg-card { transition: none; }
}
