:root {
    --bg-card: #F4F4F4;
    --accent-blue: #4682B4;
    --border-color: #CCCCCC;
    --text-main: #222222;
}

/* Grilla de Equipos Premium */
.grid-equipos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.equipo-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.equipo-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
    border-color: var(--accent-blue);
}

.equipo-card img {
    width: 65px;
    height: 65px;
    object-fit: contain;
    margin-bottom: 15px;
    filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.1));
}

.equipo-card .nombre {
    display: block;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 15px;
    text-transform: uppercase;
    font-size: 0.95rem;
    line-height: 1.2;
}

.ver-btn {
    background: var(--accent-blue);
    color: #ffffff !important;
    padding: 8px 20px;
    border-radius: 6px;
    text-decoration: none !important;
    font-size: 0.85rem;
    font-weight: bold;
    transition: background 0.3s ease;
    width: 80%;
    display: inline-block;
}

.ver-btn:hover {
    background: #36648B;
    color: #ffffff !important;
}

/* Responsivo */
@media (max-width: 480px) {
    .grid-equipos {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 10px 5px;
    }

    .equipo-card {
        padding: 12px 8px;
    }

    .equipo-card img {
        width: 50px;
        height: 50px;
        margin-bottom: 10px;
    }

    .equipo-card .nombre {
        font-size: 0.8rem;
        margin-bottom: 10px;
        min-height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .ver-btn {
        padding: 6px 12px;
        font-size: 0.75rem;
        width: 100%;
    }
}

/* --- Estilos para Partidos y Resultados (Estilo Fixture Premium) --- */
.info-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    margin-bottom: 30px;
    border: 1px solid #eee;
}

.card-header {
    background: var(--accent-blue);
    color: #ffffff;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    text-shadow: none !important;
    -webkit-font-smoothing: antialiased;
}

.card-header span:first-child {
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: -0.5px;
}

.card-header span:last-child {
    font-weight: 500;
    font-size: 0.85rem;
    opacity: 1;
}

.fixture-table {
    width: 100%;
    border-collapse: collapse;
}

.fixture-table td {
    vertical-align: middle !important;
    padding: 15px 10px;
}

.fixture-row {
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
}

.fixture-row:hover {
    background: #fafafa;
}

.fixture-row:last-child {
    border-bottom: none;
}

.cancha-divider {
    background: var(--accent-blue);
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    padding: 6px 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 15px 0 10px 0;
    text-align: center;
    border-radius: 4px;
    text-shadow: none !important;
    -webkit-font-smoothing: antialiased;
}

.team-container {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

/* Asegurar que el contenedor inverso (para equipo local) mantenga la línea */
.team-container[style*="row-reverse"] {
    justify-content: flex-start;
}

.team-text {
    font-size: 0.9rem;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1.1;
    flex: 1;
}

.team-shield {
    width: 32px;
    height: 32px;
    min-width: 32px;
    object-fit: contain;
    flex-shrink: 0;
}

.match-score-box {
    background: #f8f9fa;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 800;
    min-width: 65px;
    display: inline-block;
    text-align: center;
    border: 1px solid #eee;
    color: #333;
    font-size: 1.1rem;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

.btn-ficha-home {
    opacity: 0.6;
    transition: opacity 0.2s, transform 0.2s;
    margin-left: 8px;
    flex-shrink: 0;
}

.btn-ficha-home:hover {
    opacity: 1;
    transform: scale(1.1);
}

.btn-ficha-home img {
    width: 14px !important;
}

/* Responsivo para Partidos */
@media (max-width: 600px) {
    .fixture-table td {
        padding: 10px 5px !important;
    }

    .team-text {
        font-size: 0.75rem;
    }

    .team-shield {
        width: 24px;
        height: 24px;
        min-width: 24px;
    }

    .match-score-box {
        min-width: 50px;
        font-size: 0.95rem;
        padding: 4px 8px;
    }
}

@media (max-width: 480px) {
    .card-header {
        padding: 12px 15px;
    }

    .card-header span:first-child {
        font-size: 0.95rem;
    }
}

/* --- Estilos para Descargas --- */
.download-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    padding: 30px 0;
}

.download-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

.download-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
    border-color: var(--accent-blue);
}

.download-icon {
    width: 60px;
    height: 60px;
    background: #f8f9fa;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    transition: background 0.3s;
}

.download-card:hover .download-icon {
    background: #eef4f9;
}

.download-card img {
    width: 30px !important;
    height: auto !important;
}

.download-title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: -0.2px;
    line-height: 1.3;
}

.download-btn {
    width: 100%;
    background: var(--accent-blue);
    color: #fff !important;
    padding: 12px;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none !important;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background 0.2s;
}

.download-btn:hover {
    background: #36648B;
}

