:root {
    --header-height: 4.5rem;
    --dark-color: #070D1F;
    --dark-color-alt: rgba(80, 80, 95, 0.85);
    --white-color: #E6E7E9;
    --accent-color: #bd9aff;
    --body-font: 'Poppins', sans-serif;
    --lang-bg: rgba(84, 49, 153, 0.75);
    --lang-border: #543199;
    --select-circle: #D9C7FB;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--body-font);
    background: var(--dark-color);
    color: var(--white-color);
    padding-top: 6rem;
    min-height: 100vh;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 5.2rem;
}

ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

a {
    text-decoration: none;
}

.nav {
    font-family: 'Poppins', sans-serif;
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 85%;
    max-width: 1100px;
    height: 3.2rem;
    padding: 0 1.5rem;
    background: var(--dark-color-alt);
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 1000;
}

.nav-menu-list {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    color: var(--white-color);
    font-size: 0.9rem;
    font-weight: 400;
    transition: 0.3s;
}

.nav-link:hover {
    color: var(--accent-color);
    font-size: 1.2rem;
}

.nav-link.active {
    background: var(--accent-color);
    padding: 0.35rem 0.8rem;
    border-radius: 0.35rem;
    color: #fff;
    font-weight: 600;
}

.nav-icon img {
    height: 88px;
    display: block;
}

