﻿/*=============== VARIABLES CSS ===============*/

:root {
    --header-height: 3.5rem;
    /*========== Colors ==========*/
    /*Color mode HSL(hue, saturation, lightness)*/
    --black-color: hsl(220, 24%, 12%);
    --black-color-light: hsl(220, 24%, 15%);
    --black-color-lighten: hsl(220, 20%, 18%);
    --white-color: #fff;
    --body-color: hsl(220, 100%, 97%);
    /*========== Font and typography ==========*/
    /*.5rem = 8px | 1rem = 16px ...*/
    --body-font-Abel-Serif: "Abel", serif;
    --body-font-Open-Sans: "Open Sans", serif;
    /*========== Font weight ==========*/
    --font-regular: 400;
    --font-semi-bold: 700;
    /*========== z index ==========*/
    --z-tooltip: 10;
    --z-fixed: 9999;
}
/*.en, .it, .de {
    display: none;
}
.lang-en .en,
.lang-it .it {
    display: inline;
}*/

/*========== Responsive typography ==========*/
@media screen and (min-width: 1024px) {
    :root {
        --normal-font-size: 1rem;
    }
}

/*=============== BASE ===============*/
* {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
    font-family: var(--body-font-Open-Sans);
    font-size: var(--normal-font-size);
}

body {
    background-color: var(--body-color);
}
ul li a{
    font-family: var(--body-font-Abel-Serif);
}

ul {
    list-style: none;
    /* Color highlighting when pressed on mobile devices */
    /*-webkit-tap-highlight-color: transparent;*/
}

a {
    text-decoration: none !important;
}

.navColor {
    /*transition: background-color 0.5s ease !important;*/
    background-color:white;
}

.navScrolled {
    background-color: white !important;
    box-shadow: 0px 6px 15px rgba(0, 0, 0, 0.2);
}

/*=============== REUSABLE CSS CLASSES ===============*/
.container {
    max-width: 1120px;
    margin-inline: 1.5rem;
}

/*=============== HEADER ===============*/
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: var(--z-fixed);
}

main {
    padding-top: calc(var(--header-height) + 1.9rem); /* Aggiunge spazio sotto la navbar */
}


/*=============== NAV ===============*/
.nav {
    height: var(--header-height);
    display:flex;
    align-items:center;
    justify-content:space-between;
}

.nav__logo,
.nav__burger,
.nav__close {
    /*color: var(--white-color);*/
    color: #0b3954;
}

.nav__data {
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav__logo {
    display: inline-flex;
    align-items: center;
    column-gap: .25rem;
    font-weight: var(--font-semi-bold);
    /* Color highlighting when pressed on mobile devices */
    /*-webkit-tap-highlight-color: transparent;*/
}

    .nav__logo i {
        font-weight: initial;
        font-size: 1.25rem;
    }

.nav__toggle {
    position: relative;
    width: 32px;
    height: 32px;
}

.nav__burger,
.nav__close {
    position: absolute;
    width: max-content;
    height: max-content;
    inset: 0;
    margin: auto;
    font-size: 1.25rem;
    cursor: pointer;
    transition: opacity .1s, transform .4s;
}

.nav__close {
    opacity: 0;
}

/* Navigation for mobile devices */
@media screen and (max-width: 1118px) {
    .nav__menu {
        position: absolute;
        left: 0;
        top: 2.5rem;
        width: 100%;
        height: calc(100vh - 3.5rem);
        overflow: auto;
        pointer-events: none;
        opacity: 0;
        transition: top .4s, opacity .3s;
    }
    /* codice prova separazione icon burger - logo */
    .nav__data {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    .nav__logo {
        margin-left: 1rem;
    }

    .nav__toggle {
        margin-left: auto;
        margin-right: 1rem;
    }
    /*  ---------------------------*/

    .nav {
        justify-content: center;
    }

    #logoImg {
        width: 100px;
    }

    .nav__menu::-webkit-scrollbar {
        width: 0;
    }

    .nav__list {
        background-color: white;
        box-shadow: 0px 6px 15px rgba(0, 0, 0, 0.2);
        padding-top: 1rem;
    }

    .nav__link {
        color: #0b3954;
        font-weight: bold;
        /* color: var(--white-color);*/
        /* background-color: var(--black-color);*/
        /*font-weight: var(--font-semi-bold);*/
        border-bottom: 0.1px solid white !important;
        font-size: 1.3em;
        padding: 1.25rem 1.5rem;
        display: flex;
        justify-content: center !important;
        align-items: center;
        transition: background-color .3s;
    }
}

.nav__link {
    color: #0b3954;
    font-weight: bold;
    /* color: var(--white-color);*/
    /* background-color: var(--black-color);*/
    /*font-weight: var(--font-semi-bold);*/
    font-size: 1.3em;
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color .3s;
}

    .nav__link:hover {
        color: black;
    }

/* Show menu */
.show-menu {
    opacity: 1;
    top: 3.5rem;
    pointer-events: initial;
}

/* Show icon */
.show-icon .nav__burger {
    opacity: 0;
    transform: rotate(90deg);
}

.show-icon .nav__close {
    opacity: 1;
    transform: rotate(90deg);
}

/*=============== DROPDOWN ===============*/
.dropdown__item {
    cursor: pointer;
}

.dropdown__arrow {
    font-size: 1.25rem;
    font-weight: initial;
    transition: transform .4s;
}

.dropdown__link,
.dropdown__sublink {
    padding: 1.25rem 1.25rem 1.25rem 2.5rem;
    color: var(--white-color);
    background-color: var(--black-color-light);
    display: flex;
    align-items: center;
    column-gap: .5rem;
    font-weight: var(--font-semi-bold);
    transition: background-color .3s;
}

    .dropdown__link i,
    .dropdown__sublink i {
        font-size: 1.25rem;
        font-weight: initial;
    }

    .dropdown__link:hover,
    .dropdown__sublink:hover {
        background-color: var(--black-color);
    }

.dropdown__menu,
.dropdown__submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height .4s ease-out;
}

