Setting off ST Capital Gains in foreign shares with ST Losses in Listed Indian shares

Normally capital gains that are taxed at a higher rate cannot be offset with capital gains taxes at a lower rate. For example, long term capital losses on listed Indian shares cannot be used to offset short-term capital gains on listed Indian shares.

In my case, my marginal tax rate would be 30%. Would I be able to offset ST capital gains on foreign shares ( marginal tax rate 30% ) with ST capital losses in Indian shares ( taxed at 15%/20%) ?

As an example, I have the following capital gains for the FY 2024-25.

LT Capital Gains Listed India +10L ( old rate) +15L ( new rate) total +25L
ST Capital Gains Listed India -5L ( old rate) +3L ( new rate) total -2L
LT Capital Gains Foreign +5L ( old rate) -10L ( new rate) total -5L.
ST Capital Gains Foreign +4L ( before budget date) - 3L ( after budget date) Total +1L.

Can someone please help me with how the offsetting within the categories will work in my case ? What will be the net capital gains in each of the categories at the old and new rates ?

Thanks in advance for your help.