/**
 * خدمة أونلاين - ملف CSS الرئيسي
 * Main Stylesheet
 */

/* ==================== المتغيرات العامة ==================== */
:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --dark-color: #343a40;
    --light-color: #f8f9fa;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 5px 20px rgba(0, 0, 0, 0.15);
}

/* ==================== إعدادات عامة ==================== */
body {
    font-family: 'Cairo', sans-serif !important;
    background-color: #f8f9fa !important;
    line-height: 1.6 !important;
    direction: rtl !important;
    text-align: right !important;
}

/* ==================== Navbar ==================== */
.navbar-brand {
    font-size: 1.5rem !important;
    font-weight: bold !important;
}

.navbar-brand i {
    color: var(--primary-color) !important;
}

.nav-link {
    font-weight: 500 !important;
    padding: 0.5rem 1rem !important;
}

/* ==================== Hero Section ==================== */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    padding: 80px 0 !important;
    position: relative !important;
    overflow: hidden !important;
}

.hero-section h1 {
    color: white !important;
    font-size: 3rem !important;
    font-weight: bold !important;
    margin-bottom: 1.5rem !important;
}

.hero-section .lead {
    color: white !important;
    font-size: 1.2rem !important;
    margin-bottom: 2rem !important;
}

.hero-section .badge {
    background-color: white !important;
    color: #333 !important;
    padding: 0.5rem 1rem !important;
    font-weight: 500 !important;
}

.search-form .input-group {
    border-radius: 50px !important;
    overflow: hidden !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2) !important;
}

.search-form .form-control {
    border: none !important;
    padding: 1rem 1.5rem !important;
    font-size: 1.1rem !important;
}

.search-form .btn {
    padding: 1rem 2.5rem !important;
    font-weight: bold !important;
}

/* ==================== الإحصائيات ==================== */
.stats-section {
    background-color: white !important;
    border-bottom: 1px solid #e0e0e0 !important;
}

.stat-item h3 {
    color: var(--primary-color) !important;
    font-size: 2.5rem !important;
    margin-bottom: 0.5rem !important;
}

.stat-item p {
    color: #6c757d !important;
    font-size: 0.95rem !important;
}

/* ==================== Section Headers ==================== */
.section-header h2 {
    font-weight: bold !important;
    color: #212529 !important;
    position: relative !important;
    display: inline-block !important;
    padding-bottom: 15px !important;
}

.section-header h2::after {
    content: '' !important;
    position: absolute !important;
    bottom: 0 !important;
    right: 50% !important;
    transform: translateX(50%) !important;
    width: 60px !important;
    height: 3px !important;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%) !important;
    border-radius: 2px !important;
}

/* ==================== البطاقات ==================== */
.card {
    border-radius: 12px !important;
    border: 1px solid #e0e0e0 !important;
    transition: all 0.3s ease !important;
}

.hover-shadow:hover {
    box-shadow: var(--shadow-hover) !important;
    transform: translateY(-5px) !important;
}

/* ==================== بطاقة التصنيف ==================== */
.category-card .card {
    border: 2px solid transparent !important;
    transition: all 0.3s ease !important;
}

.category-card:hover .card {
    border-color: var(--primary-color) !important;
}

.category-icon {
    width: 80px !important;
    height: 80px !important;
    margin: 0 auto 1rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%) !important;
    border-radius: 50% !important;
}

.category-icon i {
    color: var(--primary-color) !important;
}

/* ==================== بطاقة الخدمة ==================== */
.service-card {
    overflow: hidden !important;
}

.service-card img {
    transition: transform 0.3s ease !important;
    height: 200px !important;
    object-fit: cover !important;
}

.service-card:hover img {
    transform: scale(1.1) !important;
}

.service-card .card-title a {
    color: #212529 !important;
    text-decoration: none !important;
    transition: color 0.3s ease !important;
}

.service-card .card-title a:hover {
    color: var(--primary-color) !important;
}

.service-card .rating i {
    color: #ffc107 !important;
    font-size: 0.9rem !important;
}

.service-card .price h6 {
    color: var(--primary-color) !important;
    font-weight: bold !important;
}

/* ==================== بطاقة المشروع ==================== */
.project-card {
    transition: all 0.3s ease !important;
}

.project-card:hover {
    border-color: var(--primary-color) !important;
}

.project-card .card-title a {
    color: #212529 !important;
    text-decoration: none !important;
    transition: color 0.3s ease !important;
}

.project-card .card-title a:hover {
    color: var(--primary-color) !important;
}

.project-meta {
    border-top: 1px solid #dee2e6 !important;
    padding-top: 1rem !important;
    margin-top: 1rem !important;
}

.project-card .budget h6 {
    color: var(--primary-color) !important;
    font-weight: bold !important;
}

/* ==================== الشارات ==================== */
.badge {
    font-weight: 500 !important;
    padding: 0.4rem 0.8rem !important;
    border-radius: 20px !important;
}

/* ==================== الأزرار ==================== */
.btn {
    border-radius: 8px !important;
    padding: 0.6rem 1.5rem !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%) !important;
    border: none !important;
    color: white !important;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4) !important;
}

.btn-warning {
    background-color: var(--warning-color) !important;
    border: none !important;
    color: #000 !important;
}

.btn-warning:hover {
    background-color: #ffca2c !important;
    transform: translateY(-2px) !important;
}

.btn-outline-primary {
    border: 2px solid var(--primary-color) !important;
    color: var(--primary-color) !important;
    background: transparent !important;
}

.btn-outline-primary:hover {
    background: var(--primary-color) !important;
    color: white !important;
    transform: translateY(-2px) !important;
}

