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

html{
    font-size: 67.5%;
}

body{
    font-family: Nunito Sans;
    position: relative;
}

.main-page{
    background-color: hsl(0, 0%, 98%);
}

/********************For JavaScript - Light or Dark Mode****************/
.dark-mode-page{
    background-color: hsl(207, 26%, 17%);
}

.dark-mode-element{
    background-color: hsl(209, 23%, 22%) ;
}

.dark-mode-element, 
.dark-mode-element span, 
.dark-mode-element i,
.dark-mode-element input,
.dark-mode-element input::placeholder{
    color: hsl(0, 0%, 100%); 
}

.light-mode-element{
    color:hsl(200, 15%, 8%);
    background-color: hsl(0, 0%, 100%);
}

/* .search-inputs{
    width: 100%;
    margin-bottom: 3rem;
    border-radius: 5px;
    padding: 0 2rem;
    background-color: hsl(209, 23%, 22%);
}

.search-inputs input::placeholder, 
.search-inputs i{
    color: hsl(0, 0%, 100%);
} */

/*******************************JavaScript end***************************/

/***********HEADER-SECTION*********/
.header{
    width: 100%;
    padding: 1.3rem 5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0px 3px 25px rgb(0, 0, 0, .2);
}

.header-question{
    font-weight: 600;
    text-shadow: 0 0 1px rgb(0, 0, 0);
}

.switch-modes{
    width: 85px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    font-weight: 300;
    justify-content: space-between;
    background-color: transparent;
}

.switch-modes,
.fa-moon{
    text-shadow: 0 0 1.2px rgb(0, 0, 0, .7);
}

.switch-modes .mode-text{
    opacity: .9;
}

/***********FILTER-SECTION*********/
.filter-section{
    width: 85%;
    margin: 6rem auto 0;
}

.search-field,
.select-region-container{
    box-shadow: 0px 3px 15px rgb(0, 0, 0, .2);
}

