/* Header Settings */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/*
html, body {
    height: 100%;
    overflow-x: hidden;
}
*/

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
    background: #000412;
    color: #fff;
    overflow-y: auto;
}

/* ===== 헤더 중앙맞춤 ===== */
.header .header-inner {
    max-width: 113rem;
    margin: 0 auto;
    padding: 0 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

/* ===== 로고 스타일 ===== */
.header .logo {
    height: 2.8125rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.header .logo img {
    height: 100%;
    width: auto;
    display: block;
    filter: brightness(100%) contrast(100%);
    transition: all 0.3s ease;
}


/* 스크롤 시 로고 최적화 */
header.header.scrolled .logo img {
    filter: brightness(110%) contrast(105%);
}

/* ===== GNB 메뉴 스타일 ===== */
.header .gnb-center {
    display: flex;
    justify-content: center;
    flex: 1;
}

.header .gnb {
    display: flex;
    gap: 3.7rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.header .gnb li {
    position: relative;
    list-style: none;
}

.header .gnb a {
    color: #fff;
    text-decoration: none;
    font-size: 1.125rem;
    font-weight: 300;
    position: relative;
    padding: 0.625rem 0;
    display: block;
    /* 폰트 그림자 효과 */
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    /* 부드러운 전환 */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 스크롤 시 텍스트 최적화 */
header.header.scrolled .gnb a {
    color: #f8f9fa;
    text-shadow: none;
    font-weight: 400;
}

.header .gnb a:hover {
    color: #bc2d3d;
   /* transform: translateY(-1px); */
}

/* 액티브 상태 밑줄 */
.header .gnb li.active a::after,
.header .gnb a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0.125rem;
    background: linear-gradient(90deg, #bc2d3d 0%, #bc2d3d 100%);
    transform: scaleX(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.header .gnb li.active a::after {
    transform: scaleX(1);
}

.header .gnb a:hover::after {
    transform: scaleX(1);
}

/* ===== 햄버거 메뉴 스타일 ===== */
.header .hamburger {
    position: fixed;
    top: 2.3rem;
    right: 2.3rem;
    z-index: 1001;
    padding: 0.5rem;
    flex-direction: column;
    cursor: pointer;
    background: none;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    transition: all 0.3s ease;
}

.header .hamburger span {
    width: 2rem;
    height: 0.125rem;
    background: white;
    margin: 0.2rem 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 0.125rem;
    display: block;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* 스크롤 시 햄버거 최적화 */
header.header.scrolled .hamburger span {
    background: #e9ecef;
    box-shadow: none;
}

/* 햄버거 애니메이션 */
.header .hamburger.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-0.3rem, 0.35rem);
}

.header .hamburger.active span:nth-child(2) {
    opacity: 0;
}

.header .hamburger.active span:nth-child(3) {
    transform: rotate(45deg) translate(-0.3rem, -0.35rem);
}

/* ===== 풀스크린 메뉴 스타일 ===== */
.fullscreen-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg,
        rgba(18, 18, 43, 0.97) 0%,
        rgba(19, 19, 37, 0.95) 100%);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.fullscreen-menu.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.fullscreen-menu .close-btn {
    position: fixed;
    top: 2.3rem;
    right:2.6rem;
    background: none;
    border: 0.125rem solid rgba(255, 255, 255, 0.6);
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.3125rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2001;
}

.fullscreen-menu .close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
    transform: scale(1.05);
}

.fullscreen-menu .menu-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2.7rem;
    max-width: 75rem;
    width: 100%;
    padding: 0 2.5rem;
}

.fullscreen-menu .menu-section h2 {
    font-size: 2.15rem;
    margin-bottom: 1.25rem;
    border-bottom: 0.125rem solid rgba(255, 255, 255, 0.3);
    padding-bottom: 0.5rem;
    font-weight: 600;
    list-style: none;
    margin-left: 0;
    padding-left: 0;
    transition: border-color 0.3s ease;
}

.fullscreen-menu .menu-section:hover h2 {
    border-bottom-color: rgba(255, 255, 255, 0.6);
}

.fullscreen-menu .menu-section ul,
.fullscreen-menu .menu-section li {
    list-style: none;
    margin: 0;
    padding: 0;
}

.fullscreen-menu .menu-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 1.25rem;
    transition: all 0.3s ease;
    display: block;
    padding: 0.5125rem 0;
    border-radius: 0.25rem;
}

.fullscreen-menu .menu-section a:hover {
    color: white;
    padding-left: 0.625rem;
    background: rgba(255, 255, 255, 0.05);
}

/* ===== 반응형 처리 ===== */
@media (max-width: 1100px) {
    .header .header-inner {
        padding: 0 1rem;
                display: flex;
        align-items: center; /* 수직 중앙 정렬 */
        justify-content: space-between;
    }
    
    .header .gnb {
        gap: 1.5rem;
    }
    
    .header .gnb a {
        font-size: 1rem;
    }
    
    .fullscreen-menu .menu-content {
        gap: 1.5rem;
        padding: 0 1rem;
    }
    
    .header .hamburger,
    .fullscreen-menu .close-btn {
        right: 1rem;
    }

    .header .hamburger {
        position: static !important;
        margin-top: 0 !important;
        align-self: center;
        right: auto !important;
        top: auto !important;
    }

    .header .logo {
        align-self: center;
    }
}
/* ===== 모바일 GNB 정렬 및 겹침 방지 ===== */
@media (max-width: 1100px) {
  .header {
    position: relative;
    z-index: 1000; /* 헤더가 항상 최상단 */
  }

  .header .header-inner {
    display: flex;
    flex-direction: row;
    align-items: center;  /* 수직 가운데 정렬 */
    justify-content: space-between;
    padding: 0.75rem 1rem; /* 일정한 내부 여백 */
  }

  /* 로고와 햄버거 버튼이 수직으로 겹치지 않게 */
  .header .logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
  }

  .header .hamburger {
    position: static !important;
    margin: 0;
    top: auto;
    right: auto;
    align-self: center;
  }

  /* GNB 메뉴가 헤더 아래로 밀리며 명확하게 표현 */
  .header .gnb-center {
    position: relative;
    display: none; /* 모바일에서는 숨기고 풀스크린 메뉴로 대체 */
  }

  /* 전체 메뉴 펼쳤을 때, 내용과 겹침 방지 */
  .fullscreen-menu {
    padding-top: 5rem; /* 헤더 높이만큼 여백 */
    box-sizing: border-box;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    align-items: flex-start; /* 상단 정렬 */
    /* Safe area 하단 여백 추가 */
    padding-bottom: env(safe-area-inset-bottom);
    padding-bottom: constant(safe-area-inset-bottom); /* iOS 11.0-11.2 대응 */
  }

  .fullscreen-menu .menu-content {
    margin-top: 1.5rem; /* 추가적인 여백 */

    /* Safe area 고려한 최대 높이 설정 */
    max-height: calc(92vh - env(safe-area-inset-bottom));
    max-height: calc(92vh - constant(safe-area-inset-bottom)); /* iOS 11.0-11.2 대응 */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    /* 하단 여백 추가로 마지막 메뉴 완전히 보이게 */
    padding-bottom: calc(env(safe-area-inset-bottom) + 2rem);
    padding-bottom: calc(constant(safe-area-inset-bottom) + 2rem);
  }

    /* 크롬, 사파리, 오페라, 엣지 용 스크롤바 숨김 */
    .fullscreen-menu::-webkit-scrollbar,
    .fullscreen-menu .menu-content::-webkit-scrollbar {
        display: none;
    }

    /* 파이어폭스용 스크롤바 숨김 */
    .fullscreen-menu,
    .fullscreen-menu .menu-content {
        scrollbar-width: none;
    }
}


