/* Header Styles */
header {
    background: #fff;
    padding: 1rem 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-image {
    width: auto;
    object-fit: contain;
}

.logo-mobile {
    display: none;
    height: 20px;
}

.logo-desktop {
    display: block;
    height: 30px;
}

nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin-top: 0;
    margin-bottom: 0;
}

.nav-links a {
    text-decoration: none;
    color: #2c3e50;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #3b9dd4;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.sign-in {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: #2c3e50;
    font-weight: 500;
    transition: color 0.3s;
}

.sign-in:hover {
    color: #3b9dd4;
}

.notification-btn {
    position: relative;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: #2c3e50;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s;
    border-radius: 50%;
    width: 40px;
    height: 40px;
}

.notification-btn:hover {
    color: #3b9dd4;
    background: rgba(59, 157, 212, 0.1);
}

.notification-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    border: 2px solid white;
}

.user-profile-wrapper {
    position: relative;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background 0.3s;
}

.user-profile:hover {
    background: rgba(0, 0, 0, 0.05);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e0e0e0;
}

.user-name {
    color: #2c3e50;
    font-weight: 500;
    font-size: 0.9375rem;
}

.chevron-icon {
    color: #666;
    transition: transform 0.3s;
}

.user-profile-wrapper.active .chevron-icon {
    transform: rotate(180deg);
}

.user-profile:hover .chevron-icon {
    transform: translateY(2px);
}

.user-profile-wrapper.active .user-profile:hover .chevron-icon {
    transform: rotate(180deg) translateY(2px);
}

.user-profile-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
    z-index: 1000;
    overflow: hidden;
}

.user-profile-wrapper.active .user-profile-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.profile-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    text-decoration: none;
    color: #2c3e50;
    transition: background 0.2s;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
}

.profile-dropdown-item:last-child {
    border-bottom: none;
}

.profile-dropdown-item:hover {
    background: #f8f9fa;
}

.profile-dropdown-item-logout {
    color: #ef4444;
}

.profile-dropdown-item-logout:hover {
    background: #fee2e2;
    color: #dc2626;
}

.profile-dropdown-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
    width: 24px;
    text-align: center;
}

.profile-dropdown-text {
    font-weight: 500;
    font-size: 0.9375rem;
    flex: 1;
}

.profile-dropdown-badge {
    background: #ef4444;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    min-width: 24px;
    text-align: center;
    line-height: 1.2;
}

.post-listing-wrapper {
    position: relative;
}

.post-listing-btn {
    background: #3b9dd4;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    border: none;
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.3s, transform 0.2s;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
}

.post-listing-btn:hover {
    background: #2d8bc4;
    transform: translateY(-2px);
}

.dropdown-chevron {
    transition: transform 0.3s;
    margin-left: 0.25rem;
}

.post-listing-wrapper.active .dropdown-chevron {
    transform: rotate(180deg);
}

.post-listing-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 300px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
    z-index: 1000;
    overflow: hidden;
}

.post-listing-wrapper.active .post-listing-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    text-decoration: none;
    color: #2c3e50;
    transition: background 0.2s;
    border-bottom: 1px solid #f0f0f0;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background: #f8f9fa;
}

.dropdown-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.dropdown-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

.dropdown-title {
    font-weight: 600;
    font-size: 0.9375rem;
    color: #2c3e50;
    display: block;
}

.dropdown-subtitle {
    font-size: 0.8125rem;
    color: #666;
    display: block;
}

.mobile-post-icon-container {
    display: none;
    position: relative;
}

.mobile-post-btn-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: #2c3e50;
    transition: color 0.3s;
    font-family: inherit;
}

.mobile-post-btn-header:hover {
    color: #3b9dd4;
}

.icon-circle-plus {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #3b9dd4;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
}

.icon-circle-plus::before {
    content: "+";
    color: white;
    font-size: 1.5rem;
    font-weight: 300;
    line-height: 1;
    position: absolute;
}

.mobile-post-text {
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
}

.mobile-chat-btn {
    display: none;
    position: relative;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: #2c3e50;
    transition: color 0.3s;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
}

.mobile-chat-btn:hover {
    color: #3b9dd4;
    background: rgba(59, 157, 212, 0.1);
}

.mobile-chat-btn svg {
    width: 20px;
    height: 20px;
}

.mobile-chat-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    border: 2px solid white;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: #2c3e50;
    transition: color 0.3s;
    font-family: inherit;
}

.mobile-menu-btn:hover {
    color: #3b9dd4;
}

.mobile-profile-icon {
    font-size: 1.5rem;
    display: block;
}

