:root {
    --color-accent: #E83986;
    --color-surface: #FFFFFF;
    --color-text: #3E373A;
    --color-special: #7BE83A;
    --color-dark-gray: #666666;

    --font-f: 'Fredoka', sans-serif;
}

* {
  box-sizing: border-box;
}

a {
    color: var(--color-text);
    font-family: var(--font-f);
    font-size: 20px;
    font-weight: 400;
    text-decoration: none;
}

a:hover {
    color: var(--color-accent);
}

a.card {
    display: contents;
}

.card-project {
    border-radius: 20px;
    box-shadow: 0px 5px 10px 0px rgba(0, 0, 0, 0.2);
    margin: 0 auto;
    padding: 40px;
    width: 100%;
}

.card-project-preview {
    border-radius: 20px;
    box-shadow: 0px 5px 10px 0px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    padding: 40px;
    transition: box-shadow 0.3s ease;
    width: 33.33%;
}

.card-project-preview:hover {
    border: solid 1px var(--color-accent);
    box-shadow: none
}

.card-project img, .card-project-preview img {
    width: 100%;
}

.card-gray {
    background-color: #f5f5f5;
    border-radius: 20px;
    padding: 40px;
}

.container {
    margin-left: auto;
    margin-right: auto;
    max-width: 1200px;
    width: 100%;
}

.burger {
    display: none;
}

button.primary, a.button {
    background-color: var(--color-accent);
    border: solid 1px var(--color-accent);
    border-radius: 10px;
    box-shadow: 0px 5px 10px 0px rgba(0, 0, 0, 0.2);
    color: var(--color-surface);
    cursor: pointer;
    font-family: var(--font-f);
    font-size: 20px;
    font-weight: 500;
    padding: 10px 30px;
    text-align: center;
    transition: box-shadow 0.3s ease;
    width: fit-content;
}

button.primary:hover, a.button:hover {
    box-shadow: none;
}

button.secondary, a.button-secondary {
    background-color: var(--color-surface);
    border: solid 1px var(--color-accent);
    border-radius: 10px;
    box-shadow: 0px 5px 10px 0px rgba(0, 0, 0, 0.2);
    color: var(--color-accent);
    cursor: pointer;
    font-family: var(--font-f);
    font-size: 20px;
    font-weight: 500;
    padding: 10px 30px;
    text-align: center;
    transition: box-shadow 0.3s ease;
    width: fit-content;
}

button.secondary:hover, a.button-secondary:hover {
    box-shadow: none;
}

.cta-hero {
    display: flex;
    flex-direction: row;
    gap: 40px;
}

.flex-h {
    display: flex;
    flex-direction: row;
}

.flex-h-l-c {
    align-items: center;
    display: flex;
    flex-direction: row;
}

