@import url("../../assets/css/root.css");
@import url("../../css/navbar.css");
@import url("../../css/footer.css");

.contenedor {
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    overflow: hidden;
    padding: 2rem;
}

/* PARTIDOS */
.partidos {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    justify-content: center;
    padding: 1rem;
    max-width: 850px;
    margin: 0 auto;
    grid-template-rows: auto;
}

/* Jornada */
.jornada {
    grid-column: span 2;
    text-align: center;
    margin-bottom: .1rem;
    font-weight: bold;
    color: var(--white);
    background-color: var(--tertiary);
    border-radius: 10px;
    padding: 1rem;
    background: linear-gradient(to right, rgba(255, 255, 255, 0), var(--tertiary), rgba(255, 255, 255, 0));
}

.jornada-numero {
    text-transform: uppercase;
    font-size: 2rem;
    color: var(--white);
}

.jornada-fecha {
    font-size: 1rem;
    color: var(--white);
}

.nav-jornadas button {
    background-color: #cd6e38;
    border: none;
    color: #fff;
    padding: 10px 20px;
    font-size: 16px;
    margin: 0 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-weight: bold;
}

.nav-jornadas button:hover:not(:disabled) {
    background-color: #b66232;
    color: #fff;
}

.nav-jornadas button:disabled {
    background-color: #404147;
    color: var(--white3, #b3b2b0);
    cursor: not-allowed;
}

/* Partido */
.partido {
    color: var(--white);
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: left;
    font-weight: 600;
    margin-bottom: 1rem;

    width: 100%;
    height: 100%;
    background-image: linear-gradient(40deg,
            #47904b 50%,
            #30633a 55%,
            #47904b 55%);
    background-size: 2em 2em;
    background-repeat: round;
    background-color: #47904b;
}

.informacion-partido {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-weight: 600;
    color: var(--white);
    background-color: var(--tertiary);
    border-radius: 10px;
    padding: 1rem;
    width: 100%;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.lugar {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.fecha-hora {
    display: flex;
    flex-direction: row;
    gap: 15px;
    font-size: 1rem;
}


.numero-juego {
    background-color: var(--tertiary);
    width: 100%;
    padding: 1rem;
    border-radius: 5px;
    text-transform: uppercase;
    text-align: center;
    font-size: 1.5rem;
}

.numero-juego:hover {
    color: var(--primary);
}

.lugar a {
    text-decoration: none;
    color: var(--white);
    font-weight: 600;
}

.lugar a:hover {
    color: var(--primary);
}

/* Estilo para los detalles del equipo */
.equipo-detalles {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-top: 1rem;
    background-color: rgb(48, 99, 58, .7);
    padding: 1rem;
    border-radius: 5px;
}

.equipo {
    display: flex;
    align-items: center;
    padding: 0.5rem 0;
}

.equipo-logo {
    width: 30px;
    height: 30px;
    margin-right: 10px;
    /* border-radius: 50%; */
    object-fit: cover;
}

.equipo span {
    font-size: 1rem;
}

.puntuacion {
    font-size: 1.2rem;
    font-weight: bold;
    margin-left: auto;
}

/* Botón de detalles */
.detalles {
    background-color: var(--clr);
    color: var(--white);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 1rem;
    font-weight: 600;
}

.detalles:hover {
    background-color: var(--clr3);
}

/* MODAL */
.modal-content {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);

    width: 100%;
    height: 100%;
    background-image: linear-gradient(40deg,
            #47904b 50%,
            #30633a 55%,
            #47904b 55%);
    background-size: 2em 2em;
    background-repeat: round;
    background-color: #47904b;

    color: var(--white);
}

/* FASE DEL JUEGO */
#modal-jornada-fase {
    width: 100%;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--white);
    font-size: 1.5rem;
    font-weight: 600;
    text-transform: uppercase;
    background-color: var(--primary);
    padding: 1rem;
    margin-bottom: .5rem;
    border-radius: 5px;
}

/* EQUIPOS LOGO */
#modal-equipos {
    background-color: rgb(48, 99, 58, .7);
    border-radius: 5px;
    padding: 1rem;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 1px;
}

#modal-equipos img {
    width: auto;
    height: 75px;
    margin-bottom: 10px;
}

#modal-equipos .score {
    font-size: 1.2rem;
    font-weight: 500;
    background-color: var(--primary);
    padding: .5rem 1rem;
    border-radius: 2.5px;
    font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
}


/* TABLA */
#contenedor-puntuaciones {
    overflow: auto;
}

#modal-puntuaciones {
    width: 100%;
    border-collapse: collapse;
    background: linear-gradient(to left, var(--quaternary), rgba(71, 144, 75, 0.4));
    color: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    margin-top: 1rem;
}

th,
td {
    padding: 12px;
    text-align: center;
    border-bottom: 2px solid rgba(0, 0, 0, 0.);
    padding: 10px;
    font-size: 1em;
}

th {
    background-color: var(--tertiary);
    color: white;
    font-weight: bold;
    text-transform: uppercase;
}

tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.1);
}

tr:hover {
    background-color: rgba(0, 0, 0, 0.2);
    transform: scale(1.01);
    transition: all 0.2s ease;
}

td img.equipo-logo {
    width: 50px;
    height: 50px;
    margin-right: 10px;
    aspect-ratio: 1/1;
}

td:nth-child(2),
th:nth-child(2) {
    font-weight: 600;
    text-align: left;
}

/* APARTDO JUGADOR DESTACADOS */
#modal-jugadores-destacados {
    background-color: rgb(48, 99, 58, .7);
    border-radius: 5px;
    padding: 1rem;
    color: var(--white);
    text-transform: uppercase;
}

#modal-jugadores-destacados h5 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Botón cerrar modal */
#btn-close-modal {
    background-color: var(--contra);
    border: none;
    font-size: 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#btn-close-modal:hover {
    background-color: var(--resa2);
}

/* BREAKPOINTS */
@media (max-width: 768px) {
    main {
        padding-top: 120px;
    }

    .partidos {
        display: block;
        margin: 0;
    }

    .jornada {
        grid-column: span 1;
        text-align: center;
        margin-bottom: 1rem;
    }

    .numero-juego {
        font-size: 1rem;
    }

    .lugar,
    .hora {
        font-size: 0.9rem;
    }

    .equipo-logo {
        width: 25px;
        height: 25px;
    }

    .equipo span {
        font-size: 0.9rem;
    }

    .detalles {
        padding: 0.4rem 0.8rem;
    }

    .nav-tabs .nav-link {
        font-size: 0.9rem;
        padding: 8px 10px;
        width: 10rem;
    }

    .container {
        padding: 0;
    }

    /* modal */
    #modal-equipos img {
        width: 60px;
        height: auto;
    }

    #modal-equipos .score {
        font-size: 1.2rem;
        margin: .5rem;
        width: 70%;
    }
}

@media (max-width: 425px) {

    #modal-equipos {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    #modal-equipos img {
        width: 50px;
        height: auto;
    }

    #modal-equipos .score {
        font-size: 1.2rem;
        margin: 1rem;
    }

    .nav-jornadas button {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        width: 100%;
        max-width: 250px;
        padding: 0.5rem 1rem;
        margin: 0.5rem auto;
        gap: 5px;
    }
}