/* ============================================
   دليل السودان - تصميم بسيط وأنيق
   responsive | رائع على الجوال
   ============================================ */

/* المتغيرات */
:root {
    --primary: #1a7431;
    --primary-dark: #0e5a24;
    --secondary: #f39c12;
    --dark: #2c3e50;
    --light: #f8f9fa;
    --gray: #6c757d;
    --white: #ffffff;
    --shadow: 0 2px 10px rgba(0,0,0,0.05);
    --radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Tajawal', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light);
    color: var(--dark);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ============================================
   شريط التنقل
   ============================================ */
.navbar {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 12px 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.nav-brand a {
    text-decoration: none;
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-brand i {
    font-size: 1.6rem;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 20px;
    flex-wrap: wrap;
}

.nav-menu a {
    text-decoration: none;
    color: var(--dark);
    padding: 8px 12px;
    border-radius: 25px;
    transition: all 0.3s;
    font-size: 0.95rem;
}

.nav-menu a:hover {
    background: var(--primary);
    color: var(--white);
}

.nav-menu .admin-link {
    background: var(--secondary);
    color: var(--white);
}

.search-form {
    display: flex;
    gap: 5px;
}

.search-form input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 25px;
    outline: none;
    width: 180px;
    font-size: 0.85rem;
}

.search-form input:focus {
    border-color: var(--primary);
}

.search-form button {
    background: var(--primary);
    border: none;
    padding: 0 12px;
    border-radius: 25px;
    color: var(--white);
    cursor: pointer;
}

/* ============================================
   المحتوى الرئيسي
   ============================================ */
.main {
    padding: 30px 0;
    min-height: calc(100vh - 300px);
}

/* بطاقات المحتوى */
.card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-2px);
}

.card h3 {
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.card h3 a {
    text-decoration: none;
    color: var(--primary);
}

.card h3 a:hover {
    text-decoration: underline;
}

.card p {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.card-meta {
    display: flex;
    gap: 15px;
    font-size: 0.8rem;
    color: var(--gray);
}

/* شبكة الأقسام في الرئيسية */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.section-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--primary);
    display: inline-block;
}

/* جدول الأسعار */
.price-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
}

.price-table th,
.price-table td {
    padding: 12px;
    text-align: right;
    border-bottom: 1px solid #eee;
}

.price-table th {
    background: var(--primary);
    color: var(--white);
}

.price-table tr:hover {
    background: #f5f5f5;
}

/* أزرار */
.btn {
    display: inline-block;
    padding: 10px 20px;
    background: var(--primary);
    color: var(--white);
    text-decoration: none;
    border-radius: 25px;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s;
}

.btn:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--secondary);
}

/* نموذج المقارنة */
.compare-form {
    background: var(--white);
    padding: 20px;
    border-radius: var(--radius);
    margin-bottom: 30px;
}

.compare-form .form-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.compare-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.compare-form select,
.compare-form input {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    min-width: 150px;
}

/* ترقيم الصفحات */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
}

.pagination a,
.pagination span {
    padding: 8px 14px;
    background: var(--white);
    border-radius: 8px;
    text-decoration: none;
    color: var(--primary);
}

.pagination .active {
    background: var(--primary);
    color: var(--white);
}

/* ============================================
   التذييل
   ============================================ */
.footer {
    background: var(--dark);
    color: var(--white);
    padding: 40px 0 20px;
    margin-top: 40px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer h3,
.footer h4 {
    margin-bottom: 15px;
}

.footer-links ul {
    list-style: none;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    line-height: 2;
}

.footer-links a:hover {
    color: var(--secondary);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #444;
    font-size: 0.85rem;
    color: #aaa;
}

/* ============================================
   استجابة للجوال
   ============================================ */
@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }
    
    .nav-menu {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 10px;
        padding: 15px 0;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .search-form {
        width: 100%;
        order: 3;
    }
    
    .search-form input {
        flex: 1;
    }
    
    .grid-2 {
        grid-template-columns: 1fr;
    }
    
    .compare-form .form-group {
        flex-direction: column;
    }
    
    .price-table {
        font-size: 0.8rem;
    }
    
    .price-table th,
    .price-table td {
        padding: 8px;
    }
}

/* ============================================
   أدوات مساعدة
   ============================================ */
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.text-primary { color: var(--primary); }