@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@200..800&family=Rubik:ital,wght@0,300..900;1,300..900&display=swap');

/* Root Styles */

:root{
    --text-white : #F3F3F3;
    --border-blue : #103979;
}

::-webkit-scrollbar{
    display: none;
}

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Manrope',serif;
    color: var(--text-white);
}

ul li{
    list-style: none;
}

body{
    background-image: url(../images/background-img.jpg);
    background-color: #050E1F;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

#main{
    width: 90%;
    min-height: 90vh;
    max-width: 1080px;
    background-color: #030c1d6d;
    backdrop-filter: blur(4px);
    border: 0.1px solid var(--border-blue);
    border-radius: 25px;
    padding: 1em 2em;
    position: relative;
}

#welcome{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    margin-top: 1em;
    text-align: center;
}

#welcome h1{
    font-size: 3rem;
}

#welcome p{
    font-size: 1.25rem;
    margin: 1em;
    padding: 0.5em 0;
    transition: 0.1s;
    cursor: pointer;
    border: 1px solid var(--border-blue);
    border-radius: 25px;
}

#welcome p:hover{
    transform: scale(1.1);
    transition: 0.1s;
}


#header{
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

#search{
    display: flex;
    width: 60%;
    margin: 0.5em 0;
}

#searchform{
    display: flex;
    justify-content: center;
    width: 100%;
    position: relative;
}

#search i{
    font-size: 1.5rem;
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.5;
}

#search input[type = "text"]{
    width: 100%;
    background-color: transparent;
    outline: none;
    border: 1px solid rgba(255, 255, 255, 0.505);
    border-radius: 50px;
    font-size: 1rem;
    padding: 0.70em 2.5em;
}

#location{
    text-align: right;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

#location.hide{
    display: none;
}

#location i{
    font-size: 2rem;
}

#location p{
    font-size: 0.75rem;
    opacity: 0.7;
}

#temp-contents{
    display: flex;
    justify-content: space-between;
    margin: 2em 0;
}

#temp-icon{
    display: flex;
    justify-content: left;
    align-items: center;
    gap: 0.5em;
    width: 40%;
    text-transform: capitalize;
}

#temperature{
    font-size: 5rem;
    text-shadow: 1px 1px 5px var(--text-white);
}

#weather-text{
    font-size: 1.25rem;
    opacity: 0.75;
}

#icon img{
    width: 150px;
}

#temp-data{
    display: flex;
    align-items: center;
    text-align: center;
    gap: 2em;
    border: 2px solid var(--border-blue);
    border-radius: 50px;
    padding: 1.5em;
    margin: 1em 0;
}

#temp-data h4{
    font-size: 1.5rem;
}

#temp-data p{
    opacity: 0.75;
}

.data-icon{
    height: fit-content;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hourly-text, .cities-text{
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hourly-text h4, .cities-text h4{
    font-size: 1.25rem;
}

.hourly-text p, .cities-text p{
    cursor: pointer;
    opacity: 0.75;
}

.swiper {
    width: 100%;
    height: 100%;
    margin: 1em 0;
}

.swiper-slide {
    text-align: center;
    border: 2px solid var(--border-blue);
    border-radius: 25px;
    padding: 0.5em;
}

.swiper-slide img{
    width: 50%;
}

.swiper p{
    font-size: 1rem;
    opacity: 0.75;
}

#cards-container{
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.city-cards {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: center;
    border: 2px solid var(--border-blue);
    border-radius: 25px;
    padding: 1.5em 0.75em;
    width: 32%;
    margin: 1.5em 0;
}

.city-icon{
    width: 20%;
}

.city-icon img{
    width: 100%;
}

.city-cards h4{
    font-size: 1.25rem;
    display: flex;
    align-items: center;
}

.city-cards p{
    font-size: 1rem;
    opacity: 0.75;
}

/* Weekly Data */

.back-icon{
    height: 40px;
    width: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    border: 1px solid var(--border-blue);
    border-radius: 50%;
    cursor: pointer;
    transition: 0.2s;
    margin-top: 0.5em;
}

.back-icon:hover{
    transform: scale(1.1);
    transition: 0.2s;
}

.day-data{
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    border: 1px solid var(--border-blue);
    border-radius: 15px;
    margin: 1em 0;
    padding: 1em;
    text-align: center;
}

.day-data h4{
    font-size: 2rem;
}

.day-data p{
    opacity: 0.75;
}

.max-min{
    display: flex;
    gap: 1em;
}

#weekly-data{
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

#weekly-data #day-data-img{
    width: 10%;
}

#weekly-data #day-data-img img{
    width: 100%;
}

#date{
    width: 20%;
}

#day-temp{
    width: 20%;
}

#day-max-min{
    width: 20%;
}

#day-data-img{
    width: 20%;
}

.hide{
    display: none;
}

/* Media Queries */

@media(max-width:900px){
    html{
        font-size: 15px;
    }

    #main{
        width: 100%;
        height: 100%;
        border-radius: 0;
        margin: 0;
        min-height: 100vh;
    }

    #header{
        flex-direction: column;
    }

    #search{
        width:100%;
    }

    #location{
        margin-top: 1em;
    }

    #temp-contents{
        flex-direction: column;
        align-items: center;
    }

    #temp-data{
        gap: 5em;
    }

    #temp-icon{
        display: flex;
        justify-content: center;
        gap: 1em;
        width: 50%;
    }

    #cards-container{
        flex-direction: column;
    }

    .city-cards{
        width:50%;
        gap: 1em;
    }

    .swiper-slide {
        border-radius: 20px;
    }

    .city-cards h4{
        font-size: 1.25rem;
    }
    

}

@media(max-width:640px){

    html{
        font-size: 14px;
    }

    #welcome h1{
        font-size: 2rem;
        margin-top: 2em;
    }    

    #welcome p{
        font-size: 1rem;
    }

    #temperature{
        font-size: 3rem;
    }

    #temp-data{
        gap: 2em;
        padding: 1.5em;
    }

    .city-cards{
        width:90%;
        gap: 1em;
    }

    .day-data{
        flex-wrap: wrap;
    }

    .day-data h4{
        font-size: 1rem;
    }

    .day-data p{
        font-size: 0.80rem;
    }

    .max-min{
        gap: 0.5em;
    }

    .swiper-slide {
        padding: 1em;
    }

    .swiper-slide img{
        width: 100%;
    }

    .city-cards h4{
        font-size: 1.10rem;
    }
    
}