﻿/* ===== ServanexoPlatform – Home (dark glass, Bootstrap 5) ===== */

/* 0) أساس الصفحة */
.hero-section,
.stats-section,
.services-section,
.testimonials-section {
    --surface: #0f172a;
    --text: #e8eef7;
    --muted: #9aa4b2;
    --bs-body-color: var(--text);
    --bs-secondary-color: var(--muted);
    --bs-heading-color: #fff;
}

:root {
    --primary: #3b82f6; /* لو غيرتها عالمشروع سيتبعها اللمعان */
}

.fw-800 {
    font-weight: 800;
}

/* ===== هيرو ===== */
.hero-section {
    padding-top: calc(var(--header-h, 60px) + 24px);
    padding-bottom: 40px;
    background: radial-gradient(1200px 420px at 0% -10%, color-mix(in srgb, var(--primary) 32%, transparent), transparent), linear-gradient(180deg, color-mix(in srgb, var(--primary) 22%, transparent), transparent);
}

.text-hero {
    color: #fff;
}

.text-muted-hero {
    color: var(--muted);
    margin-bottom: 1rem;
}

.hero-image {
    box-shadow: 0 24px 60px rgba(2,6,23,.45);
    border-radius: 18px;
}

/* أزرار الهيرو */
.hero-section .btn {
    border-radius: 14px;
    font-weight: 800;
}

.hero-section .btn-outline-light {
    border-color: rgba(255,255,255,.35);
    background: rgba(255,255,255,.06);
    color: #fff;
}

    .hero-section .btn-outline-light:hover {
        background: color-mix(in srgb, var(--primary) 18%, transparent);
        border-color: color-mix(in srgb, var(--primary) 45%, transparent);
    }

/* ===== الإحصائيات ===== */
.stats-section {
    padding: 22px 0 8px;
}

.stat-box {
    --box-bg-fallback: rgba(15,23,42,.92);
    background: color-mix(in srgb, var(--surface) 90%, transparent);
    color: var(--text);
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 18px;
    box-shadow: 0 18px 40px rgba(2,6,23,.35);
    padding: 22px;
}

.stat-value {
    color: #7fb5ff;
    font-weight: 800;
    margin: 0;
    font-size: clamp(28px, 4.2vw, 44px);
}

.stat-label {
    color: var(--muted);
    margin: 8px 0 0;
}

/* ===== عناوين الأقسام ===== */
.section-header .section-title {
    color: #fff;
    font-weight: 800;
    letter-spacing: .2px;
}

.section-header .section-subtitle {
    color: var(--muted);
}

/* ===== أقسام البطاقات ===== */
.services-section {
    padding: 36px 0;
}

