/* ============================================
   NAVBAR STYLES - MODERN REDESIGN
   ============================================ */

/* Override scroll animations for navbar - ensure visibility */
.navbar .scroll-animate,
.navbar .scroll-animate-left,
.navbar .scroll-animate-right,
.navbar .scroll-animate-scale {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
}

.navbar .scroll-animate.animate-in,
.navbar .scroll-animate-left.animate-in,
.navbar .scroll-animate-right.animate-in,
.navbar .scroll-animate-scale.animate-in {
    opacity: 1 !important;
    transform: none !important;
}

/* Ensure all navbar elements are always visible and properly colored */
.navbar * {
    opacity: 1 !important;
    visibility: visible !important;
}

.navbar .nav-logo,
.navbar .nav-menu,
.navbar .nav-controls,
.navbar .navbar-nav,
.navbar .dark-mode-switch,
.navbar .nav-toggle {
    opacity: 1 !important;
    transform: none !important;
    visibility: visible !important;
}

/* Ensure language button is always visible */
.navbar .language-btn {
    opacity: 1 !important;
    transform: none !important;
    visibility: visible !important;
    color: var(--text-primary) !important;
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(107, 142, 35, 0.1);
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
    margin: 0;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.1);
    border-bottom-color: rgba(107, 142, 35, 0.2);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    transition: transform 0.3s ease;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.nav-logo-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.nav-logo:hover {
    transform: scale(1.05);
}

.nav-logo:hover .nav-logo-img {
    transform: rotate(5deg) scale(1.1);
}

.nav-logo h2 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-color);
    margin: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    /* Ensure visibility despite scroll animations */
    opacity: 1 !important;
    transform: none !important;
}

.nav-logo h2::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    transition: width 0.3s ease;
}

.nav-logo:hover h2::after {
    width: 100%;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-link {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    /* Ensure visibility despite scroll animations */
    opacity: 1 !important;
    transform: none !important;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(107, 142, 35, 0.1), transparent);
    transition: left 0.5s ease;
}

.nav-link:hover::before {
    left: 100%;
}

.nav-link:hover {
    color: var(--primary-color);
    background: rgba(107, 142, 35, 0.05);
    transform: translateY(-2px);
}

.nav-link.active {
    color: var(--primary-color);
    background: rgba(107, 142, 35, 0.1);
    font-weight: 700;
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Ensure nav controls are always visible */
.nav-controls .scroll-animate,
.nav-controls .scroll-animate-left,
.nav-controls .scroll-animate-right,
.nav-controls .scroll-animate-scale {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Ensure navbar-nav elements are always visible */
.navbar-nav .scroll-animate,
.navbar-nav .scroll-animate-left,
.navbar-nav .scroll-animate-right,
.navbar-nav .scroll-animate-scale {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
}

.dark-mode-switch {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--bg-primary);
    border: 2px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    /* Ensure visibility despite scroll animations */
    opacity: 1 !important;
    transform: none !important;
}

.dark-mode-switch::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 10px;
}

.dark-mode-switch:hover::before {
    opacity: 0.1;
}

.dark-mode-switch:hover {
    transform: translateY(-2px);
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(107, 142, 35, 0.2);
}

