html{
    width: 100%;
    height: 100%;
}
body {
    margin: 0;
    line-height: 1.6;
    background-color: #f7f7f7;
    height: 100%;
    width: 100%;
}



.repehead{
    font-family: 'Zilla Slab', sans-serif;
    background-color: #ff6600;
    color: black;
    text-align: right;
    font-size: 1em;
    font-weight: bold;
    margin-top: 0;
}

.equipo {
    text-align: left;
    padding-bottom: 4rem;
}

.descripcion {
    padding-left: 5rem;
    background-color: #ff6600;
    color: white;
    display: inline-block;
    border-radius: 25px;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    font-size: 20px;
    font-family: "Roboto", sans-serif;
    margin-top: 10px;
    max-width: 100%;
    line-height: 30px;
    padding-bottom: 1rem;
    padding-top: 1rem;
    padding-right: 10rem;
    margin-right: 10em;
    text-align: left;
}



.repensar_texto {
    line-height: 3.5rem;
}

.directores, .alumnos {
    padding-left: 40px;
    text-align: center;
}

h2 {
    font-family: 'Zilla Slab', sans-serif;
    font-size: 2em;
    margin-bottom: 20px;
    text-align: left; /* Align text to the left */
    font-weight: bolder;
}

/*
.perfil-container {
    display: flex; /* Change grid to flex 
    justify-content: space-between; /* Distribute items evenly 
    align-items: center; /* Align items vertically 
    overflow-x: auto;  Allow horizontal scrolling if needed 
    
}
.perfil-container > * {
    margin-bottom: 80px;
}

.perfil-container > :nth-last-child(2):nth-child(odd),
.perfil-container > :nth-last-child(2):nth-child(even) {
    grid-column: span 2;
    justify-self: center;
}

.perfil-container > :nth-last-child(1):nth-child(odd) {
    grid-column: span 4;
    justify-self: center;
}
*/
.perfil-container {
    display: grid; /* Change from flex to grid */
    grid-template-columns: repeat(4, 1fr); /* Define the number of columns */
    gap: 20px; /* Gap between grid items */
    justify-content: center; /* Center-align grid items horizontally */
    align-items: center; /* Align grid items vertically */
}

.item:nth-last-child(-n + 4) {
    grid-row: 1; /* Assign to the top row */
}

.item:nth-last-child(-n + 3) {
    
    grid-row: 2; /* Assign to the bottom row */
}

.perfil{
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 80%;
    height:50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s ease;
}

.perfil img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.perfil:hover img {
    transform: scale(1.05);
}

a {
    text-decoration: none;
    color: black;
}




.perfil p {
    font-family: "Roboto", sans-serif;
    margin-top: 10px;
    font-size: 0.9em;
}
a .item:hover .perfil {
    transform: translateY(-10px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}
.info{
    display: flex;
    flex-direction: row;
}

p {
    font-family: "Roboto", sans-serif;
    margin-top: 10px;
    font-size: 1em;
    font-weight: bolder;
}

/* Media Queries for Responsive Design */
@media (max-width: 800px) {
    .contenedor-nav {
        flex-direction: column;
        align-items: center;
    }

    .nav {
        flex-direction: column;
        align-items: center;
        width: auto;
    }

    .nav a {
        margin: 10px 0;
    }

    .repehead {
        text-align: center;
        width: 100%;
        padding: 5px 10px;
        font-size: 1.2em;
    }

    .descripcion {
        padding: 10px;
        font-size: 1em;
        padding-right: 1rem;
        margin-right: 0;
    }

    .perfil-container {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .perfil {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .contenedor-nav {
        flex-direction: column;
    }

    .nav {
        flex-direction: column;
        width: auto;
    }

    .nav a {
        margin: 10px 0;
    }

    .descripcion {
        padding: 10px;
        font-size: 1em;
        padding-right: 1rem;
        margin-right: 0;
    }

    .perfil-container {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .perfil {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .repehead {
        font-size: 1.2em;
    }

    .descripcion {
        font-size: 0.9em;
    }

    h2 {
        font-size: 1.5em;
    }

    .perfil-container {
        grid-template-columns: 1fr;
    }

    .perfil {
        width: 100%;
    }

    .nav {
        text-align: center;
    }

    .nav a {
        font-size: 1em;
        padding: 10px 0;
    }
}

@media (max-width: 450px) {
    .contenedor-nav {
        flex-direction: column;
        align-items: center;
    }

    .nav {
        flex-direction: column;
        align-items: center;
        width: auto;
    }

    .nav a {
        margin: 5px 0;
        font-size: 0.8em;
    }

    .repehead {
        text-align: center;
        width: 100%;
        padding: 5px 10px;
        font-size: 0.9em;
    }

    .descripcion {
        padding: 10px;
        font-size: 0.8em;
        padding-right: 1rem;
        margin-right: 0;
    }

    .perfil-container {
        grid-template-columns: 1fr;
    }

    .perfil {
        width: 100%;
    }

    h2 {
        font-size: 1em;
    }

    p {
        font-size: 0.8em;
    }
}