/* ═══════════════════════════════════════════════════════════════════════════════ */
/* COMMON MENU STYLES - Reusable across all pages */
/* Navigation, Mobile Menu, Dropdowns, and Animations */
/* ═══════════════════════════════════════════════════════════════════════════════ */

/* Ensure consistent font family across all menu elements */
.common-nav-menu,
.common-nav-menu *,
.nav-item,
.nav-item a,
.nav-logo,
.gradient-text {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ──────────── MAIN NAVIGATION MENU ──────────── */
.common-nav-menu {
    background: linear-gradient(135deg, #10b981 0%, #3b82f6 100%);
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1000 !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    width: 100% !important;
    height: 70px;
    min-height: 70px;
    transition: all 0.3s ease;
}

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

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

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

.nav-logo i {
    font-size: 1.8rem;
    color: #a7f3d0;
}

.nav-logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.nav-logo-img:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

.gradient-text {
    background: linear-gradient(135deg, #ffffff, #a7f3d0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ──────────── DESKTOP NAVIGATION ──────────── */
.nav-desktop {
    display: flex;
    align-items: center;
    gap: 1rem;
}

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

.nav-item {
    position: relative;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.nav-item:hover {
    transform: translateY(-2px);
}

/* Enhanced hover animations for nav items */
.nav-item a {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

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

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

.nav-item a:hover {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.nav-item::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #ffffff, #a7f3d0);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.nav-item:hover::before {
    width: 80%;
}

.nav-item a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    white-space: nowrap;
}

.nav-item a:hover {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.15) 0%, 
        rgba(16, 185, 129, 0.1) 25%, 
        rgba(59, 130, 246, 0.1) 50%, 
        rgba(16, 185, 129, 0.1) 75%, 
        rgba(255, 255, 255, 0.15) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1), 0 4px 16px rgba(16, 185, 129, 0.2);
    color: #a7f3d0;
    transform: translateY(-2px);
}

.nav-item a i {
    font-size: 0.9rem;
    color: #a7f3d0;
    transition: color 0.3s ease;
}

/* ──────────── DROPDOWN MENU ──────────── */
.common-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    min-width: 300px;
    max-width: 350px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
    z-index: 9999;
    padding: 12px;
    pointer-events: none;
    margin-top: 5px;
}

.nav-item:hover .common-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

/* Ensure dropdown stays visible when hovering over it */
.common-dropdown:hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

/* Force dropdown to be visible when parent is hovered */
.nav-item:hover .common-dropdown,
.common-dropdown:hover {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
}

.dropdown-item {
    padding: 14px 20px;
    color: #374151 !important;
    transition: all 0.3s ease;
    border-radius: 10px;
    margin: 6px 0;
    display: flex;
    align-items: center;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    white-space: nowrap;
    background: transparent;
    line-height: 1.4;
    min-height: 20px;
}

.dropdown-item:hover {
    background: linear-gradient(135deg, 
        rgba(16, 185, 129, 0.4) 0%, 
        rgba(59, 130, 246, 0.4) 50%, 
        rgba(16, 185, 129, 0.4) 100%) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
    color: white !important;
    transform: translateX(5px);
}

.dropdown-item i {
    margin-right: 14px;
    width: 18px;
    font-size: 16px;
    color: #6b7280 !important;
    flex-shrink: 0;
    text-align: center;
    transition: color 0.3s ease;
}

.dropdown-item:hover i {
    color: white !important;
}

/* ──────────── MOBILE NAVIGATION ──────────── */
.nav-mobile {
    display: none; /* Hidden by default on desktop */
    align-items: center;
    gap: 1rem;
}

#mobileMenuBtn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

#mobileMenuBtn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* ──────────── MOBILE MENU OVERLAY ──────────── */
.common-mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #10b981 0%, #3b82f6 100%);
    z-index: 100;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    display: none;
}

.common-mobile-menu.active {
    transform: translateX(0);
    display: block;
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

#closeMobileMenu {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

#closeMobileMenu:hover {
    background: rgba(255, 255, 255, 0.1);
}

.mobile-menu-content {
    padding: 20px;
}

.mobile-menu-section {
    margin-bottom: 30px;
}

.mobile-menu-section-title {
    color: #a7f3d0;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid rgba(167, 243, 208, 0.3);
}

.mobile-menu-link {
    display: block;
    color: white;
    font-weight: 600;
    text-decoration: none;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    border-radius: 8px;
    margin-bottom: 5px;
}

.mobile-menu-link:hover {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.15) 0%, 
        rgba(16, 185, 129, 0.1) 25%, 
        rgba(59, 130, 246, 0.1) 50%, 
        rgba(16, 185, 129, 0.1) 75%, 
        rgba(255, 255, 255, 0.15) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.2);
    padding-left: 30px;
    transform: translateX(10px);
}

