/* HEADER & NAVIGATION STYLES */

/* Sticky Header */
header {
    background: var(--white);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    width: 100%;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 0 30px;
    box-sizing: border-box;
}

.logo {
    display: flex;
    align-items: center;
    position: relative;
    z-index: 10;
}

.logo img {
    height: 55px;
    width: auto;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 22px;
    margin-left: auto;
    margin-right: 30px;
}

.nav-links li {
    list-style: none;
}

.nav-links a {
    font-size: 14.5px;
    font-weight: 600;
    color: #1b4d3e;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    transition: all 0.2s ease;
}

/* Show icons on desktop with a subtle style */
.nav-links a i,
.nav-links a svg {
    display: block !important;
    width: 16px;
    height: 16px;
    opacity: 0.7;
    transition: all 0.2s ease;
}

.nav-links a.active {
    color: var(--primary);
    position: relative;
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary);
    border-radius: 10px;
}

.nav-links a:hover {
    color: var(--primary);
    transform: translateY(-1px);
}

.nav-links a:hover i {
    opacity: 1;
    transform: scale(1.1);
}

.sidebar-header,
.sidebar-footer {
    display: none;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-post-btn {
    padding: 10px 20px;
    font-weight: 600;
    font-size: 16px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(109, 179, 77, 0.2);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: #f8f9fa;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    color: var(--text-main);
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

/* RESPONSIVE NAVIGATION SECTION */
@media (max-width: 1100px) {
    .nav-links {
        gap: 15px;
    }

    .nav-links a {
        font-size: 13.5px;
    }
}

@media (max-width: 991px) {
    .nav-links {
        display: none;
        /* Hide wide menu on medium screens */
    }

    .mobile-menu-toggle {
        display: flex;
        margin-left: auto;
        margin-right: 15px;
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 0 15px;
    }

    /* Sidebar Nav Styles (Mobile) */
    .nav-links {
        display: flex !important;
        position: fixed;
        top: 0;
        right: -100%;
        width: 300px;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        gap: 0;
        box-shadow: -10px 0 50px rgba(0, 0, 0, 0.1);
        transition: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 1001;
        padding: 0;
        margin-right: 0;
    }

    .nav-links.active {
        right: 0;
    }

    .sidebar-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 20px;
        border-bottom: 1px solid var(--border-color);
        margin-bottom: 10px;
    }

    .sidebar-header img {
        height: 45px;
        width: auto;
        object-fit: contain;
    }

    .sidebar-close {
        background: #f8fafc;
        border: 1px solid #e2e8f0;
        width: 40px;
        height: 40px;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        color: #64748b;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links a {
        padding: 16px 20px;
        font-size: 16px;
        font-weight: 600;
        border-bottom: 1px solid #f1f5f9;
        color: #334155;
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .nav-links a i {
        width: 20px;
        height: 20px;
        opacity: 0.7;
    }

    .nav-links a.active {
        background: #f0fdf4;
        color: var(--primary);
        border-left: 4px solid var(--primary);
    }

    .nav-links a.active::after {
        display: none;
    }

    .sidebar-footer {
        display: block;
        padding: 20px;
        margin-top: auto;
        background: #fcfdfe;
    }



    .menu-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(2px);
        opacity: 0;
        visibility: hidden;
        transition: 0.3s;
        z-index: 1000;
    }

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

    .nav-actions {
        display: none;
        /* Hide post ad on top for mobile (it's in sidebar) */
    }
}

/* Dropdown Styles */
.nav-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    background: var(--white);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    min-width: 200px;
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 100;
    list-style: none;
    border: 1px solid #f1f3f5;
}

.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 0;
    width: 100%;
    height: 15px;
}

.dropdown-menu li a {
    padding: 10px 20px !important;
    font-size: 14px !important;
    color: #4a5568 !important;
    border-bottom: none !important;
    transition: background 0.2s;
}

.dropdown-menu li a:hover {
    background: #f8fafc;
    color: var(--primary) !important;
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Mobile Dropdown adjustment */
@media (max-width: 768px) {
    .dropdown-menu {
        position: static;
        box-shadow: none;
        padding: 0 0 0 10px;
        display: none;
        /* Controlled by JS on mobile */
        background: transparent;
        border: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        transition: none;
    }

    .nav-link-item .chevron {
        transition: transform 0.3s ease;
    }

    .dropdown-menu li a {
        padding: 12px 20px 12px 45px !important;
        border-bottom: none !important;
        font-size: 14px !important;
    }

    .dropdown-menu li a i {
        width: 16px;
        height: 16px;
    }
}