/* 6. PARTIDOS */
/* ======================================================================= */

.seccion-partidos-header {
    background: #e60000;
    color: white;
    padding: 30px 40px;
}

.header-contenido {
    max-width: 1200px;
    margin: 0 auto;
    /* Simplificado: ya no es flex entre texto y contador */
}

.header-texto h1 {
    font-size: 30px;
    margin-bottom: 5px;
    text-align: center;
}

.header-texto p {
    opacity: 0.9;
    font-size: 16px;
    text-align: center;

}

.seccion-calendario {
    padding: 50px 40px;
    background: #f5f5f5;
}

.rejilla-partidos {
    display: flex;
    flex-direction: column;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.partidos-alerta-ok {
    padding: 12px 16px;
    border-radius: 10px;
    background: #e7f8ec;
    color: #17603a;
    border: 1px solid #b6e2c5;
    text-align: center;
    font-weight: 600;
}

.caja-equipo {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    padding: 20px;
    position: relative;
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
    border: 1px solid transparent;
}

.caja-equipo:hover {
    transform: translateY(-10px);
    border-color: rgba(230, 0, 0, 0.16);
    box-shadow: 0 22px 42px rgba(127, 29, 29, 0.14);
}

.titulo-equipo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    text-align: center;
}

.titulo-equipo i {
    font-size: 24px;
    color: #e60000;
}

.titulo-equipo h3 {
    font-size: 20px;
    margin-bottom: 2px;
}

.titulo-equipo p {
    font-size: 14px;
    color: #777;
}