.mobile-menu-link i {
    margin-right: 12px;
    width: 20px;
    font-size: 16px;
    color: #a7f3d0;
}

.mobile-submenu-button {
    width: 100%;
    background: none;
    border: none;
    color: white;
    font-weight: 600;
    text-align: left;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    border-radius: 8px;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.mobile-submenu-button:hover {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.15) 0%, 
        rgba(16, 185, 129, 0.1) 25%, 
        rgba(59, 130, 246, 0.1) 50%, 
        rgba(16, 185, 129, 0.1) 75%, 
        rgba(255, 255, 255, 0.15) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.2);
}

.mobile-submenu-button i {
    color: #a7f3d0;
    transition: transform 0.3s ease;
}

.mobile-submenu-button.active i {
    transform: rotate(180deg);
}

.mobile-submenu {
    display: none;
    background: rgba(0, 0, 0, 0.2);
    padding-left: 20px;
    border-radius: 8px;
    margin: 10px 0;
    overflow: hidden;
}

.mobile-submenu.active {
    display: block;
    animation: slideDown 0.3s ease;
}

.mobile-submenu-link {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    padding: 12px 20px;
    font-size: 14px;
    transition: all 0.3s ease;
    border-radius: 6px;
    margin: 4px 0;
}

.mobile-submenu-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    padding-left: 30px;
}

.mobile-submenu-link i {
    margin-right: 12px;
    width: 16px;
    font-size: 14px;
    color: #a7f3d0;
}

/* ──────────── LANGUAGE SELECTOR ──────────── */
#languageSelector,
#mobileLanguageSelector {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#languageSelector:hover,
#mobileLanguageSelector:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

#languageSelector option,
#mobileLanguageSelector option {
    background: #374151;
    color: white;
}

/* ──────────── NAVIGATION ANIMATIONS ──────────── */
.nav-background-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}

.nav-background-animation::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shimmer 4s linear infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 500px;
    }
}

/* ──────────── RESPONSIVE DESIGN ──────────── */
@media (min-width: 1025px) {
    .nav-mobile {
        display: none;
    }
    .nav-desktop {
        display: flex;
    }
}

@media (max-width: 1024px) {
    .nav-desktop {
        display: none;
    }
    .nav-mobile {
        display: flex;
    }
    
    .nav-content {
        height: 60px;
        padding: 0 16px;
    }
    
    .nav-logo {
        font-size: 1.3rem;
    }
}

@media (max-width: 768px) {
    .nav-content {
        height: 55px;
        padding: 0 12px;
    }
    
    .nav-logo {
        font-size: 1.2rem;
    }
    
    .nav-logo i {
        font-size: 1.5rem;
    }
}

/* ──────────── ACCESSIBILITY ──────────── */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.sr-only:focus {
    position: static;
    width: auto;
    height: auto;
    padding: inherit;
    margin: inherit;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

/* Focus styles for accessibility */
.nav-item a:focus,
.dropdown-item:focus,
.mobile-menu-link:focus,
.mobile-submenu-button:focus,
#mobileMenuBtn:focus,
#closeMobileMenu:focus {
    outline: 2px solid #a7f3d0;
    outline-offset: 2px;
}

/* ──────────── SCROLL EFFECTS ──────────── */
.common-nav-menu.scrolled {
    background: rgba(16, 185, 129, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

/* ──────────── LOADING STATE ──────────── */
.common-nav-menu.loading {
    pointer-events: none;
    opacity: 0.7;
}

.common-nav-menu.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #a7f3d0, transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}
