* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #f3f3f3;
    font-family: "Open Sans", sans-serif;
}

a {
    text-decoration: none;
}

.contenedor {
    width: 90%;
    max-width: 800px; /*para las filas*/
    margin: auto;
}

/*-----------------------------------------*/
/*  HEADER  */
/*-----------------------------------------*/

header {
    padding: 50px 0;
}

header .logo {
    text-align: center;
    margin-bottom: 40px;
}

header .logo p {
    color: #9b9b9b;
}

.logo img {
    width: 30px;
}

header form {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

header .barra-busqueda {
    width: 70%;
    height: 40px;
    line-height: 40px;
    background: #fff;
    padding: 0 20px;
    border-radius: 180px;
    border: none;
    text-align: center;
    font-size: 16px;
}

header .categorias {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

header .categorias a {
    color: #9b9b9b;
    margin: 10px 20px;
    font-size: 18px;
    font-weight: 700;
}

header .categorias a.activo {
    color: #000;
}

/*-----------------------------------------*/
/*  Grid  */
/*-----------------------------------------*/

.grid {
    position: relative;
    width: 100%;
    opacity: 0;
    transition: opacity 0.5s linear 1s;
}

.grid.imagenes-cargadas {
    opacity: 1;
}

.grid .item {
    position: absolute;
    display: block;
    padding: 0;
    margin: 10px;
    width: calc(33.333333% - 20px);
}

.grid .item-contenido {
    position: relative;
}

.grid .item img {
    border-radius: 10px;
    cursor: pointer;
    vertical-align: top;
    width: 100%;
}

/*-----------------------------------------*/
/*  Overlay  */
/*-----------------------------------------*/

.popup {
    background: rgba(0, 0, 0, 0.9);
    bottom: 0;
    height: 100vh;
    left: 0;
    position: fixed;
    right: 0;
    top: 0;
    width: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.popup.activo {
    display: flex;
}

.popup img {
    max-width: 100%;
}

.popup .descripcion {
    display: block;
    background: #fff;
    padding: 20px;
    text-align: center;
    margin-top: 5px;
    border-radius: 10px;
    max-width: 50%;
}

.contenedor-img {
    position: relative;
}

.popup #btn-cerrar-popup {
    background: none;
    font-size: 20px;
    color: #fff;
    border: none;
    cursor: pointer;
    position: absolute;
    right: -20px;
    top: -20px;
}

/*-----------------------------------------*/
/*  Footer  */
/*-----------------------------------------*/

footer .redes-sociales {
    display: flex;
    align-content: center;
    justify-content: center;
    padding: 20px;
    flex-wrap: wrap;
}

footer .redes-sociales a {
    display: block;
    width: 60px;
    height: 60px;
    background: #000;
    margin: 20px;
    text-align: center;
    border-radius: 100px;
    transition: 0.3s ease all;
}

footer .redes-sociales a i {
    font-size: 20px;
    color: white;
    line-height: 60px;
}

footer .redes-sociales .github {
    background: black;
}
footer .redes-sociales .twitter {
    background: #1da1f2;
}

footer .contenedor-icono:hover a {
    animation: icono 1s ease;
}

@keyframes icono {
    from {
        transform: rotate3d(0, 0, 0, 0);
    }
    to {
        transform: rotate3d(0, 1, 0, 360deg);
    }
}

footer .creado-por {
    margin-bottom: 40px;
    text-align: center;
    font-size: 14px;
    color: #0099ff;
}

footer .creado-por a {
    color: #000;
}

footer .creado-por a:hover {
    text-decoration: underline;
}

/*-----------------------------------------*/
/*  Mediaqueris  */
/*-----------------------------------------*/

@media screen and (max-width: 700px) {
    .grid .item {
        width: calc(50% - 20px);
    }

    header .barra-busqueda {
        width: 100%;
    }
}

/*-----------------------------------------*/
/*  ScrollBar  */
/*-----------------------------------------*/

body::-webkit-scrollbar {
    width: 10px;
}

body::-webkit-scrollbar-thumb {
    border-radius: 10px;
    background: #0099ff81;
}

body::-webkit-scrollbar-track {
    background: #d3d3d394;
    border-radius: 10px;
}
