/* Common CSS Variables and 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;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    overflow-x: hidden;
}

/* Navigation 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;
}

.nav-menu {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 0rem;
}

.nav-item {
    position: relative;
}

.nav-menu a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    padding: 0.75rem 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);
}

.nav-menu a i {
    font-size: 0.8rem;
    transition: var(--transition);
}

.nav-item:hover a i {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 250px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-radius: 15px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
    border: 1px solid rgba(0, 32, 74, 0.1);
}

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

.dropdown-menu li {
    list-style: none;
}

.dropdown-menu a {
    padding: 1rem 1.5rem;
    border-radius: 0;
    border-bottom: 1px solid rgba(0, 32, 74, 0.05);
    display: block;
    color: var(--text-color);
    font-weight: 400;
    transition: var(--transition);
}

.dropdown-menu a:hover {
    background: rgba(0, 32, 74, 0.05);
    color: var(--primary-color);
    padding-left: 2rem;
}

.dropdown-menu li:last-child a {
    border-bottom: none;
    border-radius: 0 0 15px 15px;
}

.dropdown-menu li:first-child a {
    border-radius: 15px 15px 0 0;
}

/* Multi-level Dropdown */
.dropdown-menu .nav-item {
    position: relative;
}

.dropdown-menu .dropdown-menu {
    top: 0;
    left: 100%;
    margin-left: 5px;
}

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

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    margin: 3px 0;
    transition: var(--transition);
}

/* Page Header Styles */
.page-header {
    background: linear-gradient(135deg, #00204a 0%, #005555 100%);
    padding: 120px 0 80px;
    color: white;
    text-align: center;
}

.page-header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.page-header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Section Styles */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-align: center;
}

.section-subtitle {
    font-size: 1.2rem;
    color: #6c757d;
    margin-bottom: 3rem;
    text-align: center;
}

/* Button Styles */
.btn {
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    display: inline-block;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(45deg, #00204a, #005555);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.btn-white {
    background: white;
    color: var(--primary-color);
}

.btn-white:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* Footer Styles */
.footer {
    background: #1a1a1a;
    color: white;
    padding: 50px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.footer-section p,
.footer-section a {
    color: #ccc;
    text-decoration: none;
    line-height: 1.8;
}

.footer-section a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 20px;
    text-align: center;
    color: #999;
}

/* WhatsApp Button */
.whatsapp-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #25D366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    text-decoration: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
    z-index: 999;
}

.whatsapp-btn:hover {
    transform: scale(1.1);
    color: white;
}

/* Mobile Menu */
.nav-menu.active {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 1rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-radius: 0 0 15px 15px;
}

.nav-menu.active a {
    padding: 1rem;
    border-radius: 10px;
    margin: 0.25rem 0;
}

.nav-menu.active .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    background: var(--light-bg);
    margin: 0.5rem 0;
    border-radius: 10px;
}

.nav-menu.active .dropdown-menu a {
    padding: 0.75rem 1rem;
    margin: 0;
    border-bottom: 1px solid rgba(0, 32, 74, 0.1);
}

.nav-menu.active .dropdown-menu li:last-child a {
    border-bottom: none;
}

/* Arabic pages specific styles */
[dir="rtl"] .nav-container {
    padding: 0.5rem 20px;
}

[dir="rtl"] .nav-menu a {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
}

[dir="rtl"] .logo {
    font-size: 1rem;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .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);
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }
}

/* RTL Support for Arabic */
[dir="rtl"] body {
    direction: rtl;
    text-align: right;
}

[dir="rtl"] .logo img {
    margin-left: 0;
    margin-right: 10px;
}

[dir="rtl"] .whatsapp-btn {
    right: auto;
    left: 20px;
}

/* English specific styles */
body:not([dir="rtl"]) {
    font-family: 'Work Sans', sans-serif;
}

body:not([dir="rtl"]) .logo img {
    margin-right: 10px;
    margin-left: 0;
}