/* WRAPPER: sempre fixed sopra l'hero */
.main-navbar-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 3000;
}

/* STATO BASE: sopra l'hero, trasparente + blur */
.main-navbar {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
    transition:
        background-color 0.25s ease,
        box-shadow 0.25s ease,
        padding 0.25s ease,
        transform 0.2s ease;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

/* LOGO */
.main-navbar-logo img {
    height: 32px;
    width: auto;
}

@media (min-width: 992px) {
    .main-navbar-logo img {
        height: 40px;
    }
}

/* LINK: uppercase + tracking + stile fresco */
.main-navbar .nav-link {
    position: relative;
    font-weight: 600;
    font-size: 0.92rem;
    padding: 0.55rem 1rem;
    color: #000000;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    transition: color 0.2s ease, opacity 0.2s ease;
}

/* underline morbido "glow" su hover/active (desktop) */
@media (min-width: 992px) {
    .main-navbar .nav-link::after {
        content: "";
        position: absolute;
        left: 50%;
        bottom: 4px;
        width: 0;
        height: 3px;
        border-radius: 999px;
        background: linear-gradient(90deg, #c9d536, #a9c808); /* giallo tennis -> lime */
        transform: translateX(-50%);
        transition: width 0.27s ease, opacity 0.2s ease;
        opacity: 0;
    }

    .main-navbar .nav-link:hover::after,
    .main-navbar .nav-link.active::after {
        width: 70%;
        opacity: 1;
    }
}

/* Colore testo active/hover */
.main-navbar .nav-link:hover,
.main-navbar .nav-link.active {
    color: #c9d536;
    opacity: 1;
}

/* STATO SCROLLATO O MENU APERTO: full white, ombra, link dark */
.main-navbar.scrolled,
.main-navbar.menu-open {
    background: #ffffff;
    box-shadow: 0 6px 20px rgba(0,0,0,0.16);
    border-bottom-color: transparent;
}

.main-navbar.scrolled .nav-link,
.main-navbar.menu-open .nav-link {
    color: #1d1d1d;
    opacity: 0.9;
}

.main-navbar.scrolled .nav-link.active,
.main-navbar.menu-open .nav-link.active {
    color: #000000; /* blu acceso */
}

/* underline colori diversi su stato scrolled/menu-open */
.main-navbar.scrolled .nav-link::after,
.main-navbar.menu-open .nav-link::after {
    background: linear-gradient(90deg, #0a6fe9, #0079b9);
}

/* Burger */
.main-navbar.navbar-light .navbar-toggler {
    border: none;
}

.main-navbar.navbar-light .navbar-toggler-icon {
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.6));
}

/* MENU MOBILE: link più grandi e comodi */
@media (max-width: 991.98px) {
    .main-navbar .navbar-collapse {
        margin-top: 0.5rem;
    }

    .main-navbar .nav-link {
        padding: 0.75rem 0;
        font-size: 1.05rem;
        opacity: 0.85;
    }

    .main-navbar .nav-link:hover {
        opacity: 1;
        color: #c9d536;
    }
}

/* Compensazione per il contenuto sotto la navbar */
body.with-main-navbar {
    padding-top: 70px;
}

@media (min-width: 992px) {
    body.with-main-navbar {
        padding-top: 80px;
    }
}

/* Dropdown stile soft */
.main-navbar .dropdown-menu {
    border-radius: 14px;
    padding: 8px 0;
    box-shadow: 0 10px 25px rgba(0,0,0,0.12);
    border: 0;
}

.main-navbar .dropdown-item {
    padding: 8px 16px;
    font-weight: 500;
    border-radius: 10px;
}

.main-navbar .dropdown-item:hover,
.main-navbar .dropdown-item.active {
    background: rgba(0,0,0,0.05);
}

/* SOCIAL ICONS IN NAVBAR – glassmorphism */
.main-navbar-social {
    gap: 14px;
}

.main-social-link {
    width: 40px;
    height: 40px;
    border-radius: 16px;
    background: rgba(255,255,255,0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1d1d1d;
    font-size: 1.05rem;
    transition: all 0.25s ease;
    box-shadow: 0 6px 18px rgba(0,0,0,0.14);
}

.main-social-link:hover {
    background-color: #0d6efd;
    color: #fff;
    transform: translateY(-3px) scale(1.05);
}


/* SOLO DESKTOP */
@media (min-width: 992px) {

    /* la riga del menu non deve wrappare gli elementi */
    .main-navbar .navbar-nav {
        flex-wrap: nowrap;
    }

    /* ogni voce di menu occupa solo lo spazio che le serve e non si restringe */
    .main-navbar .navbar-nav .nav-item {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    /* il link resta su una riga e allinea icone / caret */
    .main-navbar .navbar-nav .nav-link {
        white-space: nowrap;
        display: inline-flex;
        align-items: center;
    }
}