/* Navigation Styles - Standalone Component */

/* CSS Variables */
:root {
    --gray-50: #F8FAFC;
    --gray-100: #F1F5F9;
    --gray-200: #E2E8F0;
    --gray-300: #CBD5E1;
    --gray-400: #94A3B8;
    --gray-500: #64748B;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1E293B;
    --gray-900: #0F172A;
    --white: #FFFFFF;
    --electric-violet: #6D28D9;
    --bright-accent: #22D3EE;
    --gradient-primary: linear-gradient(135deg, var(--electric-violet) 0%, var(--bright-accent) 100%);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

/* Navbar Placeholder - ensure it's visible while loading */
/* #navbar-placeholder {
    min-height: 70px; 
    position: relative;
} */

/* Navigation Base */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--gray-200);
    border-top: 1px solid var(--gray-200);
    z-index: 999;
    transition: all 0.3s ease;
}

.navbar.has-banner {
    top: 3.75rem;
    border-top: none;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-md);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: visible;
    padding: 1rem 2rem;
}

/* Brand/Logo */
.nav-brand {
    display: flex;
    align-items: center;
    z-index: 1001;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--gray-900);
    letter-spacing: -0.02em;
    text-decoration: none;
}

.logo-icon {
    font-size: 1.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-text {
    font-weight: 800;
}

/* Nav menu wrapper (links + CTA) */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-left: auto;
}

/* Mobile Menu Toggle Button */
.nav-mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.nav-mobile-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--gray-900);
    transition: all 0.3s ease;
    border-radius: 2px;
}

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

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

.nav-mobile-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Navigation Links */
.nav-links {
    display: flex;
    gap: 2.5rem;
    align-items: center;
    margin: 0 auto;
    position: relative;
    overflow: visible;
}

.nav-links a {
    text-decoration: none;
    color: var(--gray-700);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-links a:hover {
    color: var(--gray-900);
}

.nav-links a.active {
    color: var(--electric-violet);
    font-weight: 600;
}

/* Navigation Arrow */
.nav-arrow {
    font-size: 0.875rem;
    color: var(--gray-400);
    margin-left: 0.25rem;
    transition: transform 0.3s ease, color 0.3s ease;
    display: inline-block;
    line-height: 1;
}

.nav-links a:hover .nav-arrow {
    transform: translateX(2px);
    color: var(--gray-600);
}

/* Dropdown Base */
.nav-dropdown {
    position: relative;
    z-index: 1001;
}

.nav-dropdown-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    text-decoration: none;
    color: var(--gray-700);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.nav-dropdown-toggle:hover {
    color: var(--gray-900);
}

.nav-dropdown.active .nav-dropdown-toggle {
    color: var(--gray-900);
}

.nav-dropdown.active .nav-dropdown-toggle .nav-arrow {
    transform: rotate(90deg);
    color: var(--gray-600);
}

.nav-dropdown.active .nav-dropdown-toggle.active {
    color: var(--electric-violet);
    font-weight: 600;
}

/* Dropdown Menu */
.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.25rem);
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background: var(--white);
    border-radius: 0.75rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1), 0 4px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--gray-200);
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1002;
    padding: 0.5rem 0;
    pointer-events: none;
}

/* Bridge element to prevent gap between parent and menu - only active when hovered */
.nav-dropdown::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 0.5rem;
    z-index: 1001;
    pointer-events: none;
}

.nav-dropdown.hover-active::before,
.nav-dropdown.active::before {
    pointer-events: auto;
}

.nav-dropdown.active .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.nav-dropdown-menu a {
    display: block;
    padding: 0.75rem 1.25rem;
    color: var(--gray-700);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    border: none;
    gap: 0;
}

.nav-dropdown-menu a:hover {
    background: var(--gray-50);
    color: var(--gray-900);
}

.nav-dropdown-menu a.active {
    background: var(--gray-100);
    color: var(--electric-violet);
    font-weight: 600;
}

.nav-dropdown-menu a:first-child {
    border-top-left-radius: 0.75rem;
    border-top-right-radius: 0.75rem;
}

.nav-dropdown-menu a:last-child {
    border-bottom-left-radius: 0.75rem;
    border-bottom-right-radius: 0.75rem;
}