@media (max-width: 900px) {
    header.header {
        min-height: 3.75rem;
    }
    
    header.header.scrolled {
        padding: 0.5rem 0;
    }

    /*
    .header .header-inner {
        padding: 0 0.625rem;
    }
    */
    
    .header .logo {
        height: 2rem;
    }
    
    .fullscreen-menu .menu-content {
        display: flex;
        flex-direction: column;
        gap: 2rem;
        max-width: 95vw;
        padding: 0 5vw;
        align-items: flex-start;
    }
    
    .header .hamburger,
    .fullscreen-menu .close-btn {
        top: 1.5rem;
        right: 0.625rem;
        width: 2.5rem;
        height: 2.5rem;
    }
    
    .header .hamburger span {
        width: 1.8rem;
    }
    
    .fullscreen-menu .close-btn {
        font-size: 1.3rem;
    }
}

@media (max-width: 768px) {
    /* 중앙 메뉴 숨김 */
    .header .gnb-center {
        display: none;
        width: 0;
        flex: none;
        margin: 0;
        padding: 0;
        visibility: hidden;
        opacity: 0;
    }
    
    .header .gnb {
        display: none;
    }
    
    .header .hamburger {
        padding: 0.5rem;
        margin: 0;
        flex-shrink: 0;
        display: flex;

    }

    .fullscreen-menu {
        overflow-y: auto !important;
        align-items: flex-start;
        /* Safe area 하단 여백 추가 */
        padding-bottom: env(safe-area-inset-bottom);
        padding-bottom: constant(safe-area-inset-bottom);
    }

    .fullscreen-menu .menu-content {
        /* Safe area 고려한 최대 높이 설정 */
        max-height: calc(85vh - env(safe-area-inset-bottom));
        max-height: calc(85vh - constant(safe-area-inset-bottom));
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        /* 하단 여백을 충분히 확보 (Safe area + 추가 여백) */
        padding-bottom: calc(env(safe-area-inset-bottom) + 3rem);
        padding-bottom: calc(constant(safe-area-inset-bottom) + 3rem);
    }

    /* 크롬, 사파리, 오페라, 엣지 용 스크롤바 숨김 */
    .fullscreen-menu::-webkit-scrollbar,
    .fullscreen-menu .menu-content::-webkit-scrollbar {
        display: none;
    }

    /* 파이어폭스용 스크롤바 숨김 */
    .fullscreen-menu,
    .fullscreen-menu .menu-content {
        scrollbar-width: none;
    }

    
    .header .hamburger span {
        width: 2rem;
        height: 0.125rem;
        margin: 0.2rem 0;
    }
    
    .header .hamburger,
    .fullscreen-menu .close-btn {
        top: 1.25rem;
        right: 1rem;
        width: 2.25rem;
        height: 2.25rem;
    }
    
    .header .hamburger span {
        width: 1.6rem;
        margin: 0.15rem 0;
    }
    
    .fullscreen-menu .close-btn {
        font-size: 1.2rem;
    }
}

