/* Global Styles */

body {
    margin: 0;
    font-family: 'Lexend', sans-serif;
    line-height: 1.4;
    color: #202124;
    width: 100%; /* Assicura che il body non superi la larghezza */
    height: 100%; /* Assicura che il body occupi l'altezza */
}

.desktop-break {
    display: inline; /* Mostra il <br> di default */
}

/* Header */

header {
    background-size: cover;
    background-color: #1e88e0ff;
    color: white;
    text-align: center;
    padding: 6rem 1rem;
    padding-bottom: 10rem; /* Maggiore altezza sotto */
    position: relative;
    clip-path: polygon(0 0, 100% 0, 100% 80%, 0 100%); /* Angled edge */
}

header img {
    max-width: 70px;
    margin-bottom: 4rem;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

header h1 {
    font-size: 3.3rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: left;
    padding-left: 0%; /* Posizionato con padding per evitare sbordi sulla destra */
    max-width: 700px;
    margin: 0 auto; /* Centra il blocco orizzontalmente */
    position: relative;
}

header h1 span {
    display: block;
    color: #202124;
}

header p {
    font-size: 1.5rem;
    padding-top: 3rem;
    padding-bottom: 6rem;
    line-height: 1.5;
    text-align: left;
    padding-left: 5%; /* Posizionato con padding per evitare sbordi sulla destra */
    max-width: 700px;
    margin: 0 auto; /* Centra il blocco orizzontalmente */
    position: relative;
}

/* Quote Section */

.quote-section {
    background-color: white;
    text-align: center;
    padding: 5rem 1rem;
    position: relative;
}

.quote-testimonial {
    position: absolute;
    top: -160px;
    transform: translateX(-50%);
    width: 250px;
    height: 250px;
    border-radius: 50%;
    z-index: 2;
    margin-bottom: 1rem;
}

.quote-block {
    display: flex;
    align-items: center;
    justify-content: center; /* Cambiato da flex-start a center */
    padding: 1rem 1rem;
    max-width: 800px;
    margin: auto;
    margin-bottom: 0px;
    padding-bottom: 0px;
}

.quote-symbol {
    width: 100px;
    height: auto;
    margin-right: 20px;
    margin-left: -60px;
}

.quote-text-block {
    font-size: 1.6rem;
    color: #202124;
    line-height: 1.5;
    font-style: italic;
}

.quote-author {
    font-size: 1.2rem;
    font-weight: 300; /* Peso più leggero */
    color: #202124;
    margin-top: 0;
    padding-bottom: 2rem;
    line-height: 1.2;
    text-align: center; /* Se richiesto */
}

/* Box Section */

.box {
    background-color: #f8f9faff;
    border-radius: 20px;
    padding: 3rem 1rem;
    margin: 5rem auto;
    max-width: 800px;
}

.box h2 {
    font-size: 2.5rem;
    line-height: 1.2;
    color: #202124;
    padding: 2rem 1rem;
    margin: 0 auto;
    max-width: 700px;
    text-align: left;
}

.box ul {
    list-style: none; /* Rimuove i bullet points */
    padding: 1rem 1rem;
    margin: 0 auto;
    max-width: 700px;
    text-align: left;
    line-height: 1.5;
}

.box ul li {
    font-size: 1.5rem;
    margin-bottom: 0.5rem; /* Opzionale: aggiunge spazio tra i punti */
    color: #202124;
}

.keywords {
    display: flex;
    justify-content: left;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding-left: 50px;
    padding-right: 50px;
    padding-top: 40px;
    padding-bottom: 40px;
}

.keyword {
    background-color: #1e88e0ff;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 1.5rem;
    font-size: 1.2rem;
    font-weight: 300;
}

/* CTA Section without modal */

.cta {
    max-width: 700px;
    text-align: center;
    margin: 2rem auto;
    padding-left: 2rem;
    padding-right: 2rem;
    padding-top: 8rem;
    padding-bottom: 15rem;
}

.cta img {
    max-width: 70px;
    margin-bottom: 2rem;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.cta p {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 300;
    margin: 0.5rem 1rem;
}

.cta-title {
    text-align: center;
    font-weight: 700;
    font-size: 2.5rem;
    line-height: 1.2;
    color: #202124;
    margin: 1rem 0rem;
}

.cta button {
    background-color: #202124;
    color: white;
    border: none;
    margin-top: 2rem;
    padding: 1rem 6rem;
    font-size: 1.5rem;
    font-weight: 700;
    border-radius: 2rem;
    cursor: pointer;
    width: auto;
    display: block;
    margin-left: auto;
    margin-right: auto; /* Centra il pulsante */
}

.cta button:hover {
    background-color: #333;
}

/* Modal contact form, from CTA section */

.close {
    position: fixed;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    cursor: pointer;
}

.close img {
    width: 40px;
    height: 40px;
}

.modal { /* Contenitore per la modale su cui il form andrà in overlay */
    display: none;  /* Nasconde la modale inizialmente */
    justify-content: center; /* Centra orizzontalmente */
    align-items: center; /* Centra verticalmente */
    position: fixed; /* Sovrapposizione */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Sfondo semi-trasparente */
    padding: 2rem 2rem;
    z-index: 1000;
    box-sizing: border-box; /* IMP. Include padding nei calcoli della dimensione ed evita decentramenti o criticità */
}

.modal-content { /* Il form e il suo contenuto */
    padding: 2rem; /* Uniforma il padding */
    max-width: 600px;
    width: 90%; /* Adatta la larghezza per dispositivi più piccoli */
    margin: 0 auto;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.modal-content input,
.modal-content textarea {
    width: 90%; /* Occupa l'80% della larghezza della modale */
    max-width: 100%; /* Per prevenire overflow */
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1.1rem;
    font-family: Arial, Helvetica, sans-serif;
    box-sizing: border-box; /* IMP. Include padding e bordi nel calcolo della larghezza  ed evita decentramenti o criticità*/
}

.modal-content button {
    background-color: #1e88e0ff;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 2rem;
    font-size: 1.5rem;
    cursor: pointer;
    width: 80%; /* Stessa larghezza degli input */
}

.modal-content button:hover {
    background-color: #155f9c;
}

/* Logos Section  */

.logos {
    text-align: center;
    padding: 10rem 1rem;
    background-color: #202124;
}

.logos h2 {
    text-align: center;
    color: white;
    font-size: 1.5rem;
    padding-bottom: 2rem;
}

.logos img {
    margin: 0.5rem;
    max-width: 250px;
}

/* Story Section */

.story {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 700px;
    margin: 5rem auto;
    padding: 4rem 1rem;
    gap: 4rem;
}

.story-content {
    flex: 1;
    text-align: left;
}

.story-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #202124;
    margin-bottom: 1rem;
}

.story-content p {
    font-size: 1.4rem;
    line-height: 1.6;
    color: #202124;
    margin-bottom: 1rem;
}

.story-small-text {
    font-size: 1.2rem;
    line-height: 1.4;
    color: #202124;
    margin-top: 1rem;
}

.story-content a {
    font-weight: 300;
    color: #1e88e0ff;
    text-decoration: none;
}

.story-content a:hover {
    text-decoration: underline;
}

.story-image {
    flex: 0 0 40%; /* Occupazione del 40% dello spazio orizzontale */
    max-width: 300px; /* Limita la larghezza massima dell'immagine */
}

.story-image img {
    width: 100%;
    border-radius: 10px; /* Arrotonda gli angoli */
    height: auto;
}

/* Pre-footer */

.pre-footer {
    background-color: #202124;
    color: white;
    text-align: center;
    padding: 10rem 1rem;
    position: relative; /* Necessario per posizionare il pseudo-elemento */
}

.pre-footer::after {
    content: ""; /* Crea la linea */
    display: block;
    width: calc(100% - 2rem); /* Riduce la larghezza della linea con padding laterale */
    max-width: 750px; /* Limita la larghezza massima della linea */
    height: 1px; /* Altezza della linea */
    background-color: #f8f9faff; /* Colore grigio chiaro */
    margin: 0 auto; /* Centra la linea */
    position: absolute;
    bottom: 0; /* Posiziona la linea alla fine della sezione */
    left: 0;
    right: 0;
}

.pre-footer div {
    max-width: 700px;
    margin: 0 auto; /* Centra il div orizzontalmente */
}

.pre-footer img {
    padding: 10rem 1rem;
    max-width: 300px;
    margin: 0 auto;
}

/* Footer */

footer {
    background-color: #202124;
    color: white;
    text-align: center;
    padding: 1rem 1rem;
}

footer div {
    max-width: 750px;
    margin: 0 auto; /* Centra il div orizzontalmente */
}

footer p {
    font-size: 0.9rem;
    font-weight: 300;
}

footer img {
    margin-top: 5rem;
    margin-bottom: 8rem;
    padding: 2rem 1rem;
    max-width: 300px;
}

/* Responsive mobile settings */

@media (max-width: 768px) {

    header h1 {
        font-size: 2.3rem;
        padding-left: 10px;
        max-width: 90%;
    }

    header p {
        font-size: 1.3rem;
        padding-left: 10px;
        max-width: 90%;
    }

    .desktop-break {
        display: none; /* Nasconde il <br> in mobile */
    }

    .quote-section p {
        font-size: 1.2rem;
    }

    .quote-symbol {
        width: 60px;
        height: auto;
        margin-right: 0px;
        margin-left: 0px;
    }

    .box {
        border-radius: 0px;
    }

    .box h2 {
        font-size: 2rem;
        padding-left: 20px;
    }

    .box ul {
        list-style: none; /* Rimuove i bullet points */
        padding: 1rem 1rem;
        padding-left: 10px;
    }       

    .box ul li {
        font-size: 1.2rem;
        padding-left: 10px;
    }

    .keywords {
        justify-content: center;
        gap: 0.3rem;
        padding-left: 10px;
        padding-right: 10px;
    }

    .keyword {
        padding: 0.3rem 1rem;
        font-size: 1.2rem;
    }

    .cta-title {
        font-size: 2rem;
    }

    .cta p {
        font-size: 1.3rem;
    }

    .cta button {
        width: 100%; /* Assicura che il bottone sia completamente allineato */
        max-width: 300px; /* Evita che sia troppo largo */
        margin: 1 auto; /* Centra il bottone */
        padding: 0.75rem; /* Regola il padding interno per evitare il decentramento */
        text-align: center; /* Allinea il testo al centro */
        font-size: 1.5rem; /* Regola la dimensione del testo per dispositivi più piccoli */
    }

    .close {
        width: 30px;
        height: 30px;
    }

    .close img {
        width: 30px;
        height: 30px;
    }

    .logos h2 {
        padding-left: 3rem;
        padding-right: 3rem;
    }

    .logos img {
        max-width: 150px;
        margin: 1rem auto; /* Centra le immagini su mobile */
    }

    .story {
        display: flex;
        flex-direction: column; /* Disposizione verticale degli elementi */
        align-items: center; /* Centra tutti gli elementi */
        gap: 2rem; /* Riduce spazio tra gli elementi, in questo caso spazio verticale */
        max-width: 80%; /* Riduce la larghezza massima su dispositivi mobili */
        margin: 3rem auto; /* Centra la sezione verticalmente */
        padding: 2rem 1rem; /* Riduce il padding per dispositivi mobili */
    }

    .story-content h2 {
        font-size: 2rem; /* Riduce leggermente la dimensione del titolo */
    }

    .story-content p {
        font-size: 1.2rem; /* Riduce la dimensione del testo */
        line-height: 1.5;  /* Riduce di 0.1rem l'interlinea */
    }

    .story-small-text {
        font-size: 1.1rem; /* Ulteriore riduzione per il testo piccolo */
        line-height: 1.4;
        margin-top: 1.5rem;
    }

    .story-image {
        order: 2; /* Posiziona l'immagine al centro */
        width: auto;
    }

    .pre-footer img {
        padding: 6rem 1rem;
        max-width: 225px;
    }
}