.rejilla-partido-doble {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.rejilla-partido-doble.unico {
    grid-template-columns: 1fr;
    max-width: 560px;
    margin: 0 auto;
}

.tarjeta-partido {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    position: relative;
    text-align: center;
    background: linear-gradient(180deg, #ffffff 0%, #fff8f6 100%);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.tarjeta-partido:hover {
    transform: translateY(-12px) scale(1.01);
    border-color: rgba(230, 0, 0, 0.28);
    box-shadow: 0 28px 48px rgba(127, 29, 29, 0.18);
}

.tarjeta-partido-oculto {
    border-color: #d97706;
    background: #fffaf0;
}

.etiqueta-estado {
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 10px;
}

.etiqueta-estado.proximo {
    background: #4CAF50;
}

.etiqueta-estado.finalizado {
    background: #e60000;
}

.jornada {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 12px;
    color: #999;
}

.enfrentamiento {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: center;
    gap: 18px;
    margin-bottom: 18px;
}

.equipo {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.equipo img {
    width: 78px;
    height: 78px;
    display: block;
    object-fit: cover;
    padding: 10px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 30% 30%, #ffffff 0%, #fff7f7 45%, #fee2e2 100%);
    border: 1px solid rgba(230, 0, 0, 0.12);
    box-shadow:
        0 14px 30px rgba(230, 0, 0, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transition: box-shadow 0.2s ease;
}

.equipo p {
    font-size: 14px;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
    line-height: 1.35;
    max-width: 16ch;
}

.rol-equipo {
    font-size: 11px;
    color: #888;
}

.vs {
    min-width: 66px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    font-weight: 700;
    color: #e60000;
    padding: 10px 12px;
    font-size: 18px;
    border-radius: 999px;
    background: linear-gradient(135deg, #fff1f2 0%, #ffe4e6 100%);
    box-shadow: inset 0 0 0 1px rgba(230, 0, 0, 0.1);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.marcador-inline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    min-width: 96px;
    padding: 10px 14px;
    border-radius: 999px;
    background: #111827;
    color: #fff;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: 0.02em;
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.tarjeta-partido:hover .vs,
.tarjeta-partido:hover .marcador-inline {
    transform: translateY(-2px) scale(1.03);
}

.info-adicional {
    border-top: 1px solid #eee;
    padding-top: 10px;
    font-size: 14px;
    color: #555;
    display: block;
}

.info-adicional div {
    margin-bottom: 5px;
}

.info-adicional i {
    color: #e60000;
    margin-right: 5px;
    width: 15px;
    text-align: center;
}

.dato-horario,
.dato-lugar {
    text-align: center;
}

.acciones-partido {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-detalle-partido {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border-radius: 999px;
    background: #111827;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.btn-detalle-partido:hover {
    background: #e60000;
    transform: translateY(-1px);
}

.form-ocultar-partido {
    margin: 0;
}

.btn-toggle-oculto-partido {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border: 1px solid #d97706;
    border-radius: 999px;
    background: #fff;
    color: #b45309;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.btn-toggle-oculto-partido:hover {
    background: #d97706;
    color: #fff;
    transform: translateY(-1px);
}


/* Migrado de inline */
.partidos-empty-card { grid-column: 1 / -1; text-align: center; }

.pie-pagina {
    margin-top: 0;
}

/* =========================
   Modo oscuro SOLO Partidos
   ========================= */
html[data-theme="dark"] .public-news-hero {
    background: radial-gradient(circle at 22% 12%, #7f1d1d 0%, #1f2937 45%, #020617 100%);
}

html[data-theme="dark"] .public-news-hero-badge {
    background: #111827;
    border: 1px solid #374151;
    color: #fecaca;
}

html[data-theme="dark"] .public-news-hero h1 {
    color: #f8fafc;
}

html[data-theme="dark"] .public-news-hero p {
    color: #e2e8f0;
}

html[data-theme="dark"] .public-news-hero-divider {
    background: #f87171;
}

html[data-theme="dark"] .seccion-calendario {
    background: #0b1120;
}

html[data-theme="dark"] .partidos-alerta-ok {
    background: #052e1a;
    border-color: #166534;
    color: #bbf7d0;
}

html[data-theme="dark"] .caja-equipo {
    background: #0f172a;
    border: 1px solid #1f2937;
    box-shadow: 0 14px 30px rgba(2, 6, 23, 0.55);
}

html[data-theme="dark"] .titulo-equipo {
    border-bottom-color: #334155;
}

html[data-theme="dark"] .titulo-equipo i {
    color: #f87171;
}

html[data-theme="dark"] .titulo-equipo h3 {
    color: #f8fafc;
}

html[data-theme="dark"] .titulo-equipo p {
    color: #cbd5e1;
}

html[data-theme="dark"] .tarjeta-partido {
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    border-color: #334155;
}

html[data-theme="dark"] .tarjeta-partido:hover {
    border-color: #ef4444;
    box-shadow: 0 22px 40px rgba(2, 6, 23, 0.62);
}

html[data-theme="dark"] .tarjeta-partido-oculto {
    background: #2d2311;
    border-color: #f59e0b;
}

html[data-theme="dark"] .etiqueta-estado.finalizado {
    background: #b91c1c;
}

html[data-theme="dark"] .etiqueta-estado.proximo {
    background: #166534;
}

html[data-theme="dark"] .jornada {
    color: #94a3b8;
}

html[data-theme="dark"] .equipo p {
    color: #f1f5f9;
}

html[data-theme="dark"] .equipo img {
    background: radial-gradient(circle at 30% 30%, #1e293b 0%, #172033 48%, #0f172a 100%);
    border-color: rgba(248, 113, 113, 0.18);
    box-shadow:
        0 18px 36px rgba(2, 6, 23, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

html[data-theme="dark"] .vs {
    color: #fecaca;
    background: linear-gradient(135deg, rgba(127, 29, 29, 0.45) 0%, rgba(69, 10, 10, 0.7) 100%);
    box-shadow: inset 0 0 0 1px rgba(248, 113, 113, 0.2);
}

html[data-theme="dark"] .info-adicional {
    border-top-color: #334155;
    color: #cbd5e1;
}

html[data-theme="dark"] .info-adicional i {
    color: #f87171;
}

html[data-theme="dark"] .acciones-partido {
    border-top-color: #334155;
}

html[data-theme="dark"] .btn-detalle-partido {
    background: #1d4ed8;
    color: #f8fafc;
}

html[data-theme="dark"] .btn-detalle-partido:hover {
    background: #2563eb;
}

html[data-theme="dark"] .btn-toggle-oculto-partido {
    background: #111827;
    border-color: #f59e0b;
    color: #fbbf24;
}

html[data-theme="dark"] .btn-toggle-oculto-partido:hover {
    background: #f59e0b;
    color: #111827;
}

@media (max-width: 992px) {
    .seccion-partidos-header,
    .seccion-calendario {
        padding-left: 24px;
        padding-right: 24px;
    }

    .rejilla-partido-doble {
        grid-template-columns: 1fr;
    }

    .rejilla-partido-doble.unico {
        max-width: none;
    }
}

@media (max-width: 768px) {
    .seccion-partidos-header {
        padding: 34px 18px;
    }

    .header-texto h1 {
        font-size: 28px;
    }

    .header-texto p {
        font-size: 15px;
    }

    .seccion-calendario {
        padding: 34px 18px;
    }

    .caja-equipo {
        padding: 16px;
    }

    .titulo-equipo {
        gap: 10px;
        margin-bottom: 16px;
        padding-bottom: 12px;
    }

    .titulo-equipo h3 {
        font-size: 18px;
    }

    .tarjeta-partido {
        padding: 14px;
    }

    .jornada {
        position: static;
        display: block;
        margin-bottom: 10px;
    }

    .enfrentamiento {
        gap: 10px;
        margin-bottom: 12px;
    }

    .equipo img {
        width: 68px;
        height: 68px;
        padding: 9px;
    }

    .equipo p {
        font-size: 13px;
        line-height: 1.35;
    }

    .info-adicional {
        font-size: 13px;
    }

    .marcador-inline {
        font-size: 22px;
    }
}

@media (max-width: 576px) {
    .seccion-partidos-header {
        padding: 28px 16px;
    }

    .header-texto h1 {
        font-size: 24px;
    }

    .seccion-calendario {
        padding: 28px 16px;
    }

    .caja-equipo {
        padding: 14px;
    }

    .titulo-equipo i {
        font-size: 20px;
    }

    .titulo-equipo h3 {
        font-size: 17px;
    }

    .tarjeta-partido {
        padding: 12px;
    }

    .etiqueta-estado {
        font-size: 11px;
        padding: 3px 7px;
    }

    .enfrentamiento {
        flex-direction: column;
        gap: 12px;
    }

    .marcador-inline {
        font-size: 19px;
    }

    .vs {
        min-width: 58px;
        padding: 8px 12px;
        font-size: 16px;
    }

    .equipo {
        width: 100%;
    }

    .equipo img {
        width: 62px;
        height: 62px;
        padding: 8px;
    }

    .info-adicional div {
        margin-bottom: 8px;
    }
}
