/* 
    Navbar Stylesheet
    Modern, Fixed, and Fully Responsive (Vanilla CSS)
*/

:root {
    --nav-bg: rgba(255, 255, 255, 0.95);
    --nav-text: #111827;
    --nav-accent: #0A7A3E;
    --nav-hover-bg: rgba(10, 122, 62, 0.08);
    --nav-height: 75px;
    --shadow-nav: 0 4px 20px rgba(0, 0, 0, 0.08);
    --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Compensate for Fixed Navbar */
body {
    padding-top: var(--nav-height);
}

.main-navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 2000;
    box-shadow: var(--shadow-nav);
    display: flex;
    align-items: center;
    transition: var(--transition-base);
}

.navbar-container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    /* This pushes elements to opposite sides */
    align-items: center;
    flex-direction: row;
    /* Force LTR-like ordering as requested: Links Right, Logo Left */
}

/* RTL Layout Logic: 
   On an Arabic site, direction: rtl. 
   To have Logo on LEFT and Links on RIGHT:
   In RTL, first child is Right, last child is Left.
*/
[dir="rtl"] .navbar-container {
    flex-direction: row;
    /* In RTL, row makes the first child (NAV) appear on Right, second child (LOGO) on Left */
}

/* Logo Styling (Left Side) */
.navbar-logo .logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--nav-text);
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.navbar-logo span {
    color: var(--nav-accent);
}

.navbar-logo i {
    color: var(--nav-accent);
    font-size: 1.3rem;
}

/* Navigation Menu (Right Side) */
.nav-menu {
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 8px;
    /* Control spacing between items */
    margin: 0;
    padding: 0;
}

.nav-link {
    padding: 10px 18px;
    color: var(--nav-text);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 12px;
    transition: var(--transition-base);
}

/* Active and Hover Effects */
.nav-link:hover {
    color: var(--nav-accent);
    background: var(--nav-hover-bg);
}

.nav-link.active {
    color: var(--nav-accent);
    background: var(--nav-hover-bg);
    position: relative;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 18px;
    right: 18px;
    height: 3px;
    background: var(--nav-accent);
    border-radius: 10px;
}

/* Special Styling for Contact Button */
#contactBtn {
    background: var(--nav-accent);
    color: white;
    padding: 10px 22px;
}

#contactBtn:hover {
    background: #086332;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(10, 122, 62, 0.2);
}

#contactBtn.active::after {
    display: none;
    /* No underline for button style */
}

/* Mobile Toggle - Hidden by default */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 2100;
}

.menu-toggle .bar {
    width: 30px;
    height: 3px;
    background: var(--nav-text);
    border-radius: 10px;
    transition: var(--transition-base);
}

/* RESPONSIVE DESIGN */
@media screen and (max-width: 992px) {
    .menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        /* Hidden on the right */
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: var(--nav-bg);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15);
        padding: 100px 30px;
        transition: var(--transition-base);
        z-index: 2050;
        display: flex;
        /* Ensure flex for column layout */
        flex-direction: column;
        align-items: flex-start;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-list {
        flex-direction: column;
        gap: 15px;
    }

    .nav-link {
        display: block;
        width: 100%;
        font-size: 1.1rem;
        padding: 15px;
    }

    /* Hamburger Animation to X */
    .menu-toggle.active .bar:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    .menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active .bar:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }
}

/* Dark Mode Support (optional, for consistency) */
[data-theme="dark"] .main-navbar {
    --nav-bg: rgba(13, 17, 23, 0.95);
    --nav-text: #E6EDF3;
    background: var(--nav-bg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .nav-menu {
    background: #161B22;
}