/* ملف تنسيق صفحة الوثائق
-------------------------------------------------- */
:root {
    --primary-color: #1c4f82;
    --secondary-color: #e6b400;
    --dark-color: #0a2240;
    --light-color: #f8f9fa;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --primary-rgb: 28, 79, 130;
    --secondary-rgb: 230, 180, 0;
}

/* تنسيقات البريدكرمب */
.breadcrumb-container {
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.2);
    padding: 8px 15px;
    border-radius: 30px;
    margin-top: 15px;
}

.breadcrumb {
    margin-bottom: 0;
    padding: 0;
    background-color: transparent;
}

.breadcrumb-item a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
}

.breadcrumb-item a:hover {
    color: var(--secondary-color);
}

.breadcrumb-item.active {
    color: var(--secondary-color);
}

.breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.5);
}

/* تنسيقات العنوان الرئيسي */
.page-title-section {
    background-color: var(--primary-color);
    color: #fff;
    padding: 60px 0;
    position: relative;
    overflow: hidden;
}

.page-title-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: url('../images/pattern.png');
    opacity: 0.1;
    z-index: 1;
}

.page-title-section .section-header {
    position: relative;
    z-index: 2;
}

.section-header h1 {
    font-weight: 700;
    margin-bottom: 20px;
    color: #fff;
}

.section-divider {
    height: 4px;
    width: 80px;
    background-color: var(--secondary-color);
    margin: 0 auto;
}

/* تنسيقات breadcrumb */
.breadcrumb-container {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    padding: 10px 20px;
    display: inline-flex;
    margin-top: 20px;
}

.breadcrumb {
    margin-bottom: 0;
    padding: 0;
    background-color: transparent;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-item.active {
    color: #fff;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "\f054";
    font-family: "bootstrap-icons";
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.7rem;
    margin-top: 2px;
}

/* تنسيقات قسم الفلترة */
.filter-section {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 20px 0;
    margin-bottom: 40px;
}

.filter-section .form-control {
    border-radius: 30px;
    padding: 10px 20px;
    border: 1px solid #ced4da;
}

.filter-section .btn {
    border-radius: 30px;
    padding: 10px 20px;
    font-weight: 600;
}

.filter-section .btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.filter-section .btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
}

/* تنسيقات قسم الوثائق */
.documents-section {
    padding: 60px 0;
}

.section-padding {
    padding: 60px 0;
}

/* تنسيقات بطاقات الوثائق */
.document-card {
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

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

.document-header {
    padding: 25px;
    text-align: center;
    position: relative;
    background: linear-gradient(135deg, var(--primary-color), var(--dark-color));
    color: #fff;
    border-radius: 15px 15px 0 0;
    overflow: hidden;
}

.document-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    transform: rotate(45deg);
    pointer-events: none;
    animation: shimmer 3s infinite linear;
}

.document-header h4 {
    margin-top: 10px;
    font-size: 1rem;
    font-weight: 500;
    opacity: 0.8;
}

@keyframes shimmer {
    0% { transform: rotate(45deg) translateX(-100%); }
    100% { transform: rotate(45deg) translateX(100%); }
}

.document-icon {
    width: 80px;
    height: 80px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    transition: all 0.3s ease;
}

.document-card:hover .document-icon {
    transform: scale(1.1);
    background-color: rgba(255, 255, 255, 0.3);
}

.document-icon i {
    font-size: 2.5rem;
    color: #fff;
}

.document-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.document-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--dark-color);
    position: relative;
    padding-bottom: 15px;
    text-align: center;
}

.document-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background-color: var(--secondary-color);
    transition: width 0.3s ease;
}

.document-card:hover .document-title::after {
    width: 80px;
}

.document-description {
    color: #6c757d;
    margin-bottom: 20px;
    flex-grow: 1;
    text-align: center;
    line-height: 1.6;
}

.document-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: #6c757d;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.document-meta span {
    display: inline-flex;
    align-items: center;
}

.document-meta i {
    margin-left: 5px;
    color: var(--secondary-color);
}

.document-actions {
    text-align: center;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 25px;
    background-color: var(--primary-color);
    color: #fff;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid var(--primary-color);
    width: 100%;
}

