Color not changing in viewport when switching between sections i

Im having trouble again in my project, when I move from the section its suppose to change the colors of the viewport, Im sorry im still a newbe in web development I only know the basics of html css and javascipt Id love to know where I can understand more about the concepts im using in this project if anyone can reference me to something it can be great.

this is my JavaScript code:

const sections = document.querySelectorAll('.section');
const sectBtns = document.querySelectorAll('.controls');
const sectBtn = document.querySelectorAll('.control');
const allSections = document.querySelector('.main-content');


function PageTransitions() {
    sectBtn.forEach((btn) => {
      btn.addEventListener("click", function () {
        console.log(document.querySelector(".active-btn").classList)
        document.querySelector(".active-btn").classList.remove("active-btn");
        this.classList.add("active-btn");
      });
    });
    allSections.addEventListener('click', (e) => {
      const id = e.target.dataset.id;
      if(id){
        //remove selected from the other btns
        sectBtns.forEach((btn) =>{
          btn.classList.remove('active')
        })
        e.target.classList.add('active')

        //hide other sections
        sections.forEach((section)=>{
          section.classList.remove('active')
        })

        const element = document.getElementById(id)
        element.classList.add('active');
      }
    })
}
  
PageTransitions();

this is my css code:

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    list-style: none;
}

:root{
    --color-primary: #191d2b;
    --color-secondary: #27AE60;
    --color-white: #FFFFFF;
    --color-black: #000;
    --color-grey0: #f8f8f8;
    --color-grey-1: #dbe1e8;
    --color-grey-2: #b2becd;
    --color-grey-3: #6c7983;
    --color-grey-4: #454e56;
    --color-grey-5: #2a2e35;
    --color-grey-6: #12181b;
    --br-sm-2: 14px;
    --box-shadow-1: 0 3px 15px rgba(0,0,0,.3);
}

body{
    background-color: var(--color-primary);
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    color: var(--color-white);
    transition: all .4s ease-in-out;
}
a{
    display: inline-block;
    text-decoration: none;
    color: inherit;
    font-family: inherit;
}

header{
    height: 100vh;
    color: var(--color-white);
    overflow: hidden;
    padding: 0 !important;
}
section{
    min-height: 100vh;
    width: 100%;
    position: absolute;
    left: 0;
    top: 0;
    padding: 3rem 18rem;

}
.section{
    transform: translateY(-100%) scale(0);
    transition: all .4s ease-in-out;
    background-color: var(--color-primary);
}
.sec1{
    display: none;
    transform: translateY(0) scale(1);
    background-color: slateblue;
}
.sec2{
    display: none;
    transform: translateY(0) scale(1);
    background-color: slateblue;
}
.sec3{
    display: none;
    transform: translateY(0) scale(1);
    background-color: rgb(146, 205, 90);
}
.sec4{
    display: none;
    transform: translateY(0) scale(1);
}
.sec5{
    display: none;
    transform: translateY(0) scale(1);
}
.active{
    display: block;
}

//Controls
.controls{
    position: fixed;
    z-index: 10;
    top: 50%;
    right: 3%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transform: translateY(-50%);
    .active-btn{
        background-color: var(--color-secondary) !important;
        transition: all .4s ease-in-out;
        i{color: var(--color-white);}
    }
    .control{
        padding: 1rem;
        cursor: pointer;
        background-color: var(--color-grey-4);
        width: 55px;
        height: 55px;
        border-radius: 50%;
        display: flex;
        justify-content: center;
        align-items: center;
        margin: .7rem 0;
        box-shadow: var(--box-shadow-1);
        i{
            font-size: 1.2rem;
            color: var(--color-grey-2);
            pointer-events: none;
        }
    }
}

Can you post the link to the page? If you dont have it in your HTML put this in with the other meta tag.
<meta name="viewport" content="width=device-width, initial-scale=1.0">