@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

:root{
    --dark-white : rgba(255, 255, 255, 0.352);
    --light-white : rgba(255, 255, 255, 0.8);
}

html, body{
    height: 100vh;
    width: 100%;
}

.container{
    width: 100%;
    height: 100%;
    background-image: url('Assests/l-art-numerique-de-belles-montagnes.webp');
    background-position: center;
    background-size: cover;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgb(255, 255, 255);
}
.container::before{
    content: "";
    position: absolute;
    height: 100%;
    width: 100%;
    background: rgba(0, 0, 0, 0.391);
    backdrop-filter: blur(5px);
}

#dynamic{
    display: none;
    position: absolute;
    z-index: 5;
    margin: 2rem 1rem;
    bottom: 0;
    left: 0;
    font-size: 2rem;
    cursor: pointer;
    border-radius: 100%;
    background: transparent;
    opacity: 0.5;
    transition: all 0.3s;
}
 #dynamic:hover{
   opacity: 1;           }

.card{
    height: 92%;
    max-height: 34.375rem;
    width: 35%;
    position: relative;
    z-index: 2;
    border-radius: 12px;
    border: 3px solid rgba(0, 0, 0, 0.293);
    background:  rgba(163, 163, 163, 0.11); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
    backdrop-filter: blur(20px);
    padding: 1.25rem 1rem;

}


.header{
    width: 100%;
    border-radius: 14px;
    border: none;
    outline: none;
    background: rgba(0, 0, 0, 0.15);
    display: flex;
    position: relative;
    margin-bottom: 1.25rem;
}

.header .input{
    padding: 0.5rem 2.5rem 0.5rem 0.75rem;
    width: 100%;
    border-radius: 14px;
    border: 3px solid transparent;
    outline: none;
    font-size: 0.9375rem;
    font-weight: 500;
    background: transparent;
    color: var(--light-white);
    transition: border 0.05s;
}
.header .input:focus{
    border: 3px solid var(--dark-white);
}

.header .input::placeholder{
    color: var(--light-white);
}

#search{
    font-size: 1rem;
    font-weight: 600;
    background: none;
    border: none;
    color: var(--light-white);
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 4.5%;
}


.api_data_section{
    height: calc(100% - 3rem);
    padding: 0.75rem 0rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

.weather-info{
    width: 100%;
    padding: 0 0.45rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 400;
    font-size: 1rem;
}

.location{
    display: flex;
    gap: 0.85rem;
    align-items: center;
}

.weather-summary{
    width: 100%;
    padding: 0 0.45rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.weather-svg{
    width: 6.25rem;
    position: relative;
    right: 0.20rem;
}

.temp-weather{
    text-align: end;
    font-weight: 400;
}

.humidity-wind-container{
    width: 100%;
        padding: 0 0.45rem;
    display: flex;
    align-items: center;
    justify-content: space-between;

    span{
        font-size: 2rem;
    }
}

.humidity, .wind-speed{
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.humidity h5:nth-child(2), .wind-speed h5:nth-child(2){
    font-weight: 400;
}
.wind-speed h5:nth-child(2){
    text-align: center;
}

.wind-speed{
    h5{
        margin-left: 2px;
    }
}

.Five-days-forecast{
    padding: 0.5rem 0;
    width: 100%;
    height: 160px;
    display: flex;
    align-items: center;
    gap: 1rem;
    overflow-x: auto;
}

.forecast-item{
    display: flex;
    flex-direction: column;
    gap: auto;
    padding: 8px;
    height: 125px;
        border-radius: 12px;
        text-align: center;
    background:rgba(255, 253, 253, 0.1);
    transition: all 0.1s;
    cursor: pointer;
}

.forecast-item:hover{
    background:rgba(255, 253, 253, 0.15);
}

.forecast-item img{
    height: 65px;
}


.Five-days-forecast::-webkit-scrollbar {
    height: 8px; /* This controls the track height */
}

.Five-days-forecast::-webkit-scrollbar-track:horizontal {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
}

.Five-days-forecast::-webkit-scrollbar-thumb:horizontal {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 6px;
}


.error_data_section,
.first_data_section{
    width: 100%;
    height: calc(100% - 100px);
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.75rem;
}

.error_data_section img{
    width: 100%;
    max-width: 500px;
}
.first_data_section img{
    max-height: 75%;
    max-width: 80%;
}

.error_data_section .error_data_text,
.first_data_section .first_data_text{
    width: 80%;
    h4{
        margin-top: 0.4rem;
        font-weight: 400;
    }
}


@media (orientation: portrait) {
    #dynamic{
        left: unset;
            border-radius: 1rem;
            padding: 2vw;
    }
}

@media (min-width : 1450px) {
    .Five-days-forecast{
        justify-content: space-between;
    }
}

@media (max-width : 1200px) {
    html,
    body {
        font-size: 15px; }
.card{
    width: 40%; }           }


@media (max-width : 1000px) {
    html,
    body {
        font-size: 14px; }
.card{
    width: 45%; }   }


@media (max-width : 700px) {
.card{
    width: 55%; } 

.humidity-wind-container .material-symbols-outlined{
font-size: 1.5rem;  }
i{ font-size: 0.9rem;}

.weather-info{
    flex-direction: column;
    gap: 0.25rem;
    font-weight: 350;       }
}

@media (max-width : 550px) {
.card{
    width: 65%; } 
.weather-svg{
    width: 6rem; }
}

@media (max-width : 450px) {
.card{
    max-height: 60vh;
    width: 75%; } 
}

@media (max-width : 375px) {
.card{
    width: 85%; } 

.humidity-wind-container{
    flex-direction: column;
    gap: 10px;                  }

.humidity-text, .wind-text{
    display: flex;
    flex-direction: row;
    gap: 0.5rem;                }

.weather-svg{
    width: 5.5rem; }

/* .error_data_section img,
.first_data_section img{
    height: 8rem;      } */

.error_data_section .error_data_text,
.first_data_section .first_data_text{
    h4{ font-size: 1.2rem; }
}
}

@media (max-width : 250px) {
    html, body {
        font-size: 12px; }
.weather-summary{
    flex-direction: column; }

 .weather-svg{
        width: 5rem; }
}

@media (max-width : 160px) {
       html, body {
        font-size: 11px; } 
.humidity-wind-container,
.weather-summary,
.weather-info{
    padding: 0.25rem; }

.card{
    padding: 1.25rem 0rem; }
}