/* Navigation Styles */

:root {
    --navbar-height: 80px;
    --navbar-height-scrolled: 70px;
    --primary-color: #2E7D32;
    --text-color: #2C3E50;
    --bg-color: rgba(255, 255, 255, 0.98);
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.15);
    --font-family: 'Tajawal', 'Cairo', sans-serif;
}


/* Reset Navigation Styles */

.navbar *,
.sidebar * {
    font-family: var(--font-family) !important;
    font-weight: 600 !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
}


/* Main Navigation */

.navbar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background: var(--bg-color);
    height: var(--navbar-height);
    z-index: 9999 !important;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    font-family: var(--font-family) !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.navbar.scrolled {
    height: var(--navbar-height-scrolled);
    box-shadow: var(--shadow-md);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 100%;
    position: relative;
}


/* Logo */

.nav-right {
    display: flex;
    align-items: center;
    z-index: 2;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-img {
    height: 60px;
    width: auto;
    transition: all 0.3s ease;
}

.navbar.scrolled .logo-img {
    height: 50px;
}


/* Desktop Navigation */

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
    height: 100%;
    position: relative;
    z-index: 2;
}

.desktop-nav li {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.desktop-nav a {
    color: var(--text-color) !important;
    text-decoration: none !important;
    font-size: 1.15rem !important;
    font-weight: 600 !important;
    padding: 0.5rem 0;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
    font-family: var(--font-family) !important;
    letter-spacing: 0.3px;
}

.desktop-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary-color);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.desktop-nav a:hover {
    color: var(--primary-color) !important;
}

.desktop-nav a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.desktop-nav .active a {
    color: var(--primary-color) !important;
}

.desktop-nav .active a::after {
    transform: scaleX(1);
}


/* Mobile Navigation */

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--text-color);
    cursor: pointer;
    padding: 0.5rem;
    z-index: 2;
}


/* Sidebar Styles */

.sidebar {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    background: var(--bg-color);
    z-index: 10000 !important;
    transition: right 0.3s ease;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    font-family: var(--font-family) !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    overflow-y: auto;
}

.sidebar.active {
    right: 0;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
    background: var(--bg-color);
    position: sticky;
    top: 0;
    z-index: 2;
}

.sidebar-logo {
    height: 45px;
    width: auto;
}

.sidebar-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-color);
    cursor: pointer;
    padding: 0.5rem;
    transition: all 0.3s ease;
}

.sidebar-close:hover {
    color: var(--primary-color);
    transform: rotate(90deg);
}

.sidebar-nav {
    list-style: none;
    padding: 1rem 0;
    margin: 0;
    background: var(--bg-color);
}

.sidebar-nav li {
    padding: 0.5rem 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.sidebar-nav li:last-child {
    border-bottom: none;
}

.sidebar-nav a {
    color: var(--text-color) !important;
    text-decoration: none !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    display: block;
    padding: 0.8rem 0;
    transition: all 0.3s ease;
    font-family: var(--font-family) !important;
    letter-spacing: 0.3px;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    color: var(--primary-color) !important;
    padding-right: 0.5rem;
}

.sidebar-nav hr {
    margin: 1rem 0;
    border: none;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.sidebar-nav .btn {
    width: 100%;
    padding: 0.8rem;
    font-weight: 600 !important;
    font-family: var(--font-family) !important;
    transition: all 0.3s ease;
}

.sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998 !important;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.sidebar-backdrop.active {
    opacity: 1;
    visibility: visible;
}


/* Media Queries */

@media (max-width: 991px) {
    .desktop-nav {
        display: none;
    }
    .nav-toggle {
        display: block;
    }
    .navbar {
        height: var(--navbar-height-scrolled);
    }
    .logo-img {
        height: 45px;
    }
    .navbar-container {
        padding: 0 1rem;
    }
    .sidebar {
        width: 280px;
    }
    .sidebar-nav li {
        padding: 0.5rem 1rem;
    }
    .sidebar-nav a {
        font-size: 1rem !important;
        padding: 0.7rem 0;
    }
}

@media (max-width: 480px) {
    .navbar {
        height: var(--navbar-height-scrolled);
    }
    .logo-img {
        height: 40px;
    }
    .sidebar {
        width: 260px;
    }
    .sidebar-header {
        padding: 1rem;
    }
    .sidebar-nav li {
        padding: 0.4rem 0.8rem;
    }
    .sidebar-nav a {
        font-size: 0.95rem !important;
        padding: 0.6rem 0;
    }
}