/* ============================================
   ENHANCED NAVIGATION BAR WITH DROPDOWN CAPABILITIES
   ============================================ */

/* ============================================
   NAVBAR BASE STYLES
   ============================================ */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(1, 4, 24, 0.98);
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    z-index: 1000;
    padding: 0.75rem 0;
    box-shadow: 0 2px 20px rgba(0, 168, 255, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 1px solid rgba(0, 168, 255, 0.15);
}

.navbar:hover {
    background-color: rgba(1, 4, 24, 1);
    box-shadow: 0 4px 30px rgba(0, 168, 255, 0.4);
}

.navbar.scrolled {
    background-color: rgba(1, 4, 24, 0.99);
    box-shadow: 0 4px 30px rgba(0, 168, 255, 0.5);
    padding: 0.5rem 0;
}

/* ============================================
   NAV CONTAINER
   ============================================ */

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

/* ============================================
   NAV LOGO
   ============================================ */

.nav-logo {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--glow-color-2);
    text-decoration: none;
    text-shadow: 0 0 10px var(--glow-color-1);
    transition: transform 0.3s ease, text-shadow 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 1002;
}

.nav-logo-img {
    width: 36px !important;
    height: 36px !important;
    object-fit: contain;
    border-radius: 50%;
    box-shadow: 0 0 10px var(--glow-color-1);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    display: block !important;
    background-color: rgba(0, 168, 255, 0.1);
    border: 2px solid var(--glow-color-1);
    image-rendering: -webkit-optimize-contrast;
    image-rendering: pixelated;
    position: relative;
    z-index: 10;
    border-radius: 50% !important;
}

.nav-logo-img:hover {
    box-shadow: 0 0 15px var(--glow-color-2), 0 0 25px var(--glow-color-1);
    transform: scale(1.1);
}

.nav-logo:hover {
    -webkit-transform: scale(1.05);
    transform: scale(1.05);
    text-shadow: 0 0 20px var(--glow-color-2);
}

/* ============================================
   NAV MENU - DESKTOP
   ============================================ */

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.5rem;
    align-items: center;
}

.nav-item {
    margin: 0;
    position: relative;
}

/* ============================================
   NAV LINKS
   ============================================ */

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.nav-link:hover {
    color: var(--glow-color-2);
    background-color: rgba(0, 168, 255, 0.15);
    border-color: rgba(0, 168, 255, 0.4);
    -webkit-transform: translateY(-2px);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 168, 255, 0.4);
    text-shadow: 0 0 8px var(--glow-color-1);
}

.nav-link:focus {
    outline: 2px solid var(--glow-color-1);
    outline-offset: 2px;
}

.nav-link.active {
    background-color: rgba(0, 168, 255, 0.2);
    border-color: rgba(0, 229, 255, 0.5);
    color: var(--glow-color-2);
    box-shadow: 0 5px 15px rgba(0, 168, 255, 0.4), 0 0 10px rgba(0, 229, 255, 0.3);
    text-shadow: 0 0 8px var(--glow-color-1);
    position: relative;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--glow-color-2), transparent);
    border-radius: 2px;
    animation: spotlight 2s ease-in-out infinite;
}

@keyframes spotlight {

    0%,
    100% {
        opacity: 0.5;
        width: 60%;
    }

    50% {
        opacity: 1;
        width: 90%;
    }
}

/* ============================================
   DROPDOWN MENU STYLES
   ============================================ */

.nav-item.has-dropdown>.nav-link::after {
    content: '\f107';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-left: 0.5rem;
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.nav-item.has-dropdown:hover>.nav-link::after,
.nav-item.has-dropdown:focus-within>.nav-link::after {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background-color: rgba(1, 4, 24, 0.98);
    border: 1px solid rgba(0, 168, 255, 0.3);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 168, 255, 0.3);
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1001;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.nav-item.has-dropdown:hover .dropdown-menu,
.nav-item.has-dropdown:focus-within .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(8px);
}

.dropdown-item {
    display: block;
    width: 100%;
}

.dropdown-link {
    color: var(--text-color);
    text-decoration: none;
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s ease;
    border-radius: 6px;
    font-size: 0.9rem;
}

.dropdown-link:hover {
    background-color: rgba(0, 168, 255, 0.2);
    color: var(--glow-color-2);
    padding-left: 1.5rem;
    text-shadow: 0 0 5px rgba(0, 168, 255, 0.3);
}

.dropdown-link:focus {
    outline: 2px solid var(--glow-color-1);
    outline-offset: -2px;
    background-color: rgba(0, 168, 255, 0.15);
}

/* Removed dropdown link icons - no arrow icons needed */

/* ============================================
   HAMBURGER MENU
   ============================================ */

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    background: none;
    border: none;
    padding: 0.5rem;
    margin: 0;
    border-radius: 8px;
    transition: background-color 0.3s ease;
    z-index: 1003;
}

.hamburger:hover {
    background-color: rgba(0, 168, 255, 0.1);
}

