/* Shared Header Styles for consistent navigation across all pages */

/* Navigation container styles */
.nav-container {
    background: linear-gradient(135deg, rgba(102,126,234,0.8) 0%, rgba(118,75,162,0.8) 100%);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    position: relative;
}

/* Home page specific navigation styling */
.nav-container.home-nav {
    background: rgba(0, 0, 0, 0.3) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: none;
}

/* Home page scrolled state - same gradient as other pages */
.nav-container.scrolled {
    background: linear-gradient(135deg, rgba(102,126,234,0.8) 0%, rgba(118,75,162,0.8) 100%) !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Logo styles */
.logo {
    background: linear-gradient(45deg, #ffffff, #f8fafc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

/* Navigation link styles */
.nav-link {
    position: relative;
    transition: all 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 50%;
    background-color: #fff;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

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

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

/* Enhanced Mobile Menu Button */
#mobile-menu-button {
    display: none;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    padding: 0.75rem;
    border-radius: 0.75rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 48px;
    min-height: 48px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

#mobile-menu-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

#mobile-menu-button:hover::before {
    left: 100%;
}

#mobile-menu-button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

#mobile-menu-button:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

#mobile-menu-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

/* Enhanced Mobile Menu Container */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 0;
    border-radius: 1rem;
    background: rgba(17, 24, 39, 0.95);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 1000;
    position: relative;
}

#mobile-menu.menu-open {
    max-height: 100vh;
    opacity: 1;
    transform: translateY(0) scale(1);
    margin-top: 1rem;
}

/* Enhanced Mobile Menu Content */
.mobile-menu {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Enhanced Mobile Menu Links */
#mobile-menu a {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    margin: 0.25rem 0;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

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

#mobile-menu a:hover::before {
    left: 100%;
}

#mobile-menu a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(8px) scale(1.02);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
    color: white;
}

#mobile-menu a:active {
    transform: translateX(4px) scale(1.01);
    color: white;
}

#mobile-menu a i {
    width: 1.5rem;
    text-align: center;
    margin-right: 1rem;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    color: white;
}

#mobile-menu a:hover i {
    color: white;
    transform: scale(1.1);
}

/* Enhanced Mobile Search Form */
#mobile-menu .search-form {
    margin-bottom: 2rem;
    padding: 0 1.25rem;
    position: relative;
}

#mobile-menu .search-form input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 1rem;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    color: white;
}

#mobile-menu .search-form input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

#mobile-menu .search-form input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 
        0 0 0 4px rgba(255, 255, 255, 0.1),
        0 4px 20px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
    color: white;
}

#mobile-menu .search-form .search-icon {
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
}

#mobile-menu .search-form input:focus + .search-icon {
    color: white;
}

#mobile-menu .search-form .search-button {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

#mobile-menu .search-form .search-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    color: white;
}

/* Enhanced Mobile Authentication Section */
#mobile-menu .auth-section {
    border-top: 2px solid rgba(255, 255, 255, 0.2);
    padding-top: 2rem;
    margin-top: 2rem;
    position: relative;
}

#mobile-menu .auth-section::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
}

#mobile-menu .auth-section .welcome-message {
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 0.75rem;
    font-weight: 700;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

#mobile-menu .auth-section .welcome-message::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.4));
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .nav-container {
        padding: 0.5rem 0;
    }
    
    .nav-container nav {
        padding: 0.5rem 1rem;
    }
    
    #mobile-menu-button {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Ensure mobile menu doesn't overflow viewport */
    #mobile-menu.menu-open {
        max-height: calc(100vh - 120px);
        overflow-y: auto;
    }
    
    /* Enhanced mobile menu scrolling */
    #mobile-menu.menu-open::-webkit-scrollbar {
        width: 6px;
    }
    
    #mobile-menu.menu-open::-webkit-scrollbar-track {
        background: rgba(0, 0, 0, 0.05);
        border-radius: 3px;
    }
    
    #mobile-menu.menu-open::-webkit-scrollbar-thumb {
        background: linear-gradient(180deg, #3b82f6, #1d4ed8);
        border-radius: 3px;
        box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.3);
    }
    
    #mobile-menu.menu-open::-webkit-scrollbar-thumb:hover {
        background: linear-gradient(180deg, #2563eb, #1e40af);
    }
    
    .md\\:hidden {
        display: block !important;
    }
    
    .hidden.md\\:flex {
        display: none !important;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .nav-container nav {
        padding: 0.5rem 0.75rem;
    }
    
    #mobile-menu {
        margin-left: -0.75rem;
        margin-right: -0.75rem;
        border-radius: 0.75rem;
    }
    
    .mobile-menu {
        padding: 1.5rem;
    }
    
    #mobile-menu a {
        padding: 1.125rem 1rem;
        font-size: 1rem;
        min-height: 56px;
        display: flex;
        align-items: center;
    }
    
    /* Improve search form on small screens */
    #mobile-menu .search-form input {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 1.125rem 1rem 1.125rem 3.5rem;
    }
}

/* Enhanced Animation for Menu Icon */
#mobile-menu-button i {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1.25rem;
}

#mobile-menu-button.menu-open i {
    transform: rotate(90deg) scale(1.1);
    color: #3b82f6;
}

