/* ============================================
   ECPSOLUTIONS INC. - Premium Navbar
   ============================================ */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    padding: 1rem 0;
}

.navbar-bg {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

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

.navbar-glow {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(168, 85, 247, 0.6), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

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

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

/* ============================================
   Brand - Animated Orb Logo
   ============================================ */
.navbar-brand {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    text-decoration: none;
    flex-shrink: 0;
}

.brand-logo {
    width: 44px;
    height: 44px;
    min-width: 44px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-orb {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.orb-core {
    position: absolute;
    width: 20px;
    height: 20px;
    background: radial-gradient(circle at 30% 30%, #a855f7, #6366f1, #3b82f6);
    border-radius: 50%;
    box-shadow: 
        0 0 30px rgba(168, 85, 247, 0.6),
        0 0 60px rgba(99, 102, 241, 0.4),
        inset 0 0 20px rgba(255, 255, 255, 0.2);
    animation: orbPulse 3s ease-in-out infinite;
}

@keyframes orbPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 30px rgba(168, 85, 247, 0.6), 0 0 60px rgba(99, 102, 241, 0.4); }
    50% { transform: scale(1.1); box-shadow: 0 0 50px rgba(168, 85, 247, 0.8), 0 0 100px rgba(99, 102, 241, 0.6); }
}

.orb-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid;
    animation: ringRotate 8s linear infinite;
}

.orb-ring-1 {
    width: 28px;
    height: 28px;
    border-color: rgba(168, 85, 247, 0.5);
    animation-duration: 6s;
}

.orb-ring-2 {
    width: 36px;
    height: 36px;
    border-color: rgba(99, 102, 241, 0.3);
    animation-duration: 8s;
    animation-direction: reverse;
}

.orb-ring-3 {
    width: 44px;
    height: 44px;
    border-color: rgba(59, 130, 246, 0.2);
    animation-duration: 10s;
}

@keyframes ringRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.orb-ring::before {
    content: '';
    position: absolute;
    width: 4px;
    height: 4px;
    background: linear-gradient(135deg, #a855f7, #6366f1);
    border-radius: 50%;
    top: -2px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.8);
}

.orb-ring-2::before { width: 3px; height: 3px; top: auto; bottom: -1.5px; }
.orb-ring-3::before { width: 2px; height: 2px; top: 50%; left: -1px; }

/* Brand Text */
.brand-text {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.brand-name {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    background: linear-gradient(135deg, #ffffff, #e0e7ff, #c7d2fe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-inc {
    font-family: Arial, sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: #ffffff;
    padding: 6px 12px;
    border: 1px solid #a855f7;
    border-radius: 6px;
    background: rgba(168, 85, 247, 0.2);
    display: inline-block;
}

/* ============================================
   Center Navigation Pills
   ============================================ */
.navbar-center {
    position: absolute;
    left: 55%;
    transform: translateX(-50%);
}

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

.nav-pill-bg {
    position: absolute;
    height: calc(100% - 0.5rem);
    top: 0.25rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(168, 85, 247, 0.3));
    border-radius: 100px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.2);
}

.nav-pill {
    position: relative;
    padding: 0.625rem 1.25rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    border-radius: 100px;
    transition: all 0.3s ease;
    white-space: nowrap;
    z-index: 1;
}

.nav-pill:hover {
    color: #ffffff;
}

.nav-pill.active {
    color: #ffffff;
    /* Remove background - the pill-bg handles this */
}

/* ============================================
   ECP360 CTA Button
   ============================================ */
.navbar-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 10;
    flex-shrink: 0;
}

.btn-ecp360 {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 1.25rem 0.5rem 0.5rem;
    font-family: 'Outfit', sans-serif;
    color: #ffffff;
    text-decoration: none;
    background: rgba(168, 85, 247, 0.08);
    border: 1px solid rgba(168, 85, 247, 0.35);
    border-radius: 14px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    isolation: isolate;
}

.btn-ecp360:hover {
    transform: translateY(-2px);
    border-color: rgba(168, 85, 247, 0.7);
    background: rgba(168, 85, 247, 0.15);
    box-shadow: 
        0 0 20px rgba(168, 85, 247, 0.25),
        0 0 60px rgba(168, 85, 247, 0.1),
        inset 0 0 20px rgba(168, 85, 247, 0.04);
}

/* Inline SVG logo */
.ecp360-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    min-width: 34px;
    border-radius: 10px;
    background: rgba(168, 85, 247, 0.1);
    padding: 4px;
    transition: all 0.3s ease;
}

.ecp360-logo svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 4px rgba(168, 85, 247, 0.4));
    transition: filter 0.3s ease;
}

.btn-ecp360:hover .ecp360-logo {
    background: rgba(168, 85, 247, 0.18);
}

.btn-ecp360:hover .ecp360-logo svg {
    filter: drop-shadow(0 0 8px rgba(168, 85, 247, 0.6));
}

/* Two-line text layout */
.ecp360-text-wrap {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.ecp360-name {
    font-size: 0.875rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    background: linear-gradient(135deg, #e0e7ff 0%, #a855f7 50%, #c084fc 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: ecp360Gradient 4s ease infinite;
}

.ecp360-sub {
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.45);
    transition: color 0.3s ease;
}

.btn-ecp360:hover .ecp360-sub {
    color: rgba(255, 255, 255, 0.7);
}

@keyframes ecp360Gradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Animated border glow */
.ecp360-glow {
    position: absolute;
    inset: -1px;
    border-radius: 14px;
    background: conic-gradient(
        from 0deg,
        transparent 0%,
        rgba(168, 85, 247, 0.5) 10%,
        transparent 20%,
        transparent 100%
    );
    z-index: -1;
    opacity: 0;
    animation: ecp360GlowSpin 3s linear infinite;
    transition: opacity 0.4s ease;
}

.btn-ecp360:hover .ecp360-glow {
    opacity: 1;
}

@keyframes ecp360GlowSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Subtle idle pulse */
.btn-ecp360::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 14px;
    background: radial-gradient(ellipse at center, rgba(168, 85, 247, 0.12), transparent 70%);
    z-index: -2;
    animation: ecp360Pulse 3s ease-in-out infinite;
}

