/* ============================================================
   ريف الخبراء — Listing + Profile (polished)
   ============================================================ */

.listing-hero {
    background:
        radial-gradient(circle at 85% 50%, rgba(168, 144, 72, 0.1) 0%, transparent 50%),
        linear-gradient(135deg, var(--bg-soft) 0%, white 100%);
    padding: 44px 0;
    border-bottom: 1px solid var(--border);
}
.listing-hero h1 {
    color: var(--text);
    font-size: 2rem;
    margin: 0 0 8px;
    font-weight: 800;
    letter-spacing: -0.01em;
}
.listing-hero p { margin: 0; color: var(--text-muted); font-size: 1.02rem; }

.listing-main { padding: 36px 0 72px; }
.listing-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 28px;
}
@media (max-width: 820px) { .listing-grid { grid-template-columns: 1fr; } }

/* ---- Filters ---- */
.listing-filters {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    align-self: start;
    position: sticky;
    top: 80px;
    box-shadow: var(--shadow-sm);
}
.filter-form h3 {
    margin: 0 0 18px;
    color: var(--text);
    font-size: 1.05rem;
    font-weight: 800;
}
.filter-form label {
    display: block;
    margin-bottom: 16px;
}
.filter-form span {
    display: block;
    font-weight: 600;
    font-size: 0.88rem;
    margin-bottom: 6px;
    color: var(--text);
}
.filter-form input,
.filter-form select {
    width: 100%;
    padding: 10px 13px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.92rem;
    transition: border-color var(--t-fast);
}
.filter-form input:focus,
.filter-form select:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(84, 0, 168, 0.08);
}
.filter-form button,
.filter-form .btn-ghost { margin-top: 8px; }

/* ---- Results ---- */
.results-head {
    color: var(--text-muted);
    margin-bottom: 20px;
    font-size: 0.98rem;
}
.results-head strong {
    color: var(--brand);
    font-size: 1.15rem;
    font-weight: 800;
}

.experts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.expert-card {
    display: block;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    text-decoration: none !important;
    color: var(--text);
    transition: all var(--t-base);
    position: relative;
    overflow: hidden;
}
.expert-card::before {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 4px;
    background: #cbd5e1;
    transition: all var(--t-base);
}
.expert-card.card-tier-silver::before { background: #94a3b8; }
.expert-card.card-tier-gold::before   { background: var(--gold); }
.expert-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    border-color: transparent;
}
.expert-card:hover::before { width: 6px; }

.expert-card.card-tier-gold {
    background: linear-gradient(180deg, white 0%, #fdfaf0 100%);
}

.expert-head {
    display: flex;
    gap: 14px;
    align-items: center;
}
.expert-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 900;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}
.card-tier-gold .expert-avatar {
    background: linear-gradient(135deg, var(--gold), #8e7a3a);
}
.expert-info { flex: 1; min-width: 0; }
.expert-name {
    font-weight: 800;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 1.02rem;
    flex-wrap: wrap;
}
.tier-icon { font-size: 1rem; }
.verified {
    background: var(--success);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 900;
}
.expert-spec {
    color: var(--text-dim);
    font-size: 0.9rem;
    margin-top: 3px;
}
.expert-city {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 2px;
}

/* ---- Empty state ---- */
.empty-state {
    background: white;
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 48px 28px;
    text-align: center;
    color: var(--text-muted);
}
.empty-state h3 { color: var(--text-dim); margin: 0 0 10px; }

/* ---- CTA Banner ---- */
.cta-banner {
    background:
        radial-gradient(circle at 10% 50%, rgba(168, 144, 72, 0.15) 0%, transparent 50%),
        linear-gradient(135deg, var(--brand), var(--brand-darker));
    color: white;
    border-radius: var(--radius-xl);
    padding: 32px 36px;
    margin-top: 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}
.cta-banner h3 { margin: 0 0 6px; color: white; font-size: 1.4rem; font-weight: 800; }
.cta-banner p { margin: 0; color: rgba(255,255,255,0.88); font-size: 1rem; }
.cta-banner .btn-primary {
    background: white;
    color: var(--brand-dark) !important;
    border: none;
    font-weight: 800;
}

/* ---- Profile page ---- */
.profile-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 24px 60px;
}
.profile-head {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 36px 36px;
    display: flex;
    gap: 28px;
    align-items: center;
    margin-bottom: 28px;
    flex-wrap: wrap;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.profile-head::before {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 5px;
    background: linear-gradient(180deg, var(--brand), var(--gold));
}
.profile-avatar-xl {
    width: 112px;
    height: 112px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-darker) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: 900;
    flex-shrink: 0;
    box-shadow: var(--shadow-lg);
}
.profile-info { flex: 1; min-width: 240px; }
.profile-info h1 {
    margin: 0 0 12px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 1.75rem;
    font-weight: 800;
}
.verified-badge {
    background: var(--success);
    color: white;
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 0.78rem;
    font-weight: 800;
}
.profile-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.profile-cta { margin-top: 10px; }

.profile-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 28px;
}
@media (max-width: 820px) {
    .profile-grid { grid-template-columns: 1fr; }
    .profile-head { padding: 24px; gap: 20px; }
    .profile-avatar-xl { width: 80px; height: 80px; font-size: 2.2rem; }
    .profile-info h1 { font-size: 1.4rem; }
}

.section-block {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}
.section-block h3 {
    margin: 0 0 16px;
    color: var(--text);
    font-size: 1.15rem;
    font-weight: 800;
}

.info-card {
    background: linear-gradient(135deg, #eff6ff 0%, white 100%);
    border: 1px solid #bfdbfe;
    border-right: 4px solid var(--info);
    border-radius: var(--radius);
    padding: 18px 22px;
    margin-bottom: 20px;
}
.info-card h3 { margin: 0 0 6px; color: #1e40af; font-size: 1rem; }
.info-card p { margin: 0; color: #1e40af; font-size: 0.92rem; }

.certs-list { display: flex; flex-direction: column; gap: 10px; }
.cert-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: var(--bg-soft);
    border-radius: var(--radius);
    transition: background var(--t-fast);
}
.cert-row:hover { background: var(--bg-elev); }
.cert-icon { font-size: 1.5rem; }
.cert-info { flex: 1; }
.cert-info strong { color: var(--text); display: block; font-weight: 700; }
.cert-issuer { color: var(--text-muted); font-size: 0.88rem; }

.side-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px 24px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}
.side-card h4 {
    margin: 0 0 14px;
    color: var(--text);
    font-size: 1rem;
    font-weight: 800;
}
.side-dl {
    margin: 0;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px 14px;
    font-size: 0.9rem;
}
.side-dl dt { color: var(--text-muted); font-weight: 500; }
.side-dl dd { margin: 0; color: var(--text); font-weight: 600; }
.side-dl dd code {
    background: var(--bg-elev);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 0.85rem;
    color: var(--brand);
}
.side-note {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0 0 12px;
}