/* Enhanced focus states for accessibility */
#mobile-menu-button:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1);
}

#mobile-menu a:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Enhanced backdrop effect */
#mobile-menu::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.6));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

#mobile-menu.menu-open::before {
    opacity: 1;
    pointer-events: auto;
}

/* Smooth transitions for all interactive elements */
.nav-container * {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Ensure home page navigation elements are properly styled */
.nav-container.home-nav .logo {
    color: white !important;
    -webkit-text-fill-color: white !important;
    background: none !important;
}

.nav-container.home-nav .fas.fa-users {
    color: white !important;
}

.nav-container.home-nav .text-white.text-xs {
    color: rgba(255, 255, 255, 0.8) !important;
}

.nav-container.home-nav .nav-link {
    color: white !important;
}

.nav-container.home-nav .nav-link:hover {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* Scrolled state styling - same as regular pages */
.nav-container.scrolled .logo {
    color: white !important;
    -webkit-text-fill-color: white !important;
    background: none !important;
}

.nav-container.scrolled .fas.fa-users {
    color: white !important;
}

.nav-container.scrolled .text-white.text-xs {
    color: rgba(255, 255, 255, 0.9) !important;
}

.nav-container.scrolled .nav-link {
    color: white !important;
}

.nav-container.scrolled .nav-link:hover {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Prevent body scroll when mobile menu is open */
body.menu-open {
    overflow: hidden;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    #mobile-menu {
        border: 2px solid #000;
    }
    
    #mobile-menu a {
        border: 1px solid transparent;
    }
    
    #mobile-menu a:hover {
        border-color: #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    #mobile-menu,
    #mobile-menu-button,
    #mobile-menu a,
    #mobile-menu-button i {
        transition: none;
    }
    
    #mobile-menu.menu-open {
        transform: none;
    }
    
    #mobile-menu-button.menu-open i {
        transform: none;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    #mobile-menu {
        background: rgba(17, 24, 39, 0.98);
        border-color: rgba(255, 255, 255, 0.1);
        box-shadow: 
            0 25px 50px -12px rgba(0, 0, 0, 0.5),
            0 0 0 1px rgba(255, 255, 255, 0.1),
            inset 0 1px 0 rgba(255, 255, 255, 0.1);
    }
    
    #mobile-menu a {
        color: #f3f4f6;
        background: rgba(59, 130, 246, 0.05);
    }
    
    #mobile-menu a:hover {
        background: rgba(59, 130, 246, 0.15);
        color: #ffffff;
        border-color: rgba(59, 130, 246, 0.3);
    }
    
    #mobile-menu .search-form input {
        background: #374151;
        border-color: #4b5563;
        color: #f3f4f6;
    }
    
    #mobile-menu .search-form input::placeholder {
        color: #9ca3af;
    }
    
    #mobile-menu .search-form input:focus {
        background: #1f2937;
        border-color: #3b82f6;
    }
    
    #mobile-menu .auth-section {
        border-color: #4b5563;
    }
    
    #mobile-menu .welcome-message {
        background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(147, 51, 234, 0.15));
        color: #f3f4f6;
        border-color: rgba(59, 130, 246, 0.2);
    }
    
    #mobile-menu a i {
        color: #9ca3af;
    }
    
    #mobile-menu a:hover i {
        color: #60a5fa;
    }
}

/* Loading animation for menu items */
@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

#mobile-menu.menu-open .mobile-menu > * {
    animation: slideInFromLeft 0.4s ease forwards;
}

#mobile-menu.menu-open .mobile-menu > *:nth-child(1) { animation-delay: 0.1s; }
#mobile-menu.menu-open .mobile-menu > *:nth-child(2) { animation-delay: 0.15s; }
#mobile-menu.menu-open .mobile-menu > *:nth-child(3) { animation-delay: 0.2s; }
#mobile-menu.menu-open .mobile-menu > *:nth-child(4) { animation-delay: 0.25s; }
#mobile-menu.menu-open .mobile-menu > *:nth-child(5) { animation-delay: 0.3s; }
#mobile-menu.menu-open .mobile-menu > *:nth-child(6) { animation-delay: 0.35s; }
#mobile-menu.menu-open .mobile-menu > *:nth-child(7) { animation-delay: 0.4s; }
#mobile-menu.menu-open .mobile-menu > *:nth-child(8) { animation-delay: 0.45s; }

/* Remove nav shadow on single post pages - Enhanced for maximum compatibility */
.single-post .nav-container,
.single .nav-container,
body.single .nav-container,
body.single-post .nav-container,
body.post .nav-container,
body.type-post .nav-container,
body.ast-single-post .nav-container,
body.wp-singular .nav-container {
    box-shadow: none !important;
    background: linear-gradient(135deg, rgba(102,126,234,0.8) 0%, rgba(118,75,162,0.8) 100%) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* Additional override for any remaining shadow effects */
.single-post .nav-container::before,
.single-post .nav-container::after,
.single .nav-container::before,
.single .nav-container::after,
body.single .nav-container::before,
body.single .nav-container::after,
body.single-post .nav-container::before,
body.single-post .nav-container::after {
    display: none !important;
} 