.gallery-section {
    padding-top: 129px;
    min-height: 50em;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

h1 {
    margin: 1.5em 1em 0 1em;
}

.title-text {
    text-align: center;
    margin: 2em 1em 0 1em;
}

button {
    width: 100%;
    height: 100%;
    border: 0;
    background: none;
    font-size: 12px;
    color: black;
    text-align: justify;
    text-justify: inter-word;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(5, 200px);
    grid-template-rows: repeat(3, 200px);
    gap: 2.5em;
    margin: 4em 0 4em 0;
}
  
.gallery-container {
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease-in-out, border 0.3s ease-in-out;
    border: solid 2px rgb(119, 94, 61);
    box-sizing: border-box;
    z-index: 0;
}
  
.image-info {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    transition: transform 0.3s ease-in-out;
    flex-direction: column;
    font-size: 12px;
    color: white;
    text-align: justify;
    text-justify: inter-word;
}

.gallery-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-container:hover {
    transform: scale(1.5);
    border: 4px solid var(--lighterbrown);
    z-index: 2;
}
  
.gallery-container:hover .image-info {
    visibility: visible;
}

.image-info-container {
    transition: 0.3s ease-in-out;
    visibility: hidden;
    display: flex;
    position: fixed;
    z-index: 5;
    flex-direction: column;
    margin: 0;
    top: 14%;
    height: 75vh;
    width: 100%;
    transform: translateY(-10em);
    opacity: 0;
    font-size: 18px;
    padding-bottom: 1em;
    padding-top: 1em;
    justify-content: center;
}

.image-info-container.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.info-container-button {
    height: 2em;
    width: 2em;
    margin-top: 2em;
    background-image: url(/img/gallery/x.png);
    background-repeat: no-repeat;
    background-size: contain;
}

.info-container-button:hover {
    cursor: pointer;
}

.info-container-img {
    max-width: 25em;
    max-height: 18em;
    margin-bottom: 1em;
}

.info-container-div {
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 100%;
}

.info-container-div button {
    color: var(--brown);
    font-size: 3em;
    height: 100%;
    width: 100%;
    margin: 0 0.2em 0 0.2em 
}

.info-container-div button:first-child {
    text-align: right;
}

.info-container-div button:hover {
    cursor: pointer;
}

.cover {
    transition: opacity 0.3s ease-in-out;
    opacity: 0;
    visibility: hidden;
    background-color: rgba(88, 68, 54, 0.479);
    z-index:4;
    width: 100%;
    height: 100%;
    position: fixed;
    overflow: hidden;
    top: 0;
}

.cover.active {
    visibility: visible;
    opacity: 1;
}

@media only screen and (max-width: 1280px) {
    .gallery {
        grid-template-columns: repeat(3, 200px);
        grid-template-rows: repeat(5, 200px);
    }

    .info-container-img {
        max-width: 20em;
        max-height: 15em;
    }
}

@media only screen and (max-width: 700px) {
    .gallery {
        grid-template-columns: repeat(2, 200px);
        grid-template-rows: repeat(7, 200px);
    }

    .gallery-container:last-of-type {
        left: 7.5em;
    }
}

@media only screen and (max-width: 460px) {
    .gallery {
        gap: 2em;
        grid-template-columns: repeat(2, 150px);
        grid-template-rows: repeat(7, 150px);
    }

    .gallery-container:last-of-type {
        left: 5.75em;
    }

    .info-container-img {
        max-width: 15em;
        max-height: 15em;
    }
}

@media only screen and (max-width: 360px) {
    .gallery {
        grid-template-columns: repeat(1, 200px);
        grid-template-rows: repeat(13, 200px);
    }

    .gallery-container:last-of-type {
        left: auto;
    }

    .info-container-img {
        max-height: 15em;
        max-width: 15em;
    }
}

@keyframes click {
    0% {
        background-color: var(--plain);
    }

    50% {
        background-color: var(#ffdbc1);
    }

    100% {
        background-color: var(--plain);
    }
}