/* ── ECP360 Navbar ── */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.navbar-bg {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 20, 0.6);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    border-bottom: 1px solid rgba(168, 85, 247, 0.06);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.navbar.scrolled .navbar-bg {
    opacity: 1;
}

.navbar-glow {
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent,
        rgba(168, 85, 247, 0.3),
        rgba(99, 102, 241, 0.3),
        transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.navbar.scrolled .navbar-glow { opacity: 1; }

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 2;
}

/* ── Brand ── */
.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
}

.brand-logo {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}

.brand-logo svg { width: 100%; height: 100%; }

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 800;
    background: var(--gradient-text);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
}

.brand-sub {
    font-size: 0.6rem;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ── Center pills ── */
.navbar-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-pills {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 100px;
    padding: 0.3rem;
    position: relative;
}

.nav-pill-bg {
    position: absolute;
    top: 0.3rem;
    height: calc(100% - 0.6rem);
    border-radius: 100px;
    background: rgba(168, 85, 247, 0.12);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0;
    pointer-events: none;
}

.nav-pill {
    padding: 0.45rem 1rem;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 100px;
    white-space: nowrap;
    transition: color 0.25s ease;
    position: relative;
    z-index: 1;
}

.nav-pill:hover { color: var(--text-primary); }

.nav-pill.active {
    color: var(--text-primary);
    background: rgba(168, 85, 247, 0.15);
}

/* ── ECPSOLUTIONS button ── */
.btn-ecpsolutions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.06em;
    text-decoration: none;
    border-radius: 10px;
    border: 1px solid rgba(168, 85, 247, 0.25);
    background: rgba(168, 85, 247, 0.08);
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-ecpsolutions i,
.btn-ecpsolutions svg {
    width: 14px;
    height: 14px;
    stroke: var(--accent-purple);
}

.btn-ecpsolutions:hover {
    background: rgba(168, 85, 247, 0.18);
    border-color: rgba(168, 85, 247, 0.45);
    box-shadow: 0 0 16px rgba(168, 85, 247, 0.15);
}

/* ── Mobile toggle ── */
.navbar-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 30px;
    height: 24px;
    background: none;
    border: none;
    cursor: pointer;
    justify-content: center;
    z-index: 5;
}

.navbar-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.navbar-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navbar-toggle.active span:nth-child(2) { opacity: 0; }
.navbar-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile menu ── */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    pointer-events: none;
    visibility: hidden;
    opacity: 0;
    transition: all 0.4s ease;
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

.mobile-menu-bg {
    position: absolute;
    inset: 0;
    background: rgba(5, 5, 15, 0.95);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
}

.mobile-menu-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    height: 100%;
    padding: 4rem 2rem;
}

.mobile-link {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.25s ease;
}

.mobile-link:hover { color: var(--text-primary); }

.mobile-link-external {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--accent-purple);
    text-decoration: none;
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 10px;
}

.mobile-link-external i,
.mobile-link-external svg {
    width: 16px;
    height: 16px;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    .navbar-center,
    .navbar-actions { display: none; }
    .navbar-toggle { display: flex; }
}

@media (min-width: 1025px) {
    .mobile-menu { display: none !important; }
}

@media (max-width: 640px) {
    .navbar-container { padding: 0 1rem; }
    .brand-name { font-size: 1rem; }
    .brand-sub { font-size: 0.55rem; }
}
