/* =====================================================
   بوابة الشراكات والتعاون المؤسسي — دعم
   التصميم الرئيسي
   ===================================================== */

:root {
    --primary: #1a5276;
    --primary-light: #2980b9;
    --primary-dark: #0e2f44;
    --secondary: #27ae60;
    --accent: #e74c3c;
    --warning: #f39c12;
    --info: #3498db;
    --light: #f8f9fa;
    --dark: #2c3e50;
    --gray: #95a5a6;
    --border: #dee2e6;
    --shadow: 0 2px 10px rgba(0,0,0,0.08);
    --shadow-lg: 0 4px 20px rgba(0,0,0,0.12);
    --radius: 8px;
    --radius-lg: 12px;
    --font: 'Tajawal', 'Segoe UI', Tahoma, Arial, sans-serif;
}

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

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

body {
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.8;
    color: var(--dark);
    background-color: #f5f7fa;
    min-height: 100vh;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: var(--primary-light);
}

img {
    max-width: 100%;
    height: auto;
}

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

/* ===== شريط التنقل ===== */
.navbar {
    background: #fff;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0.5rem 0;
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
}

.brand-icon {
    font-size: 1.8rem;
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    list-style: none;
}

.navbar-nav a {
    color: var(--dark);
    font-weight: 500;
    padding: 8px 12px;
    border-radius: var(--radius);
    transition: all 0.3s;
    white-space: nowrap;
}

.navbar-nav a:hover {
    color: var(--primary);
    background: var(--light);
}

.navbar-nav .btn-nav {
    color: #fff;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-weight: 600;
}

.navbar-nav .btn-nav:hover {
    background: var(--primary-dark);
    color: #fff;
}

.navbar-toggler {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    flex-direction: column;
    gap: 5px;
}

.navbar-toggler span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
    transition: all 0.3s;
}

/* ===== الأزرار ===== */
.btn {
    display: inline-block;
    padding: 10px 24px;
    border: none;
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

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

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

.btn-success {
    background: var(--secondary);
    color: #fff;
}

.btn-danger {
    background: var(--accent);
    color: #fff;
}

.btn-lg {
    padding: 14px 32px;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.875rem;
}

.btn-block {
    display: block;
    width: 100%;
}

/* ===== قسم البطل ===== */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #fff;
    padding: 100px 0;
    text-align: center;
}