/* Show dropdown menu & submenu */
.dropdown__item:hover .dropdown__menu,
.dropdown__subitem:hover > .dropdown__submenu {
    max-height: 1000px;
    transition: max-height .4s ease-in;
}

/* Rotate dropdown icon */
.dropdown__item:hover .dropdown__arrow {
    transform: rotate(180deg);
}

/*=============== DROPDOWN SUBMENU ===============*/
.dropdown__add {
    margin-left: auto;
}

.dropdown__sublink {
    background-color: var(--black-color-lighten);
}

/*=============== BREAKPOINTS ===============*/
/* For small devices */
@media screen and (max-width: 340px) {
    .container {
        margin-inline: 1rem;
        /*justify-content:center;*/
    }

    .nav__link {
        padding-inline: 1rem;
    }
}

/* For large devices */
@media screen and (min-width: 1118px) {
    .container {
        margin-inline: auto;
    }

    #logoImg {
        width: 250px;
        margin-right: 100px;
    }

    .nav {
        height: calc(var(--header-height) + 2rem);
        display: flex;
        justify-content: center;
    }

    .nav__toggle {
        display: none;
    }

    .nav__list {
        height: 100%;
        display: flex;
        column-gap: 3rem;
    }

    .nav__link {
        height: 100%;
        padding: 0;
        justify-content: initial;
        column-gap: .25rem;
    }

        .nav__link:hover {
            background-color: transparent;
        }

    .dropdown__item,
    .dropdown__subitem {
        position: relative;
    }

    .dropdown__menu,
    .dropdown__submenu {
        max-height: initial;
        overflow: initial;
        position: absolute;
        left: 0;
        top: 6rem;
        opacity: 0;
        pointer-events: none;
        transition: opacity .3s, top .3s;
    }

    .dropdown__link,
    .dropdown__sublink {
        padding-inline: 1rem 3.5rem;
    }

    .dropdown__subitem .dropdown__link {
        padding-inline: 1rem;
    }

    .dropdown__submenu {
        position: absolute;
        left: 100%;
        top: .5rem;
    }

    /* Show dropdown menu */
    .dropdown__item:hover .dropdown__menu {
        opacity: 1;
        top: 5.5rem;
        pointer-events: initial;
        transition: top .3s;
    }

    /* Show dropdown submenu */
    .dropdown__subitem:hover > .dropdown__submenu {
        opacity: 1;
        top: 0;
        pointer-events: initial;
        transition: top .3s;
    }
}
