/* Estilos para el contenedor principal del pronóstico */
.pronostico-container {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin: 20px auto;
    max-width: 600px;
    font-family: 'Arial', sans-serif;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Estilos para el encabezado del pronóstico */
.pronostico-header {
    background-color: #f7f7f7;
    color: #333;
    font-weight: bold;
    padding: 12px;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

/* Estilos para el cuerpo del pronóstico */
.pronostico-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
}

/* Estilos para cada equipo */
.team {
    display: flex;
    align-items: center;
    flex-basis: 40%; /* Ocupa el 40% del espacio */
}

.team img {
    width: 50px;
    height: 50px;
    margin-right: 10px;
}

.team span {
    font-size: 16px;
    font-weight: bold;
}

.team-visitante {
    justify-content: flex-end; /* Alinea el contenido a la derecha */
}

.team-visitante img {
    margin-left: 10px;
    margin-right: 0;
}

/* Estilos para el marcador */
.score {
    flex-basis: 20%; /* Ocupa el 20% del espacio central */
    text-align: center;
}

.score span {
    font-size: 28px;
    font-weight: bold;
    color: #000;
    background-color: #f0f0f0;
    padding: 5px 15px;
    border-radius: 5px;
}

/* --- Nuevos Estilos para Tarjetas de Estadísticas y Resultados --- */

/* Estilo base para las tarjetas */
.stats-card, .results-card {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    margin-bottom: 24px;
    background-color: #fff;
}

/* Estilo para los encabezados de las tarjetas */
.stats-header, .results-header {
    display: flex;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #e1e4e8;
}

.team-logo {
    width: 40px;
    height: 40px;
    margin-right: 12px;
}

.stats-header h2, .results-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

/* Estilo para la secuencia de forma (G/E/P) */
.form-sequence {
    padding: 12px 16px;
    display: flex;
    gap: 8px;
}

.form-sequence .resultado {
    display: inline-block;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    border-radius: 50%;
    color: #fff;
    font-weight: bold;
    font-size: 12px;
}

.form-sequence .g { background-color: #28a745; } /* Verde para Ganado */
.form-sequence .e { background-color: #6c757d; } /* Gris para Empatado */
.form-sequence .p { background-color: #dc3545; } /* Rojo para Perdido */

/* Rejilla de estadísticas */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    padding: 16px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    background-color: #f6f8fa;
    padding: 12px;
    border-radius: 5px;
    text-align: center;
}

.stat-item span {
    font-size: 12px;
    color: #586069;
}

.stat-item strong {
    font-size: 20px;
    font-weight: 600;
    color: #24292e;
}

/* Pie de página de la tarjeta de estadísticas */
.stats-footer {
    font-size: 12px;
    color: #586069;
    padding: 12px 16px;
    border-top: 1px solid #e1e4e8;
    background-color: #f6f8fa;
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
}

/* Cuerpo de la tarjeta de resultados */
.results-body {
    padding: 8px 0;
}

.result-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #e1e4e8;
}

.result-item:last-child {
    border-bottom: none;
}


.result-date {
    font-size: 12px;
    color: #586069;
    width: 80px;
}

.result-teams {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.result-teams .score {
    font-weight: 600;
    font-size: 16px;
    padding: 0 16px;
}

.result-teams .team-local, .result-teams .team-visitor {
    flex: 1;
}

.result-teams .team-visitor {
    text-align: right;
}

.result-teams .team-winner {
    font-weight: 700;
    color: #28a745;
}

.result-teams .team-loser {
    color: #dc3545;
}

.result-teams .team-draw {
    color: #6c757d;
}

/* Media Query para responsividad */
@media (max-width: 600px) {
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }

    .result-teams {
        flex-direction: column;
        align-items: flex-start;
    }

    .result-teams .team-visitor {
        text-align: left;
    }

    .result-teams .score {
        padding: 8px 0;
    }

    .pronostico-body {
        flex-direction: column;
        gap: 16px;
    }

    .team {
        flex-direction: column;
        text-align: center;
    }

    .team img {
        margin: 0 0 8px 0;
    }

    .team-visitante img {
        margin: 0 0 8px 0;
    }
}

/* --- Estilos para el Shortcode de Predicciones --- */

.predicciones-shortcode-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.prediction-card {
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s ease-in-out;
}

.prediction-card:hover {
    box-shadow: 0 8px 24px rgba(149, 157, 165, 0.2);
}

.card-header {
    padding: 12px 16px;
    font-weight: 600;
    border-bottom: 1px solid #e1e4e8;
    text-align: center;
    font-size: 14px;
    color: #586069;
}

.card-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 16px;
}

.team-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100px;
}

.team-info img {
    width: 50px;
    height: 50px;
    margin-bottom: 8px;
}

.team-info span {
    font-size: 14px;
    font-weight: 600;
}

.score-info {
    font-size: 28px;
    font-weight: 700;
}

.card-footer {
    padding: 12px 16px;
    border-top: 1px solid #e1e4e8;
    text-align: center;
    background-color: #f6f8fa;
}

.card-link {
    text-decoration: none;
    color: #0366d6;
    font-weight: 600;
    font-size: 14px;
}

.card-link:hover {
    text-decoration: underline;
}

/* --- Estilos para el Botón Cargar Más --- */

.cargar-mas-wrapper {
    text-align: center;
    margin-top: 24px;
}

#cargar-mas-btn {
    background-color: #2ea44f;
    color: #fff;
    border: 1px solid rgba(27, 31, 35, 0.15);
    border-radius: 6px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
}

#cargar-mas-btn:hover {
    background-color: #22863a;
}

/* --- Estilos para la Paginación de WordPress --- */

.pagination-links {
    margin-top: 30px;
    text-align: center;
}

.pagination-links .page-numbers {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 2px;
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    text-decoration: none;
    color: #0366d6;
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
}

.pagination-links .page-numbers:hover {
    background-color: #f6f8fa;
}

.pagination-links .page-numbers.current {
    background-color: #0366d6;
    color: #fff;
    border-color: #0366d6;
}

/* --- Estilos para el Botón Cargar Más --- */

.cargar-mas-wrapper {
    text-align: center;
    margin-top: 24px;
}

#cargar-mas-btn {
    background-color: #2ea44f;
    color: #fff;
    border: 1px solid rgba(27, 31, 35, 0.15);
    border-radius: 6px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
}

#cargar-mas-btn:hover {
    background-color: #22863a;
}