.hero h1 {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.hero-subtitle {
    font-size: 1.3rem;
    opacity: 0.9;
    margin-bottom: 15px;
}

.hero-desc {
    font-size: 1.1rem;
    opacity: 0.85;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero .btn-outline {
    border-color: #fff;
    color: #fff;
}

.hero .btn-outline:hover {
    background: #fff;
    color: var(--primary);
}

/* ===== الإحصائيات ===== */
.stats-section {
    padding: 60px 0;
    background: #fff;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.stat-card {
    text-align: center;
    padding: 30px;
    border-radius: var(--radius-lg);
    background: var(--light);
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 1rem;
    color: var(--gray);
}

/* ===== الأقسام ===== */
.section {
    padding: 80px 0;
}

.section-alt {
    background: #fff;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    text-align: center;
    margin-bottom: 10px;
}

.section-subtitle {
    text-align: center;
    color: var(--gray);
    margin-bottom: 50px;
    font-size: 1.1rem;
}

/* ===== البطاقات ===== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.card h3 {
    font-size: 1.3rem;
    color: var(--primary);
    margin-bottom: 10px;
}

.card p {
    color: var(--gray);
    margin-bottom: 15px;
}

.card-list {
    list-style: none;
    padding: 0;
}

.card-list li {
    padding: 5px 0;
    padding-right: 20px;
    position: relative;
}

.card-list li::before {
    content: '✓';
    position: absolute;
    right: 0;
    color: var(--secondary);
    font-weight: bold;
}

/* ===== خطوات ===== */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.step-card {
    text-align: center;
    padding: 30px;
    position: relative;
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 20px;
}

.step-card h3 {
    color: var(--primary);
    margin-bottom: 10px;
}

/* ===== القوائم ===== */
.check-list {
    list-style: none;
    padding: 0;
}

.check-list li {
    padding: 10px 0;
    padding-right: 30px;
    position: relative;
    font-size: 1.1rem;
}

.check-list li::before {
    content: '✓';
    position: absolute;
    right: 0;
    color: var(--secondary);
    font-weight: bold;
    font-size: 1.2rem;
}

/* ===== النماذج ===== */
.form-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.form-section {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

.form-section h3 {
    color: var(--primary);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--light);
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 15px;
}

.form-check input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 4px;
    accent-color: var(--primary);
}

.form-check label {
    font-weight: normal;
    margin-bottom: 0;
}

/* ===== التنبيهات ===== */
.alert {
    padding: 15px 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* ===== الشارات ===== */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-danger {
    background: #f8d7da;
    color: #721c24;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.badge-info {
    background: #d1ecf1;
    color: #0c5460;
}

.badge-primary {
    background: #cce5ff;
    color: #004085;
}

.badge-secondary {
    background: #e2e3e5;
    color: #383d41;
}

/* ===== الجداول ===== */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.table th,
.table td {
    padding: 12px 15px;
    text-align: right;
    border-bottom: 1px solid var(--border);
}

.table th {
    background: var(--primary);
    color: #fff;
    font-weight: 600;
}

.table-striped tbody tr:nth-child(even) {
    background: var(--light);
}

/* ===== صفحة تسجيل الدخول ===== */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-box {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-lg);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    font-size: 1.3rem;
    color: var(--primary);
    margin-bottom: 5px;
}

.login-header p {
    color: var(--gray);
}

.login-footer {
    text-align: center;
    margin-top: 20px;
}

/* ===== لوحة التحكم ===== */
.admin-body {
    display: flex;
    min-height: 100vh;
}

.admin-wrapper {
    display: flex;
    width: 100%;
}

.admin-sidebar {
    width: 260px;
    background: var(--primary-dark);
    color: #fff;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    transition: transform 0.3s;
    z-index: 100;
}

.sidebar-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header h2 {
    font-size: 1rem;
    font-weight: 600;
}

.sidebar-nav {
    padding: 20px 0;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: rgba(255,255,255,0.8);
    transition: all 0.3s;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.nav-icon {
    font-size: 1.2rem;
}

.admin-main {
    flex: 1;
    margin-right: 260px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.admin-topbar {
    background: #fff;
    padding: 15px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 50;
}

.sidebar-toggler {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

.topbar-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary);
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-name {
    font-weight: 600;
}

.user-role {
    color: var(--gray);
    font-size: 0.875rem;
}

.admin-content {
    flex: 1;
    padding: 30px;
}

/* ===== بطاقات لوحة التحكم ===== */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30.md;
}

.stat-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: var(--shadow);
}

.stat-card .stat-icon {
    font-size: 2rem;
}

.stat-card h3 {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1;
}

.stat-card p {
    color: var(--gray);
    font-size: 0.9rem;
}

.bg-info { background: #e3f2fd; }
.bg-success { background: #e8f5e9; }
.bg-warning { background: #fff3e0; }
.bg-primary { background: #e3f2fd; }

/* ===== شبكة لوحة التحكم ===== */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.dashboard-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 25px;
    box-shadow: var(--shadow);
}

.dashboard-card h3 {
    color: var(--primary);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--light);
}

/* ===== توزيع الحالات ===== */
.status-distribution {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.status-bar {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-label {
    min-width: 120px;
    font-size: 0.9rem;
}

.status-progress {
    flex: 1;
    height: 8px;
    background: var(--light);
    border-radius: 4px;
    overflow: hidden;
}

.status-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 4px;
    transition: width 0.5s;
}

.status-count {
    min-width: 30px;
    text-align: center;
    font-weight: 600;
}

/* ===== صفحات المحتوى ===== */
.page-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #fff;
    padding: 60px 0;
    text-align: center;
}

.page-header h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
}

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

/* ===== تقسيم الأقسام ===== */
.split-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.split-content h2 {
    color: var(--primary);
    margin-bottom: 20px;
}

.split-content p {
    margin-bottom: 15px;
    line-height: 1.9;
}

.image-placeholder {
    background: var(--light);
    border-radius: var(--radius-lg);
    padding: 60px;
    text-align: center;
}

.image-placeholder span {
    font-size: 4rem;
    display: block;
    margin-bottom: 15px;
}

/* ===== الأسئلة الشائعة ===== */
.faq-preview {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: #fff;
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: var(--shadow);
}

.faq-item h4 {
    color: var(--primary);
    margin-bottom: 8px;
}

.faq-item p {
    color: var(--gray);
}

/* ===== دعوة لإجراء ===== */
.cta-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #fff;
    text-align: center;
}

.cta-content h2 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.cta-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.cta-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-section .btn-outline {
    border-color: #fff;
    color: #fff;
}

.cta-section .btn-outline:hover {
    background: #fff;
    color: var(--primary);
}

/* ===== التذييل ===== */
.footer {
    background: var(--dark);
    color: #fff;
    padding: 60px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
}

.footer-col h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: #fff;
}

