
/* =========================================
   STILE GENERALE
========================================= */

* {
    box-sizing: border-box;
}

html {
    width: 100%;
    min-height: 100%;
    margin: 0;
    padding: 0;
}

body {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    padding: 0;

    font-family: Arial, Helvetica, sans-serif;
    color: #0d2b33;
    background-color: #e0f7fa;

    display: flex;
    flex-direction: column;
    align-items: stretch;
}

/* =========================================
   TESTATA E LOGO
========================================= */

.testata {
    width: 100%;
    margin: 0;
    padding: 12px 16px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    text-align: center;
    background-color: #ffffff;

    border-bottom: 2px solid #b2ebf2;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.testata .logo {
    display: block;
    width: auto;
    max-width: 100%;
    height: 36px;
    object-fit: contain;
    margin: 0 auto;
}

.testata .titolo-app {
    margin: 6px 0 0;
    font-size: 1.2em;
    line-height: 1.3;
    color: #0d2b33;
}

.testata .descrizione-app {
    margin: 3px 0 0;
    font-size: 0.85em;
    line-height: 1.4;
    color: #4a6572;
}

/* =========================================
   CONTENITORE PREVISIONI
========================================= */

.container {
    width: 100%;
    max-width: 740px;

    margin: 0 auto;
    padding: 16px 20px 24px;

    flex: 1 0 auto;
    background-color: transparent;
}

h2 {
    width: 100%;
    margin: 10px 0 16px;

    text-align: center;
    font-size: 1.4em;
    line-height: 1.3;
    overflow-wrap: break-word;
}

h3 {
    width: 100%;
    margin: 24px 0 12px;

    text-align: center;
    font-size: 1.15em;
    line-height: 1.4;
}

/* =========================================
   SLIDER PREVISIONI
========================================= */

.slider {
    position: relative;
    width: 100%;
    min-height: 320px;

    margin: 8px auto 20px;
    overflow: hidden;
}

.slider .day {
    display: none;
    width: 100%;

    margin: 0 auto;
    padding: 20px 16px;

    text-align: center;
    overflow-wrap: break-word;

    background-color: #ffffff;
    border: 1px solid #d5eef1;
    border-radius: 12px;

    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);

    animation: fadeIn 0.4s ease;
}

.slider .day.active {
    display: block;
}

.slider .day img {
    display: inline-block;
    width: auto;
    max-width: 80px;
    height: auto;
    object-fit: contain;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* =========================================
   METEOGRAMMA
========================================= */

#meteogram {
    display: block;

    width: 100% !important;
    max-width: 700px;
    height: 360px !important;

    margin: 12px auto 20px;
}

/* =========================================
   FOOTER
========================================= */

.row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0;

    width: 100%;
    margin: 0;
    padding: 12px 20px;

    background-color: #ffffff;
    border-top: 1px solid #b2ebf2;
}

.row > div[class*="col-"] {
    flex: 1 1 50%;
    width: 50%;
    max-width: 50%;
    min-width: 0;
    margin: 0;
    padding: 0 10px;
}

/* Copyright */

.crediti_bis {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    min-height: 50px;
    margin: 0;
    padding: 8px 0;

    color: #000000;
    font-size: 13px;
    line-height: 1.6;
    text-align: center;
    overflow-wrap: anywhere;
}

/* Icone social */

.crediti {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;

    width: 100%;
    min-height: 50px;
    margin: 0;
    padding: 8px 0;
}

.crediti a {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    text-decoration: none;
}

.crediti img {
    display: block;
    width: 36px;
    height: 36px;
    object-fit: contain;
}

/* =========================================
   TABLET
========================================= */

@media screen and (min-width: 768px) and (max-width: 1024px) {
    .container {
        max-width: 700px;
        padding-right: 24px;
        padding-left: 24px;
    }

    #meteogram {
        max-width: 100%;
        height: 340px !important;
    }

    .row {
        padding-right: 24px;
        padding-left: 24px;
    }
}

/* =========================================
   MOBILE
========================================= */

@media screen and (max-width: 767px) {
    .testata {
        padding: 10px 12px;
    }

    .testata .logo {
        height: 34px;
    }

    .container {
        width: 100%;
        max-width: 100%;
        padding: 12px 14px 20px;
    }

    h2 {
        font-size: 1.3em;
    }

    h3 {
        margin-top: 20px;
    }

    .slider {
        min-height: 320px;
    }

    .slider .day {
        padding: 16px 12px;
    }

    #meteogram {
        width: 100% !important;
        max-width: 100%;
        height: 300px !important;
        margin: 10px auto 20px;
    }

    .row {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0;

        padding: 10px 12px;
    }

    .row > div[class*="col-"] {
        flex: 0 0 100%;
        width: 100%;
        max-width: 100%;
        padding: 0;
    }

    .crediti_bis {
        justify-content: center;
        width: 100%;
        min-height: auto;
        padding: 8px 0;

        font-size: 12px;
        line-height: 1.6;
        text-align: center;
    }

    .crediti {
        justify-content: center;
        width: 100%;
        min-height: auto;
        padding: 8px 0;
    }
}

/* =========================================
   SCHERMI MOLTO PICCOLI
========================================= */

@media screen and (max-width: 360px) {
    .testata .logo {
        height: 30px;
    }

    .container {
        padding-right: 10px;
        padding-left: 10px;
    }

    h2 {
        font-size: 1.15em;
    }

    .slider .day {
        padding: 14px 10px;
    }

    #meteogram {
        height: 280px !important;
    }

    .crediti_bis {
        font-size: 11px;
    }
}
