/* ═══════════════════════════════════════════════
   هدر پروفایل — سامانه مطمئن
   رنگ‌بندی داینامیک بر اساس سطح اعتماد (data-trust)
   ═══════════════════════════════════════════════ */

/* ---------- متغیرهای پایه ---------- */
.nmd-header {
    --nmd-radius: 16px;
    --nmd-card-bg: #ffffff;
    --nmd-text: #1e293b;
    --nmd-text-muted: #64748b;
    --nmd-border: #e2e8f0;

    /* رنگ اعتماد — پیش‌فرض: خنثی */
    --trust-color: #94a3b8;
    --trust-bg: #f1f5f9;
    --trust-text: #475569;

    direction: rtl;
    font-family: 'Vazir', Vazirmatn, tahoma, sans-serif;
    color: var(--nmd-text);
    margin-bottom: 32px;
}

/* ---------- رنگ‌بندی بر اساس سطح اعتماد ---------- */
.nmd-header[data-trust="trust-high"] {
    --trust-color: #16a34a;
    --trust-bg: #f0fdf4;
    --trust-text: #15803d;
}

.nmd-header[data-trust="trust-medium"] {
    --trust-color: #d97706;
    --trust-bg: #fffbeb;
    --trust-text: #b45309;
}

.nmd-header[data-trust="trust-low"] {
    --trust-color: #dc2626;
    --trust-bg: #fef2f2;
    --trust-text: #b91c1c;
}

/* ═══════════ کاور ═══════════ */
.nmd-cover {
    position: relative;
    height: 220px;
    background-size: cover;
    background-position: center;
    border-radius: 0 0 var(--nmd-radius) var(--nmd-radius);
    overflow: hidden;
}

.nmd-cover-placeholder {
    background: linear-gradient(
        135deg,
        color-mix(in srgb, var(--trust-color) 25%, #0f172a),
        #1e293b 60%,
        color-mix(in srgb, var(--trust-color) 15%, #334155)
    );
}

.nmd-cover-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.4) 100%);
}

/* ═══════════ کارت اصلی ═══════════ */
.nmd-header-card {
    position: relative;
    margin: -80px 20px 0;
    padding: 24px;
    background: var(--nmd-card-bg);
    border-radius: var(--nmd-radius);
    box-shadow: 
        0 1px 3px rgba(0,0,0,0.05),
        0 10px 25px rgba(0,0,0,0.08);
}

/* ---------- بلوک برند ---------- */
.nmd-brand-block {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 20px;
}

/* ═══════════ لوگو ═══════════ */
.nmd-logo {
    position: relative;
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    background: #ffffff;
    border: 3px solid var(--nmd-card-bg);
    border-radius: 18px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nmd-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nmd-logo-letter {
    font-size: 42px;
    font-weight: 700;
    color: var(--trust-color);
    text-transform: uppercase;
}

/* نشان اعتماد روی لوگو */
.nmd-trust-dot {
    position: absolute;
    bottom: 6px;
    left: 6px;
    width: 18px;
    height: 18px;
    background: var(--trust-color);
    border: 3px solid var(--nmd-card-bg);
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* ═══════════ بلوک عنوان ═══════════ */
.nmd-title-block {
    flex: 1;
    min-width: 0;
}

.nmd-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.nmd-title {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
    color: var(--nmd-text);
}

.nmd-verified-check {
    flex-shrink: 0;
    color: var(--trust-color);
    display: inline-flex;
    align-items: center;
}

/* زیرعنوان */
.nmd-subtitle {
    font-size: 15px;
    color: var(--nmd-text-muted);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.nmd-brand-name {
    font-weight: 600;
    color: var(--nmd-text);
}

.nmd-dot-sep::before {
    content: '•';
    color: var(--nmd-border);
}

/* ═══════════ متادیتا ═══════════ */
.nmd-header-meta {
    list-style: none;
    margin: 0 0 20px 0;
    padding: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13px;
    color: var(--nmd-text-muted);
    background: var(--trust-bg);
    border-radius: 12px;
}

.nmd-header-meta li {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nmd-icon {
    flex-shrink: 0;
    opacity: 0.7;
}

/* ═══════════ نشان‌ها ═══════════ */
.nmd-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
    margin-bottom: 24px;
}

.nmd-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 8px;
    background: var(--nmd-border);
    color: var(--nmd-text-muted);
    white-space: nowrap;
}

/* نشان سطح اعتماد */
.nmd-badge-trust {
    background: var(--trust-bg);
    color: var(--trust-text);
    font-weight: 600;
}

.nmd-badge-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.nmd-badge.trust-high {
    background: #f0fdf4;
    color: #15803d;
}

.nmd-badge.trust-medium {
    background: #fffbeb;
    color: #b45309;
}

.nmd-badge.trust-low {
    background: #fef2f2;
    color: #b91c1c;
}

/* وضعیت تأیید */
.nmd-badge.verification-verified {
    background: #dbeafe;
    color: #1e40af;
}

.nmd-badge.verification-pending {
    background: #fef3c7;
    color: #92400e;
}

.nmd-badge.verification-rejected {
    background: #fee2e2;
    color: #991b1b;
}

/* مالکیت */
.nmd-badge.claimed {
    background: #dcfce7;
    color: #166534;
}

.nmd-badge.unclaimed {
    background: #f1f5f9;
    color: #475569;
}

/* ═══════════ دکمه ادعای مالکیت ═══════════ */
.nmd-claim-wrap {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--nmd-border);
}

.nmd-claim-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, var(--trust-color), color-mix(in srgb, var(--trust-color) 80%, #000));
    border: none;
    border-radius: 10px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px color-mix(in srgb, var(--trust-color) 30%, transparent);
}

.nmd-claim-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px color-mix(in srgb, var(--trust-color) 40%, transparent);
}

