body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    background-color: seagreen;
}

.background-image {
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
}

button {
	cursor: pointer;
}


header{
    padding: 1em 2em;
    background-color: rgba(255, 255, 255, 0.7);

    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.5s ease;
}

header .container {
    display: flex;
    justify-content: space-between;
}

header .container .titolo {
    font-size: 20px;
    font-size: 2.7em;
    margin: 0;
    margin-left: 0.5em;
    align-self: center;
}


/* Form */

header .form-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.5em;
    flex-wrap: wrap;
}

header .form-container .search-form {
    display: flex;
    align-items: center;
    background: #f5f5f5;
    border-radius: 50px;
    overflow: hidden;
    height: 55px;
}

/* testo "Inserisci la città:" */
header .form-container label{
    display: none;
}

/* input */

.smooth-transition {
    transition: all 0.3s ease;
}

header .form-container input {
    border: none;
    outline: none;
    background: transparent;

    padding: 0 25px;
    width: 260px;
    height: 100%;

    font-size: 1rem;
    color: #333;
}

/* placeholder */
header .form-container input::placeholder{
    color: #999;
}

/* bottone */
header .form-container button {
    border: none;
    height: 100%;
    width: 120px;

    background: #262626;
    color: white;

    font-size: 1rem;
    cursor: pointer;

    border-radius: 0 50px 50px 0;
}

.error-message {
    color: red;
    font-size: 0.9em;
    text-align: center;
}

/* hover */
header .form-container button:hover {
    background: #111;
}

/* HEADER PINNATO */

header.is-pinned .container{
    width: 100%;
}

header.is-pinned .titolo{
    display: none;
}

header.is-pinned .form-container{
    width: 100%;
    margin: 0;
}

header.is-pinned .search-form{
    width: 100%;
}

header.is-pinned .search-form input{
    width: 100%;
}

.is-bar {
    display: flex;
    justify-content: center !important;
}

.is-pinned {
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin: 1em 3em;
    padding: 0.5em;
    transform: translateY(1em);
    background-color: rgba(255, 255, 255, 0.7);
}

/* Sezione AJAX */
.ajax-section {
    margin: 2em 0 1em;
}

.ajax-section .container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1em;
    color: white;

    padding: 1em;
	border-radius: 1em;
	background: rgba(0, 0, 0, 0.5);
    color: white;
	text-align: center;
    margin: 2em;

}

.ajax-section .city-name {
    font-size: 3em;
    margin: 0;
    text-align: center;
    font-weight: bold;
}

.ajax-section .city-temp {
    font-size: 6em;
    margin: 0;
    font-weight: bold;
}

.ajax-section .city-temp sup {
    font-size: 0.4em;
    font-weight: lighter;
}

.ajax-section .city-description {
    font-size: 1.5em;
    margin: 0;
    font-weight: normal;
}

.ajax-section .city-max-min {
    font-size: 1.2em;
    margin: 0;
    font-weight: normal;
}

/* Previsioni orarie */
.ajax-section .container-previsione {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 10px;

	padding: 1em;
	border-radius: 1em;
	background: rgba(0, 0, 0, 0.5);
    color: white;
	text-align: center;
    margin: 2em;

    overflow-x: auto;

    scrollbar-width: none;
    -ms-overflow-style: none; 
}

.ajax-section .container-previsione.dragging {
    cursor: grabbing;
    user-select: none;
}

.container-previsione .previsione {
    display: flex;
    flex-direction: column;
    align-items: center;

    gap: 0.5em;
    padding: 1em;
    border-radius: 1em;
    color: white;
    text-align: center;

    flex-shrink: 0;
}

.previsione .ora {
    font-size: 1.2em;
    font-weight: bold;
    margin: 0;
}

.previsione .temp {
    font-size: 1.5em;
    margin: 0;
}

.previsione .temp sup {
    font-size: 0.5em;
}

.previsione .previsione-icon {
    width: 4em;
    height: 4em;
    margin: 0;
}

.day-separator {
    width: 2px;
    align-self: stretch;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    margin-inline: 8px;
    flex-shrink: 0;
}

/* dati extra */
.ajax-section .container-dati {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 2em;

    border: 1em;
    color: white;
    margin: 2em;
}



.dato {
   display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    padding: 2em;
    gap: 1em;
    border-radius: 1em;
    background: rgba(0, 0, 0, 0.5);

    width: 121px;
    aspect-ratio: 1 / 1;
}

.dato h4 {
    text-align: center;
    font-weight: bold;
    margin: 0;
}

.dato p {
    font-weight: lighter;
    margin: 0;
    font-size: 2.4em;
    text-align: center;
    height: 85px;
}

.dato p sup {
    font-size: 0.5em;
}

.ajax-section .dato-vento {
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1em;
    padding: 2em;

    border: 1em;
    border-radius: 1em;
    color: white;
    margin: 2em;
}

.dato-vento h4 {
    text-align: center;
    margin: 0;
    width: 100%;
}

.dato-vento .dati {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1em;
}

.dati h5 {
    font-weight: bold;
    margin: 0;
}

.dati p {
    margin: 0;
    font-weight: lighter;
    font-size: 2.2em;
}

.hiden {
    display: none;
}





@media (max-width: 768px) {

    .ajax-section .container-dati {
        align-items: center;
        justify-content: space-between;
    }

    .dato {
        width: clamp(75px, 27.7863px + 12.1372vw, 121px);
        height: clamp(75px, 27.7863px + 12.1372vw, 121px);
    }

    /*
    .dato {
        font-size: 16px;
        width: 75px;
        height: 75px;
    }
    */

    .dato p {
        height: 63px;
    }

    header .container .titolo {
        display: none;
    }


    header .container{
        flex-direction: column;
        gap: 1em;
    }

    header .form-container{
        width: 100%;
        margin: 0;
    }

    header .form-container .search-form{
        width: 100%;
    }

    header .form-container input{
        width: 100%;
        min-width: 0;
    }

    header .form-container button{
        width: 100px;
        flex-shrink: 0;
    }


    .ajax-section .container-dati {
    justify-content: center;
    }

    .ajax-section .dato-vento {
        flex-direction: column;
        justify-content: center;
    }
}