@keyframes ecp360Pulse {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.05); }
}

/* Mobile ECP360 button in mobile menu */
.mobile-ecp360 {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding: 0.875rem 2rem 0.875rem 0.875rem;
    font-family: 'Outfit', sans-serif;
    color: #ffffff;
    text-decoration: none;
    background: rgba(168, 85, 247, 0.12);
    border: 1px solid rgba(168, 85, 247, 0.45);
    border-radius: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 0 30px rgba(168, 85, 247, 0.15);
}

.mobile-ecp360-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 12px;
    background: rgba(168, 85, 247, 0.12);
    padding: 5px;
}

.mobile-ecp360-logo svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 6px rgba(168, 85, 247, 0.5));
}

.mobile-ecp360-text {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.mobile-ecp360-text > span:first-child {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    background: linear-gradient(135deg, #e0e7ff, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.mobile-ecp360-sub {
    font-size: 0.75rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.02em;
}

.mobile-ecp360:hover {
    background: rgba(168, 85, 247, 0.2);
    border-color: rgba(168, 85, 247, 0.7);
    box-shadow: 0 0 50px rgba(168, 85, 247, 0.25);
}

/* Active state when on AI-Powered page */
.btn-ecp360.active {
    background: rgba(168, 85, 247, 0.18);
    border-color: rgba(168, 85, 247, 0.6);
    box-shadow: 
        0 0 20px rgba(168, 85, 247, 0.25),
        0 0 60px rgba(168, 85, 247, 0.1);
}

.btn-ecp360.active .ecp360-glow {
    opacity: 0.5;
}

.mobile-ecp360.active {
    background: rgba(168, 85, 247, 0.2);
    border-color: rgba(168, 85, 247, 0.7);
    box-shadow: 0 0 40px rgba(168, 85, 247, 0.25);
}

/* ============================================
   Visit ecp360.ca Button
   ============================================ */
.btn-visit-ecp360 {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.9rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 0.05em;
    text-decoration: none;
    border-radius: 8px;
    border: 1px solid rgba(168, 85, 247, 0.2);
    background: rgba(168, 85, 247, 0.06);
    transition: all 0.3s ease;
    white-space: nowrap;
    margin-left: 0.4rem;
}

.btn-visit-ecp360 i,
.btn-visit-ecp360 svg {
    width: 13px;
    height: 13px;
    stroke: rgba(168, 85, 247, 0.7);
    transition: stroke 0.3s ease;
}

.btn-visit-ecp360:hover {
    background: rgba(168, 85, 247, 0.14);
    border-color: rgba(168, 85, 247, 0.4);
    box-shadow: 0 0 14px rgba(168, 85, 247, 0.12);
    color: #fff;
}

.btn-visit-ecp360:hover i,
.btn-visit-ecp360:hover svg {
    stroke: rgba(168, 85, 247, 1);
}

.mobile-visit-ecp360 {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.8rem;
    padding: 0.55rem 1.2rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(168, 85, 247, 0.9);
    text-decoration: none;
    border: 1px solid rgba(168, 85, 247, 0.25);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.mobile-visit-ecp360 i,
.mobile-visit-ecp360 svg {
    width: 15px;
    height: 15px;
}

.mobile-visit-ecp360:hover {
    background: rgba(168, 85, 247, 0.1);
    border-color: rgba(168, 85, 247, 0.4);
}

/* ============================================
   Mobile Toggle
   ============================================ */
.navbar-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 48px;
    height: 48px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    cursor: pointer;
    z-index: 100;
}

.navbar-toggle span {
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #6366f1, #a855f7);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.navbar-toggle span:nth-child(2) { width: 70%; }
.navbar-toggle span:nth-child(3) { width: 85%; }

.navbar-toggle:hover span { width: 100%; }

.navbar-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.navbar-toggle.active span:nth-child(2) {
    opacity: 0;
}

.navbar-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 100%;
}

/* ============================================
   Mobile Menu
   ============================================ */
.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 90;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

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

.mobile-menu-bg {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.98);
    backdrop-filter: blur(40px);
}

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

.mobile-link {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s ease;
}

.mobile-link:hover {
    color: #ffffff;
    text-shadow: 0 0 30px rgba(168, 85, 247, 0.5);
}

.mobile-cta {
    margin-top: 2rem;
    padding: 1rem 3rem;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    border: none;
    border-radius: 100px;
    cursor: pointer;
    box-shadow: 0 4px 30px rgba(139, 92, 246, 0.4);
}

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

@media (max-width: 640px) {
    .navbar-container { padding: 0 1rem; }
    .brand-name { font-size: 1.125rem; }
    .brand-logo { width: 42px; height: 42px; }
    .orb-core { width: 16px; height: 16px; }
    .orb-ring-1 { width: 26px; height: 26px; }
    .orb-ring-2 { width: 34px; height: 34px; }
    .orb-ring-3 { width: 42px; height: 42px; }
    .mobile-link { font-size: 1.5rem; }
    .mobile-ecp360 { padding: 0.75rem 1.5rem 0.75rem 0.75rem; }
    .mobile-ecp360-logo { width: 36px; height: 36px; min-width: 36px; }
    .mobile-ecp360-text > span:first-child { font-size: 1rem; }
    .mobile-ecp360-sub { font-size: 0.65rem; }
}
