﻿/* ========================
   Navbar Fissa e Personalizzata
   ======================== */
.navbar-custom {
    padding: 10px 40px;
    background-color: #111 !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* Rende la navbar fissa in alto */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 2000;
    border: none !important;
    /* Fascia 3px: centro più intenso, lati ancora visibili (sfumatura meno “spenta”) */
    background-image: linear-gradient(
        90deg,
        rgba(255, 164, 0, 0.16) 0%,
        rgba(255, 164, 0, 0.28) 14%,
        rgba(255, 164, 0, 0.62) 38%,
        rgba(255, 164, 0, 0.92) 50%,
        rgba(255, 164, 0, 0.62) 62%,
        rgba(255, 164, 0, 0.28) 86%,
        rgba(255, 164, 0, 0.16) 100%
    );
    background-size: 100% 3px;
    background-position: left bottom;
    background-repeat: no-repeat;
}

/* Evita che il contenuto della pagina finisca sotto la navbar fissa (+ altezza fascia 3px) */
body {
    padding-top: 73px;
}

/* Logo */
.navbar-custom .logo img {
    height: 40px;
    display: block;
}

/* Menu Desktop */
.navbar-custom .menu {
    list-style: none;
    display: flex;
    gap: 15px;
    margin: 0;
    padding: 0;
    align-items: center;
}

/* Link */
.navbar-custom .nav-link {
    text-decoration: none !important;
    color: rgba(255,255,255,0.9) !important;
    font-weight: 500;
    padding: 8px 15px !important;
    transition: all 0.3s ease;
    border-radius: 5px;
    font-size: 0.95rem;
}

    .navbar-custom .nav-link:hover {
        color: #000 !important;
        background-color: #ffa400 !important;
    }

    /* Stato Attivo */
    .navbar-custom .nav-link.active {
        background-color: #007bff !important;
        color: #fff !important;
    }

/* Hamburger - nascosto su desktop */
.hamburger {
    display: none;
    font-size: 30px;
    color: white;
    cursor: pointer;
}

/* ========================
   Responsive - Mobile
   ======================== */
@media (max-width: 1150px) {
    .hamburger {
        display: block; /* Appare su mobile */
    }

    .navbar-custom .logo img {
        height: 30px;
        display: block;
    }
    /* Menu Mobile Nascondi */
    .navbar-custom .menu {
        display: none !important;
        flex-direction: column;
        gap: 0;
        background-color: #111;
        position: absolute;
        /* Sotto la fascia (3px) sul bordo inferiore navbar */
        top: calc(100% + 3px);
        right: 0;
        left: 0;
        padding: 20px;
        border-top: 1px solid #333;
    }

        /* Classe che attiva il menu (gestita da JS) */
        .navbar-custom .menu.active {
            display: flex !important;
        }

        .navbar-custom .menu li {
            width: 100%;
            border-bottom: 1px solid #222;
            box-sizing: border-box;
        }

    .navbar-custom .nav-link {
        padding: 15px !important;
    }

    .navbar-custom .menu-dropdown .dropdown-menu {
        position: static;
        float: none;
        width: 100%;
        margin-top: 0;
        border-radius: 0;
    }

    .navbar-custom .menu-dropdown .dropdown-toggle::after {
        float: right;
        margin-top: 0.55em;
    }
}

/* Dropdown desktop (tema coerente con navbar scura) */
.navbar-custom .menu-dropdown {
    position: relative;
}

.navbar-custom .menu-dropdown .dropdown-toggle::after {
    margin-left: 0.35em;
    vertical-align: 0.15em;
}

.navbar-custom .dropdown-menu-dark {
    --bs-dropdown-bg: #1a1a1a;
    --bs-dropdown-link-color: rgba(255, 255, 255, 0.9);
    --bs-dropdown-link-hover-color: #000;
    --bs-dropdown-link-hover-bg: #ffa400;
    --bs-dropdown-link-active-color: #fff;
    --bs-dropdown-link-active-bg: #007bff;
    border: 1px solid #333;
    margin-top: 0.25rem;
}

.navbar-custom .dropdown-item.active,
.navbar-custom .dropdown-item:active {
    font-weight: 600;
}

.navbar-custom .menu-dropdown .btn-primary {
    border-radius: 5px;
}
