body {
    margin: 0 10px;
}

.contenedor_certificados {
    padding: 0px 20px 0px 20px;
}

.lista_certificados {
    list-style: none;
    display: flex;
    justify-content: space-between;
    padding: 0px;
}

.nav {
    padding-left: 0;
}

.nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding-left: 0px;
}

.nav img {
    margin-left: 0px;
}

.nav a {
    text-decoration: none;
    color: black;
    font-size: 20px;
    font-family: 'Raleway', sans-serif;
    font-weight: bold;
    padding: 10px 20px;
    background-color: #f0f0f0;
    border-radius: 5px;
    
}

.facebook {
    text-align: center;
}

#galeria div img {
    width: 100%;
    height: auto;
    border: 2px solid black;
}

h1 {
    text-align: center;
}

.lista-items {
    padding: 0%;
}

.lista {
    display: flex;
    justify-content: center;
    text-decoration: none;
    text-align: center;
    font-size: 17px;
}

#galeria {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

#galeria div {
    flex: 1 1 calc(33.33% - 20px);
    text-align: center;
}

#galeria div img {
    width: 30vw;
    height: 35vh;
    max-height: 40vh;
    object-fit: cover;
    border: 2px solid #333;
}

#galeria div p {
    max-width: 90%;
    margin: 0 auto;
    
}

.texto-final {
    padding: 0% 10%;
}

.lista-atletismo {
    text-decoration: none;
    font-size: 17px;
}

.temporal {
    text-align: center;
    font-size: 18px;
}

p,
h2 {
    font-family: Arial, Calibri, sans-serif;
    font-style: normal;
    text-align: center;
    font-size: 17px;
}

.logo-face-wats {
    width: 25px;
    height: 25px;
}

.git {
    margin: auto;
    border-style: none;
    width: 25px;
    height: 25px;
}

.boton-flotante {
    transition: background-color 0.8s ease;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999;
}

#boton-inicio {
    border: 2px solid #000000;
    border-radius: 50%;
    box-shadow: 8px 7px 15px #000000;
    background-color: white;
    color: black;
    padding: 15px 32px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    transition: background-color 0.8s ease;
    transition: transform 0.3s ease;
}

#boton-inicio:hover {
    background-color: black;
    box-shadow: 8px 7px 15px black;
    transform: scale(1.1);
    color: white;
}

footer {
    text-align: center;
    padding: 10px;
    background-color: #333;
    color: #fff;
    font-size: 14px;
    margin-left: -10px;
    margin-right: -10px;
    width: calc(100% + 20px);
    box-sizing: border-box;
}


@media (min-width: 280px) and (max-width: 480px) {
    body {
        margin: 0%;
    }

    .contenedor_certificados {
        width: auto;
        padding: 0;
    }

    .lista_certificados {
        width: auto;
        display: grid;
        grid-template-columns: repeat(3, 1fr); /* 3 logos por fila */
        justify-items: center;
    }

    .lista_certificados li:last-child:nth-child(3n + 1) {
        grid-column: span 3; /* El último ocupa las 2 columnas de la fila */
        justify-self: center; /* Lo centra específicamente */
    }

    .logo img {
        width: 100px;
    }

    .nav ul {
        width: 100%;
        justify-content: space-around;
    }

    .nav a {
        font-size: 16px;
        padding: 7px 17px;
    }

    #galeria {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }

    #galeria div {
        flex: 1 1 100%;
    }

    #galeria div img {
        width: 90%;
        height: auto; 
    }

    .texto-final {
        padding: 0 5%;
    }

    .boton-flotante {
        bottom: 220px;
        position: fixed;
        bottom: 180px;
        right: 40px;
        z-index: 999;
    }

    #boton-inicio {
        padding: 10px 15px;
        font-size: 17px;
    }

    footer {
        width: auto;
        margin: 0;
    }
}

@media (min-width: 481px) and (max-width: 850px) {
    body {
        margin: 0;
    }

    .contenedor_certificados {
        width: auto;
        padding: 0;
    }

    .lista_certificados {
        display: grid;
        grid-template-columns: repeat(3, 1fr); /* 3 logos por fila */
        justify-items: center;
    }

    .lista_certificados li:last-child:nth-child(3n + 1) {
        grid-column: span 3; /* Ocupa las 3 columnas de la fila */
        justify-self: center;
    }

    .logo {
        flex-direction: column;
        align-items: center;
    }

    .nav li {
        margin: 10px 0;
    }

    #galeria {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-around;
    }

    #galeria div {
        flex: 1 1 calc(50% - 10px);
    }

    .texto-final {
        padding: 0% 10%;
    }

    .boton-flotante {
        bottom: 220px;
        right: 35px;
        margin: 0px;
    }

    #boton-inicio {
        padding: 10px 15px;
        margin: 0%;
    }

    footer {
        width: auto;
        margin: 0;
    }
}








