@charset "utf-8";

body {
  font-family: Arial;
  margin: 0;
}

.gallery {
    width: 100%;
    display: flex;
    overflow-x: scroll;
}

.gallery div {
    width: 90%;
    display: grid;
    grid-template-columns: auto auto auto auto auto auto auto auto auto auto; /*add new "auto" for each new recipe card*/
    grid-gap: 0;
    padding: 2rem 0;
    flex: none;
}

.gallery div img {
    height: 100%;
    max-width:10em;
    object-fit: cover;
    filter: grayscale(100%) brightness(50%);
    mix-blend-mode: multiply;
    border-radius: 2em;
    padding: .5rem;
    transition: transform 0.5s, filter 0.5s;
}

.gallery::-webkit-scrollbar {
    display: none;
}

.gallery-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
}

#backBtn, #nextBtn {
    width: 3rem;
    cursor: pointer;
    margin: 0 1rem;
}

.gallery div img:hover {
    filter: grayscale(0);
    cursor: pointer;
    transform: scale(1.1);
}

.overlay-container {
    position: relative;
    display: inline-block;
}

.title {
    position: absolute;
    top: 35%;
    left: 55%;
    transform: translate(-55%, -50%);
    color: #E7D5C4;
    font-weight: bold;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7);
    pointer-events: none;
    background-color: rgba(173, 12, 39, 0.33);
    padding: 10%;
    transition: all 0.7s ease;
    font-size: 125%;
}

.overlay-container:hover .title {
    padding: 10%;
    background-color: rgba(173, 12, 39, 0.8);
    transform: translate(-55%, 10%);
}

@media screen and (min-width: 900px) {
    .gallery {
        margin-bottom: 0%;
    }
    
    .gallery div img {
        height: 100%;
    }
    
    #backBtn, #nextBtn {
        width: 5rem;
        margin: 1rem;
    }
}

@media screen and (min-width: 1024px) {
    .gallery div img {
        padding: 1rem;
        max-width: 15em;
    }
    
    
    .title {
        top: 50%;
        left: 50%;
        padding: 15%;
        font-size: 150%;
    }
    
    .overlay-container:hover .title {
        transform: translate(-55%, 50%);
    }
    
}
