* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #85C1E9;

}

a {
    text-decoration: none;
}

.contenedor-gal {
    width: 90%;
    max-width: 800px;
    margin: auto;
}

/*HEADER*/

.contenedor {
    padding: 40px;
}

.contenedor .logo {
    text-align: center;
    margin-bottom: 40px;
}

.contenedor .logo h1 {
    color: white;
    font-size: 40px;


}

.contenedor .logo p {
    color: white;
    font-size: 20px;
}

.contenedor form {
    width: 100%;
    display: flex;
    justify-content: center;
}

.contenedor .barra-busqueda {
    width: 70%;
    height: 40px;
    line-height: 40px;
    background: #fff;
    padding: 0 20px;
    border-radius: 100px;
    border: none;
    text-align: center;
    font-size: 16px;
}

.contenedor .categorias {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.contenedor .categorias a {
    color: white;
    margin: 15px 20px;
    font-size: 18px;
    font-weight: 900;
}

.contenedor .categorias a.activo {
    color: black;
}

/*INICA GRID ANIMACIÓN*/

.grid {
    position: relative;
    width: 100%;
    transition: opacity 0.5s linear 1s;
}

.grid.imagenes-cargadas{
    opacity: 1;
}

.grid .item {
    position: absolute;
    display: block;
    padding: 0;
    margin: 10px;
    width: calc(33.33333333% - 20px);
  
}

.grid .item-contenido{
    position: relative;
}

.grid .item img {
    width: 100%;
    cursor: pointer;
    vertical-align: top;
 
}

.overlay{
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,.9);
    width: 100%;
    height: 100vh;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;

}

.overlay.activo{
    display: flex;
}

.overlay img{
    max-width: 100%;
}

.overlay .descripcion{
    display: block;
    background: #fff;
    padding: 20px;
    text-align: center;
    margin-top: 5px;
    border-radius: 10px;
    max-width: 50%;

}

.contenedor-img{
    position: relative;
}

.overlay #btn-cerrar-popup{
    background: none;
    font-size: 20px;
    color: #fff;
    border: none;
    cursor: pointer;
    position: absolute;
    right: -20px;
    top: -20px;
}