/* Nested Dropdown (Submenu) */
.nav-dropdown-submenu {
    position: relative;
}

.nav-dropdown-toggle-sub {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    color: var(--gray-700);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.nav-dropdown-toggle-sub:hover {
    background: var(--gray-50);
    color: var(--gray-900);
}

.nav-dropdown-submenu.active .nav-dropdown-toggle-sub {
    background: var(--gray-50);
    color: var(--gray-900);
}

.nav-dropdown-submenu.active .nav-dropdown-toggle-sub .nav-arrow {
    transform: rotate(90deg);
    color: var(--gray-600);
}

.nav-dropdown-menu-sub {
    position: absolute;
    left: calc(100% + 0.25rem);
    top: 0;
    background: var(--white);
    border-radius: 0.75rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1), 0 4px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--gray-200);
    min-width: 160px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-10px);
    transition: all 0.3s ease;
    z-index: 1003;
    padding: 0.5rem 0;
    pointer-events: none;
}

/* Bridge element for submenu to prevent gap - only active when hovered */
.nav-dropdown-submenu::before {
    content: '';
    position: absolute;
    top: 0;
    left: 100%;
    width: 0.5rem;
    height: 100%;
    z-index: 1002;
    pointer-events: none;
}

.nav-dropdown-submenu.hover-active::before,
.nav-dropdown-submenu.active::before {
    pointer-events: auto;
}

.nav-dropdown-submenu.active .nav-dropdown-menu-sub {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    pointer-events: auto;
}

.nav-dropdown-menu-sub a {
    display: block;
    padding: 0.75rem 1.25rem;
    color: var(--gray-700);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.nav-dropdown-menu-sub a:hover {
    background: var(--gray-50);
    color: var(--gray-900);
}

.nav-dropdown-menu-sub a.active {
    background: var(--gray-100);
    color: var(--electric-violet);
    font-weight: 600;
}

/* CTA Section */
.nav-cta {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    z-index: 1001;
}

.nav-login {
    text-decoration: none;
    color: var(--gray-700);
    font-weight: 500;
    font-size: 0.875rem;
    transition: color 0.3s ease;
}

.nav-login:hover {
    color: var(--gray-900);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gray-900);
    color: white;
    border: 1px solid var(--gray-900);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    background: var(--gray-800);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Launch Banner - Modern & Sleek */
.launch-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: 1001;
    padding: 0;
    display: flex;
    visibility: visible;
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
    transform: translateY(0);
    opacity: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    animation: slideDownFadeIn 0.4s ease-out;
}

/* Force banner to always be visible - override any inline styles */
#announcementBanner {
    display: flex !important;
    visibility: visible !important;
}

#announcementBanner[style*="display: none"],
#announcementBanner[style*="visibility: hidden"] {
    display: flex !important;
    visibility: visible !important;
}

@keyframes slideDownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.launch-banner-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0.75rem 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    position: relative;
}

.launch-banner-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    flex: 1;
}

.launch-banner-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffd700;
    flex-shrink: 0;
}

.launch-banner-text {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.4;
}

.launch-banner-highlight {
    font-weight: 700;
    color: #ffd700;
}

.launch-banner-text strong {
    font-weight: 700;
    color: #ffffff;
}

.launch-banner-cta {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
    white-space: nowrap;
    flex-shrink: 0;
}

.launch-banner-cta:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

.launch-banner-close {
    background: transparent;
    border: none;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.8);
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    border-radius: 0.25rem;
    flex-shrink: 0;
    margin-left: auto;
}

.launch-banner-close:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
    .launch-banner-container {
        padding: 0.625rem 1rem;
        gap: 0.5rem;
    }
    
    .launch-banner-content {
        gap: 0.5rem;
    }
    
    .launch-banner-text {
        font-size: 0.8125rem;
        text-align: center;
        display: none;
    }
    .launch-banner-close{
        display: none;
    }
    .launch-banner-cta {
        padding: 0.375rem 0.75rem;
        font-size: 0.8125rem;
    }
    
    .launch-banner-icon {
        display: none;
    }
}

/* Announcement Banner (Legacy - keeping for compatibility) */
.announcement-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    z-index: 1001;
    padding: 0.5rem 0;
    transition: transform 0.3s ease;
    height: 3rem;
    display: flex;
    align-items: center;
}

