/* المكتبة الرقمية - التصميم الرئيسي */

/* إعدادات عامة */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8fafc;
    color: #1e293b;
    line-height: 1.6;
    direction: rtl;
}

/* الشريط العلوي */
.navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 1rem 0;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
}

.navbar-nav .nav-link {
    color: rgba(255,255,255,0.9);
    margin: 0 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: white;
    background-color: rgba(255,255,255,0.1);
}

/* البطاقات */
.card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

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

.card-img-top {
    height: 200px;
    object-fit: cover;
    width: 100%;
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1e293b;
}

.card-text {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* الأزرار */
.btn {
    padding: 0.5rem 1.5rem;
    border-radius: 5px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-weight: 500;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.btn-outline-primary {
    border: 2px solid #667eea;
    color: #667eea;
    background: transparent;
}

.btn-outline-primary:hover {
    background: #667eea;
    color: white;
}

/* النماذج */
.form-control {
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    width: 100%;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    display: block;
}

/* البانر الرئيسي */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero-title {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

/* التصنيفات */
.category-card {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.category-card:hover {
    transform: translateY(-5px);
}

.category-icon {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 1rem;
}

/* تفاصيل الكتاب */
.book-detail {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.book-cover {
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.book-info {
    padding: 2rem;
}

.book-title {
    font-size: 2rem;
    font-weight: bold;
    color: #1e293b;
    margin-bottom: 1rem;
}

.book-author {
    color: #64748b;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.book-description {
    color: #475569;
    line-height: 1.8;
    margin-bottom: 2rem;
}

/* التنبيهات */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: none;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
}

.alert-info {
    background-color: #dbeafe;
    color: #1e40af;
}

.alert-warning {
    background-color: #fef3c7;
    color: #92400e;
}

/* الترقيم */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2rem 0;
}

.page-link {
    padding: 0.5rem 1rem;
    margin: 0 0.25rem;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    color: #667eea;
    text-decoration: none;
    transition: all 0.3s ease;
}

.page-link:hover {
    background-color: #667eea;
    color: white;
}

.page-link.active {
    background-color: #667eea;
    color: white;
}

/* التذييل */
.footer {
    background: #1e293b;
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    text-align: center;
}

/* الاستجابة */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .book-title {
        font-size: 1.5rem;
    }
    
    .card-img-top {
        height: 150px;
    }
}

/* تأثيرات إضافية */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* أيقونات المفضلة */
.favorite-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #ef4444;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.favorite-btn:hover {
    transform: scale(1.2);
}

.favorite-btn.active {
    color: #dc2626;
}

/* شريط البحث */
.search-section {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.search-form {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.search-form .form-group {
    flex: 1;
    min-width: 200px;
}

/* إضافات للتصميم */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -0.5rem;
}

.col-md-3, .col-md-4, .col-md-6, .col-md-8, .col-lg-3, .col-lg-4 {
    padding: 0 0.5rem;
    margin-bottom: 1rem;
}

.col-md-3 { flex: 0 0 25%; }
.col-md-4 { flex: 0 0 33.333333%; }
.col-md-6 { flex: 0 0 50%; }
.col-md-8 { flex: 0 0 66.666667%; }
.col-lg-3 { flex: 0 0 25%; }
.col-lg-4 { flex: 0 0 33.333333%; }

.col-12 { flex: 0 0 100%; }

.navbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-nav {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.text-center { text-align: center; }
.text-muted { color: #6c757d; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mt-3 { margin-top: 1rem; }

.d-grid { display: grid; }
.d-flex { display: flex; }
.justify-content-between { justify-content: space-between; }
.justify-content-center { justify-content: center; }
.align-items-center { align-items: center; }

.btn-sm { padding: 0.25rem 0.5rem; font-size: 0.875rem; }

.section-title {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 2rem;
    text-align: center;
    color: #1e293b;
}

.page-title {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 2rem;
    color: #1e293b;
}

.stat-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 1rem;
}

.category-header, .publisher-header {
    margin-bottom: 2rem;
}

.category-description, .publisher-description {
    font-size: 1.1rem;
    color: #64748b;
    margin-bottom: 1rem;
}

.book-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.card-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.social-links {
    margin: 1rem 0;
}

.social-links a {
    color: white;
    margin: 0 0.5rem;
    font-size: 1.5rem;
    text-decoration: none;
}

.social-links a:hover {
    opacity: 0.8;
}

/* تحسينات للاستجابة */
@media (max-width: 768px) {
    .navbar-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .navbar-nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .search-form {
        flex-direction: column;
    }
    
    .col-md-3, .col-md-4, .col-md-6, .col-md-8, .col-lg-3, .col-lg-4 {
        flex: 0 0 100%;
    }
    
    .book-actions, .card-actions {
        flex-direction: column;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .page-title {
        font-size: 2rem;
    }
} 