.dark-mode-switch i {
    font-size: 1.2rem;
    color: var(--primary-color);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.dark-mode-switch:hover i {
    color: var(--primary-dark);
    transform: scale(1.1);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    /* Ensure visibility despite scroll animations */
    opacity: 1 !important;
    transform: none !important;
}

.nav-toggle:hover {
    background: rgba(107, 142, 35, 0.1);
}

/* Dark mode support for nav-toggle */
body.dark-mode .nav-toggle:hover,
body.dark-theme .nav-toggle:hover {
    background: rgba(107, 142, 35, 0.2);
}

body.dark-mode .nav-toggle,
body.dark-theme .nav-toggle {
    background: rgba(107, 142, 35, 0.08);
    border-color: rgba(107, 142, 35, 0.2);
}

body.dark-mode .nav-toggle:hover,
body.dark-theme .nav-toggle:hover {
    background: rgba(107, 142, 35, 0.15);
    border-color: rgba(107, 142, 35, 0.3);
}

body.dark-mode .nav-toggle.active,
body.dark-theme .nav-toggle.active {
    background: rgba(107, 142, 35, 0.25);
    border-color: var(--primary-light);
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    margin: 3px 0;
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

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

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

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

/* Mobile menu */
@media (max-width: 768px) {
    .nav-container {
        height: 70px;
        padding: 0 15px;
    }
    
    .nav-logo {
        gap: 8px;
        flex-shrink: 0;
    }
    
    .nav-logo-img {
        width: 32px;
        height: 32px;
        flex-shrink: 0;
    }
    
    .nav-logo h2 {
        font-size: 1.6rem;
        font-weight: 700;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 120px;
    }
    
    .nav-menu {
        position: fixed !important;
        top: 70px !important;
        left: -100% !important;
        width: 100% !important;
        height: calc(100vh - 70px) !important;
        background: rgba(255, 255, 255, 0.98) !important;
        backdrop-filter: blur(20px) !important;
        -webkit-backdrop-filter: blur(20px) !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
        align-items: center !important;
        padding: 1rem 0 2rem 0 !important;
        gap: 0.5rem !important;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
        border-top: 1px solid rgba(107, 142, 35, 0.1) !important;
        z-index: 999 !important;
        opacity: 1 !important;
        visibility: visible !important;
        overflow-y: auto !important;
        transform: translateX(-100%) !important;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1) !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: thin !important;
        scrollbar-color: rgba(107, 142, 35, 0.3) transparent !important;
        margin: 0 !important;
    }
    
    /* Custom scrollbar for mobile menu */
    .nav-menu::-webkit-scrollbar {
        width: 4px !important;
    }
    
    .nav-menu::-webkit-scrollbar-track {
        background: transparent !important;
    }
    
    .nav-menu::-webkit-scrollbar-thumb {
        background: rgba(107, 142, 35, 0.3) !important;
        border-radius: 2px !important;
    }
    
    .nav-menu::-webkit-scrollbar-thumb:hover {
        background: rgba(107, 142, 35, 0.5) !important;
    }
    
    /* Dark mode scrollbar */
    body.dark-mode .nav-menu::-webkit-scrollbar-thumb,
    body.dark-theme .nav-menu::-webkit-scrollbar-thumb {
        background: rgba(107, 142, 35, 0.5) !important;
    }
    
    body.dark-mode .nav-menu::-webkit-scrollbar-thumb:hover,
    body.dark-theme .nav-menu::-webkit-scrollbar-thumb:hover {
        background: rgba(107, 142, 35, 0.7) !important;
    }

    .nav-menu.nav-open {
        left: 0 !important;
        transform: translateX(0) !important;
    }

    .nav-link {
        font-size: 1.1rem;
        padding: 0.8rem 1.5rem;
        width: 85%;
        text-align: center;
        border-radius: 12px;
        margin: 0.2rem 0;
        font-weight: 600;
        background: rgba(107, 142, 35, 0.05);
        border: 1px solid transparent;
        transition: all 0.3s ease;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .nav-link:hover {
        background: rgba(107, 142, 35, 0.1);
        border-color: rgba(107, 142, 35, 0.2);
        transform: translateY(-1px);
    }
    
    .nav-link.active {
        background: rgba(107, 142, 35, 0.15);
        border-color: var(--primary-color);
        color: var(--primary-color);
        font-weight: 700;
    }

    .nav-toggle {
        display: flex !important;
        opacity: 1 !important;
        visibility: visible !important;
        padding: 0.4rem;
        border-radius: 8px;
        background: rgba(107, 142, 35, 0.05);
        border: 1px solid rgba(107, 142, 35, 0.1);
        flex-shrink: 0;
        transition: all 0.3s ease;
    }
    
    .nav-toggle:hover {
        background: rgba(107, 142, 35, 0.1);
        border-color: rgba(107, 142, 35, 0.2);
        transform: scale(1.05);
    }
    
    .nav-toggle.active {
        background: rgba(107, 142, 35, 0.15);
        border-color: var(--primary-color);
    }
    
    .navbar-nav {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        flex-shrink: 0;
    }
    
    .language-btn {
        padding: 6px 8px;
        font-size: 0.8rem;
        flex-shrink: 0;
    }
    
    .language-btn i {
        font-size: 0.9rem;
    }
    
    .dark-mode-switch {
        width: 40px;
        height: 40px;
        flex-shrink: 0;
    }
    
    .dark-mode-switch i {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 12px;
        height: 65px;
    }
    
    .nav-logo {
        gap: 6px;
        flex-shrink: 0;
    }

    .nav-logo h2 {
        font-size: 1.4rem;
        font-weight: 700;
        max-width: 100px;
    }
    
    .nav-logo-img {
        width: 28px;
        height: 28px;
        flex-shrink: 0;
    }

    .nav-menu {
        top: 65px;
        height: calc(100vh - 65px);
        padding: 0.8rem 0 1.5rem 0;
    }

    .nav-link {
        width: 90%;
        font-size: 1rem;
        padding: 0.7rem 1.2rem;
        margin: 0.15rem 0;
        min-height: 42px;
    }

    .dark-mode-switch {
        width: 36px;
        height: 36px;
        flex-shrink: 0;
    }

    .dark-mode-switch i {
        font-size: 0.9rem;
    }
    
    .navbar-nav {
        gap: 0.3rem;
        flex-shrink: 0;
    }
    
    .language-btn {
        padding: 5px 7px;
        font-size: 0.75rem;
        flex-shrink: 0;
    }
    
    .language-btn i {
        font-size: 0.8rem;
    }
    
    .nav-toggle {
        padding: 0.3rem;
        flex-shrink: 0;
    }
    
    .nav-toggle span {
        width: 22px;
        height: 2px;
        margin: 2px 0;
    }
}

@media (max-width: 360px) {
    .nav-container {
        padding: 0 10px;
        height: 60px;
    }
    
    .nav-logo {
        gap: 5px;
        flex-shrink: 0;
    }
    
    .nav-logo h2 {
        font-size: 1.2rem;
        max-width: 80px;
    }
    
    .nav-logo-img {
        width: 24px;
        height: 24px;
        flex-shrink: 0;
    }
    
    .nav-menu {
        top: 60px;
        height: calc(100vh - 60px);
        padding: 0.6rem 0 1rem 0;
    }
    
    .nav-link {
        width: 92%;
        font-size: 0.95rem;
        padding: 0.6rem 1rem;
        min-height: 40px;
    }
    
    .dark-mode-switch {
        width: 34px;
        height: 34px;
        flex-shrink: 0;
    }
    
    .nav-toggle {
        padding: 0.25rem;
        flex-shrink: 0;
    }
    
    .nav-toggle span {
        width: 20px;
        height: 2px;
        margin: 1.5px 0;
    }
    
    .navbar-nav {
        gap: 0.2rem;
        flex-shrink: 0;
    }
    
    .language-btn {
        padding: 4px 6px;
        font-size: 0.7rem;
        flex-shrink: 0;
    }
}

/* Dark mode adjustments - Support both dark-mode and dark-theme classes */
body.dark-mode .navbar,
body.dark-theme .navbar {
    background: rgba(18, 18, 18, 0.95);
    border-bottom-color: rgba(107, 142, 35, 0.2);
}

body.dark-mode .navbar.scrolled,
body.dark-theme .navbar.scrolled {
    background: rgba(18, 18, 18, 0.98);
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
}

body.dark-mode .nav-link,
body.dark-theme .nav-link {
    color: var(--text-primary);
}

body.dark-mode .nav-link:hover,
body.dark-theme .nav-link:hover {
    color: var(--primary-light);
    background: rgba(107, 142, 35, 0.1);
}

body.dark-mode .nav-link.active,
body.dark-theme .nav-link.active {
    color: var(--primary-light);
    background: rgba(107, 142, 35, 0.15);
}

body.dark-mode .dark-mode-switch,
body.dark-theme .dark-mode-switch {
    background: var(--bg-secondary);
    border-color: var(--border-light);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

body.dark-mode .dark-mode-switch i,
body.dark-theme .dark-mode-switch i {
    color: var(--primary-light);
}

body.dark-mode .nav-toggle span,
body.dark-theme .nav-toggle span {
    background: var(--primary-light);
}

/* Mobile menu dark mode support */
@media (max-width: 768px) {
    body.dark-mode .nav-menu,
    body.dark-theme .nav-menu {
        background: rgba(18, 18, 18, 0.98) !important;
        border-top-color: rgba(107, 142, 35, 0.2) !important;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
    }
    
    body.dark-mode .nav-menu .nav-link,
    body.dark-theme .nav-menu .nav-link {
        color: var(--text-primary) !important;
        background: rgba(107, 142, 35, 0.08) !important;
        border-color: rgba(107, 142, 35, 0.15) !important;
    }
    
    body.dark-mode .nav-menu .nav-link:hover,
    body.dark-theme .nav-menu .nav-link:hover {
        color: var(--primary-light) !important;
        background: rgba(107, 142, 35, 0.15) !important;
        border-color: rgba(107, 142, 35, 0.25) !important;
    }
    
    body.dark-mode .nav-menu .nav-link.active,
    body.dark-theme .nav-menu .nav-link.active {
        color: var(--primary-light) !important;
        background: rgba(107, 142, 35, 0.2) !important;
        border-color: var(--primary-color) !important;
    }
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Active link highlighting */
.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--primary-color);
    border-radius: 1px;
} 