/* ==========================================
   الستايلات العامة والهيرو سيكشن
========================================== */
.page-header {
    position: relative;
    height: 350px;
    width: 100%;
    /* تم نقل background-image للـ HTML للحفاظ على الديناميكية */
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    padding-top: 80px;
}

.page-header::before { 
    content: ''; 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(0, 0, 0, 0.7); 
}

.page-header-content { 
    position: relative; 
    z-index: 2; 
    width: 80%; 
}

.breadcrumb { 
    background: transparent; 
    padding: 0; 
    justify-content: center; 
    margin-bottom: 0; 
}

.breadcrumb-item a { 
    color: #ccc; 
    text-decoration: none; 
}

.breadcrumb-item.active { 
    color: #fff; 
}

.breadcrumb-item + .breadcrumb-item::before { 
    color: #ccc; 
}

/* ==========================================
   تنسيقات الصناديق الأساسية والودجات
========================================== */
.project-content-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.03);
    border: 1px solid #eee;
    padding: 30px;
    margin-bottom: 30px;
}

.sidebar-widget {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.03);
    border: 1px solid #eee;
    padding: 25px;
    margin-bottom: 25px;
}

/* ==========================================
   فئة التميز (المشروع / صاحب المشروع / العروض)
========================================== */
.is-featured {
    border: 2px solid #ffc107 !important;
    position: relative;
    overflow: hidden; 
}

.featured-ribbon {
    position: absolute;
    top: 23px;
    background: #ffc107;
    color: #000;
    padding: 5px 40px;
    font-weight: 900;
    font-size: 0.95rem;
    z-index: 10;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    
    /* افتراضي للغة العربية (RTL) */
    left: -35px;
    transform: rotate(-45deg);
}

/* تعديل الاتجاه للغة الإنجليزية (LTR) */
html[dir="ltr"] .featured-ribbon {
    left: auto;
    right: -35px;
    transform: rotate(45deg);
}

.featured-proposal { 
    background-color: #fffbf2; 
    border-radius: 10px; 
    padding: 20px !important; 
    margin-bottom: 15px; 
}

/* ==========================================
   الصور الرمزية (Avatars) والتفاصيل
========================================== */
.project-avatar-lg {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #eee;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.client-avatar { 
    width: 80px; 
    height: 80px; 
    border-radius: 50%; 
    object-fit: cover; 
    margin-bottom: 10px; 
    border: 3px solid #fff; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.1); 
    transition: 0.3s; 
}

.client-avatar:hover { 
    transform: scale(1.05); 
}

.freelancer-thumb { 
    width: 60px; 
    height: 60px; 
    border-radius: 50%; 
    object-fit: cover; 
    border: 2px solid #fff; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.1); 
}

/* ==========================================
   كارت المشاركة والـ QR
========================================== */
.social-share-btns { 
    display: flex; 
    justify-content: center; 
    gap: 10px; 
    margin-bottom: 20px; 
}

.social-share-btns a { 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    width: 45px; 
    height: 45px; 
    border-radius: 8px; 
    background: #f8f9fa; 
    text-decoration: none; 
    transition: 0.3s; 
    font-size: 1.2rem; 
}