.footer-col h4 {
    font-size: 1rem;
    margin-bottom: 15px;
    color: rgba(255,255,255,0.9);
}

.footer-col p {
    color: rgba(255,255,255,0.7);
    margin-bottom: 10px;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 8px;
}

.footer-col ul li a {
    color: rgba(255,255,255,0.7);
}

.footer-col ul li a:hover {
    color: #fff;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 20px 0;
    text-align: center;
}

.footer-bottom p {
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
}

/* ===== صفحة المحتوى ===== */
.content-page {
    max-width: 800px;
    margin: 0 auto;
}

.content-page h2 {
    color: var(--primary);
    margin: 30px 0 15px;
}

.content-page ul {
    margin-bottom: 20px;
    padding-right: 20px;
}

.content-page li {
    margin-bottom: 8px;
}

/* ===== مرشحات البحث ===== */
.filter-form {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.filter-form .form-group {
    flex: 1;
    min-width: 150px;
    margin-bottom: 0;
}

/* ===== تفاصيل ===== */
.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.detail-item label {
    font-weight: 600;
    color: var(--primary);
    display: block;
    margin-bottom: 5px;
}

.detail-item p {
    color: var(--dark);
}

.detail-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.detail-section h4 {
    color: var(--primary);
    margin-bottom: 15px;
}

/* ===== سجل المراحل ===== */
.timeline {
    position: relative;
    padding-right: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    right: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    padding-bottom: 20px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    right: -24px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary);
}

.timeline-date {
    font-size: 0.875rem;
    color: var(--gray);
    margin-bottom: 5px;
}

.changed-by {
    color: var(--gray);
    font-size: 0.875rem;
    margin-right: 10px;
}

/* ===== شريط التقدم ===== */
.progress-bar {
    width: 100%;
    height: 10px;
    background: var(--light);
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 5px;
}

.progress-fill {
    height: 100%;
    background: var(--secondary);
    border-radius: 5px;
    transition: width 0.5s;
}

/* ===== الإجراءات ===== */
.page-actions {
    margin-bottom: 20px;
}

/* ===== الاستجابة للشاشات ===== */
@media (max-width: 992px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .steps-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .split-section {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .navbar-toggler {
        display: flex;
    }
    
    .navbar-nav {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        background: #fff;
        flex-direction: column;
        padding: 20px;
        box-shadow: var(--shadow);
        gap: 10px;
    }
    
    .navbar-nav.active {
        display: flex;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero {
        padding: 60px 0;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-sidebar {
        transform: translateX(100%);
    }
    
    .admin-sidebar.active {
        transform: translateX(0);
    }
    
    .admin-main {
        margin-right: 0;
    }
    
    .sidebar-toggler {
        display: block;
    }
}

@media (max-width: 576px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
    }
    
    .steps-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-cards {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .section {
        padding: 40px 0;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
}

/* ===== أدوات مساعدة ===== */
.text-center {
    text-align: center;
}

.mt-4 {
    margin-top: 2rem;
}

.mb-4 {
    margin-bottom: 2rem;
}