.flex-h-sb-b {
    align-items: end;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

.flex-h-sb-c {
    align-items: center;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

.flex-h-sb-t {
    align-items: normal;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

.flex-v-c {
    align-items: center;
    display: flex;
    flex-direction: column;
}

.flex-v {
    display: flex;
    flex-direction: column;
}

footer {
    margin-top: 80px;
}

footer .alto {
    align-items: center;
    background-color: #666666;
    border-radius: 20px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    padding: 10px 20px;
}

footer .alto .menu {
    display: flex;
    flex-direction: row;
    gap: 10px;
}

footer .alto a {
    color: var(--color-surface);
    font-size: 15px;
}

footer .alto a:hover {
    color: var(--color-special);
    font-size: 15px;
}

footer .alto img {
    height: 24px;
}

footer .basso {
    padding: 0px 20px;
}

footer .basso p {
    color: var(--color-dark-gray);
    font-size: 15px;
}

footer .basso a {
    color: var(--color-dark-gray);
    font-size: 15px;
}

footer .basso a:hover {
    color: var(--color-accent);
}

.gap-10 {
    gap: 10px;
}

.gap-20 {
    gap: 20px;
}

.gap-40 {
    gap: 40px;
}

.gap-60 {
    gap: 60px;
}

h1 {
    color: var(--color-text);
    font-family: var(--font-f);
    font-size: 64px;
    font-weight: 700;
    margin: 0;
}

h2 {
    color: var(--color-text);
    font-family: var(--font-f);
    font-size: 30px;
    font-weight: 600;
    margin: 0;
}

h3 {
    color: var(--color-text);
    font-family: var(--font-f);
    font-size: 36px;
    font-weight: 600;
    margin: 0;
}

h4 {
    color: var(--color-text);
    font-family: var(--font-f);
    font-size: 24px;
    font-weight: 600;
    margin: 0;
}

img.application {
    border-radius: 10px;
    width: 50%;
}

.m-auto {
    margin: 0 auto;
}

.mt-40 {
    margin-top: 40px;
}

nav {
    align-items: center;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

nav ul {
    display: flex;
    gap: 20px;
    list-style: none;
    margin: 0;
    padding: 0;
}

p {
    color: var(--color-text);
    font-family: var(--font-f);
    font-size: 20px;
    font-weight: 400;
    line-height: 28px;
    margin: 0;
}

p.title {
    color: var(--color-text);
    font-family: var(--font-f);
    font-size: 24px;
    font-weight: 600;
    line-height: 28px;
    margin: 0;
}

.section-distance {
    margin-top: 80px;
}

span.step {
    align-self: flex-start;
    background-color: var(--color-special);
    border-radius: 10px;
    color: var(--color-surface);
    font-family: var(--font-f);
    font-size: 36px;
    font-weight: 600;
    padding: 5px 10px;
}

.text-c {
    text-align: center;
}

.title-and-icon {
    align-items: center;
    display: flex;
    flex-direction: row;
    gap: 10px;
}

.w-33 {
    width: 33.33%;
}

.w-50 {
    width: 50%;
}

.w-66 {
    width: 66.66%;
}

.w-100 {
    width: 100%;
}

@media (max-width: 768px) {

    .card-gray {
        padding: 20px;
    }
    
    .cta-hero {
        align-items: center;
        flex-direction: column;
        gap: 20px;
    }

    .burger {
        display: flex;
        flex-direction: column;
        gap: 5px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 5px;
    }

    .burger.open span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .burger.open span:nth-child(2) {
        opacity: 0;
    }
    .burger.open span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .burger span {
        display: block;
        width: 25px;
        height: 3px;
        background-color: var(--color-text);
        border-radius: 3px;
        transition: all 0.3s ease;
    }

    button.primary {
        width: 100%;
    }

    .flex-h,
    .flex-h-l-c,
    .flex-h-sb-b,
    .flex-h-sb-c,
    .flex-h-sb-t {
        flex-direction: column;
    }

    .card-project {
        width: 100%;
}

    footer .alto {
        align-items: flex-start;
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    h1 {
        font-size: 42px;
        line-height: 48px;
    }

    h2 {
        font-size: 24px;
    }

    h3 {
        font-size: 30px;
    }

    h4 {
        font-size: 24px;
    }

    /* Larghezze: tutto a piena larghezza */
    .w-33, .w-50, .w-66, .card-project-preview {
        width: 100%;
    }

    .gap-40 {
        gap: 20px;
    }

    .gap-60 {
        gap: 30px;
    }

    img.application {
        margin: 0 auto;
        width: 75%;
    }
    nav {
        position: relative;
    }

    nav ul {
        display: none;
        background-color: var(--color-surface);
        border-radius: 10px;
        box-shadow: 0px 5px 10px 0px rgba(0, 0, 0, 0.2);
        flex-direction: column;
        gap: 20px;
        padding: 10px;
        position: absolute;
        right: 0;
        text-align: right;
        top: 100%;
    }

    nav ul.open {
        display: flex;
    }

    p.project-description {
        text-align: center;
    }
    
    .section-distance {
        margin-top: 80px;
    }

    span.step {
        margin-top: 40px;
    }
}