function openKakao() {
    const kakaoUrl = document.querySelector('[data-kakao-url]')?.dataset.kakaoUrl || '#';
    if (kakaoUrl !== '#') {
        window.open(kakaoUrl, '_blank');
    } else {
        alert('카카오톡 채널 URL이 설정되지 않았습니다.');
    }
}

document.addEventListener('DOMContentLoaded', function() {
    const navbar = document.querySelector('.navbar');
    if (!navbar) {
        return;
    }

    const setShadow = () => {
        navbar.style.boxShadow = window.scrollY > 0
            ? '0 2px 8px rgba(0,0,0,0.1)'
            : '0 1px 3px rgba(0,0,0,0.1)';
    };

    setShadow();
    window.addEventListener('scroll', setShadow, { passive: true });
});