.nmd-claim-button:active {
    transform: translateY(0);
}

/* ═══════════ رفع مسئولیت ═══════════ */
.nmd-disclaimer {
    margin-top: 24px;
    padding: 16px;
    background: #fef9c3;
    border: 1px solid #fde047;
    border-radius: 10px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.nmd-disclaimer .nmd-icon {
    flex-shrink: 0;
    color: #ca8a04;
    margin-top: 2px;
}

.nmd-disclaimer p {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: #713f12;
}

.nmd-disclaimer strong {
    font-weight: 700;
    color: #854d0e;
}

/* ═══════════════════════════════════════════════
   ریسپانسیو (موبایل)
   ═══════════════════════════════════════════════ */
@media (max-width: 768px) {
    .nmd-header {
        margin-bottom: 24px;
    }

    .nmd-cover {
        height: 160px;
        border-radius: 0;
    }

    .nmd-header-card {
        margin: -60px 12px 0;
        padding: 18px;
        border-radius: 12px;
    }

    .nmd-brand-block {
        flex-direction: column;
        gap: 16px;
        margin-bottom: 16px;
    }

    .nmd-logo {
        width: 80px;
        height: 80px;
        border-radius: 14px;
    }

    .nmd-logo-letter {
        font-size: 32px;
    }

    .nmd-title {
        font-size: 22px;
    }

    .nmd-subtitle {
        font-size: 14px;
        margin-bottom: 12px;
    }

    .nmd-header-meta {
        font-size: 12px;
        gap: 12px;
        padding: 14px;
        margin-bottom: 16px;
    }

    .nmd-badges {
        gap: 6px;
        margin-top: 16px;
        margin-bottom: 20px;
    }

    .nmd-badge {
        font-size: 11px;
        padding: 5px 10px;
    }

    .nmd-claim-wrap {
        margin-top: 20px;
        padding-top: 16px;
    }

    .nmd-claim-button {
        width: 100%;
        justify-content: center;
        font-size: 13px;
        padding: 12px;
    }

    .nmd-disclaimer {
        padding: 14px;
        margin-top: 20px;
    }

    .nmd-disclaimer p {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .nmd-header {
        margin-bottom: 20px;
    }

    .nmd-title {
        font-size: 20px;
    }

    .nmd-header-meta {
        flex-direction: column;
        gap: 8px;
        padding: 12px;
    }

    .nmd-badges {
        margin-top: 12px;
        margin-bottom: 16px;
    }

    .nmd-claim-wrap {
        margin-top: 16px;
        padding-top: 14px;
    }

    .nmd-disclaimer {
        margin-top: 16px;
    }
}
