.g1-topnews {
    width: 100%;
    margin: 0 auto;
    font-family: inherit;
}

.g1-topnews *,
.g1-topnews *::before,
.g1-topnews *::after {
    box-sizing: border-box;
}

.g1-topnews__frame {
    width: min(100%, var(--g1-max-width));
    margin-inline: auto;
    padding: 14px;
    border: 1px solid rgba(15, 23, 42, .12);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 28px rgba(15, 23, 42, .09);
}

.g1-topnews__main,
.g1-topnews__small {
    overflow: hidden;
    border-radius: 14px;
    background: #f4f6f8;
    box-shadow: 0 3px 12px rgba(15, 23, 42, .10);
}

.g1-topnews__main {
    min-height: 390px;
}

.g1-topnews__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.g1-topnews__small {
    min-height: 155px;
}

.g1-topnews__link {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    min-height: inherit;
    color: #fff;
    text-decoration: none;
    isolation: isolate;
}

.g1-topnews__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.001);
    transition: transform .55s ease, filter .35s ease;
}

/* La imagen queda limpia y luminosa. Solo protegemos el área del texto. */
.g1-topnews__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, var(--g1-main-text-shadow)) 0%,
        rgba(0, 0, 0, calc(var(--g1-main-text-shadow) * .62)) 15%,
        rgba(0, 0, 0, .10) 31%,
        rgba(0, 0, 0, 0) 48%
    );
}

.g1-topnews__small .g1-topnews__overlay {
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, var(--g1-small-text-shadow)) 0%,
        rgba(0, 0, 0, calc(var(--g1-small-text-shadow) * .72)) 29%,
        rgba(0, 0, 0, .08) 58%,
        rgba(0, 0, 0, 0) 82%
    );
}

.g1-topnews__content {
    position: absolute;
    z-index: 2;
    left: 24px;
    right: 24px;
    bottom: 22px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.g1-topnews__small .g1-topnews__content {
    left: 12px;
    right: 12px;
    bottom: 11px;
    gap: 6px;
}

.g1-topnews__badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 4px 12px;
    border-radius: 999px;
    background: #1597d3;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: .04em;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .22);
}

.g1-topnews__small .g1-topnews__badge {
    min-height: 21px;
    padding: 3px 9px;
    font-size: 9px;
}

.g1-topnews__title {
    display: block;
    color: #fff;
    font-size: clamp(14px, 1.05vw, 17px);
    font-weight: 800;
    line-height: 1.13;
    text-shadow:
        0 2px 3px rgba(0, 0, 0, 1),
        0 4px 12px rgba(0, 0, 0, .95),
        0 0 2px rgba(0, 0, 0, 1);
}

.g1-topnews__title--main {
    max-width: 92%;
    font-size: clamp(28px, 3vw, 43px);
    line-height: 1.05;
    letter-spacing: -.02em;
}

.g1-topnews__link:hover .g1-topnews__image,
.g1-topnews__link:focus-visible .g1-topnews__image {
    transform: scale(1.035);
    filter: saturate(1.08) contrast(1.03);
}

.g1-topnews__link:focus-visible {
    outline: 3px solid #1597d3;
    outline-offset: 3px;
}

@media (max-width: 980px) {
    .g1-topnews__main { min-height: 340px; }
    .g1-topnews__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .g1-topnews__small { min-height: 175px; }
}

@media (max-width: 620px) {
    .g1-topnews__frame { padding: 8px; border-radius: 8px; }
    .g1-topnews__main { min-height: 275px; border-radius: 11px; }
    .g1-topnews__grid { grid-template-columns: 1fr; gap: 8px; margin-top: 8px; }
    .g1-topnews__small { min-height: 205px; border-radius: 11px; }
    .g1-topnews__content { left: 15px; right: 15px; bottom: 15px; }
    .g1-topnews__title--main { max-width: 100%; font-size: clamp(23px, 8vw, 32px); }
    .g1-topnews__title { font-size: 18px; }
}

.g1-topnews--refresh .g1-topnews__main,
.g1-topnews--refresh .g1-topnews__small {
  animation: g1TopNewsFade .45s ease both;
}
@keyframes g1TopNewsFade {
  from { opacity: .35; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .g1-topnews--refresh .g1-topnews__main,
  .g1-topnews--refresh .g1-topnews__small { animation: none; }
}
