* {
    margin: 0;
    padding: 0;
    font-size: 0;
}

@media only screen and (min-width: 0px) {

    #top-activity-image {
        display: none;
    }
    
    .flex-wrapper {
        opacity: 0;
        width: 90%;
        margin: 15vw auto;
        height: auto;
        display: grid; 
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        transition: opacity 0.6s ease-in-out;
    }
    
    .activity-entity {
        height: 150px;
        width: 150px;
        margin: 0 auto;
        margin-bottom: 3.2vw;
        border-radius: 10px;
        flex-grow: 1;
        flex-basis: 48%;
        background-size: cover;
        transition: transform 1s ease-in-out;
        overflow: hidden;
    }
    
    .activity-entity:nth-child(1) {
        background-image: url(hiking.jpg);
    }
    
    .activity-entity:nth-child(2) {
        background-image: url(bicycling.jpg);
    }
    
    .activity-entity:nth-child(3) {
        background-image: url(fishing.jpg);
    }
    
    .activity-entity:nth-child(4) {
        background-image: url(bathing.jpg);
    }
    
    .activity-entity:nth-child(5) {
        background-image: url(northernlights.jpg);
    }
    
    .activity-entity:nth-child(6) {
        background-image: url(sightseeing.jpg);
    }
    
    .activity-entity:nth-child(7) {
        background-image: url(boat.jpg);
    }
    
    .activity-entity:nth-child(8) {
        background-image: url(skiing.jpg);
    }
    
    
    .filter {
        opacity: 0;
        width: 100%;
        height: calc(100% + 2px);
        background-color: rgba(200,200,200,0.8);
        transition: opacity 0.6s ease-in-out;
    }
    
    .activity-entity:hover {
        transform: scale(0.95);
    }
    
    .activity-entity:hover > .filter {
        opacity: 1;
        cursor: pointer;
    }
    
    .activity-title {
        width: 90%;
        margin: 0 auto;
        padding: 35% 0 5%;
        text-align: center;
        font-size: 16px;
        font-family:'Hind Siliguri', sans-serif;
        font-weight: 100;
        color: #474747; 
    }
    
    #card {
        display: none;
        width: 86%;
        height: 68vh;
        max-height: 500px;
        opacity: 0;
        background-color: white;
        border-radius: 10px;
        box-shadow: 0 0 20px rgba(160,160,160,0.8);
        position: fixed;
        top: 16vh;
        left: 7%;
        transition: opacity 0.4s ease-in-out;
    }
    
    #card-title {
        margin: 6% 10% 5%;
        font-size: 20px;
        font-family:'Hind Siliguri', sans-serif;
        font-weight: 100;
        color: #600080;
    }
    
    #card-desc {
        width: 80%;
        margin: 0% 10%;
        font-size: 16px;
        font-family:'Hind Siliguri', sans-serif;
    
    }
    
    #card-img {
        position: absolute;
        top: 50%;
        left: 10%;
        width: 80%;
        height: 45%;
        background-size: cover;
        border-radius: 10px;
    }
    
    #card-btn {
        width: 18px;
        height: 18px;
        position: absolute;
        top: 5%;
        right: 10%;
        border: none;
        background-color: white;
    }
    
    #card-btn span {
        display: block;
        width: 100%;
        height: 15%;
        background-color: #787878;
    }
    
    #card-btn:hover > #card-btn span {
        background-color: red;
    }
    
    #card-btn span:nth-child(1) {
        transform: rotate(45deg);
    }
    
    #card-btn span:nth-child(2) {
        margin-top: -15%;
        transform: rotate(-45deg);
    }
    }

@media only screen and (min-width: 996px) {

#top-activity-image {
    opacity: 0;
    display: block;
    width: 80%;
    height: 30vw;
    margin: 4vw auto 0;
    border-radius: 10px;
    background-image: url("activity.jpg");
    background-size: cover;
    transition: opacity 0.6s ease-in-out;
}

.flex-wrapper {
    margin-top: 70px;
    width: 84%;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.activity-entity {
    width: 250px;
    height: 250px;
    margin: 60px auto 0;
}

.activity-title {
    width: 60%;
    border-bottom: 1.2px solid #600080;
    font-size: 18px;
}

#card {
    display: none;
    width: 76%;
    height: 35vw;
    opacity: 0;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(160,160,160,0.8);
    position: fixed;
    top: 13vh;
    left: 12%;
    transition: opacity 0.4s ease-in-out;
}

#card-title {
    margin: 6% 5% 5%;
    font-size: 2vw;
    font-family:'Hind Siliguri', sans-serif;
    font-weight: 100;
    color: #600080;
}

#card-desc {
    width: 35%;
    margin: 0% 5%;
    font-size: 1.25vw;
    font-family:'Hind Siliguri', sans-serif;
    line-height: 2.5em;

}

#card-img {
    position: absolute;
    top: 10%;
    right: 7%;
    left: auto;
    width: 38%;
    height: 80%;
    background-size: cover;
    border-radius: 10px;
}

#card-btn {
    width: 2vw;
    height: 2vw;
    position: absolute;
    top: 2.5%;
    right: 1.5%;
    border: none;
    background-color: white;
}

#card-btn span {
    display: block;
    width: 100%;
    height: 15%;
    background-color: #787878;
}

#card-btn:hover > #card-btn span {
    background-color: red;
}

#card-btn span:nth-child(1) {
    transform: rotate(45deg);
}

#card-btn span:nth-child(2) {
    margin-top: -15%;
    transform: rotate(-45deg);
}
}

@media only screen and (min-width: 1480px) {

    main {
        width: 1480px;
        margin: 0 auto;
    }

    #top-activity-image {
        height: 444px;
        margin: 80.2px auto 0;
    }

    .flex-wrapper {
        margin-bottom: 200px;
    }
    
    .activity-entity {
        height: 236.8px;
    }
    
    #card {
        width: 1185px;
        height: 518px;
        top: 13vh;
        left: calc((100vw - 1200px)/2);
    }
    
    #card-title {
        font-size: 29.6px;
    }
    
    #card-desc {
        font-size: 20px;
    }

    #card-btn {
        width: 29.6px;
        height: 29.6px;
    }
    

}