/* Iconos de archivo */
.icon-excel {
    color: #217346;
    background: #e9f5ee !important;
}

.icon-pdf {
    color: #d32f2f;
    background: #fdeaea !important;
}

.download-icon svg {
    width: 30px;
    height: 30px;
    stroke-width: 2.5;
}

@media (max-width: 480px) {
    .download-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* --- Estilos para Sanciones --- */
.sanction-badge {
    background: #FFEDED;
    color: #CC0000;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    border: 1px solid #FFCDCD;
    display: inline-block;
}

.red-card-icon {
    width: 12px;
    height: 18px;
    background: #FF0000;
    border-radius: 2px;
    display: inline-block;
    margin-right: 8px;
    vertical-align: middle;
    box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.badge-vuelve {
    background: #E8F5E9;
    color: #2E7D32;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 800;
    display: inline-block;
}

/* Tabla de Sanciones Responsiva - Versión "Ultra One Line" con Cabecera Full */
@media (max-width: 600px) {
    .fixture-table.sanciones-table thead {
        display: table-header-group;
    }

    .fixture-table.sanciones-table thead tr {
        display: flex;
        flex-direction: row;
        border-bottom: 2px solid #eee;
        padding: 5px 8px;
        background: #f8f9fa;
    }

    .fixture-table.sanciones-table thead th {
        display: block;
        padding: 0 4px !important;
        font-size: 0.65rem !important;
        color: var(--accent-blue) !important;
        text-transform: uppercase;
        font-weight: 900;
        border: none;
    }

    .fixture-table.sanciones-table thead th:nth-child(1) {
        flex: 1;
        text-align: left !important;
        padding-left: 20px !important;
    }

    .fixture-table.sanciones-table thead th:nth-child(2) {
        display: none;
    }

    .fixture-table.sanciones-table thead th:nth-child(3) {
        width: 45px;
        text-align: center !important;
    }

    .fixture-table.sanciones-table thead th:nth-child(4) {
        width: 75px;
        text-align: center !important;
    }

    .fixture-table.sanciones-table tr {
        display: flex;
        flex-direction: row;
        align-items: center;
        padding: 5px 8px;
        border-bottom: 1px solid #f0f0f0;
        gap: 0px;
        overflow: hidden;
    }

    .fixture-table.sanciones-table td {
        display: flex !important;
        padding: 0 4px !important;
        border: none;
        width: auto !important;
        min-width: 0;
        white-space: nowrap;
        vertical-align: middle !important;
    }

    .fixture-table.sanciones-table td::before {
        display: none;
    }

    .fixture-table.sanciones-table td[data-label="Jugador"] {
        flex-shrink: 0;
        overflow: visible;
        display: flex !important;
        align-items: center;
        padding-right: 0px !important;
    }

    .fixture-table.sanciones-table td[data-label="Jugador"] .team-container {
        width: auto !important;
    }

    .fixture-table.sanciones-table td[data-label="Jugador"] .team-text {
        flex: none !important;
        margin-right: 0px;
    }

    .fixture-table.sanciones-table td[data-label="Equipo"] {
        flex: 1;
        display: flex !important;
        align-items: center;
        padding-left: 0px !important;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .fixture-table.sanciones-table td[data-label="Equipo"] .team-text {
        font-size: 0.7rem;
        color: #888;
        font-weight: 400;
    }

    .fixture-table.sanciones-table td[data-label="Equipo"] .team-text::before {
        content: "(";
    }

    .fixture-table.sanciones-table td[data-label="Equipo"] .team-text::after {
        content: ")";
    }

    .fixture-table.sanciones-table td[data-label="Artículo"] {
        margin-left: auto;
        padding-left: 10px !important;
    }

    .fixture-table.sanciones-table td[data-label="Artículo"] .sanction-badge {
        font-size: 0.60rem;
        padding: 3px 5px;
    }

    .fixture-table.sanciones-table td[data-label="Vuelve"] {
        padding-left: 6px !important;
    }

    .fixture-table.sanciones-table td[data-label="Vuelve"] .badge-vuelve {
        font-size: 0.65rem;
        padding: 3px 6px;
    }
}

/* --- Estilos para Fixture --- */
.zona-tag {
    font-size: 9px;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 4px;
    background: #f0f2f5;
    color: #64748b;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    display: inline-block;
}

.swiper-container {
    width: 100%;
    padding-bottom: 50px;
}

.btn-ficha {
    opacity: 0.6;
    transition: opacity 0.2s, transform 0.2s;
    margin-left: 8px;
    flex-shrink: 0;
}

.btn-ficha:hover {
    opacity: 1;
    transform: scale(1.1);
}

.btn-ficha img {
    width: 14px !important;
}