/* Desktop Navigation */
.desktop-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background-color: #ffffff;
    border-bottom: 1px solid #EAEAEA;
    width: 100%;
    display: none; /* Hidden on mobile by default */
}

.nav-container {
    width: 100%;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

/* Left Section & Search */
.nav-left {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex: 1;
}

.nav-logo {
    height: 2rem;
    width: auto;
}

.search-wrapper {
    position: relative;
    width: 100%;
    max-width: 448px;
    display: none; /* Hidden on small tablets, shown on LG */
}

.search-input {
    width: 100%;
    height: 2.75rem;
    padding-left: 3rem;
    padding-right: 1rem;
    background-color: #F5F5F5;
    border: none;
    border-radius: 9999px;
    font-size: 0.875rem;
    outline: none;
    transition: all 0.2s;
    color: #1C1C1C;
}

.search-input:focus {
    box-shadow: 0 0 0 1px #d1d5db;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.25rem;
    height: 1.25rem;
    pointer-events: none;
    opacity: 0.5;
}

/* Right Section & Links */
.nav-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

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

.nav-menu-link {
    color: #4b5563;
    font-weight: 500;
    font-size: 0.875rem;
    text-decoration: none;
    transition: color 0.2s;
}

.nav-menu-link:hover {
    color: #000000;
}

/* User Actions */
.user-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    border-left: 1px solid #EAEAEA;
    padding-left: 1.5rem;
    height: 2rem;
}

.notification-btn {
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.notification-icon {
    width: 1.5rem;
    height: 1.5rem;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.notification-btn:hover .notification-icon {
    opacity: 1;
}

.notification-badge {
    position: absolute;
    top: -0.125rem;
    right: -0.125rem;
    width: 0.625rem;
    height: 0.625rem;
    background-color: #FF4D4D; /* Highlight color */
    border: 2px solid #ffffff;
    border-radius: 50%;
}

.user-profile-thumb {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background-color: #e5e7eb;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
}

.user-profile-thumb:hover {
    box-shadow: 0 0 0 2px #f3f4f6;
}

.user-profile-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Search Dropdown */
.search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-top: 8px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
}

.search-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    gap: 8px;
    color: #666;
    font-size: 14px;
}

.loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #333;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.search-results-list {
    padding: 8px 0;
}

.search-section-title {
    padding: 8px 16px 4px;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    cursor: pointer;
    transition: background-color 0.2s;
    gap: 12px;
}

.search-result-item:hover {
    background-color: #f8f9fa;
}

.result-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    opacity: 0.7;
}

.result-content {
    flex: 1;
    min-width: 0;
}

.result-content span:first-child {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #1c1c1c;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.result-author {
    display: block;
    font-size: 12px;
    color: #666;
    margin-top: 2px;
}

.search-result-item.view-all {
    justify-content: center;
    font-size: 13px;
    font-weight: 500;
    color: #333;
    border-top: 1px solid #f0f0f0;
    margin-top: 4px;
}

.search-no-results {
    padding: 20px 16px;
    text-align: center;
    color: #666;
    font-size: 14px;
}

/* Responsive Logic */
@media (min-width: 768px) {
    .desktop-nav {
        display: block;
    }
}

@media (min-width: 1024px) {
    .search-wrapper {
        display: block;
    }
}

/* Mobile Search Button */
.mobile-search-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.mobile-search-btn:hover {
    background-color: #f5f5f5;
}

.mobile-search-icon {
    width: 20px;
    height: 20px;
    opacity: 0.7;
}

/* Hide desktop search on mobile, show mobile search button instead */
@media (max-width: 1023px) {
    .search-wrapper {
        display: none;
    }
    
    .mobile-search-btn {
        display: block;
    }
    
    .search-dropdown {
        position: fixed;
        top: 60px;
        left: 16px;
        right: 16px;
        max-width: none;
        margin: 0;
        border-radius: 12px;
    }
}