/* ==========================================
   الستايلات العامة والهيرو سيكشن
========================================== */
.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.6); 
}

.page-header-content { 
    position: relative; 
    z-index: 2; 
}

.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; 
}

/* ==========================================
   السايد بار والودجات (الفلاتر)
========================================== */
.sidebar-widget { 
    background: #fff; 
    padding: 20px; 
    border-radius: 12px; 
    box-shadow: 0 2px 15px rgba(0,0,0,0.03); 
    margin-bottom: 25px; 
    border: 1px solid #eee; 
}

.widget-title { 
    font-weight: 700; 
    margin-bottom: 20px; 
    padding-bottom: 10px; 
    border-bottom: 2px solid #f1f1f1; 
    position: relative; 
}

/* وضع افتراضي لخط المؤشر باللغة العربية (RTL) */
.widget-title::after { 
    content: ''; 
    position: absolute; 
    bottom: -2px; 
    right: 0; 
    width: 50px; 
    height: 2px; 
    background: var(--primary-color, #0d6efd); 
}

/* تعديل الاتجاه للغة الإنجليزية (LTR) تلقائياً */
html[dir="ltr"] .widget-title::after {
    right: auto;
    left: 0;
}

.filter-label { 
    font-weight: bold; 
    margin-bottom: 8px; 
    font-size: 0.9rem; 
    display: block; 
}

/* ==========================================
   بطاقة المستقلين (Freelancer Card)
========================================== */
.freelancer-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #eee;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.freelancer-card:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 10px 25px rgba(0,0,0,0.08); 
    border-color: var(--primary-color, #0d6efd); 
}

.avatar-container { 
    position: relative; 
    width: 90px; 
    height: 90px; 
    margin: 0 auto 15px; 
}

.freelancer-avatar { 
    width: 100%; 
    height: 100%; 
    border-radius: 50%; 
    object-fit: cover; 
    border: 3px solid #f8f9fa; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.1); 
}

.freelancer-name { 
    font-weight: 700; 
    font-size: 1.1rem; 
    margin-bottom: 5px; 
    color: var(--dark-color, #212529); 
}

.verified-badge { 
    color: #1da1f2; 
    font-size: 0.9rem; 
    margin-right: 5px; 
}

.freelancer-title { 
    color: #777; 
    font-size: 0.9rem; 
    margin-bottom: 10px; 
}

/* تقييم المستقل بدقة */
.freelancer-rating { 
    color: #ffc107; 
    font-size: 0.95rem; 
    margin-bottom: 15px; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    gap: 2px; 
}

.empty-star-color {
    color: #e4e5e9;
}

.skills-container { 
    margin-bottom: 15px; 
    flex-grow: 1; 
}

.skill-badge { 
    display: inline-block; 
    background: #f1f3f5; 
    color: #555; 
    padding: 4px 10px; 
    border-radius: 15px; 
    font-size: 0.75rem; 
    margin: 2px; 
}

.freelancer-footer { 
    border-top: 1px solid #f4f4f4; 
    padding-top: 15px; 
    margin-top: 10px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}

.hourly-rate { 
    font-weight: 800; 
    color: var(--primary-color, #0d6efd); 
    font-size: 1.1rem; 
}

.hourly-rate span { 
    font-size: 0.8rem; 
    color: #777; 
    font-weight: 400; 
}

/* ==========================================
   التنسيقات للمستقل المميز (Featured Badge)
========================================== */
.featured-badge { 
    position: absolute; 
    top: 15px; 
    background: #ffc107; 
    color: #000; 
    padding: 5px 35px; 
    font-size: 0.8rem; 
    font-weight: bold; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.2); 
    z-index: 3; 
    
    /* افتراضي للغة العربية (RTL) */
    left: -30px; 
    transform: rotate(-45deg); 
}

/* تعديل الاتجاه للغة الإنجليزية (LTR) تلقائياً */
html[dir="ltr"] .featured-badge {
    left: auto;
    right: -30px;
    transform: rotate(45deg);
}

.featured-freelancer-card { 
    border: 2px solid #ffc107 !important; 
    box-shadow: 0 5px 20px rgba(255, 193, 7, 0.12); 
}

.featured-freelancer-card:hover { 
    border-color: #ffb300 !important; 
    box-shadow: 0 8px 25px rgba(255, 193, 7, 0.25); 
}

/* ==========================================
   التقسيم (Pagination)
========================================== */
.pagination .page-link { 
    color: #333; 
    border: none; 
    margin: 0 3px; 
    border-radius: 5px; 
}

.pagination .page-item.active .page-link { 
    background-color: var(--primary-color, #0d6efd); 
    color: white; 
}

/* ==========================================
   النوافذ المنبثقة (Modals)
========================================== */
.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;
}

.modal-content { 
    background: #fff; 
    padding: 30px; 
    border-radius: 12px; 
    width: 450px; 
    max-width: 90%; 
    position: relative; 
}

.close-btn { 
    position: absolute; 
    top: 15px; 
    cursor: pointer; 
    font-size: 24px; 
    color: #888; 
    
    /* افتراضي للغة العربية (RTL) */
    left: 20px; 
}

/* تعديل الاتجاه للغة الإنجليزية (LTR) تلقائياً */
html[dir="ltr"] .close-btn {
    left: auto;
    right: 20px;
}

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-hire-select {
    width: 100%; 
    margin-top: 15px; 
    padding: 10px; 
    border: 1px solid #ddd; 
    border-radius: 8px; 
    font-family: inherit;
}

/* ==========================================
   رفع الملفات ومعاينتها (Upload Area)
========================================== */
.file-upload-box { 
    display: block; 
    border: 2px dashed #0000005c; 
    padding: 20px; 
    text-align: center; 
    border-radius: 10px; 
    cursor: pointer; 
    margin-top: 15px; 
    background: #f8fbff;
}

.file-upload-box:hover { 
    background: #eef5ff; 
}

.upload-icon-size {
    font-size: 24px;
}

.files-preview-area { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 10px; 
    margin-top: 10px; 
}

.preview-item { 
    position: relative; 
    background: #eee; 
    padding: 5px; 
    border-radius: 8px; 
    display: flex; 
    align-items: center; 
    gap: 5px; 
    font-size: 12px;
}

.preview-item img { 
    width: 40px; 
    height: 40px; 
    border-radius: 4px; 
    object-fit: cover; 
}

.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;
}

.progress-container { 
    display: none; 
    background: #ddd; 
    width: 100%; 
    height: 5px; 
    border-radius: 3px; 
    margin-top: 10px; 
    overflow: hidden;
}

.progress-bar { 
    height: 100%; 
    background: #000000; 
    width: 0%; 
    transition: 0.2s;
}

#response-msg, #hire-response-msg { 
    margin-top: 15px; 
    text-align: center; 
    font-weight: bold; 
}

/* ==========================================
   أزرار المودال والتحكم (Buttons)
========================================== */
.btn.open-modal-btn.btn-outline-dark.rounded-pill.px-3,
.btn.open-hire-modal-btn.btn-primary.rounded-pill.px-3.py-2.fw-bold {
    padding: 10px !important;
    font-size: 14px;
}

.form-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: none;
    padding-left: 10px;
    padding-right: 10px;
}

.freelancer-card.featured-freelancer-card {
  border: 1px solid #eee !important;
  box-shadow: 0 5px 20px rgba(255, 193, 7, 0) !important;
}
.freelancer-card.featured-freelancer-card:hover {
  border-color: var(--primary-color, #0d6efd) !important;
}