/* ============================
   LAYOUT GENERALE
============================ */

.container {
    width: 90%;
    max-width: 1300px;
    margin: auto;
}

/* ============================
   NAVBAR
============================ */

.navbar {
    position: sticky;
    top: 0;
    width: 100%;
    background: #1a1a1a;
    border-bottom: 1px solid #333;
    z-index: 1000;
    padding: 12px 0;
}

.nav-container {
    width: 90%;
    max-width: 1300px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* LOGO */
.nav-logo {
    font-size: 1.9rem;
    font-weight: 700;
    font-family: "Raleway", sans-serif;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 12px;
}

.home-icon {
    width: 30px;
    height: 30px;
    filter: brightness(0) invert(1);
}

/* MENU DESKTOP */
.nav-menu {
    list-style: none;
    display: flex;
    gap: 28px;
    align-items: center;
}

.nav-menu>li>a {
    font-family: "Raleway", sans-serif;
    color: #ddd;
    font-size: 1rem;
    font-weight: 500;
    padding: 8px 5px;
    transition: 0.3s;
}

.nav-menu>li>a:hover {
    color: var(--rosa);
}

.nav-menu a.active {
    color: var(--rosa);
    font-weight: 600;
}

/* HAMBURGER */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
}

.nav-toggle span {
    width: 26px;
    height: 3px;
    background: #fff;
    border-radius: 3px;
    transition: 0.3s ease;
}

/* ============================
   DROPDOWN DESKTOP
============================ */

.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 6px;
    list-style: none;
    padding: 10px 0;
    min-width: 200px;
    display: none;
    z-index: 2000;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.dropdown-menu li a {
    display: block;
    padding: 10px 18px;
    color: #ddd;
    font-size: 0.95rem;
    transition: 0.25s ease;
}

.dropdown-menu li a:hover {
    background: #2a2a2a;
    color: var(--rosa);
}

/* Divider elegante */
.dropdown-divider {
    border: none;
    border-top: 1px solid #333;
    margin: 6px 0;
}

/* Etichette interne */
.dropdown-label {
    padding: 6px 18px 4px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    pointer-events: none;
}

/* Hover SOLO desktop */
@media (min-width: 901px) {
    .dropdown:hover .dropdown-menu {
        display: block;
    }
}

/* ============================
   OVERLAY MOBILE
============================ */

.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    transition: 0.3s ease;
    z-index: 900;
}

.nav-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* ============================
   DROPDOWN + MENU MOBILE
============================ */

@media (max-width: 900px) {

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 75%;
        max-width: 340px;
        height: 100vh;
        background: #111;
        flex-direction: column;
        padding-top: 90px;
        gap: 25px;
        transition: right 0.35s ease;
        box-shadow: -4px 0 12px rgba(0, 0, 0, 0.4);
        z-index: 1000;
    }

    .nav-menu.open {
        right: 0;
    }

    .nav-toggle {
        display: flex;
    }

    /* Animazione hamburger → X */
    .nav-toggle.open span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .nav-toggle.open span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.open span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* Dropdown mobile */
    .dropdown-menu {
        position: static;
        background: #111;
        border: none;
        padding-left: 20px;
        padding-bottom: 10px;
        display: none;
        box-shadow: none;
    }

    .dropdown.open .dropdown-menu {
        display: block;
    }

    .dropdown-toggle::after {
        content: "▾";
        margin-left: 8px;
        font-size: 0.8rem;
        color: #ddd;
        transition: transform 0.3s ease;
    }

    .dropdown.open>.dropdown-toggle::after {
        transform: rotate(180deg);
    }

    /* Label mobile */
    .dropdown-label {
        padding-left: 0;
        margin-top: 8px;
        color: #aaa;
        font-size: 0.8rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
}

@media (max-width: 900px) {

    /* MENU MOBILE MIGLIORATO */
    .nav-menu {
        height: 100vh;
        overflow-y: auto;
        /* permette di scrollare tutto il menu */
        padding-bottom: 40px;
        /* evita tagli in fondo */
        scrollbar-width: thin;
    }

    /* Scrollbar elegante per Chrome/Safari */
    .nav-menu::-webkit-scrollbar {
        width: 6px;
    }

    .nav-menu::-webkit-scrollbar-thumb {
        background: #444;
        border-radius: 4px;
    }

    /* DROPDOWN MOBILE SCROLLABILE */
    .dropdown-menu {
        max-height: 300px;
        /* spazio sufficiente per tutte le voci */
        overflow-y: auto;
        /* abilita lo scroll verticale */
        padding-bottom: 20px;
        /* evita che l’ultima voce venga tagliata */
        scrollbar-width: thin;
    }

    .dropdown-menu::-webkit-scrollbar {
        width: 6px;
    }

    .dropdown-menu::-webkit-scrollbar-thumb {
        background: #555;
        border-radius: 4px;
    }

    /* MIGLIORAMENTO SPAZIATURA VOCI */
    .dropdown-menu li a {
        padding: 12px 18px;
        font-size: 1rem;
    }

    /* MIGLIORAMENTO LABEL */
    .dropdown-label {
        margin-top: 10px;
        padding-left: 0;
        font-size: 0.85rem;
        color: #bbb;
    }

    /* MIGLIORAMENTO FRECCIA DROPDOWN */
    .dropdown-toggle::after {
        content: "▾";
        margin-left: 10px;
        font-size: 0.9rem;
        color: #ddd;
        transition: transform 0.3s ease;
    }

    .dropdown.open>.dropdown-toggle::after {
        transform: rotate(180deg);
    }
}

/* ============================
   MINI-BARRA LEGALE
============================ */

#footer {
    background: #111;
    color: #ccc;
    font-family: "Quicksand", sans-serif;
    text-align: center;
    padding: 12px 0;
    border-top: 3px solid var(--rosa);
}

.footer-legal {
    font-size: 0.85rem;
    line-height: 1.4;
}

.footer-legal a {
    color: var(--rosa);
    text-decoration: none;
}

.footer-legal a:hover {
    text-decoration: underline;
    opacity: 0.8;
}

/* ============================
   COOKIE BANNER
============================ */

#cookie-banner {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 320px;
    background: #111;
    color: #fff;
    padding: 18px 20px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
    border-radius: 12px;
    font-size: 0.9rem;
    z-index: 9999;
    display: none;
}

#cookie-banner p {
    margin-bottom: 12px;
    line-height: 1.4;
}

.cookie-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#cookie-banner button {
    background: var(--rosa);
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    color: #111;
    font-weight: 600;
}

#cookie-banner #reject-cookies {
    background: #444;
    color: #fff;
}

#cookie-banner a {
    color: var(--rosa);
    font-size: 0.85rem;
}