/* =====================================================================
   *STYLEGLOBAL: common.css - 사이트 전체 공통 스타일
   
   목차:
   1. 폰트 설정 (Pretendard, NEXON Lv2 Gothic)
   2. CSS 변수 (색상, 폰트 사이즈, 레이아웃)
   3. 기본 설정 (html, body)
   4. 공통 컨테이너
   5. 헤더 (PC/모바일 메뉴)
   6. 플로팅 버튼
   7. 모달
   8. 푸터
   9. 애니메이션
   10. 반응형 스타일
===================================================================== */

/* =====================================================================
   1. 폰트 설정
===================================================================== */

/* Pretendard 폰트 */
@font-face {
    font-family: 'Pretendard';
    src: url('../fonts/Pretendard-Thin.woff2') format('woff2');
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Pretendard';
    src: url('../fonts/Pretendard-ExtraLight.woff2') format('woff2');
    font-weight: 200;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Pretendard';
    src: url('../fonts/Pretendard-Light.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Pretendard';
    src: url('../fonts/Pretendard-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Pretendard';
    src: url('../fonts/Pretendard-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Pretendard';
    src: url('../fonts/Pretendard-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Pretendard';
    src: url('../fonts/Pretendard-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Pretendard';
    src: url('../fonts/Pretendard-ExtraBold.woff2') format('woff2');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Pretendard';
    src: url('../fonts/Pretendard-Black.woff2') format('woff2');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

/* NEXON Lv2 Gothic 폰트 */
@font-face {
    font-family: 'NEXON Lv2 Gothic';
    src: url('../fonts/NEXON\ Lv2\ Gothic\ OTF\ Light.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'NEXON Lv2 Gothic';
    src: url('../fonts/NEXON\ Lv2\ Gothic\ OTF.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'NEXON Lv2 Gothic';
    src: url('../fonts/NEXON\ Lv2\ Gothic\ OTF\ Medium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'NEXON Lv2 Gothic';
    src: url('../fonts/NEXON\ Lv2\ Gothic\ OTF\ Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* =====================================================================
   2. CSS 변수
===================================================================== */
:root {
    /* 폰트 사이즈 - Body/UI (12~20) */
    --fs-12: 1.2rem;
    --fs-14: 1.4rem;
    --fs-16: 1.6rem;
    --fs-18: 1.8rem;
    --fs-20: 2rem;

    /* 폰트 사이즈 - 중간 타이틀 (22~30) */
    --fs-22: 2.2rem;
    --fs-24: 2.4rem;
    --fs-26: 2.6rem;
    --fs-28: 2.8rem;
    --fs-30: 3rem;

    /* 폰트 사이즈 - 대형 타이틀 (32 이상) */
    --fs-32: 3.2rem;
    --fs-36: 3.6rem;
    --fs-40: 4rem;
    --fs-48: 4.8rem;
    --fs-50: 5rem;
    --fs-56: 5.6rem;

    /* 행간 */
    --lh-body: 1.4;
    --lh-tight: 1.35;
    --lh-title: 1.2;
    --lh-relaxed: 1.6;
    --lh-loose: 1.7;

    /* 기본 색상 */
    --black-primary: #000000;
    --white-primary: #ffffff;

    /* 텍스트 색상 */
    --text-primary: #000000;
    --text-secondary: #4e4e4e;

    /* 그레이 스케일 */
    --gray-100: #f6f6f6;
    --gray-200: #dcdcdc;
    --gray-300: #4e4e4e;

    /* 블루 계열 */
    --blue-primary: #003892;
    --blue-dark: #043b72;
    --blue-medium: #004e9c;
    --blue-light: #4380e2;
    --blue-soft: #89b6ff;
    --blue-point: #3bcaff;
    --blue-light-medium: #cde0f0;

    /* 오렌지 계열 */
    --orange-primary: #ff8a24;
    --orange-light: #ffd9b8;
    --orange-point: #ff9335;
    --orange-floating: #dd6a27;

    /* 옐로우 */
    --yellow-light: #faf1aa;

    /* 레이아웃 */
    --header-h: 70px;
    --hero-text-top: calc(var(--header-h) + 80px);
}

/* =====================================================================
   3. 기본 설정
===================================================================== */
html {
    font-size: 62.5%;
    box-sizing: border-box;
}

body {
    font-family: 'NEXON Lv2 Gothic', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 400;
    font-size: var(--fs-14);
    line-height: var(--lh-relaxed);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    box-sizing: border-box;
    color: var(--text-primary);
}

/* =====================================================================
   4. 공통 컨테이너
===================================================================== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: clamp(60px, 8vw, 100px) 0;
}

.content {
    padding-top: 70px;
}

/* =====================================================================
   5. 헤더
===================================================================== */
.header {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    background: var(--white-primary);
    z-index: 998;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.header.transparent {
    background: transparent;
    box-shadow: none;
}

.header.transparent .menu .menu_item > a {
    color: var(--white-primary);
}

.header.transparent .menu .menu_item > a.active,
.header.transparent .menu .menu_item > a:hover:not(.active) {
    color: var(--orange-primary);
}

.header .h_wrap {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

.header .h_container {
    padding: 0 20px;
}

.header .nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.header .logo {
    flex-shrink: 0;
}

.header .logo a {
    display: flex;
    align-items: center;
}

.header .logo img {
    width: 120px;
    height: auto;
}

/* ----- PC 메뉴 ----- */
.header .menu {
    display: flex;
    gap: 30px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.header .menu .menu_item {
    position: relative;
    height: 70px;
    display: flex;
    align-items: center;
}

.header .menu .menu_item > a {
    font-size: var(--fs-16);
    font-weight: 500;
    padding: 10px 20px;
    display: inline-block;
    text-align: center;
    border-radius: 20px;
    transition: all 0.3s ease;
    color: var(--text-primary);
    text-decoration: none;
}

.header .menu .menu_item > a.active,
.header .menu .menu_item > a:hover:not(.active) {
    color: var(--orange-primary);
}

/* ----- PC 서브메뉴 ----- */
.header .menu .sub_menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--white-primary);
    min-height: 0;
    padding: 5px 0;
    overflow: hidden;
    opacity: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    min-width: 200px;
    margin: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    box-shadow: 0 10px 12px rgba(0, 0, 0, 0.15);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

.header .menu .menu_item:hover .sub_menu {
    opacity: 1;
    pointer-events: auto;
}

.header .menu .sub_menu li {
    padding: 4px 0;
}

.header .menu .sub_menu a {
    display: block;
    padding: 10px 20px;
    color: var(--text-primary);
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
    border-radius: 20px;
    font-size: var(--fs-16);
}

.header .menu .sub_menu a:hover:not(.active) {
    color: var(--orange-primary);
}

.header .menu .sub_menu a.active {
    color: var(--orange-primary);
    font-weight: 500;
    background-color: transparent;
}

/* ----- 모바일 메뉴 버튼 ----- */
.header .m_btn {
    display: none;
    cursor: pointer;
    padding: 5px;
    transition: transform 0.3s ease;
    background: none;
    border: none;
}

.header .m_btn img {
    width: 24px;
    height: auto;
}

/* ----- 모바일 메뉴 ----- */
.header .m_menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    display: none;
}

.header .m_menu.open {
    max-height: 600px;
}

.header .m_menu .m_list {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
}

.header .m_menu .m_item {
    font-size: var(--fs-14);
    width: 100%;
}

.header .m_menu .m_item > a,
.header .m_menu .m_item > button {
    font-size: var(--fs-14);
    width: 100%;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
    padding: 10px 20px;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.header .m_menu .m_item > a > img,
.header .m_menu .m_item > button > img {
    width: 24px;
    transition: transform 0.3s ease;
    transform: rotate(0deg);
}

.header .m_menu .m_item.open > a > img,
.header .m_menu .m_item.open > button > img {
    transform: rotate(180deg);
}

.header .m_menu .m_item > a.active,
.header .m_menu .m_item > button.active {
    background: var(--orange-primary);
    color: var(--white-primary);
}

.header .m_menu .m_item > a:hover:not(.active),
.header .m_menu .m_item > button:hover:not(.active) {
    background: var(--orange-light);
    color: var(--text-primary);
}

.header .m_item.open > a:not(.active),
.header .m_item.open > button:not(.active) {
    background: var(--gray-100);
}

.header .m_item:not(:has(.m_sub_menu)) > a::after,
.header .m_item:not(:has(.m_sub_menu)) > button::after {
    display: none;
}

/* ----- 모바일 서브메뉴 ----- */
.header .m_menu .m_sub_menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    list-style: none;
    width: 100%;
}

.header .m_item.open .m_sub_menu {
    max-height: 500px;
}

.header .m_sub_menu li {
    border-bottom: 1px solid #f0f2f5;
}

.header .m_sub_menu li:first-child {
    border-top: 1px solid #f0f2f5;
}

.header .m_menu .m_sub_menu a {
    display: inline-block;
    width: 100%;
    padding: 10px 20px;
    color: var(--text-primary);
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.header .m_menu .m_sub_menu a.active {
    color: var(--orange-primary);
    font-weight: 600;
    background: transparent;
}

.header .m_menu .m_sub_menu a:hover:not(.active) {
    background: var(--orange-light);
    color: var(--text-primary);
}

/* =====================================================================
   6. 플로팅 버튼
===================================================================== */
.floating {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 997;
}

.floating .f_button {
    width: 72px;
    height: 72px;
    background: var(--orange-floating);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.floating .f_button img.fb_img {
    width: 28px;
    height: auto;
}

.floating .f_button img.fb_img2 {
    width: 32px;
    height: auto;
}

/* =====================================================================
   7. 모달
===================================================================== */
.modal_overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal_overlay.active {
    display: flex;
}

.modal {
    background: var(--white-primary);
    border-radius: 8px;
    padding: 30px 40px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal .m_top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.modal .m_title {
    font-size: var(--fs-28);
    font-weight: 800;
    color: var(--blue-primary);
    flex-shrink: 0;
}

.modal .m_top .m_select {
    max-width: 400px;
}

.modal .m_form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.modal .m_select {
    width: 100%;
    padding: 15px 20px;
    font-size: var(--fs-14);
    border: 1px solid #989898;
    background: var(--white-primary);
    cursor: pointer;
    background-image: url('../images/arr_down2.png');
    background-size: 24px;
    background-repeat: no-repeat;
    background-position: right 20px center;
    padding-right: 50px;
    color: #b9b9b9;
}

.modal .m_select:focus {
    border-color: var(--blue-primary);
}

.modal .m_select:valid {
    color: var(--text-primary);
}

.modal .m_select option {
    color: var(--text-primary);
}

.modal .m_input {
    width: 100%;
    padding: 15px 20px;
    font-size: var(--fs-14);
    border: 1px solid #989898;
    border-radius: 8px;
}

.modal .m_input::placeholder {
    color: #b9b9b9;
}

.modal .m_input:focus {
    border-color: var(--blue-primary);
}

.modal .m_input_group {
    display: flex;
    gap: 15px;
}

.modal .m_select_half {
    flex: 1;
    padding: 15px 20px;
    font-size: var(--fs-14);
    border: 1px solid #989898;
    border-radius: 8px;
    background: var(--white-primary);
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23073693' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 20px center;
    padding-right: 50px;
    color: #b9b9b9;
}

.modal .m_select_half:focus {
    border-color: var(--blue-primary);
}

.modal .m_select_half:valid {
    color: var(--text-primary);
}

.modal .m_select_half option {
    color: var(--text-primary);
}

.modal .m_textarea {
    width: 100%;
    padding: 15px 20px;
    font-size: var(--fs-14);
    border: 1px solid #989898;
    border-radius: 8px;
    resize: vertical;
    font-family: inherit;
    min-height: 200px;
}

.modal .m_textarea:focus {
    outline: none;
    border-color: var(--blue-primary);
}

.modal .m_checkbox_group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 10px;
}

.modal .m_checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.modal .m_checkbox input[type='checkbox'] {
    width: 20px;
    height: 20px;
    border: 2px solid #989898;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.modal .m_checkbox input[type='checkbox']:checked {
    background: var(--blue-primary);
    border-color: var(--blue-primary);
}

.modal .m_checkbox input[type='checkbox']:checked::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 6px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.modal .m_checkbox span {
    font-size: var(--fs-14);
    color: var(--text-primary);
}

.modal .m_btn_group {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.modal .m_btn {
    flex: 1;
    padding: 18px 20px;
    font-size: var(--fs-16);
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.modal .m_btn_submit {
    background: var(--blue-primary);
    color: var(--white-primary);
}

.modal .m_btn_submit:hover {
    background: #05297a;
}

.modal .m_btn_cancel {
    background: #9e9e9e;
    color: var(--white-primary);
}

.modal .m_btn_cancel:hover {
    background: #757575;
}

/* =====================================================================
   8. 푸터
===================================================================== */
.footer {
    background: var(--white-primary);
    padding: 80px 0;
}

.footer_info p,
.footer_info a {
    font-size: var(--fs-16);
    font-weight: 500;
    color: var(--text-primary);
    line-height: var(--lh-loose);
}

/* =====================================================================
   9. 애니메이션
===================================================================== */
.ani-fade-up,
.ani-item {
    --move-y: 80px;
    --duration: 0.7s;
    --delay: 0s;
    opacity: 0;
    transform: translateY(var(--move-y));
    transition: opacity var(--duration) ease-out var(--delay),
        transform var(--duration) cubic-bezier(0.22, 1, 0.36, 1) var(--delay);
}

.is-show {
    opacity: 1;
    transform: translateY(0);
}

.ani-stagger .ani-item {
    transition-delay: calc(var(--i) * 0.2s);
}

/* =====================================================================
   10. 반응형 스타일
   *STYLEMEDIA: 태블릿 (max-width: 768px)
===================================================================== */
@media (max-width: 1280px) {
    .header .menu {
        display: none;
    }

    .header .m_btn {
        display: block;
    }

    .header .m_menu {
        display: block;
    }

    .header .h_wrap {
        max-width: 100%;
        margin: 0 auto;
    }
}

@media (max-width: 1200px) {
    .header .h_wrap {
        max-width: 1200px;
        margin: 0 auto;
    }

    .floating {
        gap: 14px;
        right: 20px;
        bottom: 20px;
    }

    .floating .f_button {
        width: 56px;
        height: 56px;
    }

    .floating .f_button img.fb_img {
        width: 22px;
    }

    .floating .f_button img.fb_img2 {
        width: 26px;
    }
}

@media (max-width: 768px) {
    .header .menu {
        display: none;
    }

    .header .m_btn {
        display: block;
    }

    .header .m_menu {
        display: block;
    }

    .floating {
        bottom: 15px;
        right: 15px;
    }

    .floating .f_button {
        width: 48px;
        height: 48px;
    }

    .floating .f_button img.fb_img {
        width: 20px;
    }

    .floating .f_button img.fb_img2 {
        width: 24px;
    }

    .modal {
        padding: 25px 20px;
        width: 95%;
    }

    .modal .m_top {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        margin-bottom: 20px;
    }

    .modal .m_title {
        font-size: var(--fs-18);
    }

    .modal .m_top .m_select {
        max-width: 100%;
        width: 100%;
    }

    .modal .m_input_group {
        flex-direction: column;
        gap: 15px;
    }

    .modal .m_btn {
        padding: 15px 20px;
        font-size: var(--fs-14);
    }

    .modal .m_input,
    .modal .m_select,
    .modal .m_select_half,
    .modal .m_textarea {
        padding: 12px 16px;
        font-size: var(--fs-12);
    }

    .modal .m_checkbox span {
        font-size: var(--fs-12);
    }

    .modal .m_checkbox input[type='checkbox'] {
        width: 18px;
        height: 18px;
    }

    .modal .m_select,
    .modal .m_select_half {
        background-size: 18px;
        background-position: right 16px center;
        padding-right: 40px;
    }

    .footer {
        padding: 30px 0 28px;
    }

    .footer_info p,
    .footer_info a {
        font-size: var(--fs-14);
    }
}

/* *STYLEMEDIA: 모바일 (max-width: 480px) */
@media (max-width: 480px) {
    .footer_info p,
    .footer_info a {
        font-size: var(--fs-12);
    }

    .modal .m_input,
    .modal .m_select,
    .modal .m_select_half,
    .modal .m_textarea {
        padding: 10px 14px;
    }

    .modal .m_select,
    .modal .m_select_half {
        background-size: 16px;
        background-position: right 14px center;
        padding-right: 36px;
    }

    .modal .m_checkbox input[type='checkbox'] {
        width: 16px;
        height: 16px;
    }
}