.search-field{
    width: 100%;
    margin-bottom: 3rem;
    border-radius: .5rem;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-input,
.select-region-container{
    font-size: 1.5rem;
}

.search-input{
    font-weight: 600;
    border: none;
    outline: none;
    padding: 1.3rem;
    opacity: .8;
    background-color: transparent;
}

.search-input::placeholder{
    font-size: 1.5rem;
    color: hsl(0, 0%, 52%);
    text-shadow: 0 .1rem .1rem rgb(0, 0, 0, .1);
}

.fa-magnifying-glass{
    font-size: 1.5rem;
    margin-right: 1rem;
    color: hsl(0, 0%, 52%, .9);
    cursor: pointer;
}

.fa-magnifying-glass:hover{
    color: hsl(0, 0%, 52%);
}

.select-region-container{
    width: 80%;
    position: relative;
    border-radius: .5rem;
}

.filter-by-region{
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: .5rem;
}

.filter-by-region h2{
    font-size: 1.7rem;
    font-weight: 800;
    padding: 1rem 2rem;
    opacity: .8;
}

.select-region{
    display: none;
    width: 100%;
    position: absolute;
    left: 0;
    list-style-type: none;
    z-index: 999;
    margin-top: .6rem;
    border-radius: .5rem;
    box-shadow: 0 .1rem .3rem rgb(0, 0, 0, .2);
}

.region{
    font-size: 1.6rem;
    font-weight: 600;
    padding: 1rem 2rem;
    cursor: pointer;
    opacity: .8;
}

.region:hover{
    background-color: hsl(0, 0%, 52%, .5);
}

.fa-angle-up,
.fa-angle-down{
    font-size: 1.3rem;
    padding: .5rem 1.4rem;
}

.fa-angle-up:hover,
.fa-angle-down:hover{
    color: hsl(0, 0%, 52%)
}

.fa-angle-up{
    display: none;
}

/* For JavaScript */
.display-block{
    display: block;
}

.display-none{
    display: none;
}
/* JS end */

/***********COUNTRIES-SECTION*********/
.all-countries-container{
    padding: 5rem 0;
    width: 80%;
    margin: 0 auto;
    display: grid;
    row-gap: 2.5rem;
    column-gap: 2.5rem;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.country-container{
    border-radius: .5rem;
    overflow: auto;
    box-shadow: 1px 5px 15px rgb(0, 0, 0, .5);
}

.country-img-div{
    width: 100%;
    height: 20rem;
}

.country-img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-top-left-radius: .5rem;
    border-top-right-radius: .5rem;
}

.country-details{
    width: 95%;
    margin: 0 auto;
    padding: 1rem 2rem;
}

.country-name{
    font-size: 2rem;
    font-weight: 800;
    line-height: 2.5rem;
    margin: 1rem 0;
}

.country-details p{
    line-height: 2.3rem;
}

.country-details p,
.searched-country-details-A p,
.searched-country-details-B p{
    font-size: 1.8rem;
    font-weight: 500;
    opacity: .9;
    text-shadow: 0 0 2px rgb(0, 0, 0, .2);
}

.searched-country-details-B{
    margin-top: 3rem;
}

.country-alt,
.continent,
.population,
.region-name,
.sub-region,
.capital,
.top-level-domain,
.currencies,
.language{
    font-weight: 600;
}

/* Searched Country section*/
.back-btn{
    font-size: 1.5rem;
    padding: 1rem 2.5rem;
    margin-bottom: 5rem;
    opacity: .7;
}

.back-btn,
.border-country{
    border: none;
    outline: none;
    font-weight: 600;
    cursor: pointer;
    border-radius: .5rem;
    box-shadow: 0 0 4px rgb(0, 0, 0, .5);
}

.back-btn:hover,
.border-country:hover{
    background-color: hsl(0, 0%, 52%, .2);
}

.fa-arrow-left{
    margin-right: 1rem;
}

.searched-country-hero{
    padding: 2rem;
}

.searched-country-img-div{
    width: 100%;
    height: 20rem;
}

.searched-country-img{
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.searched-country-details-container{
    padding: 2rem;
}

.searched-country-details-A p,
.searched-country-details-B p{
    line-height: 3.5rem;
}

.border-countries-div{
    margin-top: 3rem;
}

.border-countries-div h2{
    font-size: 1.7rem;
    font-weight: 800;
    opacity: .8;
}

.border-countries{
    width: 100%;
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.border-country{
    font-size: 1.3rem;
    padding: 1rem 1.8rem;
    opacity: .65;
}

/* Move to Top Page */
.arrow-up-div{
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    padding: 1rem 1.4rem;
    z-index: 1;
    border-radius: 100%;
    cursor: pointer;
    box-shadow: 0 2px 5px rgb(0, 0, 0, .4);  
}

.fa-arrow-up{
    font-size: 2rem;
}

.arrow-up-div:active .fa-arrow-up{
    color: red;
}

@media screen and (min-width: 992px) {
    .filter-section{
        width: 95%;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    
    .search-field{
        width: 35%;
        margin-bottom: 0;
    }

    .select-region-container{
        width: 23%;
    }

    .region{
        padding: .7rem 2rem;
    }

    .all-countries-container{
        width: 95%;
    }

    .country-name{
        font-size: 2.2rem;
    }

    .country-details p{
        font-size: 1.4rem;
    }

    /* Searched Country Section */
    .searched-country-container{
        width: 100%;
        display: grid;
        place-items: center;
        column-gap: 10rem;
        grid-template-columns: 35% 54%;
        padding: 0 5rem 5rem 3rem;
    }

    .searched-country-hero{
        width: 100%;
    }

    .searched-country-img-div{
        width: 100%;
        height: 30rem;
    }
    
    .searched-country-img{
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .searched-country-details-container{
        width: 100%;
        margin-top: 5rem;
    }

    .searched-country-details-div{
        display: flex;
        /* align-items: center; */
        gap: 5rem;
        justify-content: space-between;
        margin-top: 3rem;
    }

    /* .searched-country-details-A, */

    .searched-country-details-A p,
    .searched-country-details-B p{
        line-height: 2.5rem;
    }

    .searched-country-details-B{
        margin: 0;
    }

    .border-countries-div{
        width: 80%;
        display: flex;
        gap: 1rem;
        align-items: center;
        justify-content: space-between;
        margin-top: 5rem;
    }

    .border-countries-div h1{
        width: 30%;
    }

    .border-countries{
        width: 65%;
        margin: 0;
    }

    .border-country{
        padding: .6rem 1.8rem;
    }
}



