/* Mobile Navbar Styles */
:root {
    --primary-color: #00204a;
    --secondary-color: #005555;
    --accent-color: #ffc107;
    --text-color: #333;
    --light-bg: #f8f9fa;
    --white: #ffffff;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* Navigation Base Styles */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 32, 74, 0.1);
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: var(--transition);
}

.logo:hover {
    color: var(--secondary-color);
    transform: scale(1.05);
}

.logo img {
    max-height: 50px;
    width: auto;
    margin-left: 10px;
}

/* Desktop Navigation Menu */
.nav-menu {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
}

.nav-menu a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
    background: rgba(0, 32, 74, 0.1);
}

/* Dropdown Menu Styles */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    min-width: 200px;
    box-shadow: var(--shadow);
    border-radius: 10px;
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    z-index: 1001;
    list-style: none;
    margin: 0;
}

.nav-item:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu a {
    padding: 0.75rem 1rem;
    border-radius: 0;
    background: transparent;
    font-size: 0.9rem;
}

.dropdown-menu a:hover {
    background: rgba(0, 32, 74, 0.05);
    color: var(--primary-color);
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
    background: none;
    border: none;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    margin: 3px 0;
    transition: var(--transition);
    border-radius: 2px;
}

/* Mobile Menu Toggle Animation */
.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile Menu Styles */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        border-radius: 0 0 15px 15px;
        gap: 0;
        z-index: 999;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu.active .nav-item {
        width: 100%;
        margin: 0;
    }

    .nav-menu.active a {
        padding: 1rem;
        border-radius: 10px;
        margin: 0.25rem 0;
        width: 100%;
        justify-content: flex-start;
    }

    /* Mobile Dropdown Styles */
    .nav-menu.active .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: rgba(0, 32, 74, 0.05);
        margin: 0.5rem 0;
        border-radius: 10px;
        padding: 0.5rem;
    }

    .nav-menu.active .dropdown-menu a {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        margin: 0.25rem 0;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    /* Adjust logo size on mobile */
    .logo {
        font-size: 1.2rem;
    }

    .nav-container {
        padding: 0 15px;
        height: 70px;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .nav-container {
        padding: 0 10px;
        height: 60px;
    }

    .logo {
        font-size: 1rem;
    }

    .mobile-menu-toggle span {
        width: 20px;
        height: 2px;
    }
}

/* RTL Support for Arabic */
[dir="rtl"] .logo img {
    margin-left: 0;
    margin-right: 10px;
}

[dir="rtl"] .nav-menu {
    gap: 1.5rem;
}

[dir="rtl"] .dropdown-menu {
    left: auto;
    right: 0;
}

[dir="rtl"] .nav-menu a {
    flex-direction: row-reverse;
}

/* Smooth scrolling for anchor links */
html {
    scroll-behavior: smooth;
}

/* Body padding to account for fixed navbar */
body {
    padding-top: 80px;
}

@media (max-width: 768px) {
    body {
        padding-top: 70px;
    }
}

@media (max-width: 480px) {
    body {
        padding-top: 60px;
    }
}
