h2{
    text-align: left;
    font-size: clamp(1.9rem, 1.6871rem + 0.8013vw, 2.2rem);
    text-transform: uppercase;
    position: relative;
    width: fit-content;
}
h2:after{
    content: '';
    display: block;
    height: 3px;
    width: 60%;
    background-color: var(--red);
    position: absolute;
}

.data-item{
    text-align: center;
    font-weight: bold;
    margin: 0;
    font-size: clamp(1.6rem, 1.3162rem + 1.0684vw, 2rem);
}
.positive{background-color: #72A8B0;}
.neutral{background-color: #9A9A9A;}
.negative{background-color: #BE336E;}

.item-card{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 2rem;
    overflow-wrap: anywhere;
    position: relative;
}

.item-card p:first-child{
    font-size: 1.8rem;
    text-align: center;
}

.data-container{
    display: grid;
    grid-template-columns: repeat(4,20%);
    justify-items: stretch;
    justify-content: center;
    gap: 1rem;
    height: 100%;
}

#form{
    margin-bottom: 2rem;
}

.week{
    margin-bottom: 2rem;
    font-style: italic;
}

.graph-container{
    height: 40vh;
    margin-block: 2rem;
}

#graph-form{
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}


.button-graph{
    width: fit-content;
    padding: 1rem 1.5rem;
    background-color: var(--red);
    color: white;
    border: none;
    box-shadow: var(--shadow);
    text-decoration: none;
    height: 5rem;
    line-height: 3rem;
    border: 1px solid var(--red);
    transition: all .3s ease-in-out;
}

.input{
    width: fit-content;
    color: var(--red);
    border: none;
    text-decoration: none;
    width: 5rem;
    border: 1px solid var(--red);
    text-align: center;
}

.legend{
    font-size: 1.2rem;
    font-style: italic;
}
.legend:first-child{
    margin-bottom: 4rem;
}

.search-input{
    display: flex;
    align-items: center;
    gap: 1rem;
}

.date-selector{
    width: 15rem;
}

.infobulle{
    display: none;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 11rem;
    color: black;
    background-color: white;
    padding: 1rem;
    font-size: 1.2rem;
    width: 100%;
    border: 3px solid var(--red);
    z-index: 1;
}

.item-card:hover .infobulle{
    display: block
}

.legends{
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem 2rem;
    margin-bottom: 2rem;
}
.legends p:nth-child(odd){
    font-weight: bold;
}

@media screen and (max-width:768px){
    .data-container{
        grid-template-columns: 1fr 1fr;
    }
    .infobulle{
        top: 8rem;
        width: 80%;
        left: 50%;
    }
    .legends{
        grid-template-columns: 25vw 1fr;
    }
}


@media screen and (max-width:450px){
    .data-container{
        grid-template-columns: 1fr;
    }
    .graph-container{
        height: 40vh;
    }
    #form{
        display: flex;
        justify-content: center;
        gap: 3rem;
    }
    .search-input{
        gap: 0rem;
        flex-direction: column;
        margin-bottom: 2rem;
    }
    .search-input h3{
        margin-bottom: .5rem;
        text-align: center;
        width: 80%;
    }
    .legends{
        display: flex;
        grid-template-columns: 20vw 1fr;
        gap: 0rem;
        margin-bottom: 2rem;
        flex-direction: column;
    }
    .legends p:nth-child(even){
        margin-bottom: 2rem;
    }
}