.gallery-block {
    padding: calc(100vw/36 * 1.5) calc(1/12*100vw);
    padding-top: 0;
}

.gallery-title {
    text-align: center;
    margin: 3.2rem 0;
}

svg {
    margin-top: 1.2rem;
}

.gallery-images {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    color: white;
    text-align: center;
}

.gallery-images img {
    width: 100%;
}

.gallery-images>div,
.box-img,
.box-text {
    aspect-ratio: 2 / 2;
}

.gallery-images div:hover {
.box-img:
}

.box-img {
    background-position: center;
    background-size: contain;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    position: relative;
}

.box-img p:first-of-type,
.box-text p:first-of-type {
    font-size: 30px;
    font-weight: 500;
    line-height: initial;
}

.box-img div {
    margin-bottom: 15px;
    /* inserirlo solo per il testo dentro al div
    line-height: 30px;
    */
    padding: 0 2rem;
    position: absolute;
}

.box-text {
    display: none;
    background-color: #002EA4;
    flex-direction: column;
    justify-content: center;
    gap: 0;
    padding: 2rem 2rem 15px 2rem;
}

.box-text div {
    margin: auto auto 0 auto;
}

.box-text div p:first-of-type {
    margin-bottom: 1.2rem;
}

@media (max-width: 975px) {
    .gallery-images {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 650px) {
    .gallery-images {
        grid-template-columns: 1fr;
        grid-row-gap: 1.6rem;
    }

    .gallery-images>div,
    .box-img,
    .box-text {
        aspect-ratio: 2 / 1;
    }
}

@media (max-width: 768px) {
    .gallery-block {
        padding: 1.6rem;
    }

    .box-text {
        padding: 1.6rem;
        align-items: center;
    }

}

@media (max-width: 1000px) {

    .box-img p,
    .box-text p:first-of-type {
        font-size: 24px !important;
    }
}