.mobile-sign-in-text {
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
    visibility: visible;
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 320px;
    max-width: 85vw;
    height: 100vh;
    background: white;
    z-index: 9999;
    padding: 0;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

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

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    background: white;
    z-index: 1;
}

.mobile-menu-content {
    padding: 1.5rem;
}

.mobile-close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #2c3e50;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-nav-links {
    list-style: none;
    margin-bottom: 0;
    padding: 0;
    margin-top: 0;
}

.mobile-nav-links li {
    margin-bottom: 0.5rem;
}

.mobile-nav-links a {
    text-decoration: none;
    color: #2c3e50;
    font-size: 1.1rem;
    font-weight: 500;
    display: block;
    padding: 1rem;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
}

.mobile-nav-links a:hover {
    background: #f8f9fa;
    color: #3b9dd4;
}

.mobile-nav-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mobile-sign-in {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: #2c3e50;
    font-weight: 500;
    font-size: 1.1rem;
    padding: 1rem;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
}

.mobile-sign-in:hover {
    background: #f8f9fa;
    color: #3b9dd4;
}

.mobile-sign-in .icon-user {
    font-size: 1.25rem;
}

.mobile-sign-in-section {
    margin-bottom: 1.5rem;
}

.mobile-user-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: #f9fafb;
    margin-bottom: 1.5rem;
}

.mobile-user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e0e0e0;
}

.mobile-user-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.mobile-user-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1rem;
}

.mobile-user-email {
    font-size: 0.875rem;
    color: #666;
}

.mobile-post-btn {
    background: #3b9dd4;
    color: white;
    padding: 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: background 0.2s, transform 0.2s;
}

.mobile-post-btn:hover {
    background: #2d8bc4;
    transform: translateY(-1px);
}

.mobile-post-btn-secondary {
    background: white;
    color: #3b9dd4;
    border: 2px solid #3b9dd4;
}

.mobile-post-btn-secondary:hover {
    background: #f0f7fb;
    transform: translateY(-1px);
}

.mobile-post-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.mobile-post-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    text-align: left;
    flex: 1;
}

.mobile-post-title {
    font-weight: 600;
    font-size: 0.9375rem;
    display: block;
    line-height: 1.3;
}

.mobile-post-subtitle {
    font-size: 0.8125rem;
    opacity: 0.9;
    display: block;
    line-height: 1.3;
}

.mobile-post-listing-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.mobile-profile-menu {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
}

.mobile-profile-menu li {
    margin-bottom: 0;
}

.mobile-profile-menu-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    text-decoration: none;
    color: #2c3e50;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
    position: relative;
}

.mobile-profile-menu-item:hover {
    background: #f8f9fa;
    color: #3b9dd4;
}

.mobile-profile-menu-item-logout {
    color: #ef4444;
}

.mobile-profile-menu-item-logout:hover {
    background: #fee2e2;
    color: #dc2626;
}

.mobile-profile-menu-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
    width: 24px;
    text-align: center;
}

.mobile-profile-menu-text {
    flex: 1;
}

.mobile-profile-menu-badge {
    background: #ef4444;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    min-width: 24px;
    text-align: center;
    line-height: 1.2;
}

/* Header Responsive Design */
@media (max-width: 768px) {
    header {
        padding: 1rem;
    }

    .nav-links,
    .nav-actions {
        display: none;
    }

    .mobile-post-icon-container {
        display: flex;
        margin-right: 1rem;
    }

    .mobile-chat-btn {
        display: flex;
        margin-right: 1rem;
    }

    .mobile-menu-btn {
        display: block;
    }

    .logo-desktop {
        display: none;
    }

    .logo-mobile {
        display: block;
    }

    .user-name {
        display: none;
    }

    .user-profile {
        gap: 0.5rem;
        padding: 0.25rem;
    }

    .user-avatar {
        width: 36px;
        height: 36px;
    }

    .chevron-icon {
        display: none;
    }

    .post-listing-dropdown.mobile-dropdown-visible {
        position: fixed !important;
        top: 70px;
        right: 1rem;
        left: auto;
        min-width: 280px;
        max-width: calc(100vw - 2rem);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
        z-index: 10001;
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateY(0) !important;
    }
}

@media (max-width: 480px) {
    .notification-btn {
        width: 36px;
        height: 36px;
        padding: 0.4rem;
    }

    .notification-btn svg {
        width: 18px;
        height: 18px;
    }

    .mobile-chat-btn {
        width: 36px;
        height: 36px;
        padding: 0.4rem;
    }

    .mobile-chat-btn svg {
        width: 18px;
        height: 18px;
    }

    .user-avatar {
        width: 32px;
        height: 32px;
    }
}
