:root {
    --header-height: 80px;
}

/* 전역 앵커 기본값 (페이지 전체용) */
a {
    transition: 0.3s ease-in-out;
    text-decoration: none;
    color: #000000;
    font-size: 1.2rem;
    font-weight: 400;
    font-family: 'Jost',sans-serif!important;
}

/* ------------------------------
   헤더
------------------------------ */
.site-header{
    position: fixed;                /* 스크롤해도 최상단 고정 */
    top: 0; left: 0; width: 100%;
    z-index: 1000;
    background: transparent;        /* 섹션-01 배경이 비쳐 보이게 */
    color: #ffffff;                 /* 초기에는 흰색 텍스트/아이콘 */
    transition: background .25s ease, color .25s ease, box-shadow .25s ease;
    box-shadow: none;
}

/* 스크롤되면 흰 배경 / 검은 글자 */
.site-header.scrolled{
    background: #ffffff;
    color: #111111;
    box-shadow: 0 4px 16px rgba(0,0,0,.06);
}

/* 헤더 내부 링크/아이콘은 헤더의 글자색을 상속 */
.site-header a { color: inherit; }

/* (이전 코드 호환용) */
header .nav { color: #fff; }

/* 네비게이션 바 */
.navbar {
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2vw 3vw;
    width: 95%;
    max-width: 1920px;
    margin: 0 auto;
    transition: all 0.3s ease-in-out;
}

.logo {
    display: flex;
    justify-content: flex-start;
    align-items: center;
}
.logo img {
    height: clamp(20px, 2vw, 35px);
    width: auto;
}

/* 중앙 링크 */
.nav-links {
    display: flex;
    list-style: none;
    flex: 4;
    justify-content: center;
    gap: 0vw;
}
.nav-links li {
    position: relative;
    margin: 0 1vw;
    padding: 1vw 1.5vw;
    cursor: pointer;
}
/* 헤더 색 상속 받도록 override */
.nav-links a {
    text-decoration: none;
    color: inherit;                 /* ← 기존 #ffffff 대신 상속 */
    font-size: clamp(14px, 1.1vw, 17px);
    padding: 1vw;
    transition: 0.3s ease-in-out;
}
.nav-links a:hover {
    color: #e7211a;
    font-weight: bold;
    transform: translateY(-0.3vh);
}

/* 드롭다운 */
.dropdown {
    display: none;
    position: absolute;
    text-align: center;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #ffffff;
    min-width: clamp(120px, 15vw, 180px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    z-index: 99;
    padding: clamp(8px, 1vw, 12px) 0;
}
.dropdown a {
    display: block;
    padding: clamp(6px, 0.8vw, 10px);
    font-size: clamp(12px, 0.9vw, 16px);
    font-weight: 400;
    color: #000000;                 /* 드롭다운은 항상 검정 */
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease-in-out;
}
.dropdown a:hover { border-radius: 8px; }
.nav-links li:hover .dropdown { display: block; }

/* 오른쪽 영역 */
.right-menu {
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: flex-end;
}
.right-menu a {
    color: #000000;
    text-decoration: none;
    margin-left: 1vw;
    font-size: clamp(12px, 1vw, 16px);
}

/* 햄버거 아이콘 */
.right-menu-icon {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-left: clamp(10px, 1vw, 16px);
}
.right-menu-icon input[id="menu-icon"] { display: none; }
.right-menu-icon input[id="menu-icon"] + label {
    display: block;
    width: clamp(24px, 2.5vw, 32px);
    height: clamp(16px, 1.5vw, 22px);
    position: relative;
    cursor: pointer;
    z-index: 9999999;
}
/* 헤더 글자색(currentColor)을 사용해 자동 전환 */
.right-menu-icon input[id="menu-icon"] + label span {
    display: block;
    position: absolute;
    width: 100%;
    height: clamp(1.5px, 0.2vw, 3px);
    border-radius: 30px;
    background-color: currentColor; /* ← 여기 수정! */
    transition: all 0.35s;
}

#menu-icon:checked + label span {
    background-color: #111;
}


.right-menu-icon input[id="menu-icon"] + label span:nth-child(1) { top: 0; }
.right-menu-icon input[id="menu-icon"] + label span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.right-menu-icon input[id="menu-icon"] + label span:nth-child(3) { bottom: 0; }
.right-menu-icon input[id="menu-icon"]:checked + label span:nth-child(1) {
    top: 50%; transform: translateY(-50%) rotate(45deg); z-index: 2;
}
.right-menu-icon input[id="menu-icon"]:checked + label span:nth-child(2) { opacity: 0; z-index: 2; }
.right-menu-icon input[id="menu-icon"]:checked + label span:nth-child(3) {
    bottom: 50%; transform: translateY(50%) rotate(-45deg); z-index: 2;
}

/* 사이드 메뉴 보드 */
.side_menu {
    position: fixed;
    top: 0;
    right: -500px;
    height: 100vh;
    width: clamp(300px, 30vw, 500px);
    background-color: rgba(255, 255, 255, 0.9);
    z-index: 70;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: right 0.3s ease-in-out;
    gap: 2rem;
    font-weight: 500;
    text-align: center;
}
.side_menu a {
    font-size: clamp(1rem, 2vw, 1.5rem);
    font-weight: 500;
    text-align: center;
    color: rgba(0, 0, 0);
}
#menu-icon:checked + label + #header .side_menu { right: 0 !important; }
.side_menu .side-menu-a-container {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.5rem;
}
.side_menu .side-menu-top-a { margin-bottom: -2rem; color: #262527; z-index: 12; }
.side_menu_login_container {
    display: none; align-items: center; justify-content: center; gap: 3rem;
    line-height: 2; letter-spacing: -1px; transition: 0.3s ease-in-out; z-index: 0; padding-bottom: 2rem;
}
.side_menu .side_menu_btm_a_container {
    display: flex; align-items: center; justify-content: center; gap: 1.5rem;
    line-height: 5; letter-spacing: -1px; opacity: 0; z-index: 99; color: #000;
}
.side_menu a.side_menu_top_a:hover ~ .side_menu_btm_a_container { display: flex; opacity: 1; }
.side_menu .side_menu_btm_a { font-size: clamp(0.8rem, 1.5vw, 1rem); color: rgba(0, 0, 0, 0.6); }
.side_menu .side_menu_btm_a:hover { color: #e7211a; font-weight: bold; }
.side_menu a:hover { transform: scale(98%); text-decoration: underline; }
.side_menu .side_menu_icon_container { width: 100%; display: flex; align-items: center; justify-content: center; }
.side_menu .side_menu_icon_container a { margin: 0; }
.side_menu_icon_container_div {
    display: flex; gap: clamp(3rem, 3vw, 3rem); align-items: start; justify-content: center;
    padding: clamp(10px, 2vw, 20px) clamp(1rem, 2vw, 2rem); background: rgb(6, 20, 35); border-radius: 40px;
}
.side_menu_icon_container_div a { width: clamp(20px, 2vw, 30px); height: clamp(20px, 2vw, 30px); display: flex; align-items: start; }

/* ------------------------------
   반응형
------------------------------ */

/*1920px → 1200px에서 크기 조정 */
@media (max-width: 1920px) {
    .navbar { height: var(--header-height); padding: 2vw; }
    .logo img { height: clamp(28px, 3vw, 48px); }
    .nav-links { gap: 3.5vw; }
    .nav-links a { font-size: clamp(13px, 1vw, 17px); }
    .right-menu a { font-size: clamp(12px, 0.5vw, 17px); }
    .dropdown { min-width: clamp(110px, 14vw, 170px); padding: clamp(7px, 0.9vw, 11px) 0; }
    .dropdown a { font-size: clamp(11px, 0.85vw, 15px); }
    .right-menu-icon { margin-left: clamp(8px, 0.9vw, 14px); }
    .right-menu-icon input[id="menu-icon"] + label { width: clamp(22px, 2.3vw, 30px); height: clamp(14px, 1.3vw, 20px); }
    .right-menu-icon input[id="menu-icon"] + label span { height: clamp(1px, 0.15vw, 2px); }
}

/*1200px 이하에서 크기 고정 */
@media (max-width: 1200px) {
    .navbar { height: clamp(60px, 8vh, 90px); }
    .nav-links {
        display: none; position: absolute; top: 8vh; left: 0; width: 100%;
        flex-direction: column; background-color: rgba(255, 255, 255, 0.95);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }
    .logo img { height: clamp(24px, 2.5vw, 42px); }
    .nav-links { gap: 2.5vw; }
    .nav-links a { font-size: clamp(11px, 0.85vw, 15px); }
    .right-menu { font-size: clamp(9px, 0.8vw, 13px); margin-right: 10px; }
    .dropdown { min-width: 120px; padding: 8px 0; }
    .dropdown a { font-size: 12px; }
    .right-menu-icon { margin-left: 8px; }
    .right-menu-icon input[id="menu-icon"] + label { width: 24px; height: 18px; }
    .right-menu-icon input[id="menu-icon"] + label span { height: 2px; }
}

/*700px 이하 */
@media (max-width: 700px) {
    .logo { padding-left: 5px; }
    .right-menu { display: none; }
    .navbar { width: 100%; padding-right: 5px; }
    .right-menu-icon { padding-right: 10px; }
    .side_menu_login_container { display: flex; }
    .side_menu .side_menu_btm_a { color: black; }
    .side_menu .side_menu_btm_a_container {
        line-height: 3;
    }
}

/*500px 이하 */
@media (max-width: 500px) {
    .side_menu { width: 100%; right: -100%; }
    .side_menu .side_menu_btm_a_container { margin-top: 10px; }
    #menu-icon:checked + label + #header .side_menu { right: 0 !important; }
}
