/* Import Cairo Font */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700&display=swap');

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    direction: rtl;
    text-align: right;
}

body {
    font-family: 'Cairo', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #ffffff;
    direction: rtl;
    text-align: right;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Cairo', Arial, sans-serif;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #0077b6;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

a {
    color: #0077b6;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #005a8b;
}

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

/* Header */
.site-header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: #0077b6;
}

.site-logo svg {
    width: 30px;
    height: 30px;
}

/* Navigation */
.main-nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.main-nav a {
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.main-nav a:hover {
    background-color: #f0f8ff;
}

/* ✅ إخفاء زر الهمبرغر على الشاشات الكبيرة افتراضيًا */
.menu-toggle {
    display: none; 
}

/* Search Bar */
.search-container {
    position: relative;
    max-width: 300px;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-family: 'Cairo', Arial, sans-serif;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #0077b6;
}

/* Main Content */
.main-content {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 3rem 0;
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 100%);
    margin-bottom: 3rem;
    border-radius: 10px;
}

.hero h1 {
    margin-bottom: 1rem;
    color: #0077b6;
}

.hero p {
    font-size: 1.2rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.card-header {
    background: #0077b6;
    color: white;
    padding: 1.5rem;
    text-align: center;
}

.card-header h3 {
    margin: 0;
    color: white;
    font-size: 1.3rem;
}

.card-body {
    padding: 1.5rem;
}

.card-body p {
    color: #666;
    margin-bottom: 1rem;
}

.card-footer {
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #0077b6;
    color: white;
    border-radius: 5px;
    font-weight: 500;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
    font-family: 'Cairo', Arial, sans-serif;
}

.btn:hover {
    background: #005a8b;
    color: white;
}

.btn-outline {
    background: transparent;
    color: #0077b6;
    border: 2px solid #0077b6;
}

.btn-outline:hover {
    background: #0077b6;
    color: white;
}

/* Article Styles */
.article-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e0e0e0;
}

.article-meta {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.article-content {
    line-height: 1.8;
    margin-bottom: 2rem;
}

.article-content h2, .article-content h3, .article-content h4 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.article-content ul, .article-content ol {
    margin: 1rem 0;
    padding-right: 2rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}
table {
  border-collapse:collapse;
}
/* PDF Viewer */
.pdf-viewer {
    width: 100%;
    height: 600px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    margin: 1rem 0;
}

.pdf-download {
    text-align: center;
    margin: 1rem 0;
}

/* Social Share */
.social-share {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 5px;
}

.social-share a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #0077b6;
    color: white;
    border-radius: 5px;
    font-size: 0.9rem;
}

.social-share a:hover {
    background: #005a8b;
}

/* Footer */
.site-footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

.site-footer p {
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* 1. تعديل Header-Content: نجعل الشعار وزر الهمبرغر متجاورين */
    .header-content {
        flex-direction: row; 
        justify-content: space-between;
        align-items: center; 
        padding: 1rem 20px;
        gap: 1rem;
    }
    
    /* 2. تنسيقات القائمة (Hamburger Menu State) */
    .main-nav {
        display: none; /* ✅ القائمة مخفية افتراضيًا */
        position: absolute;
        top: 60px; 
        left: 0;
        right: 0;
        width: 100%;
        background-color: #fff;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
        z-index: 999;
        padding: 1rem 0;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 0;
        text-align: right;
        padding: 0;
    }
    
    .main-nav ul li a {
        display: block;
        padding: 0.75rem 20px;
        border-radius: 0;
    }
    
    .main-nav.active {
        display: block; /* ✅ تفعيل الإظهار عبر الجافاسكريبت */
    }
    
    /* 3. تنسيقات زر الهمبرغر نفسه */
    .menu-toggle {
        display: block; /* ✅ إظهار الزر على الشاشات الصغيرة */
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 5px;
        z-index: 1001; 
        order: 2; 
    }
    
    .hamburger-icon,
    .hamburger-icon::before,
    .hamburger-icon::after {
        content: '';
        display: block;
        width: 25px;
        height: 3px;
        background-color: #0077b6;
        border-radius: 3px;
        transition: all 0.3s ease;
    }

    .hamburger-icon::before {
        transform: translateY(-8px);
    }

    .hamburger-icon::after {
        transform: translateY(5px);
    }
    
    /* 4. إخفاء شريط البحث لمنع تزاحمه */
    .search-container {
        display: none; 
    }
    
    /* التنسيقات الأخرى الموجودة سابقاً في هذا المقطع */
    .cards-grid {
        grid-template-columns: 1fr;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .social-share {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .card-body, .card-header {
        padding: 1rem;
    }
    
    .hero {
        padding: 2rem 0;
    }
}

/* Print Styles */
@media print {
    .site-header, .site-footer, .social-share {
        display: none;
    }
    
    .main-content {
        padding: 0;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}