.social-share-btns a.wa { color: #25D366; } 
.social-share-btns a.in { color: #0077B5; } 
.social-share-btns a.tw { color: #1DA1F2; } 
.social-share-btns a.fb { color: #1877F2; }

.social-share-btns a:hover { 
    background: #e9ecef; 
    transform: translateY(-2px); 
}

.qr-box-container { 
    border: 1px solid #eaedf1; 
    padding: 10px; 
    border-radius: 12px; 
    display: inline-block; 
    background: #fff; 
    margin-bottom: 15px; 
}

.qr-box-container img { 
    width: 140px; 
    height: 140px; 
}

/* ==========================================
   الشارات والملحقات
========================================== */
.project-desc { 
    line-height: 1.8; 
    color: #555; 
    font-size: 1rem; 
}

.skill-tag {
    display: inline-block;
    background-color: #f0f2f5;
    color: #555;
    padding: 8px 15px;
    border-radius: 5px;
    font-size: 0.9rem;
    transition: 0.3s;
    
    /* افتراضي للغة العربية (RTL) */
    margin: 0 0 10px 10px;
}

/* تعديل الاتجاه للغة الإنجليزية (LTR) */
html[dir="ltr"] .skill-tag {
    margin: 0 10px 10px 0;
}

.skill-tag:hover { 
    background-color: var(--primary-color); 
    color: #fff; 
}

.attachment-item {
    display: flex; 
    align-items: center; 
    background: #fdfdfd; 
    border: 1px dashed #ccc;
    padding: 10px 15px; 
    border-radius: 8px; 
    margin-bottom: 10px; 
    color: #555;
    text-decoration: none; 
    transition: 0.3s;
}

.attachment-item:hover { 
    background: color-mix(in srgb, var(--primary-color) 3%, transparent) !important; 
    border-color: var(--primary-color); 
    color: var(--primary-color); 
}

/* ==========================================
   قائمة العروض (Proposals)
========================================== */
.proposal-item { 
    border-bottom: 1px solid #eee; 
    padding: 20px; 
    transition: 0.3s; 
}

.proposal-item:last-child { 
    border-bottom: none; 
}

.widget-label { 
    font-size: 0.9rem; 
    color: #777; 
    display: block; 
    margin-bottom: 5px; 
}

.widget-value { 
    font-size: 1.1rem; 
    font-weight: 700; 
    color: var(--dark-color); 
    display: block; 
    margin-bottom: 20px; 
}

/* ==========================================
   حالة المشروع (Status) والتلميحات (Tooltips)
========================================== */
.status-badge { 
    display: inline-block; 
    padding: 5px 15px; 
    border-radius: 20px; 
    font-size: 0.85rem; 
    font-weight: bold; 
}

.status-open { 
    background-color: #d1e7dd; 
    color: #0f5132; 
}

.status-closed { 
    background-color: #f8d7da; 
    color: #842029; 
}

.category-badge { 
    color: #fff; 
    /* لون الخلفية تم نقله للـ HTML للعمل بشكل ديناميكي */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1); 
}

.tooltip-inner { 
    max-width: 250px; 
    
    /* افتراضي للغة العربية (RTL) */
    text-align: right; 
}

/* تعديل الاتجاه للغة الإنجليزية (LTR) */
html[dir="ltr"] .tooltip-inner {
    text-align: left;
}

/* ==========================================
   تنسيقات نافذة الرسائل (Modal)
========================================== */
.custom-popup-modal { 
    display: none; 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(0,0,0,0.6); 
    backdrop-filter: blur(4px); 
    justify-content: center; 
    align-items: center; 
    z-index: 1000;
}

.custom-popup-modal .modal-content { 
    background: #fff; 
    padding: 30px; 
    border-radius: 12px; 
    width: 450px; 
    max-width: 90%; 
    position: relative; 
}

.custom-popup-modal .close-btn { 
    position: absolute; 
    top: 15px; 
    cursor: pointer; 
    font-size: 24px; 
    color: #888; 

    /* افتراضي للغة العربية (RTL) */
    left: 20px; 
}

/* تعديل الاتجاه للغة الإنجليزية (LTR) تلقائياً */
html[dir="ltr"] .custom-popup-modal .close-btn {
    left: auto;
    right: 20px;
}

.custom-popup-modal textarea { 
    width: 100%; 
    height: 100px; 
    margin-top: 15px; 
    padding: 15px; 
    border: 1px solid #ddd; 
    border-radius: 8px; 
    resize: none; 
    box-sizing: border-box; 
    font-family: inherit;
}

.custom-popup-modal .file-upload-box { 
    display: block; 
    border: 2px dashed #0000005c; 
    padding: 20px; 
    text-align: center; 
    border-radius: 10px; 
    cursor: pointer; 
    margin-top: 15px; 
    background: #f8fbff;
}

.custom-popup-modal .file-upload-box:hover { 
    background: #eef5ff; 
}

.custom-popup-modal .files-preview-area { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 10px; 
    margin-top: 10px; 
}

.custom-popup-modal .preview-item { 
    position: relative; 
    background: #eee; 
    padding: 5px; 
    border-radius: 8px; 
    display: flex; 
    align-items: center; 
    gap: 5px; 
    font-size: 12px;
}

.custom-popup-modal .preview-item img { 
    width: 40px; 
    height: 40px; 
    border-radius: 4px; 
    object-fit: cover; 
}

.custom-popup-modal .remove-file { 
    position: absolute; 
    top: -5px; 
    right: -5px; 
    background: red; 
    color: white; 
    border-radius: 50%; 
    width: 18px; 
    height: 18px; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    cursor: pointer; 
    font-size: 10px;
}

.custom-popup-modal .progress-container { 
    display: none; 
    background: #ddd; 
    width: 100%; 
    height: 5px; 
    border-radius: 3px; 
    margin-top: 10px; 
    overflow: hidden;
}

.custom-popup-modal .progress-bar { 
    height: 100%; 
    background: #000000; 
    width: 0%; 
    transition: 0.2s;
}

/* ==========================================
   إصلاح محاذاة القوائم وصور العروض (RTL/LTR)
========================================== */

/* افتراضي للغة العربية (RTL) */
.list-unstyled.text-start.small.text-muted.border-top.pt-3 li { 
    text-align: right; 
}

.fw-bold.mb-3.text-start.border-bottom.pb-2 { 
    text-align: right !important; 
}

.freelancer-thumb.me-3 { 
    margin-left: 1rem !important; 
    margin-right: 0 !important; 
}

/* تعديل الاتجاه للغة الإنجليزية (LTR) */
html[dir="ltr"] .list-unstyled.text-start.small.text-muted.border-top.pt-3 li { 
    text-align: left; 
}

html[dir="ltr"] .fw-bold.mb-3.text-start.border-bottom.pb-2 { 
    text-align: left !important; 
}

html[dir="ltr"] .freelancer-thumb.me-3 { 
    margin-right: 1rem !important; 
    margin-left: 0 !important; 
}

.project-content-card.is-featured.aos-init.aos-animate {
  border: 1px solid #eee !important;
}
.sidebar-widget.text-center.is-featured.aos-init.aos-animate {
  border: 1px solid #eee !important;
}

.badge.bg-info.text-dark.p-2, .badge.bg-danger.p-2 {
  background-color: color-mix(in srgb, var(--secondary-color) 5%, transparent) !important;
  color: var(--secondary-color) !important;
  border: 1px solid color-mix(in srgb, var(--secondary-color) 40%, transparent) !important;
}


.fas.fa-map-marker-alt::before {
  color: var(--secondary-color);
}
.fas.fa-calendar-alt::before {
  color: var(--secondary-color);
}


.far.fa-clock.me-1::before {
  color: var(--secondary-color);
}