.download-btn:hover {
    background-color: transparent;
    color: var(--primary-color);
    transform: translateY(-3px);
}

.download-btn i {
    margin-right: 8px;
    transition: transform 0.3s ease;
}

.download-btn:hover i {
    transform: translateY(-2px);
}

/* تنسيقات الشارات */
.document-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: var(--secondary-color);
    color: #fff;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 2;
    display: inline-flex;
    align-items: center;
}

.document-badge::before {
    content: '\f5a0';
    font-family: "bootstrap-icons";
    margin-left: 5px;
    font-size: 0.9rem;
}

/* تنسيقات التحميل */
.download-count {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
    color: #6c757d;
    font-size: 0.9rem;
}

.download-count i {
    margin-left: 5px;
    color: var(--secondary-color);
}

/* تأثير تحديث العداد */
@keyframes highlight {
    0% { color: var(--secondary-color); transform: scale(1); }
    50% { color: var(--primary-color); transform: scale(1.2); }
    100% { color: #6c757d; transform: scale(1); }
}

.highlight-count {
    animation: highlight 1.5s ease;
}

/* تنسيقات الرسائل */
.alert-custom {
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    border: none;
    background-color: rgba(23, 162, 184, 0.1);
    color: #17a2b8;
    display: flex;
    align-items: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.alert-custom i {
    font-size: 2rem;
    margin-left: 15px;
    color: #17a2b8;
}

.alert-custom h5 {
    font-weight: 600;
    color: #17a2b8;
}

.alert-custom p {
    margin-bottom: 0;
    color: #4a4a4a;
}

/* تنسيقات للأجهزة المحمولة */
@media (max-width: 767px) {
    .section-padding {
        padding: 40px 0;
    }
    
    .document-header {
        padding: 20px;
    }
    
    .document-icon {
        width: 60px;
        height: 60px;
    }
    
    .document-icon i {
        font-size: 1.8rem;
    }
    
    .document-content {
        padding: 20px;
    }
    
    .document-title {
        font-size: 1.1rem;
    }
    
    .document-description {
        font-size: 0.9rem;
    }
}

/* تأثيرات الظهور */
[data-aos] {
    opacity: 0;
    transition-property: opacity, transform;
}

[data-aos].aos-animate {
    opacity: 1;
}

[data-aos="fade-up"] {
    transform: translateY(30px);
}

[data-aos="fade-up"].aos-animate {
    transform: translateY(0);
}

/* تنسيقات معاينة المستندات */
.document-preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.document-preview-content {
    background-color: #fff;
    border-radius: 10px;
    width: 90%;
    max-width: 900px;
    height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.document-preview-header {
    padding: 15px 20px;
    background-color: var(--primary-color);
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.document-preview-header h4 {
    margin: 0;
    font-size: 1.2rem;
}

.close-preview {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: all 0.3s ease;
}

.close-preview:hover {
    transform: scale(1.2);
}

.document-preview-body {
    flex-grow: 1;
    overflow: auto;
    padding: 0;
    background-color: #f5f5f5;
}

.document-preview-body iframe {
    border: none;
    width: 100%;
    height: 100%;
}

.document-preview-body img {
    max-width: 100%;
    max-height: 100%;
    display: block;
    margin: 0 auto;
    object-fit: contain;
}

.document-preview-footer {
    padding: 15px 20px;
    background-color: #f8f9fa;
    border-top: 1px solid #eee;
    text-align: center;
}

.download-btn-sm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 20px;
    background-color: var(--primary-color);
    color: #fff;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid var(--primary-color);
}

.download-btn-sm:hover {
    background-color: transparent;
    color: var(--primary-color);
}

.download-btn-sm i {
    margin-right: 8px;
}

/* تنسيقات إضافية للفلترة */
.input-focused {
    transform: translateY(-3px);
    transition: transform 0.3s ease;
}

.fade-transition {
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

/* تنسيقات للصور المصغرة للملفات */
.document-thumbnail {
    position: absolute;
    bottom: 15px;
    left: 15px;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
}

.document-thumbnail:hover {
    transform: scale(1.1);
    background-color: rgba(255, 255, 255, 0.3);
}

.document-thumbnail i {
    font-size: 1.2rem;
    color: #fff;
}
