body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
}

.container {
    text-align: center;
    padding: 40px;
}

.title {
    color: var(--red);
    font-size: 36px;
    margin-bottom: 10px;
}

/* Estilo para la cuadrícula de equipo con diferentes columnas para cada sección */
.team-grid {
    display: grid;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Primera sección: 2 columnas */
.team-grid.section-one {
    grid-template-columns: repeat(2, 1fr);
}

.team-member .position, 
.team-member .description {
    text-align: center; /* Justifica el texto */
    padding-left: 12px;
    padding-right: 12px;
    font-size: 15px;
}

.section-one .team-member .position{
    color: #000000;
}

/* Segunda sección: 3 columnas */
.team-grid.section-two {
    grid-template-columns: repeat(3, 1fr);
}

/* Tercera sección: 5 columna */
.team-grid.section-three {
    grid-template-columns: repeat(5, 1fr);
}

/* Tarjetas de equipo generales */
.team-member {
    position: relative;
    width: 100%;
    height: 200px; /* Altura fija para las tarjetas de la primera y segunda sección */
    perspective: 1000px;
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.6s ease;
    cursor: pointer;
    align-items: center;
    text-align: center;
    padding-top: 10px;
    padding-bottom: 10px;
}

.team-member .front, .team-member .back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    transition: transform 0.6s;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.team-member .front {
    background-color: white;
    z-index: 2;
}

.team-member .back {
    background-color: #ffffff;
    transform: rotateY(180deg);
    z-index: 1;
}

.team-member.flip .front {
    transform: rotateY(180deg);
}

.team-member.flip .back {
    transform: rotateY(0deg);
}

.team-member h2 {
    margin: 0;
    font-size: 22px;
    color: #000000;
}

.position {
    font-size: 16px;
    color: var(--red);
    margin-bottom: 10px;
}

.description {
    font-size: 15px;
    color: #000000;
    padding: 0 20px;
    text-align: justify;
}

/* Tarjetas de la sección de Recursos */
.team-grid.section-three .team-member {
    height: 100px;
}

.fade-out {
    opacity: 0; /* Hacer que la tarjeta se desvanezca */
}

.team-member:hover {
    transform: translateY(-10px);
}

/* Estilo para los iconos de contacto */
.contact-icons {
    margin-top: 10px;
}

.contact-icon {
    display: inline-block;
    font-size: 24px;
    color: var(--red);
    margin: 0 10px;
    text-decoration: none;
    transition: transform 0.6s ease;
}

.contact-icon:hover {
    transform: scale(1.3);
}

.team-member-link{
    font-size: 15px;
    text-decoration: none;
}

/* Estilo para las etiquetas o "tags" */
.tags {
    margin-top: 10px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap; /* Permite que las etiquetas se ajusten en múltiples líneas */
    padding: 10px; /* Añadir padding alrededor de las etiquetas */
    align-items: center;
    text-align: center;
    padding: 10px;
    justify-content: center;
}

.tag {
    display: flex;
    background-color: var(--red);
    color: var(--red-font);
    font-size: 10px;
    padding: 5px 5px;
    border-radius: 15px;
    text-transform: uppercase;
    transition: transform 0.6s ease;
}
.tag:hover{
    transform: scale(1.1);

}


.section-two .team-member .tags .tag{
    font-size: 10px;
    padding-left: 10px;
    padding-right: 10px;
}


/* Estilo para el icono de cambio de cara en la esquina inferior derecha */
.flip-icon {
    position: absolute;
    bottom: 10px;
    right: 10px;
    font-size: 20px;
    color: var(--red);
    cursor: pointer;
}

.flip-icon:hover {
    transform: scale(1.2);
}

.team-grid.section-three .team-member h2{
    font-size: 18px;
}


/* Media queries para móviles */
@media (max-width: 768px) {
    .position{
        font-size: 10px;
    }

    h2{
        font-size: 10px;
    }

    .team-grid.section-one {
        grid-template-columns: 1fr; /* Una columna */
        gap: 20px; /* Espacio entre los cuadros */
    }
    .team-member .position, 
    .team-member .description {
        font-size: 12px;
    }

    .team-grid.section-two {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px; /* Espacio entre los cuadros */
    }

    .team-grid.section-three{
        grid-template-columns: 1fr; /* Una columna */
    }

    .team-member-link{
        font-size: 10px;
    }

    .team-grid.section-three .team-member {
        height: 50px;
    }

    .team-grid.section-three .team-member h2{
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .position{
        font-size: 10px;
    }

    h2{
        font-size: 10px;
    }

    .team-grid.section-one {
        grid-template-columns: 1fr; /* Una columna */
        gap: 20px; /* Espacio entre los cuadros */
    }

    .team-member .position, 
    .team-member .description {
        font-size: 12px;
    }

    .team-grid.section-two {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px; /* Espacio entre los cuadros */
    }

    .team-grid.section-three{
        grid-template-columns: 1fr; /* Una columna */
    }

    .team-member-link{
        font-size: 10px;
    }

    .team-grid.section-three .team-member {
        height: 50px;
    }

    .team-grid.section-three .team-member h2{
        font-size: 15px;
    }

    .tag {
        font-size: 8px;
    }
}


/* Modal de los creditos y agradecimientos*/
#creditosModal{
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100% !important;
    height: 100% !important;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.creditos-content {
    background-color: black;
    width: 100%;
    height: 100%;
    position: relative;
    border: none;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    background-image: url('../../img/games/memoria/geometry2.png');
}

#creditosModal .creditos-content #creditosmModalFrame {
    width: 100%;
    height: 100%;
    border: none;
}

.closeModalCreditos {
    color: var(--red);
    font-size: 36px;
    font-weight: bold;
    position: absolute;
    padding-left: 5px;
    padding-right: 5px;
    padding-top: 5px;
    top: 10px;
    right: 30px;
    cursor: pointer;
    transition: transform 0.6s ease;
}

.closeModalCreditos:hover,
.closeModalCreditos:focus {
    transform: scale(1.5);
    color: var(--red);
    text-decoration: none;
}

.image-container{
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-container img{
    width: 20rem;
}