/* ===== قاعدة زجاجية موحّدة للبطاقات ===== */
.card-glass,
.service-card,
.project-card,
.product-card,
.freelancer-card {
    --svx-bg-fallback: rgba(15,23,42,.96);
    --bs-card-bg: color-mix(in srgb, var(--surface) 94%, transparent);
    --bs-card-border-color: rgba(255,255,255,.10);
    --bs-card-border-radius: 18px;
    background-color: var(--bs-card-bg) !important;
    color: var(--bs-body-color) !important;
    border-color: var(--bs-card-border-color) !important;
    border-radius: var(--bs-card-border-radius) !important;
    box-shadow: 0 24px 60px rgba(2,6,23,.45);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

    .card-glass .card-body,
    .service-card .card-body,
    .project-card .card-body,
    .product-card .card-body,
    .freelancer-card .card-body {
        background: transparent !important;
        display: flex;
        flex-direction: column;
    }

/* ===== حاويات الوسائط بنسب ثابتة ===== */
.media-16x9,
.media-1x1 {
    position: relative;
    width: 100%;
    background: #0b1220;
    border-bottom: 1px solid rgba(255,255,255,.08);
    overflow: hidden;
}

.media-16x9 {
    aspect-ratio: 16 / 9;
}

.media-1x1 {
    aspect-ratio: 1 / 1;
}

.media-embed {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 0;
    display: block;
}

/* ===== شارات أعلى البطاقات ===== */
.badge-ribbon {
    position: absolute;
    top: 12px;
    inset-inline-end: 12px;
    border-radius: 999px;
    padding: .35rem .6rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .8rem;
    border: 1px solid rgba(255,255,255,.18);
    backdrop-filter: blur(8px) saturate(140%);
}

    .badge-ribbon.featured {
        background: rgba(245,158,11,.14);
        color: #fbbf24;
        border-color: rgba(245,158,11,.35);
    }

    .badge-ribbon.popular {
        top: 46px;
        background: rgba(56,189,248,.14);
        color: #7dd3fc;
        border-color: rgba(56,189,248,.32);
    }

.badge-fixed {
    color: #0ea5e9;
}

.badge-hourly {
    color: #f59e0b;
}

.badge-video {
    color: #ef4444;
}

/* ===== نصوص البطاقات ===== */
.card-title {
    color: #fff;
    font-weight: 700;
}

/* عناوين/أوصاف بأسطر ثابتة لضمان التساوي */
.title-fixed {
    --title-lines: 2;
    line-height: 1.35;
    min-height: calc(var(--title-lines) * 1.35em);
    max-height: calc(var(--title-lines) * 1.35em);
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: var(--title-lines);
}

.desc-fixed {
    --desc-lines: 2;
    line-height: 1.5;
    min-height: calc(var(--desc-lines) * 1.5em);
    max-height: calc(var(--desc-lines) * 1.5em);
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: var(--desc-lines);
}

.price {
    color: #7fb5ff;
    font-weight: 800;
}

/* زر أسفل البطاقة */
.service-card .btn,
.project-card .btn,
.product-card .btn,
.freelancer-card .btn {
    border-radius: 12px;
    font-weight: 800;
}

.service-card .btn-primary,
.project-card .btn-primary,
.product-card .btn-primary {
    box-shadow: 0 16px 34px color-mix(in srgb, var(--primary) 38%, transparent);
}

    .service-card .btn-primary:hover,
    .project-card .btn-primary:hover,
    .product-card .btn-primary:hover {
        transform: translateY(-1px);
    }

/* ===== Chips/Tags موحّدة ===== */
.tags-wrap {
    --tag-rows: 1;
    max-height: calc(var(--tag-rows) * 2rem);
    overflow: hidden;
}

    .tags-wrap .chip {
        display: inline-flex;
        align-items: center;
        gap: .35rem;
        padding: .2rem .55rem;
        font-size: .75rem;
        border-radius: 999px;
        background: #f4f6f8;
        color: #374151;
        border: 1px solid rgba(0,0,0,.06);
    }

    .tags-wrap .chip-more {
        background: #eef2ff;
        color: #4338ca;
        border-color: rgba(67,56,202,.15);
    }

    .tags-wrap .chip-cat {
        background: #ecfeff;
        color: #0e7490;
        border-color: rgba(14,116,144,.15);
    }

    .tags-wrap .chip-sub {
        background: #eef2ff;
        color: #4338ca;
        border-color: rgba(67,56,202,.15);
    }

/* ===== آراء العملاء ===== */
.testimonials-section {
    padding: 36px 0 48px;
}

.testimonial-card {
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    color: var(--text);
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 18px;
    box-shadow: 0 22px 48px rgba(2,6,23,.40);
}

    .testimonial-card .card-body {
        background: transparent !important;
    }

.badge-chip {
    position: absolute;
    top: 12px;
    inset-inline-end: 12px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.14);
    color: var(--text);
    border-radius: 999px;
    padding: .25rem .6rem;
    font-weight: 800;
    font-size: .8rem;
    backdrop-filter: blur(8px) saturate(140%);
}

    .badge-chip.top-rated {
        color: #fbbf24;
        border-color: rgba(245,158,11,.35);
        background: rgba(245,158,11,.14);
    }

    .badge-chip.verified {
        inset-inline-start: 12px;
        inset-inline-end: auto;
        color: #7dd3fc;
        border-color: rgba(56,189,248,.35);
        background: rgba(56,189,248,.14);
    }

.testimonial-card h6 {
    color: #fff;
    font-weight: 700;
}

.testimonial-card .text-muted {
    color: var(--muted) !important;
}

.testimonial-text p {
    color: var(--text);
}

.testimonial-card .border-top {
    border-top-color: rgba(255,255,255,.12) !important;
}

/* ===== أيقونات وتقييمات ===== */
.rating .fa-star {
    margin-inline-end: 2px;
}

/* ===== روابط عامة داخل الأقسام ===== */
.hero-section a, .services-section a, .testimonials-section a {
    color: #a7ccff;
}

    .hero-section a:hover, .services-section a:hover, .testimonials-section a:hover {
        color: #cfe0ff;
        text-decoration: underline;
    }

/* ===== تجاوب ===== */
@media (max-width: 575.98px) {
    .hero-section {
        padding-top: calc(var(--header-h, 60px) + 12px);
    }
}
/* ===== تحسين تباين نص الوصف داخل البطاقات ===== */
:root {
    --muted-strong: #cfd7e3; /* أفتح من --muted ليظهر بوضوح على الخلفية الداكنة */
}

.card-glass .text-muted,
.service-card .text-muted,
.project-card .text-muted,
.product-card .text-muted {
    color: var(--muted-strong) !important;
}

/* لو عندك وصف بدون class text-muted، طبّق اللون مباشرة */
.service-card .desc-fixed,
.project-card .desc-fixed,
.product-card .desc-fixed {
    color: var(--muted-strong) !important;
}
/* اسم المستقل */
.freelancer-card h6 {
    color: #fff !important;
}

/* العنوان المهني (لو كان class="text-primary") نجعله أفتح قليلًا */
.freelancer-card .text-primary {
    color: #a7ccff !important; /* أفتح من primary لقراءة أفضل على الخلفية الداكنة */
}

/* سطر المدينة/الدولة (غالبًا small text-muted) */
.freelancer-card .text-muted {
    color: var(--muted-strong) !important;
}

/* أيقونة الموقع بنفس درجة النص */
.freelancer-card .fa-map-marker-alt {
    color: var(--muted-strong) !important;
}