.announcement-content {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    gap: 1rem;
    height: 100%;
}

.announcement-text {
    font-size: 0.875rem;
    color: var(--gray-700);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.announcement-text a {
    color: var(--electric-violet);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.announcement-text a:hover {
    color: var(--bright-accent);
}

.close-banner {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--gray-500);
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
    margin-left: auto;
}

.close-banner:hover {
    color: var(--gray-900);
}

/* Responsive Styles */
@media (max-width: 768px) {
    body {
        padding-top: 0 !important;
    }

    .navbar {
        position: sticky;
        top: 0;
    }

    .navbar.has-banner {
        top: 3.75rem;
    }

    .navbar .container {
        padding: 0.75rem 1rem;
    }

    .nav-mobile-toggle {
        display: flex;
    }
    nav#mainNav {
        margin-top: 54px;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        border-bottom: 1px solid var(--gray-200);
        box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
        padding: 0.75rem 1rem 1rem;
        display: block;
        transform: translateY(-10px);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        z-index: 1000;
        overflow: visible;
    }

    .nav-menu.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        pointer-events: auto;
        overflow: visible;
    }

    .nav-links {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        margin: 0;
        overflow: visible;
    }

    .nav-links > a,
    .nav-dropdown {
        width: 100%;
        border-bottom: 1px solid var(--gray-200);
        position: relative;
        z-index: 1;
    }
    
    .nav-dropdown.active {
        z-index: 2;
    }

    .nav-links > a {
        padding: 0.9rem 0;
    }

    .nav-dropdown-toggle {
        width: 100%;
        padding: 0.9rem 0;
        justify-content: space-between;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }
    
    .nav-dropdown-toggle-sub {
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    .nav-dropdown-menu {
        position: static;
        transform: none;
        opacity: 0;
        max-height: 0;
        overflow: hidden;
        margin: 0;
        padding: 0;
        box-shadow: none;
        border: none;
        border-radius: 0;
        transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
        pointer-events: none;
        visibility: hidden;
    }

    .nav-dropdown.active .nav-dropdown-menu {
        opacity: 1;
        max-height: 500px;
        padding: 0.5rem 0;
        pointer-events: auto;
        transform: none;
        visibility: visible;
    }

    .nav-dropdown-menu a {
        padding: 0.75rem 1.5rem;
        display: block;
        width: 100%;
        cursor: pointer;
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    }

    .nav-dropdown-menu-sub {
        position: static;
        transform: none;
        margin: 0;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        box-shadow: none;
        border: none;
        border-radius: 0;
        transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
        pointer-events: none;
        visibility: hidden;
    }

    .nav-dropdown-submenu.active .nav-dropdown-menu-sub {
        opacity: 1;
        max-height: 500px;
        padding: 0.5rem 0;
        transform: none;
        pointer-events: auto;
        visibility: visible;
    }

    .nav-dropdown-menu-sub a {
        padding: 0.75rem 2.5rem;
        display: block;
        width: 100%;
        cursor: pointer;
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    }

    .nav-cta {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
        padding: 1rem 0;
        border-top: 1px solid var(--gray-200);
        margin-top: 1rem;
    }

    .btn-primary {
        width: 100%;
        justify-content: center;
    }

    .nav-login {
        width: 100%;
        text-align: center;
        padding: 0.75rem 0;
    }
}

/* Desktop Hover Behavior - JavaScript will handle with delay */
/* CSS hover kept as fallback but JavaScript provides smooth transitions */
@media (min-width: 769px) {
    .nav-dropdown.hover-active .nav-dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) translateY(0);
        pointer-events: auto;
    }

    .nav-dropdown.hover-active .nav-dropdown-toggle .nav-arrow {
        transform: rotate(90deg);
        color: var(--gray-600);
    }

    .nav-dropdown-submenu.hover-active .nav-dropdown-menu-sub {
        opacity: 1;
        visibility: visible;
        transform: translateX(0);
        pointer-events: auto;
    }

    .nav-dropdown-submenu.hover-active .nav-dropdown-toggle-sub .nav-arrow {
        transform: rotate(90deg);
        color: var(--gray-600);
    }
}

