@charset "utf-8";
/* =========================================================
    공통 헤더 (웅진스킬원 공통 Header)
    - 원본: skillone/assets_skillone/css/main.css (Header / Button / menu-btn)
    - 모든 규칙을 .header 범위로 한정하여 기존 페이지 스타일(.btn 등)에 영향 없음
    - 기존 base.css / bootstrap 의 .btn 스타일은 .header 내부에서만 초기화
    - 적용 페이지: main.html, include/html_head.php, reference/reference_view.html
    - 원복 시: 각 페이지의 header.css / header.js 링크 제거
========================================================= */

/* 헤더 전용 색상 변수 (전역 :root 변수와 충돌하지 않도록 .header 범위에 선언) */
.header {
    --hd-white: #fff;
    --hd-text: #212529;
    --hd-orange: #FF7A00;
    --hd-dark: #111;
}

/* =========================
    Header
========================= */
.header { position: fixed; top: 0; left: 0; z-index: 100; width: 100%; border-bottom: 1px solid #eee; background: #fff; backdrop-filter: blur(12px); font-size: 1.6rem; line-height: 1.5; letter-spacing: -0.03em; -webkit-font-smoothing: auto; -moz-osx-font-smoothing: auto; box-sizing: border-box; }
/* ※ 글자 간격/폰트 렌더링을 skillone·LinkedIn·Degreed 사이트와 동일하게 맞춤
     (원본은 body 16px 기준 -0.03em = -0.48px 이 헤더 전체에 상속됨) */
.header *, .header *::before, .header *::after { box-sizing: border-box; }
/* 헤더 폰트: Pretendard (font.css 에 이미 등록된 폰트 사용, 헤더 영역에만 적용) */
.header, .header button { font-family: "Pretendard", "Malgun Gothic", "맑은 고딕", sans-serif; }
.header ul, .header li { margin: 0; padding: 0; list-style: none; }
.header a, .header a:hover, .header a:focus, .header a:active { text-decoration: none; }

.header .inner { position: relative; display: flex; align-items: center; justify-content: space-between; width: min(100% - 48px, 1520px); height: 80px; margin: 0 auto; }

.header .logo { z-index: 999; margin: 0; padding: 0; font-size: inherit; line-height: 0; }
.header .logo a { display: inline-block; }
.header .logo img { height: 40px; max-width: none; vertical-align: top; }

.header .gnb { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }
.header .gnb__list { display: flex; gap: 60px; white-space: nowrap; }
.header .gnb__list a { font-size: 1.8rem; font-weight: 500; color: var(--hd-text); }
.header .link__list { display: none; width: 100%; margin-top: auto; padding-bottom: env(safe-area-inset-bottom, 0); }
.header .link__list li { flex: 1; }
.header .link__list li a { width: 100%; padding: 20px 10px; font-size: 1.6rem; border-radius: 0; }
.header .link__list li .btn--secondary { background-color: var(--hd-dark); color: var(--hd-white); }
.header .link__list li a:after { content: ''; width: 18px; height: 18px; margin-left: 8px; background: url('../image/common/icon_arrow_white.svg') no-repeat center / auto; }
.header .util { display: flex; align-items: center; gap: 12px; }
.header .util .btn { height: 40px; white-space: nowrap; }

@media (min-width: 1025px) and (max-width: 1280px) {
    .header .gnb__list { gap: 30px; }
}

/* =========================
    Button (헤더 내부 전용)
    - bootstrap / base.css 의 .btn 속성(min-width, line-height, border, ::before hover 효과 등) 초기화
========================= */
.header .btn { position: static; display: inline-flex; align-items: center; justify-content: center; min-width: 0; padding: 0 20px; border: 0; border-radius: 999px; overflow: visible; font-size: 1.4rem; font-weight: 700; line-height: 1.5; letter-spacing: inherit; vertical-align: middle; box-shadow: none; transition: .3s ease; }
.header .btn::before { content: none; display: none; }
.header .btn:hover { transform: translateY(-2px); }
.header .btn:focus { box-shadow: none; }
.header .btn--primary,
.header .btn--primary:hover { background: var(--hd-orange); color: var(--hd-white); }
.header .btn--secondary,
.header .btn--secondary:hover { background: var(--hd-white); color: var(--hd-text); }
.header .btn--outline,
.header .btn--outline:hover { border: 1px solid var(--hd-orange); background: var(--hd-white); color: var(--hd-orange); }

/* =========================
    Menu Button (모바일 햄버거)
========================= */
.header .menu-btn { display: none; width: 48px; height: 48px; padding: 14px; margin-right: -14px; border: 0; background: transparent; flex-direction: column; justify-content: center; gap: 4px; cursor: pointer; }
.header .menu-btn span { display: block; height: 2px; background: var(--hd-orange); }
.header .menu-btn span:nth-child(1) { width: 12px; margin-left: auto; }
.header .menu-btn span:nth-child(2) { width: 20px; background: var(--hd-text); }
.header .menu-btn span:nth-child(3) { width: 10px; margin-right: auto; }

.header .menu-btn.active { gap: 0; z-index: 999; }
.header .menu-btn.active span { width: 20px; margin-left: 0; margin-right: 0; background: var(--hd-text); }
.header .menu-btn.active span:nth-child(1) { transform: translateY(2px) rotate(45deg); }
.header .menu-btn.active span:nth-child(2) { opacity: 0; }
.header .menu-btn.active span:nth-child(3) { transform: translateY(-2px) rotate(-45deg); }

/* =========================
    고정 헤더 보정 (헤더 외부, 이 파일을 불러오는 페이지에만 적용)
    - #wrap 상단 여백: 고정 헤더 높이만큼 본문이 가려지지 않도록
    - scroll-padding-top: 앵커 이동(개인정보 처리방침 목차 등) 시 제목이 헤더에 가려지지 않도록
========================= */
html { scroll-padding-top: 80px; }
#wrap { padding-top: 80px; }

/* =========================
    Tablet / Mobile (~1024px)
========================= */
@media (max-width: 1024px) {
    html { scroll-padding-top: 64px; }
    #wrap { padding-top: 64px; }
    body.menu-open { overflow: hidden; }

    .header .inner { width: calc(100% - 40px); height: 64px; }
    .header .logo img { height: 28px; }
    .header .gnb { display: none; position: fixed; inset: 0; width: 100%; height: 100dvh; min-height: 100svh; background-color: var(--hd-white); transform: translateY(-100%); transition: .3s ease; z-index: 99; flex-direction: column; padding-top: 140px; padding-bottom: env(safe-area-inset-bottom, 0); overflow: hidden; }
    .header .gnb.active { display: flex; transform: translateY(0); align-items: stretch; }
    .header .gnb__list { display: flex; flex-direction: column; gap: 50px; width: 100%; padding: 0 40px; }
    .header .gnb__list a { font-size: 2.8rem; font-weight: 700; }
    .header .link__list { display: flex; }
    .header .util { display: none; }

    .header .menu-btn { display: inline-flex; }
}

/* =========================
    Mobile (~768px)
========================= */
@media (max-width: 768px) {
    .header .btn { width: 100%; min-height: 48px; }
}