.btn-lg {
    padding: 0.8rem 2rem !important;
    font-size: 1.1rem !important;
}

/* ==================== كيف يعمل الموقع ==================== */
.step-icon .bg-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%) !important;
}

/* ==================== CTA Section ==================== */
.cta-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    padding: 60px 0 !important;
}

.cta-section h2,
.cta-section p {
    color: white !important;
}

/* ==================== Footer ==================== */
footer {
    background-color: #2c3e50 !important;
    color: white !important;
}

footer h5,
footer h6 {
    color: white !important;
    font-weight: 600 !important;
}

footer a {
    color: rgba(255, 255, 255, 0.7) !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
}

footer a:hover {
    color: white !important;
    padding-right: 5px !important;
}

.social-links a {
    display: inline-block !important;
    width: 40px !important;
    height: 40px !important;
    line-height: 40px !important;
    text-align: center !important;
    background-color: rgba(255, 255, 255, 0.1) !important;
    border-radius: 50% !important;
    transition: all 0.3s ease !important;
    margin: 0 0.3rem !important;
}

.social-links a:hover {
    background-color: var(--primary-color) !important;
    transform: translateY(-3px) !important;
}

/* ==================== Service Card Fix ==================== */
.latest-services .row.g-4 {
    display: flex !important;
    flex-wrap: wrap !important;
}

.latest-services .row.g-4 > div[class*='col-'] {
    display: flex !important;
}

.latest-services .service-card {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    height: 100% !important;
}

.latest-services .service-card .position-relative {
    height: 200px !important;
    flex-shrink: 0 !important;
}

.latest-services .service-card .card-body {
    flex: 1 1 auto !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
}

.latest-services .service-card .card-title {
    min-height: 48px !important;
    max-height: 48px !important;
    margin-bottom: 1rem !important;
}

.latest-services .service-card .mt-auto {
    margin-top: auto !important;
}

.latest-services .service-card .card-footer {
    flex-shrink: 0 !important;
    height: auto !important;
}

/* ==================== Mega Menu ==================== */
.mega-menu {
    min-width: 800px !important;
    max-height: 500px !important;
    overflow-y: auto !important;
}

.mega-menu .dropdown-item {
    white-space: normal !important;
    padding: 0.5rem 1rem !important;
    border-radius: 6px !important;
    transition: all 0.2s ease !important;
}

.mega-menu .dropdown-item:hover {
    background-color: rgba(102, 126, 234, 0.1) !important;
    transform: translateX(-5px) !important;
}

.mega-menu .dropdown-item i {
    width: 20px !important;
    font-size: 0.9rem !important;
}

/* ==================== Responsive ==================== */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem !important;
    }
    
    .hero-section .lead {
        font-size: 1rem !important;
    }
    
    .stat-item h3 {
        font-size: 2rem !important;
    }
}

@media (max-width: 576px) {
    .hero-section h1 {
        font-size: 1.5rem !important;
    }
    
    .category-icon {
        width: 60px !important;
        height: 60px !important;
    }
    
    .category-icon i {
        font-size: 2rem !important;
    }
}

@media (max-width: 992px) {
    .mega-menu {
        min-width: 100% !important;
        max-height: 400px !important;
    }
}

/* ==================== Freelancer Card ==================== */
.freelancer-card {
    transition: all 0.3s ease !important;
}

.freelancer-card:hover {
    transform: translateY(-10px) !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15) !important;
}

.freelancer-card .card-title a {
    transition: color 0.3s ease !important;
}

.freelancer-card .card-title a:hover {
    color: var(--primary-color) !important;
}

/* ==================== Freelancer Profile ==================== */
.freelancer-profile .card {
    transition: all 0.3s ease !important;
}

.freelancer-profile .rating i {
    font-size: 1.2rem !important;
}

/* ==================== Portfolio ==================== */
.portfolio-item {
    transition: all 0.3s ease !important;
}

.portfolio-item:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15) !important;
}

/* ==================== Categories Page ==================== */
.categories-header {
    position: relative !important;
    overflow: hidden !important;
}

.category-section {
    background: #fff !important;
    border-radius: 15px !important;
    padding: 30px !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05) !important;
}

.category-header {
    border-bottom: 3px solid #f0f0f0 !important;
    padding-bottom: 20px !important;
}

.category-main-icon {
    width: 80px !important;
    height: 80px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%) !important;
    border-radius: 20px !important;
    color: var(--primary-color) !important;
}

.category-header h3 {
    font-size: 1.8rem !important;
    font-weight: 700 !important;
}

.category-header h3 a:hover {
    color: var(--primary-color) !important;
}

.subcategory-card {
    transition: all 0.3s ease !important;
    cursor: pointer !important;
    border-radius: 10px !important;
}

.subcategory-card:hover {
    border-color: var(--primary-color) !important;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2) !important;
    transform: translateY(-3px) !important;
}

.subcategory-card .card-body {
    padding: 15px !important;
}

.subcategory-card:hover span {
    color: var(--primary-color) !important;
}

.subcategory-card i {
    font-size: 0.9rem !important;
    transition: transform 0.3s ease !important;
}

.subcategory-card:hover i {
    transform: translateX(-5px) !important;
}

/* Responsive */
@media (max-width: 768px) {
    .category-header {
        flex-direction: column !important;
        text-align: center !important;
    }
    
    .category-main-icon {
        margin: 0 auto 20px !important;
    }
    
    .category-header .btn {
        margin-top: 15px !important;
        width: 100% !important;
    }
}