﻿:root {
    --color-title: #d4b38b;
    --font-family: 'Inter', sans-serif;
    /*--body-color: gray;*/
    --menu-color: white;
    --body-font-size: 1.1em;
    --menu-backcolor: white;
    --menu-color: black;
}

/* Toggle wrapper - default mobile */
.toggle-wrapper {
    position: fixed;
    top: 0px;
    left: 0;
    width: 50px;
    height: 60px;
    /*border-top-right-radius: 5px;*/
    border-bottom-right-radius: 5px;
    border-right: 1px solid #ccc;
    border-bottom:1px solid #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: white;
    z-index: 1001;
    transition: left 0.5s ease;
}

/* Toggle lines */
.toggle {
    position: relative;
    width: 30px;
    height: 24px;
}

    .toggle span {
        position: absolute;
        left: 0;
        width: 100%;
        height: 3px;
        background: #333;
        transition: 0.4s ease;
    }

        .toggle span:nth-child(1) {
            top: 0;
        }

        .toggle span:nth-child(2) {
            top: 50%;
            transform: translateY(-50%);
        }

        .toggle span:nth-child(3) {
            bottom: 0;
        }

/* Toggle animation (X) */
.nav-container:has(#menu-toggle:checked) .toggle span:nth-child(1) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}

.nav-container:has(#menu-toggle:checked) .toggle span:nth-child(2) {
    opacity: 0;
}

.nav-container:has(#menu-toggle:checked) .toggle span:nth-child(3) {
    top: 50%;
    transform: translateY(-50%) rotate(-45deg);
}

/* Menu - mobile default */
.menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--menu-backcolor);
    color: var(--menu-color);
/*    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;*/
    transition: left 0.5s ease, width 0.5s ease;
    z-index: 1000;
    /*border-right: 1px solid #ccc;*/ /* bordo sottile grigio */
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1); /* ombra leggera a destra */
}

/* Menu visibile su toggle attivo */
.nav-container:has(#menu-toggle:checked) .menu {
    left: 0;
}

/* Lista del menu */
.menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

    /* Elementi della lista */
    .menu-list li {
        display: flex;
        align-items: center;
        gap: 2px;
        margin: 0.7rem 0;
        width: 100%;
        justify-content: left;
    }

        /* Icone e immagini nei <li> */
    .menu-list li {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        text-align: left;
        width: 100%;
    }

        .menu-list li .menu-label {
            margin-left: 8px;
            left: 10px;
            top: 50%;
            background: white;
            color: black;
            pointer-events: none;
            transition: opacity 0.3s ease;
            font-size: 1rem;
            max-width: 120px;
            display: inline-block;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            vertical-align: middle;
        }

/*        .menu-list li i,
        .menu-list li img {
            flex-shrink: 0;
        }*/

        /* Link all'interno dei <li> */
        .menu-list li .LinkmenuToggle {
            color: var(--menu-color);
            text-decoration: none;
            /*font-size: 1.5rem;*/
            flex-grow: 1;
            text-align: left;
        }

/* Link nel menu */
.menu a {
    color: var(--menu-color);
    text-decoration: none;
    /*font-size: 2rem;
    margin: 1rem;*/
}

/* Select lingua */
.menu select {
    /*font-size: 1.5rem;*/
    /*background: white;
    color: var(--menu-color);
    font-family: var(--font-family);*/
    border: none;
    border-radius: 5px;
}

/* Espansione del menu quando attivo */
.nav-container.menu-open .menu {
    width: 200px;
}

/* Toggle spostato quando menu aperto */
.nav-container.menu-open .toggle-wrapper {
    left: 200px;
}

.top-container {
    position: relative;
    display: inline-block;
    width: 100%;
}

.top-container {
    width: 100%; /* occupa tutta la larghezza del contenitore */
}


.top-image-container {
    position: relative;    
    height: 40vh;
    overflow: hidden;
}

.overlay-image {
    position: absolute;
    bottom: -2px;
    right: 10px;
    width: 100%
}

.top-image-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: clamp(1rem, 5vw, 2rem);
    font-family: 'Source Sans 3', sans-serif;
    text-align: center;
    font-weight: bold;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.7);
    padding: 0 10px; /* margine interno per non toccare i bordi */
}


/* Desktop layout */

@media screen and (min-width: 800px) {
    /* Menu compatto di default */
    .menu {
        /*display: flex;
        flex-direction: column;*/  /*disposizione verticale */
        /*align-items: flex-start;*/  /*allinea a sinistra*/ 
        /*justify-content: flex-start;*/  /*evita che il contenuto si centri verticalmente */
        left: 0;
        width: 60px;
        height: 100%;
        /*padding-top: 10px;*/
        /*border-right: 1px solid #ccc;*/ /* bordo sottile grigio */
        box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1); /* ombra leggera a destra */
    }
    .top-container {
        width: calc(100vw - 75px)
    }

    .top-image-container {
        height: 60vh;
    }

    .top-image-text {
        font-size: clamp(1.5rem, 6vw, 4rem);
    }

    .overlay-image {
        width: 97%; /* immagine overlay più larga */
        right: 10px;
    }


    /* Toggle compatto */
    .toggle-wrapper {
        left: 60px;
    }

    /* Spostamento del contenuto */
    .page-content {
       /* display: flex;
        flex-direction: column;
        min-height: 100vh;*/
        margin-left: 60px;
        transition: margin-left 0.5s ease;
    }

    main.full-width {
        width: 100vw;
    }

    main.shifted {
        width: calc(100vw - 80px);
        /*flex: 1;*/ /* occupa lo spazio disponibile */
    }    


    .nav-container.menu-open .page-content {
        margin-left: 200px;
    }

    .menu-list {
        flex-grow: 1;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        padding: 0;
        margin: 0;
        list-style: none;
        width: 100%;
    }

/*        .menu-list li {
            position: relative;
            display: flex;
            align-items: center;
            justify-content: flex-start;
            text-align: left;
            width: 100%;
        }*/


            .menu-list li .menu-label {
                /*margin-left: 8px;*/
                position: absolute;
                left: 60px;
                /*top: 50%;*/
                transform: translateY(-50%);
               /* background: #333;
                color: white;*/
                padding: 4px 8px;
                border-radius: 4px;
                white-space: nowrap;
                opacity: 0;
                /*pointer-events: none;
                transition: opacity 0.3s ease;*/
                z-index: 999;
                /*font-size: 0.9rem;*/
            }


    /* Etichette visibili come tooltip solo quando il menu è compatto */
    .nav-container:not(.menu-open) .menu-list li:hover .menu-label {
        opacity: 1;
    }

    /* Etichette visibili inline solo quando il menu è espanso */
    .nav-container.menu-open .menu .menu-label {
        position: static;
        background: none;
        color: inherit;
        padding: 0;
        opacity: 1 !important;
        pointer-events: auto;
        transform: none;
        display: inline-block !important;
    }

    /* Etichette nascoste di default */
    .menu .menu-label {
        display: none !important;
    }

    .custom-tooltip .tooltip-inner {
        background-color: #333;
        color: #fff;
        font-size: 14px;
        padding: 8px 12px;
        border-radius: 6px;
        max-width: 300px;
        text-align: left;
    }

    .custom-tooltip.bs-tooltip-right .tooltip-arrow::before {
        border-right-color: #333;
    }

/*    .custom-tooltip.bs-tooltip-left .tooltip-arrow::before {
        border-left-color: #333;
    }*/


    .icon {
        color: var(--menu-color);
        font-size: 25px
    }
}