.hamburger:focus {
    outline: 2px solid var(--glow-color-1);
    outline-offset: 2px;
}

.hamburger span {
    width: 28px;
    height: 3px;
    background-color: var(--text-color);
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
    box-shadow: 0 0 5px var(--glow-color-1);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-6px, 7px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(20px);
}

.hamburger.active span:nth-child(3) {
    transform: rotate(45deg) translate(-6px, -7px);
}

/* ============================================
   MOBILE NAV MENU
   ============================================ */

.nav-menu.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: rgba(1, 4, 24, 0.99);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    padding: 1rem 0;
    gap: 0;
    box-shadow: 0 10px 40px rgba(0, 168, 255, 0.3);
    border-top: 1px solid rgba(0, 168, 255, 0.2);
    max-height: calc(100vh - 80px);
    overflow-y: auto;
}

.nav-menu.active .nav-item {
    width: 100%;
    text-align: left;
    border-bottom: 1px solid rgba(0, 168, 255, 0.1);
}

.nav-menu.active .nav-item:last-child {
    border-bottom: none;
}

.nav-menu.active .nav-link {
    display: flex;
    padding: 1rem 1.5rem;
    border-bottom: none;
    justify-content: space-between;
}

/* ============================================
   MOBILE DROPDOWN
   ============================================ */

.nav-menu.active .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    border-left: 3px solid var(--glow-color-1);
    background-color: rgba(0, 168, 255, 0.05);
    padding: 0;
    margin-top: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.nav-menu.active .nav-item.has-dropdown.expanded .dropdown-menu {
    max-height: 500px;
    padding: 0.5rem 0;
}

.nav-menu.active .nav-item.has-dropdown>.nav-link::after {
    transform: rotate(90deg);
}

.nav-menu.active .nav-item.has-dropdown.expanded>.nav-link::after {
    transform: rotate(-90deg);
}

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */

@media (max-width: 1200px) {
    .nav-container {
        max-width: 100%;
        padding: 0 1.5rem;
    }
}

@media (max-width: 992px) {
    .nav-link {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .nav-logo {
        font-size: 1.6rem;
    }

    .nav-logo-img {
        width: 32px !important;
        height: 32px !important;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        display: none;
    }

    .nav-container {
        padding: 0 1rem;
    }

    .nav-logo {
        font-size: clamp(1.2rem, 3vw, 1.5rem);
    }

    .nav-logo-img {
        width: clamp(28px, 4vw, 32px);
        height: clamp(28px, 4vw, 32px);
    }

    .navbar {
        padding: 0.6rem 0;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 0.75rem;
    }

    .nav-logo-img {
        width: clamp(24px, 5vw, 28px);
        height: clamp(24px, 5vw, 28px);
    }

    .nav-logo {
        font-size: clamp(1rem, 4vw, 1.3rem);
    }

    .hamburger span {
        width: 24px;
        height: 2.5px;
    }

    .nav-menu.active .nav-link {
        padding: 0.875rem 1.25rem;
        font-size: 0.95rem;
    }
}

/* ============================================
   ACCESSIBILITY ENHANCEMENTS
   ============================================ */

/* Skip to content link */
.skip-to-content {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--glow-color-1);
    color: var(--primary-bg);
    padding: 1rem 2rem;
    z-index: 10000;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: top 0.3s ease;
}

.skip-to-content:focus {
    top: 10px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {

    .nav-link,
    .dropdown-link,
    .hamburger span,
    .dropdown-menu {
        transition: none !important;
        animation: none !important;
    }

    .nav-link.active::after {
        animation: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .navbar {
        background-color: rgba(1, 4, 24, 1);
        border-bottom: 2px solid var(--glow-color-1);
    }

    .nav-link {
        border: 1px solid rgba(0, 168, 255, 0.5);
    }

    .dropdown-menu {
        border: 2px solid var(--glow-color-1);
    }
}

/* Focus visible styles for keyboard navigation */
.nav-link:focus-visible,
.dropdown-link:focus-visible,
.hamburger:focus-visible {
    outline: 3px solid var(--glow-color-1);
    outline-offset: 2px;
    box-shadow: 0 0 10px rgba(0, 168, 255, 0.5);
}

/* ============================================
   SCROLLBAR STYLING FOR MOBILE MENU
   ============================================ */

.nav-menu.active::-webkit-scrollbar {
    width: 6px;
}

.nav-menu.active::-webkit-scrollbar-track {
    background: rgba(0, 168, 255, 0.1);
}

.nav-menu.active::-webkit-scrollbar-thumb {
    background: rgba(0, 168, 255, 0.4);
    border-radius: 3px;
}

.nav-menu.active::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 168, 255, 0.6);
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav-menu.active {
    animation: fadeInDown 0.3s ease-out;
}

.dropdown-menu {
    animation: fadeInUp 0.3s ease-out;
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .navbar {
        position: static;
        box-shadow: none;
        border-bottom: 1px solid #000;
    }

    .hamburger {
        display: none;
    }

    .dropdown-menu {
        display: none;
    }
}