/* Lorenzonetti Menu V2 - Dropdown Evolution */
:root {
    --ln-bg-dark: #111827;
    --ln-bg-secondary: #1f2937;
    --ln-accent: #07b6d4;
    --ln-text: #ffffff;
    --ln-text-muted: #d1d5db;
    --ln-glass-bg: rgba(31, 41, 55, 0.95);
    --ln-glass-border: rgba(255, 255, 255, 0.1);
}

.lorenzonetti-menu-v1-auto-wrapper {
    font-family: 'Inter', sans-serif;
    width: 100%;
    background-color: var(--ln-bg-dark);
    position: relative; /* Anchor for absolute dropdowns */
}

.ln-main-nav {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1rem;
    height: 4.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.ln-nav-container {
    display: flex;
    gap: 1.5rem;
    align-items: stretch;
    height: 100%;
}

.ln-menu-item {
    display: flex;
    align-items: center;
}

.ln-menu-button {
    background: none;
    border: none;
    color: var(--ln-text);
    padding: 0.75rem 1.25rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-radius: 0.75rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ln-menu-button i:not(.ln-chevron) {
    font-size: 1rem;
    opacity: 0.9;
}

.ln-menu-button .ln-chevron {
    font-size: 0.8rem;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.7;
}

.ln-menu-button:hover {
    background-color: var(--ln-bg-secondary);
    color: var(--ln-accent);
}

.ln-menu-item.active .ln-menu-button {
    color: var(--ln-accent);
    background-color: var(--ln-bg-secondary);
}

.ln-menu-item.active .ln-chevron {
    transform: rotate(180deg);
}

/* Dropdown styling with glassmorphism */
.ln-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background-color: var(--ln-glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--ln-glass-border);
    border-radius: 1rem;
    width: clamp(280px, 90vw, 400px); /* Responsive width with bounds */
    padding: 1rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Triangle removed or hidden because it won't align with buttons consistently in centered mode */
.ln-dropdown::before {
    display: none;
}

.ln-menu-item.active .ln-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.ln-sub-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--ln-text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.ln-sub-link i {
    width: 1.25rem;
    text-align: center;
    font-size: 1rem;
}

.ln-sub-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--ln-accent);
    transform: translateX(4px);
}

.ln-sub-link.active-sub {
    color: var(--ln-accent);
    background-color: rgba(7, 182, 212, 0.1);
}

/* Mobile adjustments */
@media (max-width: 640px) {
    .ln-menu-item {
        position: static; /* Ensure it doesn't anchor the dropdown on mobile either */
    }

    .ln-nav-container {
        gap: 0.5rem;
        width: 100%;
        justify-content: center;
    }

    .ln-menu-button {
        padding: 0.5rem 0.6rem;
        font-size: 0.9rem;
        gap: 0.4rem;
    }

    .ln-dropdown {
        position: absolute;
        left: 5%;
        right: 5%;
        width: 90%;
        min-width: unset;
        max-width: unset;
        top: 100%;
        transform: translateX(0) translateY(10px); /* Reset translateX from desktop */
        opacity: 0;
        visibility: hidden;
    }

    .ln-menu-item.active .ln-dropdown {
        opacity: 1;
        visibility: visible;
        transform: translateX(0) translateY(0); /* Reset translateX from desktop */
    }
}
