/* Enhanced Navbar Styles */

/* Navbar Base */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.08);
    border-bottom-color: var(--border-color);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
    max-width: 1400px;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--text-dark);
    position: relative;
    letter-spacing: -0.5px;
    transition: all 0.3s ease;
}

.logo:hover {
    transform: translateY(-2px);
}

.logo-icon {
    color: var(--primary-color);
    font-size: 1.3rem;
    animation: rotate 10s linear infinite;
    display: inline-block;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.logo-text {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-badge {
    font-size: 0.65rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Navigation Links */
.nav-links {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.7rem 1rem;
    color: var(--text-medium);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color);
    background: var(--lighter-bg);
}

.nav-link.active {
    color: var(--primary-color);
    background: rgba(37, 99, 235, 0.1);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--primary-color);
    border-radius: 2px;
}

.link-text {
    position: relative;
}

/* Dropdown Menu */
.nav-dropdown {
    position: relative;
}

.dropdown-icon {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.nav-dropdown:hover .dropdown-icon {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 1rem);
    left: 0;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-light);
    min-width: 280px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1001;
    padding: 0.5rem;
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1rem;
    color: var(--text-dark);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background: var(--lighter-bg);
    transform: translateX(5px);
}

.dropdown-icon-wrapper {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--lighter-bg);
    border-radius: 10px;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.dropdown-title {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.95rem;
    margin-bottom: 0.2rem;
}

.dropdown-desc {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* Nav Actions */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.search-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--lighter-bg);
    border: none;
    border-radius: 10px;
    color: var(--text-medium);
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.search-btn svg {
    width: 20px;
    height: 20px;
}

.nav-cta-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.nav-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.nav-cta-btn svg {
    width: 18px;
    height: 18px;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.hamburger span {
    width: 25px;
    height: 2px;
    background: var(--text-dark);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Search Modal */
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 10vh;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.search-modal.active {
    opacity: 1;
    visibility: visible;
}

.search-modal-content {
    background: var(--card-bg);
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    padding: 2rem;
    position: relative;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.search-modal.active .search-modal-content {
    transform: translateY(0);
}

.search-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 35px;
    height: 35px;
    background: none;
    border: none;
    font-size: 28px;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-close:hover {
    color: var(--text-dark);
    transform: rotate(90deg);
}

.search-box {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: var(--lighter-bg);
    border-radius: 12px;
    margin-bottom: 2rem;
}

.search-box svg {
    width: 24px;
    height: 24px;
    color: var(--text-light);
    flex-shrink: 0;
}

.search-box input {
    flex: 1;
    border: none;
    background: none;
    font-size: 1.1rem;
    color: var(--text-dark);
    outline: none;
}

.search-box input::placeholder {
    color: var(--text-light);
}

.search-suggestions {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.search-category h4 {
    font-size: 0.85rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    font-weight: 600;
}

.search-category a {
    display: block;
    padding: 0.8rem 1rem;
    color: var(--text-dark);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    margin-bottom: 0.5rem;
}

.search-category a:hover {
    background: var(--lighter-bg);
    color: var(--primary-color);
    transform: translateX(5px);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .nav-links {
        gap: 0.3rem;
    }
    
    .nav-link {
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
    }
    
    .nav-cta-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: var(--card-bg);
        flex-direction: column;
        padding: 2rem;
        gap: 0.5rem;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
    }
    
    .nav-links.active {
        transform: translateX(0);
    }
    
    .nav-link {
        width: 100%;
        justify-content: space-between;
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        margin-top: 0.5rem;
        box-shadow: none;
        border: none;
        background: var(--lighter-bg);
    }
    
    .nav-actions {
        gap: 0.5rem;
    }
    
    .nav-cta-btn span {
        display: none;
    }
    
    .nav-cta-btn {
        width: 40px;
        height: 40px;
        padding: 0;
        justify-content: center;
    }
    
    .search-modal-content {
        width: 95%;
        padding: 1.5rem;
    }
}

/* Dark Mode */
[data-theme="dark"] .navbar {
    background: rgba(15, 23, 42, 0.95);
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .navbar.scrolled {
    background: rgba(15, 23, 42, 0.98);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .nav-link:hover {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .nav-link.active {
    background: rgba(37, 99, 235, 0.2);
}

[data-theme="dark"] .dropdown-menu {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .dropdown-icon-wrapper {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .search-btn {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .search-modal-content {
    background: #1e293b;
}

[data-theme="dark"] .search-box {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .search-category a:hover {
    background: rgba(255, 255, 255, 0.05);
}
