.proximos-partidos {
    --pp-bg: #ffffff;
    --pp-bg-cabecera: #f8f9fa;
    --pp-border: #e9ecef;
    --pp-accent: #d92b2b;
    --pp-accent-suave: #fdeceb;
    --pp-text: #212529;
    --pp-text-muted: #6c757d;
    --pp-radius: 14px;

    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    padding: 20px 0;
}

.partido {
    background: var(--pp-bg);
    border: 1px solid var(--pp-border);
    border-radius: var(--pp-radius);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    text-align: center;
    position: relative;
}

.partido:not(.partido--sin-previa):hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
    border-color: var(--pp-accent);
}

.enlace-partido {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0 0 14px;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

/* Partidos sin previa asociada: se muestran igual, pero sin apariencia clicable */
.partido--sin-previa .enlace-partido {
    cursor: default;
}

.partido--sin-previa {
    opacity: 0.85;
}

.sin-previa-tag {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--pp-text-muted);
    margin-top: 6px;
}

.partido-cabecera {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--pp-bg-cabecera);
    padding: 8px 10px;
    border-bottom: 1px solid var(--pp-border);
}

.dia-semana {
    font-size: 12px;
    font-weight: 700;
    color: var(--pp-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dia-semana--hoy {
    color: #fff;
    background: var(--pp-accent);
    padding: 2px 8px;
    border-radius: 20px;
}

.jornada {
    font-size: 11px;
    font-weight: 600;
    color: var(--pp-text-muted);
    background: var(--pp-border);
    padding: 2px 7px;
    border-radius: 20px;
}

.fecha {
    font-size: 13px;
    color: var(--pp-text-muted);
    margin: 8px 0 4px;
}

.escudos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 4px 0 2px;
    padding: 0 8px;
}

.equipo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.equipo-nombre {
    font-size: 11px;
    font-weight: 600;
    color: var(--pp-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.escudo {
    width: 44px;
    height: 44px;
    object-fit: contain;
}

.hora {
    font-size: 16px;
    font-weight: 700;
    color: var(--pp-accent);
    background: var(--pp-accent-suave);
    border-radius: 8px;
    padding: 4px 8px;
    min-width: 52px;
}

.hora--pendiente {
    font-size: 11px;
    font-weight: 600;
    color: var(--pp-text-muted);
    background: var(--pp-bg-cabecera);
    font-style: italic;
}

/* Estilos responsivos: 5 arriba / 5 abajo en escritorio (5 columnas),
   se adapta a menos columnas conforme se reduce el ancho, manteniendo
   siempre tarjetas legibles. */
@media (max-width: 1024px) {
    .proximos-partidos {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 640px) {
    .proximos-partidos {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .escudo {
        width: 36px;
        height: 36px;
    }
    .equipo-nombre {
        font-size: 10px;
    }
    .hora {
        font-size: 14px;
        min-width: 44px;
    }
}

@media (max-width: 360px) {
    .proximos-partidos {
        grid-template-columns: 1fr;
    }
}

/* Refuerzo visual: si algún anuncio llega a renderizarse dentro de la
   rejilla antes de que actúe proteger-anuncios.js, se oculta al vuelo
   en vez de romper el grid de tarjetas. */
.proximos-partidos > :not(.partido),
.proximos-partidos .adsbygoogle,
.proximos-partidos ins.adsbygoogle,
.proximos-partidos [id^="div-gpt-ad"],
.proximos-partidos iframe {
    display: none !important;
}
