'use strict'; // 호이스팅 금지, 엔진 최적화

const res_btn__res = document.querySelector('.res-btn__res');
const res_btn__pro = document.querySelector('.res-btn__pro');
const res_inner02 = document.querySelector('.res-inner02');

res_btn__res.classList.add('active');
res_inner02.classList.add('active');

res_btn__res.addEventListener('click', () => {
    res_btn__res.classList.add('active');
    res_btn__pro.classList.remove('active');
    res_inner02.classList.add('active');
    const res_inner03 = document.querySelectorAll('.res-inner03');
    const res_top_subtitle = document.querySelector('.res-top_subtitle');
    const res_subtitle = document.querySelectorAll('.res-subtitle');
    res_inner03.forEach(function (inner) {
        inner.classList.remove('active');
    });
    res_top_subtitle.classList.remove('active');
    res_subtitle.forEach(function (subtitle) {
        subtitle.classList.remove('active');
    });
});
res_btn__pro.addEventListener('click', () => {
    res_btn__pro.classList.add('active');
    res_btn__res.classList.remove('active');
    res_inner02.classList.remove('active');
    const res_inner03 = document.querySelectorAll('.res-inner03');
    const res_top_subtitle = document.querySelector('.res-top_subtitle');
    const res_subtitle = document.querySelectorAll('.res-subtitle');
    res_inner03.forEach(function (inner) {
        inner.classList.add('active');
    });
    res_top_subtitle.classList.add('active');
    res_subtitle.forEach(function (subtitle) {
        subtitle.classList.add('active');
    });
});