.nav-social {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-social a {
    color: white;
    font-size: 1.5rem;
    transition: 0.3s;
}

.nav-social a:hover {
    color: var(--accent-color);
}

.nav-lingua {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.lang-flags {
    display: flex;
    gap: 16px;
    align-items: center;
    position: relative;
    background: rgba(84, 49, 153, 0.7);
    border: 2px solid #543199;
    border-radius: 50px;
    padding: 10px 20px;
}

.flag-item {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.flag-item img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    opacity: 0.7;
    transition: all 0.2s ease;
    display: block;
}

.flag-item.active img {
    opacity: 1;
    transform: scale(1.05);
}

.flag-item:hover img {
    opacity: 1;
    transform: scale(1.08);
}

.lang-selection-circle {
    position: absolute;
    width: 50px;
    height: 40px;
    background-color: #D9C7FB;
    border-radius: 43px;
    bottom: 50%;
    transform: translateY(50%);
    transition: left 0.25s ease-in-out;
    z-index: 1;
    box-shadow: 0 0 12px rgba(217, 199, 251, 0.6);
    opacity: 0.9;
    left: 0;
}



.footer {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    margin: 0 auto;
    padding: 50px 100px;
    width: 60%;
    background-color: #b1b1b110;
    color: white;
    border-radius: 19px 19px 0 0;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 19px 19px 0 0;
    padding: 1px;
    background: linear-gradient(45deg, #828282, #383838);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}
.footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer ul h1 {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 20px;
    color: white;
    letter-spacing: 1px;
}

.footer ul li {
    margin-bottom: 12px;
}

.footer ul li a {
    color: #888;
    text-decoration: none;
    font-size: 20px;
    transition: 0.3s ease;
}

.footer ul li a:hover {
    color: white;
}

.footer ul:last-child li {
    margin-bottom: 12px;
}

.colonna_button {
    display: flex;
    flex-direction: column;
    gap: 5px;
}


.colonna_button button {
    padding: 10px 28px;
    font-family: pippo-regular;
    border-radius: 11px;
    border: none;
    background: #543199;
    width: 100%;
    color: white;
    font-size: 14px;
    cursor: pointer;
    transition: 0.3s ease;
}

#lin{
    text-decoration: none;
    font-family: pippo-regular;
    font-size: 14px;
    color: white;
}

.colonna_button button:hover {
    background: #7c3aed;
    scale: 1.1  ;
}

/* ============================================
   MOBILE.CSS - RESPONSIVE DESIGN PREMIUM
   Navbar e Footer - Design migliorato
   NON tocca: Selettore lingua
   ============================================ */

/* ============================================
   TABLET (768px - 1024px)
   ============================================ */
@media screen and (max-width: 1024px) {
    
    /* ========== NAVBAR MIGLIORATA ========== */
    .nav {
        width: 92%;
        height: 3.8rem;
        padding: 0 1.8rem;
        top: 1rem;
        background: rgba(7, 13, 31, 0.95);
        border: 1px solid rgba(189, 154, 255, 0.25);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3), 0 0 15px rgba(189, 154, 255, 0.1);
        border-radius: 60px;
    }
    
    .nav-icon img {
        height: 68px;
        transition: all 0.3s ease;
    }
    
    .nav-menu-list {
        gap: 1.5rem;
    }
    
    .nav-link {
        font-size: 0.9rem;
        font-weight: 500;
        position: relative;
        letter-spacing: 0.3px;
    }
    
    .nav-link::after {
        content: '';
        position: absolute;
        bottom: -6px;
        left: 50%;
        transform: translateX(-50%);
        width: 0;
        height: 2px;
        background: linear-gradient(90deg, #bd9aff, #a855f7);
        border-radius: 2px;
        transition: width 0.3s ease;
    }
    
    .nav-link:hover::after {
        width: 70%;
    }
    
    .nav-link:hover {
        font-size: 0.9rem;
        color: #bd9aff;
        text-shadow: 0 0 8px rgba(189, 154, 255, 0.5);
    }
    
    .nav-social {
        gap: 1rem;
    }
    
    .nav-social a {
        font-size: 1.4rem;
        transition: all 0.3s ease;
    }
    
    .nav-social a:hover {
        transform: translateY(-3px);
        color: #bd9aff;
        filter: drop-shadow(0 0 5px #bd9aff);
    }
    
    /* ========== FOOTER ========== */
    .footer {
        width: 85%;
        padding: 40px 50px;
        flex-wrap: wrap;
        gap: 40px;
        justify-content: space-around;
        background: rgba(177, 177, 177, 0.08);
    }
    
    .footer ul h1 {
        font-size: 28px;
        margin-bottom: 15px;
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
    }
    
    .footer ul li a {
        font-size: 17px;
        transition: all 0.3s ease;
    }
    
    .footer ul li a:hover {
        color: white;
        transform: translateX(5px);
        display: inline-block;
    }
    
    .colonna_button {
        width: auto;
        min-width: 180px;
    }
    
    .colonna_button button {
        padding: 10px 22px;
        background: linear-gradient(135deg, #543199, #7c3aed);
        border-radius: 30px;
        transition: all 0.3s ease;
    }
    
    .colonna_button button:hover {
        transform: translateY(-3px);
        box-shadow: 0 5px 15px rgba(124, 58, 237, 0.4);
        scale: 1.02;
    }
    
    #lin {
        font-size: 13px;
        font-weight: 500;
    }
}

/* ============================================
   MOBILE (320px - 767px) - NAVBAR SUPERIORE
   ============================================ */
@media screen and (max-width: 767px) {
    
    /* ========== NAVBAR PREMIUM MOBILE ========== */
    .nav {
        width: 94%;
        top: 0.8rem;
        padding: 0.6rem 1.2rem;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        gap: 8px;
        border-radius: 50px;
        background: rgba(7, 13, 31, 0.95);
        border: 1px solid rgba(189, 154, 255, 0.3);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(189, 154, 255, 0.1) inset;
        height: auto;
        min-height: 3.5rem;
    }
    
    .nav-icon {
        order: 1;
    }
    
    .nav-icon img {
        height: 52px;
        filter: drop-shadow(0 0 8px rgba(189, 154, 255, 0.6));
        transition: all 0.3s ease;
    }
    
    .nav-icon img:active {
        transform: scale(0.95);
    }
    
    .nav-menu {
        order: 3;
        width: 100%;
        margin-top: 5px;
    }
    
    .nav-menu-list {
        gap: 0.8rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .nav-menu-list li {
        margin: 0;
    }
    
    .nav-link {
        font-size: 0.75rem;
        font-weight: 500;
        padding: 6px 12px;
        border-radius: 30px;
        transition: all 0.3s ease;
        background: transparent;
        letter-spacing: 0.5px;
    }
    
    .nav-link:hover {
        font-size: 0.75rem;
        background: rgba(189, 154, 255, 0.15);
        color: #bd9aff;
        transform: translateY(-2px);
    }
    
    .nav-link.active {
        background: linear-gradient(135deg, #543199, #7c3aed);
        padding: 6px 14px;
        box-shadow: 0 2px 8px rgba(124, 58, 237, 0.4);
    }
    
    .nav-social {
        order: 2;
        gap: 0.8rem;
        background: rgba(189, 154, 255, 0.1);
        padding: 5px 12px;
        border-radius: 40px;
    }
    
    .nav-social a {
        font-size: 1.1rem;
        transition: all 0.3s ease;
    }
    
    .nav-social a:active {
        transform: scale(0.9);
        color: #bd9aff;
    }
    
    /* Aggiusta il padding del body per la navbar */
    body {
        padding-top: 6rem;
    }
    
    /* ========== FOOTER PREMIUM MOBILE ========== */
    .footer {
        width: 100%;
        padding: 35px 25px;
        flex-direction: column;
        gap: 35px;
        align-items: center;
        text-align: center;
        border-radius: 30px 30px 0 0;
        background: rgba(177, 177, 177, 0.05);
    }
    
    .footer::before {
        border-radius: 30px 30px 0 0;
    }
    
    .footer ul {
        width: 100%;
        text-align: center;
    }
    
    .footer ul h1 {
        font-size: 24px;
        margin-bottom: 15px;
        color: white;
        -webkit-background-clip: text;
        background-clip: text;
        display: inline-block;
    }
    
    .footer ul li {
        margin-bottom: 10px;
    }
    
    .footer ul li a {
        font-size: 16px;
        display: inline-block;
        transition: all 0.3s ease;
    }
    
    .footer ul li a:active {
        transform: translateX(5px);
        color: #bd9aff;
    }
    
    .colonna_button {
        width: 100%;
        align-items: center;
        gap: 12px;
    }
    
    .colonna_button button {
        padding: 10px 28px;
        width: auto;
        min-width: 200px;
        background: linear-gradient(135deg, #543199, #7c3aed);
        border-radius: 40px;
        font-weight: 500;
        letter-spacing: 0.5px;
        transition: all 0.3s ease;
    }
    
    .colonna_button button:active {
        transform: scale(0.97);
        box-shadow: 0 2px 10px rgba(124, 58, 237, 0.4);
    }
    
    #lin {
        font-size: 14px;
        font-weight: 500;
    }
}

/* ============================================
   MOBILE PICCOLO (320px - 480px)
   ============================================ */
@media screen and (max-width: 480px) {
    
    /* ========== NAVBAR COMPATTA ========== */
    .nav {
        width: 96%;
        top: 0.6rem;
        padding: 0.5rem 1rem;
        gap: 6px;
    }
    
    .nav-icon img {
        height: 44px;
    }
    
    .nav-menu-list {
        gap: 0.5rem;
    }
    
    .nav-link {
        font-size: 0.65rem;
        padding: 4px 10px;
    }
    
    .nav-link:hover {
        font-size: 0.65rem;
    }
    
    .nav-link.active {
        padding: 4px 12px;
    }
    
    .nav-social {
        gap: 0.6rem;
        padding: 4px 10px;
    }
    
    .nav-social a {
        font-size: 1rem;
    }
    
    body {
        padding-top: 5.8rem;
    }
    
    /* ========== FOOTER COMPATTO ========== */
    .footer {
        padding: 25px 20px;
        gap: 28px;
    }
    
    .footer ul h1 {
        font-size: 20px;
        margin-bottom: 12px;
    }
    
    .footer ul li {
        margin-bottom: 8px;
    }
    
    .footer ul li a {
        font-size: 14px;
    }
    
    .colonna_button button {
        padding: 8px 22px;
        min-width: 180px;
    }
    
    #lin {
        font-size: 12px;
    }
}

/* ============================================
   ORIENTATION LANDSCAPE (orizzontale)
   ============================================ */
@media screen and (max-height: 500px) and (orientation: landscape) {
    
    .nav {
        flex-direction: row;
        padding: 0.4rem 1.2rem;
        gap: 15px;
        min-height: 3rem;
    }
    
    .nav-icon img {
        height: 40px;
    }
    
    .nav-menu {
        order: 2;
        width: auto;
        margin-top: 0;
    }
    
    .nav-menu-list {
        gap: 1rem;
    }
    
    .nav-link {
        font-size: 0.7rem;
        padding: 4px 10px;
    }
    
    .nav-social {
        order: 3;
        width: auto;
        padding: 3px 10px;
    }

    body {
        padding-top: 4.5rem;
    }
    
    .footer {
        flex-direction: row;
        flex-wrap: wrap;
        padding: 20px 30px;
        gap: 25px;
    }
    
    .footer ul {
        width: auto;
        min-width: 130px;
    }
    
    .footer ul h1 {
        font-size: 18px;
    }
    
    .footer ul li a {
        font-size: 13px;
    }
    
    .colonna_button {
        width: auto;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .colonna_button button {
        padding: 6px 18px;
        min-width: auto;
    }
}

/* ============================================
   EXTRA: Animazioni per interazioni touch
   ============================================ */
@media (hover: none) and (pointer: coarse) {
    .nav-link:active {
        background: rgba(189, 154, 255, 0.2);
        transform: scale(0.96);
    }
    
    .nav-social a:active {
        transform: scale(0.85);
    }
    
    .colonna_button button:active {
        transform: scale(0.96);
    }
}