.ccgpm-module,
.ccgpm-module * { box-sizing: border-box; }

/*
 * La anchura exterior no pertenece al módulo.
 * Newspaper la gobierna mediante stretch_row_1200 + td-pb-row.
 * No existe max-width propio ni un ancho hardcodeado del plugin.
 */
.ccgpm-native-row { margin-top: 0; margin-bottom: 0; }
.ccgpm-native-row > .td-pb-row > .ccgpm-native-shell { width: 100%; min-width: 0; margin: 0; }

.td_block_ccg_ultimos_programas,
.ccgpm-tagdiv-block,
.td_block_ccg_ultimos_programas .ccgpm-module,
.ccgpm-tagdiv-block .ccgpm-module {
    width: 100%;
    max-width: none;
    margin-inline: 0;
}

.ccgpm-module {
    --ccgpm-red: #B02B2C;
    --ccgpm-red-dark: #B02B2C;
    --ccgpm-ink: #151515;
    --ccgpm-white: #fff;
    position: relative;
    margin-block: 34px;
    width: 100%;
    max-width: none;
    padding: 24px;
    border: 0;
    border-top: 6px solid var(--ccgpm-red);
    background: linear-gradient(135deg, #151515 0%, #242424 100%);
    color: var(--ccgpm-white);
    font-family: inherit;
    overflow: hidden;
}

.ccgpm-module::after {
    content: "";
    position: absolute;
    width: 280px;
    height: 280px;
    right: -120px;
    top: -150px;
    border-radius: 50%;
    background: rgb(176 43 44 / .15);
    pointer-events: none;
}
.ccgpm-module > * { position: relative; z-index: 1; }

.ccgpm-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.ccgpm-heading h2 { margin: 0; color: #fff; font-size: clamp(27px, 3vw, 40px); line-height: 1; letter-spacing: -.025em; }
.ccgpm-heading span { color: #c9c9c9; font-size: 13px; }

.ccgpm-switcher { padding: 18px; background: rgb(255 255 255 / .06); border: 1px solid rgb(255 255 255 / .11); }
.ccgpm-filters { display: grid; grid-template-columns: minmax(0, 1fr) minmax(250px, .55fr); gap: 22px; margin-bottom: 24px; padding: 18px 20px; background: #2d2d2d; border-left: 4px solid var(--ccgpm-red); }
.ccgpm-filter__label { display: block; margin-bottom: 8px; color: #cfcfcf; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.ccgpm-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.ccgpm-tab { appearance: none; border: 1px solid #5a5a5a; background: #202020; padding: 10px 14px; color: #fff; font: inherit; font-weight: 800; cursor: pointer; }
.ccgpm-tab:hover, .ccgpm-tab.is-active { border-color: var(--ccgpm-red); background: var(--ccgpm-red); color: #fff; }

.ccgpm-pane { display: none; }
.ccgpm-pane.is-active { display: block; }
.ccgpm-pane[hidden] { display: none !important; }
.ccgpm-list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; }
.ccgpm-card { min-width: 0; overflow: hidden; background: #fff; color: var(--ccgpm-ink); box-shadow: 0 12px 28px rgb(0 0 0 / .18); }
.ccgpm-card__thumb { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #ddd; text-decoration: none; }
.ccgpm-card__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ccgpm-placeholder { display: block; width: 100%; height: 100%; background: linear-gradient(135deg, #ddd, #eee); }
.ccgpm-card__platform { position: absolute; right: 8px; bottom: 8px; padding: 5px 8px; background: rgb(0 0 0 / .78); color: #fff; font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.ccgpm-card__body { padding: 13px 14px 15px; }
.ccgpm-card time { color: #888; font-size: 12px; text-transform: uppercase; }
.ccgpm-card h3 { margin: 5px 0 0; font-size: 17px; line-height: 1.2; }
.ccgpm-card h3 a { color: inherit; text-decoration: none; }
.ccgpm-card__actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 11px; }
.ccgpm-button { display: inline-flex; align-items: center; justify-content: center; padding: 8px 10px; background: var(--ccgpm-red); color: #fff !important; font-size: 12px; font-weight: 800; text-decoration: none !important; }
.ccgpm-button:hover { background: var(--ccgpm-red-dark); }
.ccgpm-card__article-link { color: #707070; font-size: 12px; font-weight: 700; text-decoration: none; }
.ccgpm-card__article-link:hover { color: var(--ccgpm-red); }
.ccgpm-empty { margin: 0; padding: 28px; background: #fff; color: var(--ccgpm-ink); }

@media (max-width: 1180px) {
    .ccgpm-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .ccgpm-filters { grid-template-columns: 1fr; }
}
@media (max-width: 780px) {
    .ccgpm-module { margin-block: 24px; padding: 25px 20px; }
    .ccgpm-switcher { padding: 16px; }
    .ccgpm-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ccgpm-heading { align-items: flex-start; flex-direction: column; gap: 7px; }
}
@media (max-width: 480px) {
    .ccgpm-module { padding: 22px 14px; }
    .ccgpm-switcher { padding: 12px; }
    .ccgpm-list { grid-template-columns: 1fr; }
    .ccgpm-filters { padding: 14px; }
    .ccgpm-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; }
    .ccgpm-tab { white-space: nowrap; }
}
