/* ===================================
   Fullpage Scroll CSS - 풀페이지 스크롤 스타일
   =================================== */

/* 전체 페이지 설정 */
html {
    overflow: hidden;
    scroll-behavior: auto;
    height: 100%;
}

body {
    overflow: hidden;
    height: 100vh;
    margin: 0;
    padding: 0;
    position: relative;
}

/* 풀페이지 래퍼 컨테이너 */
#fullpage-wrapper,
.fullpage-wrapper {
    width: 100%;
    height: 100vh;
    position: relative;
    transition-property: transform;
    transition-timing-function: cubic-bezier(0.65, 0, 0.35, 1);
    will-change: transform;
}

/* 전환 애니메이션 활성화 */
#fullpage-wrapper.transitioning,
.fullpage-wrapper.transitioning {
    transition-duration: 0.8s;
}

/* 애니메이션 비활성화 (초기 로드 시) */
#fullpage-wrapper:not(.transitioning),
.fullpage-wrapper:not(.transitioning) {
    transition-duration: 0s;
}

/* 모든 섹션을 정확히 100vh로 고정 */
section {
    width: 100%;
    height: 100vh;
    min-height: 100vh;
    max-height: 100vh;
    overflow: hidden;
    position: relative;
}

/* 스크롤바 완전 숨김 (모든 브라우저) */
html::-webkit-scrollbar,
body::-webkit-scrollbar,
#fullpage-wrapper::-webkit-scrollbar,
.fullpage-wrapper::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

html,
body,
#fullpage-wrapper,
.fullpage-wrapper {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

/* 터치 디바이스에서 과도한 스크롤 방지 */
body {
    overscroll-behavior: none;
    -webkit-overflow-scrolling: touch;
}

/* 모바일에서 주소창 숨김 시에도 100vh 유지 */
@supports (-webkit-touch-callout: none) {
    section {
        height: -webkit-fill-available;
        min-height: -webkit-fill-available;
    }
}

/* 섹션 내부 컨텐츠 */
section > .container {
    height: 100%;
    overflow: visible;
}

/* 네비게이션 활성화 상태 강조 */
.nav-link.active {
    color: var(--primary-light);
    position: relative;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient);
    border-radius: 2px;
}

/* 모바일 네비게이션 활성화 상태 */
.nav-menu .nav-link.active {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-light);
}

.nav-menu .nav-link.active::after {
    display: none;
}

/* 페이지 전환 중 커서 변경 */
body.scrolling {
    cursor: wait;
}

/* z-index 관리 */
section {
    z-index: 1;
}

.navbar {
    z-index: 1000;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
}

/* 애니메이션 성능 최적화 */
#fullpage-wrapper,
.fullpage-wrapper,
section,
.nav-link {
    will-change: transform;
}

/* 전환 중 텍스트 선택 방지 */
.fullpage-wrapper.transitioning {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* GPU 가속 활성화 */
#fullpage-wrapper,
.fullpage-wrapper {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-perspective: 1000;
    perspective: 1000;
}
