.section-7 {
    background-color: #fffff7;
    padding-top: 3rem;
}

.gallery {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-evenly;
}

.gallery-link {
    position: relative;
    margin: 4rem 1rem;
}

.gallery-link:hover {
    cursor: pointer;
}

.gallery-link::before {
    content: "";
    position: absolute;
    top: 0.8vw;
    left: 90%;
    width: 0.15rem;
    height: 0;
    background-color: #fffff7;
    z-index: 10;
    transition: height 0.6s;
}

.gallery-link:hover::before {
    height: 80%;
}

.gallery-link::after {
    content: "";
    position: absolute;
    top: 15%;
    left: 4rem;
    width: 0;
    height: 0.15rem;
    background-color: #fffff7;
    transition: width 0.6s;
}

.gallery-link:hover::after {
    width: 90%;
}

.training-img {
    width: 33vw;
    height: 23vw;
    object-fit: cover;
    box-shadow: 2rem 2rem 5rem #fffff7, 1rem 1rem 3rem #000000;
    transition: all 0.5s;
}

.gallery-link:hover .training-img {
    box-shadow: 1.5rem 1.5rem 6rem #000000, 2rem 2rem 4rem #fffff7;
    filter: blur(0.5rem);
    opacity: 0.4;
    transform: scale(1.1);
    cursor: pointer;
}

.training-name {
    position: absolute;
    top: 2rem;
    left: 4.5rem;
    font-size: 3rem;
    font-weight: 400;
    letter-spacing: 0.1rem;
    color: #fffff7;
    text-shadow: 0.2rem 0.1rem 0.3rem #000000;
    font-family: "Alegreya Sans", sans-serif;
    overflow: hidden;
    transition: width 0.3s;
}

.training-description {
    font-family: "Alegreya Sans", sans-serif;
    position: absolute;
    text-align: center;
    bottom: 3vw;
    left: 0;
    width: 85%;
    font-size: 1.8rem;
    font-weight: 500;
    color: #000000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s;
}

.gallery-link:hover .training-description {
    opacity: 1;
    visibility: visible;
    transition: opacity 1s 0.5s;
}

@media (max-width: 1024px) {
    .gallery {
        flex-direction: column;
        align-items: center;
    }

    .training-img {
        width: 46rem;
        height: 36rem;
    }

    .training-description {
        font-size: 1.6rem;
        bottom: 2vw;
    }
}

@media (max-width: 1200px) {
    .training-description {
        font-size: 1.6rem;
        bottom: 0.2vw;
    }
}

@media (max-width: 1366px) {
    .training-description {
        bottom: 1vw;
    }
}

@media (max-width: 1536px) {
    .section-7 {
        height: auto;
    }

    .training-description {
        bottom: 1.5vw;
    }
}

@media (max-width: 500px){
    .section-7{
        margin-top: 0;
        padding-top: 0;
    }
}

@media (max-width: 393px){
    .section-7{
        margin-bottom: 0;
        padding-bottom: 0;     
      
    }

    .gallery{
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-evenly; 
    }

    .training-name {
        position: absolute;
        top: 2rem;
        left:3rem;
        font-size: 3rem;
        font-weight: 400;
        letter-spacing: 0.1rem;
 
}
    .training-description {
        top:16vw
    }
 
}