*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
/* common */

ul{
    list-style-type: none;
}

a{
    text-decoration: none;
    color: white;
}
.flex{
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* header */
header{
    height: 12vh;
    background-color: rgb(49, 181, 234);
    color: white;
}
header.dark{
    background-color: navy;
}

nav{
    padding: .5rem 2rem;
    width: 100%;
    height: 100%;
}

.nav-logo{
    justify-content: space-around;
    color: black;
    width: 25%;
    height: 100%;
}

.nav-logo img{
    width: 15%;
    height: 100%;
}

.nav-logo h1{
    font-size: 2rem;
    color: navy;
}
.nav-logo h1.dark{
    color: rgb(198, 0, 0);
}

/* nav-buttons */
.nav-buttons{
    width: 20%;
    justify-content: space-evenly;
}

.nav-buttons a{
    width: fit-content;
    background-color: navy;
    padding: .8rem;
    border-radius: .2rem;
    cursor: pointer;
    text-align: center;
    font-weight: bold;

}
.nav-buttons a.dark{
    background-color: rgb(198, 0, 0);
}

.nav-buttons .favs-btn p{
    margin: 0 .5rem;
}

/* main */
.main{
    width: 100%;
    height: 88vh;
    justify-content: center;
    flex-direction: column;
    background-color: rgb(139, 222, 222);
}
.main.dark{
    background-color: black;
}

.search-bar{
    width: 40%;
    margin: 1.5rem;
    z-index: 1;
    height: 85vh;
}

.search-bar form{
    position: relative;
}

.search-bar .search-icon{
    border-right: 3px solid navy;
    box-shadow: 0px 5px 10px 3px navy;
    outline: none;
    border: none;
    border-top-right-radius: .8rem;
    border-bottom-right-radius: .8rem;
    width: 14%;
    padding: .8rem;
    text-align: center;
    font-size: 1rem;
    font-weight: bold;
    background-color: white;
    cursor: pointer;
}
.search-bar .search-icon.dark{
    border-right: 3px solid rgb(198, 0, 0);
    box-shadow: 0px 5px 10px 3px rgb(198, 0, 0);
}

.search-bar .search-bar-text{
    border-left: 3px solid navy;
    box-shadow: -1px 4px 10px 3px navy;
    border: none;
    outline: none;
    border-top-left-radius: .8rem;
    border-bottom-left-radius: .8rem;
    width: 85%;
    padding: .8rem;
    font-size: 1rem;
    font-weight: bold;
}
.search-bar .search-bar-text.dark{
    border-left: 3px solid rgb(198, 0, 0);
    box-shadow: -1px 4px 10px 3px rgb(198, 0, 0);
}

/* search result list*/

.search-result{
    position: absolute;
    width: 40%;
}

.single-search-result{
    border-radius: .5rem;
    background-color: rgb(47 37 37 / 49%);
    backdrop-filter: blur(2px);
    height: 4.5rem;
    width: 100%;
    padding: 0 1rem;
    margin-top: .5rem;
    justify-content: space-between;
}

.img-info{
    height: 100%;
    width: 50%;
    /* border: 2px solid red; */
}

.img-info img{
    height: 100%;
}

.hero-info{
    /* border: 2px solid green; */
    font-size: 1.2rem;
    font-weight: bold;
}

.hero-info a:hover{
    color: rgb(198, 0, 0);
}

.add-to-fav-btn{
    width: fit-content;
    border-radius: .2rem;
    background-color: navy;
    border: none;
    outline: none;
    color: white;
    padding: .5rem;
    font-weight: bold;
    font-size: .9rem;
    cursor: pointer;
}

.add-to-fav-btn.dark{
    background-color: rgb(198, 0, 0);
}

/* image section */
.superhero-img-box{
    height: 70%;
    width: 100%;
    /* border: 2px solid green; */
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    z-index:  0;
}

.superhero-img-box img{
    width: 60%;
    height: 90%;
}

/* aside  */

.popup{
    position: relative;
    bottom: 2rem;
    border: 3px solid white;
    border-radius: 0.5rem;
    border-style: double;
    width: 22%;
    padding: .8rem;
    text-align: center;
    font-weight: bold;
    font-size: 1.2rem;
    color: white;
}

.fav-toast{
    background-color: rgb(26, 129, 26);
}

.remove-toast{
    background-color: rgb(240, 36, 36);
}

/* media query */
@media screen and (max-width: 1200px){
    .nav-logo{
        width: 30%;
    }

    .search-bar{
        width: 50%;
    }

    .search-result{
        width: 50%;
    }
}

@media screen and (max-width: 1000px){
    .nav-logo{
        width: 35%;
    }

    .search-bar{
        width: 60%;
    }
    .search-result{
        width: 60%;
    }
}

@media screen and (max-width: 992px){
    .nav-buttons{
        width: 30%;
    }
    .nav-logo{
        width: 40%;
    }
    .search-bar{
        width: 70%;
    }
    .search-result{
        width: 70%;
    }
}

@media screen and (max-width: 768px){
    .nav-buttons{
        width: 40%;
    }
    .nav-logo{
        width: 50%;
    }
    .search-bar{
        width: 80%;
    }
    .search-result{
        width: 80%;
    }

    .hero-info-box {
        width: 75%;
        height: 75%;
    }
}

@media screen and (max-width: 576px){
    .nav-buttons{
        width: 50%;
    }

    .nav-logo{
        width: 55%;
    }
    .search-bar{
        width: 90%;
    }
    .search-result{
        width: 90%;
        height: 80%;
    }

    .hero-info-box {
        width: 85%;
    }
    .hero-img-and-more-info{
        flex-wrap: wrap;
        height: 70%;
    }

    .hero-img-and-more-info img {
        height: 50%;
    }
}