/* ===== 헤더 기본 스타일 ===== */
/* 헤더 기본 스타일 */
header.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: transparent;
    padding: 0.9375rem 0;
    min-height: 7.5rem;
    display: flex;
    align-items: center;
    box-sizing: border-box;
    
    /* 부드러운 전환 효과 */
    transition: background 0.3s ease, 
                padding 0.3s ease, 
                box-shadow 0.3s ease, 
                backdrop-filter 0.3s ease;
}

/* 스크롤 시 헤더 변경 스타일 */
header.header.scrolled {
    /* 불투명한 배경 */
    background: linear-gradient(135deg,
        rgba(0, 4, 18, 0.98) 0%,
        rgba(12, 23, 38, 0.99) 50%,
        rgba(0, 4, 18, 0.98) 100%);
    
    /* 블러 효과 */
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    
    /* 그림자 */
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.2),
        0 1px 3px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    
    /* 테두리 */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    
    /* 패딩 조정 */
    padding: 0.75rem 0;
}

/* 스크롤 시 내부 요소들 스타일 보정 */
header.header.scrolled .gnb a {
    color: #f8f9fa;
    text-shadow: none;
    font-weight: 400;
}
header.header.scrolled .logo img {
    filter: brightness(1.1) contrast(1.05);
}
header.header.scrolled .hamburger span {
    background: #e9ecef;
    box-shadow: none;
}



/* ===== 스크롤 방지 ===== */
body.menu-open {
    overflow: hidden;
}


/* 모바일 ~ 태블릿: 전체 메뉴(햄버거 활성화) 스크롤 허용 */
@media (max-width: 1100px) {
  .fullscreen-menu {
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    align-items: flex-start; /* 상단 정렬 */
  }

  .fullscreen-menu .menu-content {
    max-height: 92vh; /* 헤더/닫기버튼 여유 공간 */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* 크롬, 사파리, 오페라, 엣지 용 스크롤바 숨김 */
  .fullscreen-menu::-webkit-scrollbar,
  .fullscreen-menu .menu-content::-webkit-scrollbar {
    display: none;
  }

  /* 파이어폭스용 스크롤바 숨김 */
  .fullscreen-menu,
  .fullscreen-menu .menu-content {
    scrollbar-width: none;
  }
}

@media (max-width: 768px) {
  .fullscreen-menu {
    overflow-y: auto !important;
    align-items: flex-start;
  }

  .fullscreen-menu .menu-content {
    max-height: 85vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* 크롬, 사파리, 오페라, 엣지 용 스크롤바 숨김 */
  .fullscreen-menu::-webkit-scrollbar,
  .fullscreen-menu .menu-content::-webkit-scrollbar {
    display: none;
  }

  /* 파이어폭스용 스크롤바 숨김 */
  .fullscreen-menu,
  .fullscreen-menu .menu-content {
    scrollbar-width: none;
  }
}

/* 햄버거 메뉴가 전체 메뉴로 열렸을 때 풀페이지 스크롤을 차단 */
body.menu-open {
  overflow: hidden !important;
  touch-action: none !important;
  /* 필요에 따라 추가 스타일 */
}


/* ===== 헤더 고정으로 인한 콘텐츠 겹침 방지 ===== */

/* 1. 첫 번째 섹션에 헤더 높이만큼 패딩 추가 */
#fullpage > .section:first-child,
.main-visual.dark-hero {
  padding-top: 7.5rem !important; /* header min-height와 동일 */
  box-sizing: border-box;
}

/* 2. 서브 페이지 대응 (company-1.html 등) */
body.sub-page-body main {
  margin-top: 0rem;
}


/* 3. 반응형 대응 - 1100px 이하 */
@media (max-width: 1100px) {
  #fullpage > .section:first-child,
  .main-visual.dark-hero {
    padding-top: 5rem !important;
  }
  
  body.sub-page-body main {
    margin-top: 5rem;
  }
}

/* 4. 반응형 대응 - 900px 이하 */
@media (max-width: 900px) {
  #fullpage > .section:first-child,
  .main-visual.dark-hero {
    padding-top: 3.75rem !important; /* header min-height: 3.75rem */
  }
  
  body.sub-page-body main {
    margin-top: 3.75rem;
  }
}

/* 5. 반응형 대응 - 768px 이하 */
@media (max-width: 768px) {
  #fullpage > .section:first-child,
  .main-visual.dark-hero {
    padding-top: 4rem !important;
  }
  
  body.sub-page-body main {
    margin-top: 4rem;
  }
}




