v3.26.1
FAIR VALUE MEASUREMENT - Fair Value Hierarchy Individual Investments (Details) - EBP 002 - USD ($)
Dec. 31, 2025
Dec. 31, 2024
EBP, Investment, Fair Value and NAV [Line Items]    
Investments, at fair value $ 887,825,471 $ 710,029,515
Fair Value, Inputs, Level 1    
EBP, Investment, Fair Value and NAV [Line Items]    
Investments, at fair value 887,825,471 681,309,398
Fair Value Measured at Net Asset Value Per Share    
EBP, Investment, Fair Value and NAV [Line Items]    
Investments, at fair value 0 28,720,117
Mutual funds | Fair Value, Inputs, Level 1    
EBP, Investment, Fair Value and NAV [Line Items]    
Investments, at fair value 604,034,466 516,591,992
MasTec, Inc. common stock    
EBP, Investment, Fair Value and NAV [Line Items]    
Investments, at fair value 241,764,546 154,448,893
MasTec, Inc. common stock | Fair Value, Inputs, Level 1    
EBP, Investment, Fair Value and NAV [Line Items]    
Investments, at fair value 241,764,546 154,448,893
Money market funds | Fair Value, Inputs, Level 1    
EBP, Investment, Fair Value and NAV [Line Items]    
Investments, at fair value $ 42,026,459 $ 10,268,513