/* Navbar Base */
.navbar-finance {
    background-color: var(--finance-primary);
    padding: 1rem 0;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

/* Navbar Scrolled State */
.navbar-finance.scrolled {
    padding: 0.5rem 0;
    background-color: rgba(40, 41, 66, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* ==== BRAND / LOGO ==== */

/* Link brand esterno */
.navbar-brand {
    display: flex;
    align-items: center;
    padding: 0;
    margin-right: 2rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

/* Contenitore interno: icona + testi */
.navbar-brand-inner {
    display: flex;
    align-items: center;
    gap: 0.4rem; /* spazio tra icona e testo */
}

/* Icona SVG */
.navbar-logo-icon svg {
    margin-top: 0.22rem;
    height: 2.2rem;   /* regola per matchare l'altezza del testo */
    width: auto;
    display: block;
}

/* Blocchetto dei testi (2 righe) */
.navbar-logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

/* HICMAN - Dimensione fissa su tutte le risoluzioni */
.brand-text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--finance-white);
    letter-spacing: 0.05em;
    margin: 0;
}

/* CAPITAL PARTNER - Dimensione fissa su tutte le risoluzioni */
.brand-subtitle {
    font-size: 0.55rem;
    font-weight: 400;
    color: var(--finance-secondary);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin: 0;
}

.navbar-brand:hover {
    transform: translateY(-2px);
}

.navbar-brand:hover .brand-text,
.navbar-brand:hover .brand-subtitle {
    color: var(--finance-white);
}

/* Navbar Spacer */
.navbar-spacer {
    height: 80px;
}

/* Nav Links */
.navbar-nav {
    gap: 0.5rem;
}

.nav-link {
    color: var(--finance-white) !important;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: 6px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--finance-secondary);
    transition: width 0.3s ease;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--finance-white) !important;
}

.nav-link:hover::before {
    width: 60%;
}

.nav-link.active {
    background-color: rgba(255, 255, 255, 0.15);
    color: var(--finance-white) !important;
}

.nav-link.active::before {
    width: 60%;
}

/* CTA Link (Contatti) */
.nav-link-cta {
    background-color: var(--finance-primary);
    color: var(--finance-white) !important;
    font-weight: 600;
    padding: 0.5rem 1.5rem !important;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.nav-link-cta::before {
    display: none;
}

.nav-link-cta:hover {
    background-color: var(--finance-white);
    color: var(--finance-primary) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Language Switcher */
.language-switcher {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
}

.lang-link {
    color: var(--finance-white);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.lang-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--finance-secondary);
}

.lang-link.active {
    background-color: var(--finance-white);
    color: var(--finance-primary);
}

.lang-divider {
    color: var(--finance-secondary);
    font-weight: 300;
}

/* Mobile Toggle Button */
.navbar-toggler {
    border: 2px solid var(--finance-white);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* === RESPONSIVE === */
/* Tablet e dispositivi medi */
@media (max-width: 991px) {
    .navbar-finance {
        padding: 0.75rem 0;
    }

    .navbar-collapse {
        background-color: var(--finance-primary);
        padding: 1.5rem;
        margin-top: 1rem;
        border-radius: 12px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    }

    .navbar-nav {
        gap: 0.5rem;
    }

    .nav-link {
        padding: 0.75rem 1rem !important;
        text-align: left;
    }

    .nav-link-cta {
        text-align: center;
        margin-top: 0.5rem;
    }

    .language-switcher {
        justify-content: center;
        margin-top: 1rem;
    }

    .navbar-spacer {
        height: 70px;
    }

    /* Brand mantiene le stesse dimensioni */
    .navbar-brand {
        margin-right: 1rem;
    }
}

/* Smartphone medio */
@media (max-width: 767px) {
    .navbar-spacer {
        height: 70px;
    }

    /* Brand mantiene le stesse dimensioni del testo */
    .navbar-brand-inner {
        gap: 0.3rem;
    }
}

/* Smartphone piccolo */
@media (max-width: 575px) {
    .navbar-finance {
        padding: 0.5rem 0;
    }

    .navbar-collapse {
        padding: 1rem;
    }

    .navbar-spacer {
        height: 70px;
    }

    /* Brand mantiene le stesse dimensioni del testo */
    .navbar-brand {
        margin-right: 0.5rem;
    }
}

/* Dispositivi molto piccoli */
@media (max-width: 360px) {
    .navbar-finance {
        padding: 0.4rem 0;
    }

    .navbar-brand-inner {
        gap: 0.25rem;
    }

    /* Anche qui il testo mantiene le dimensioni originali */
    .navbar-logo-icon svg {
        height: 2rem;
    }
}
