/* ═══════════════════════════════════════════
   DataDeep — Header & Navigation
   ═══════════════════════════════════════════ */

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: var(--z-header);
    background: #0a0a28;
    border-bottom: 1px solid rgba(187, 49, 199, 0.35);
    transition: all 0.4s var(--ease-smooth);
}

.header.scrolled {
    background: #0a0a28;
    border-bottom-color: rgba(187, 49, 199, 0.45);
    box-shadow: 0 4px 20px rgba(187, 49, 199, 0.15);
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 20px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo img {
    height: auto;
    width: 140px;
    filter: brightness(0) invert(1);
    object-fit: contain;
}

/* Desktop Nav */
.nav-desktop {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-desktop > a,
.nav-dropdown > .nav-trigger {
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--dd-white);
    text-decoration: none;
    padding: 11px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    transition: all 0.25s var(--ease-smooth);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    background: none;
    font-family: var(--font-primary);
}

.nav-desktop > a:hover,
.nav-dropdown:hover > .nav-trigger {
    color: var(--dd-white);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(187, 49, 199, 0.45);
    box-shadow: 0 0 12px rgba(187, 49, 199, 0.2);
}

.nav-desktop > a.active {
    color: var(--dd-white);
}

/* Nav CTA */
.nav-cta {
    font-size: var(--font-size-sm) !important;
    font-weight: 600 !important;
    color: var(--dd-white) !important;
    background: var(--dd-gradient-cta) !important;
    padding: 10px 24px !important;
    border-radius: var(--radius-full) !important;
    margin-left: 8px;
}

.nav-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(187, 49, 199, 0.35);
}

/* Dropdown */
.nav-dropdown {
    position: relative;
}

.nav-trigger .chevron-down {
    width: 14px;
    height: 14px;
    transition: transform 0.25s var(--ease-smooth);
}

.nav-dropdown:hover .chevron-down {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    min-width: 200px;
    background: rgba(18, 18, 58, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    padding: 8px;
    padding-top: 16px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(0);
    transition: all 0.25s var(--ease-smooth);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
}

/* Ponte invisibile per mantenere l'hover tra trigger e menu */
.nav-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 0;
    right: 0;
    height: 12px;
    background: transparent;
}

.nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%);
}

.nav-dropdown-menu a {
    display: block;
    padding: 10px 16px;
    font-size: var(--font-size-sm);
    color: rgba(255, 255, 255, 0.7);
    border-radius: var(--radius-sm);
    transition: all 0.2s var(--ease-smooth);
}

.nav-dropdown-menu a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--dd-white);
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    cursor: pointer;
    background: none;
    border: none;
    padding: 8px;
}

.mobile-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--dd-white);
    margin: 5px 0;
    transition: 0.3s;
    border-radius: 2px;
}

/* Mobile Nav */
.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(10, 10, 40, 0.97);
    z-index: var(--z-overlay);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
}

.mobile-nav.active { display: flex; }

.mobile-nav a {
    color: var(--dd-white);
    text-decoration: none;
    font-size: var(--font-size-xl);
    font-weight: 600;
    padding: 12px;
    transition: color 0.25s var(--ease-smooth);
}

.mobile-nav a:hover { color: var(--dd-purple-light); }

.mobile-nav .mobile-label {
    font-size: var(--font-size-xs);
    color: var(--dd-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: var(--space-4);
}

.mobile-close {
    position: absolute;
    top: 20px;
    right: 24px;
    background: none;
    border: none;
    color: var(--dd-white);
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.25s;
}

.mobile-close:hover { color: var(--dd-purple-light); }
