#cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    background: #e4f9f5;
    margin-top: 50px;
    padding-top: 30px;
    padding-bottom: 20px;
}

.card {
    background-color: white;
    width: 25vw;
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    border-radius: 1px;
    margin: 30px;
    line-height: 1.7;
    box-shadow: 3px 3px 20px black;
}

.card-img > img {
    width: 100%;
    object-fit: contain;
    position: relative;
}

.card-h1 {
    font-size: 25px;
    text-align: center;
}

.card-h1:hover {
    transform: scale(1.05);
}

.card-h1 > a {
    text-decoration: none;
    color: black;
    font-weight: bold;
    cursor: pointer;
}

.card-sub {
    margin: 0;
    font-size: 12px;
    text-align: center;
}

@media only screen and (max-width: 600px) {
    .card-sub {
        font-size: 10px;
    }
}

.card-p {
    text-align: center;
    margin: 10px;
}

.button {
    background-color: blue;
    margin-bottom: 10px;
    text-align: center;
    padding: 10px;
    border-radius: 100px;
}

.button > a {
    text-decoration: none;
    color: white;
}

.button:hover {
    transform: scale(1.04);
}

@media only screen and (max-width: 1260px) {
    .card-h1 {
        font-size: 22px;
    }

    .card-p {
        font-size: 16px;
    }
}

@media only screen and (max-width: 1150px) {
    .card {
        width: 27vw
    }
}

@media only screen and (max-width: 1030px) {
    .card {
        width: 25vw
    }

    .card-h1 {
        font-size: 20px;
    }

    .card-p {
        font-size: 15px;
    }
}

/* to whoever is reading this code, forgive the loads of media queries, i didn't set a general font-size at first and now i am too tired to. */

@media only screen and (max-width: 1000px) {
    .card-h1 {
        font-size: 19px;
    }

    .card-p {
        font-size: 14px;
    }
}

@media only screen and (max-width: 950px) {
    .card-h1 {
        font-size: 17px;
    }

    .card-p {
        font-size: 13px;
    }
}

@media only screen and (max-width: 849px) {
    .card {
        margin: 20px;
        width: 26vw;
    }

    .card-h1 {
        font-size: 16px;
    }
}

@media only screen and (max-width: 775px) {
   .card {
        margin: 20px;
        width: 40vw;
   } 

   .card-h1 {
    font-size: 20px;
   }

   .card-p {
    font-size: 15px;
   }
}

@media only screen and (max-width: 630px) {
    .card-h1 {
        font-size: 18px;
    }
}

@media only screen and (max-width: 580px) {
    .card {
        margin: 15px;
        width: 42vw;
    }

    .card-h1 {
        font-size: 17px;
    }
}

@media only screen and (max-width: 500px) {
    .card {
        margin: 10px;
        width: 44vw;
    }

    .card-h1 {
        font-size: 16px;
    }

    .card-p {
        font-size: 14px;
    }
}

@media only screen and (max-width: 467px) {
    .card {
        margin-bottom: 20px;
        width: 60vw;
    }
}

@media only screen and (max-width: 350px) {
    .card -h1 {
        font-size: 15px;
    }
}