/* index_header_standalone.css
 * 애디렉트 공통 헤더(include/index_header.jsp)를 부트스트랩(vendor/app-saas) · global.css · landing.css ·
 * landing_mo.css 없이 쓰는 단독 페이지용 스타일 (현재 aitive_promotion.jsp).
 * - 위 파일들에서 헤더에 걸리는 규칙만 옮겨 와 같은 모양 · 같은 반응형(≥1051 PC / ≤1050 햄버거 드로우)을 낸다.
 *   hover 색 · EVENT 배지 · CTA 색 등은 index_header.jsp 안의 <style> 이 그대로 처리한다.
 * - 페이지 CSS 뒤에 불러온다 (페이지의 .btn 등 같은 이름 규칙을 덮기 위해).
 * - 헤더 원본 규칙(landing.css · landing_mo.css)을 고치면 여기도 같이 맞출 것.
 */

/* ---------- 리셋 (reset.css · global.css · 부트스트랩 reboot 중 헤더에 필요한 것) ---------- */
:where(.custom-header),
:where(.custom-header) *,
:where(.custom-header) *::before,
:where(.custom-header) *::after {
    box-sizing: border-box;
}

:where(.custom-header) button {
    margin: 0;
    padding: 0;
    border: 0;
    background-color: transparent;
    font: inherit;
    color: inherit;
    cursor: pointer;
}

:where(.custom-header) a {
    color: inherit;
    text-decoration: none;
}

:where(.custom-header) img {
    max-width: 100%;
    vertical-align: middle;
}

html.overflow {
    overflow-y: hidden;
}

/* ---------- 부트스트랩 유틸리티 · .btn (index_header.jsp 마크업이 쓰는 것만) ---------- */
.custom-header .w-100 { width: 100% !important; }
.custom-header .mx-auto { margin-left: auto !important; margin-right: auto !important; }
.custom-header .d-flex { display: flex !important; }
.custom-header .justify-content-between { justify-content: space-between !important; }
.custom-header .align-items-center { align-items: center !important; }

/* 부트스트랩 .btn 기본값. 명시도를 .btn 하나(0,1,0)로 둬서 아래 .custom-text-button 등이 덮게 한다.
   페이지 CSS 의 .btn(inline-flex · nowrap 등)도 여기서 되돌린다. */
:where(.custom-header) .btn {
    display: inline-block;
    gap: normal;
    height: auto;
    padding: 0.45rem 0.9rem;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: normal;
    color: #121926;
    text-align: center;
    vertical-align: middle;
    white-space: normal;
    cursor: pointer;
    user-select: none;
    border: 1px solid transparent;
    border-radius: 0.15rem;
    background-color: transparent;
    box-shadow: none;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

/* ---------- 헤더 (landing.css) ---------- */
.custom-header {
    --ct-primary: #5d2bf4;
    --ct-light-rgb: 238, 242, 247;
    position: fixed;
    top: 0;
    z-index: 99997;
    width: 100%;
    padding: 10px 0;
}

/* 항상 흰 배경 모드는 문서 흐름 안에 둔다 (본문이 헤더 밑으로 들어가지 않게) */
.custom-header.custom-header--solid {
    position: sticky;
}

.custom-header-sticky {
    background: #fff;
    transition: all 0.3s ease;
}

.custom-header-button-list {
    display: flex;
    align-items: center;
}

.custom-header-menu-logo {
    width: 80px;
}

.custom-header-menu-top {
    display: none;
}

/* .custom-inner(1080px · 가운데) + .custom-header-container 의 최종 값 */
.custom-header .custom-header-container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0px 20px;
    text-align: center;
}

.custom-header-logo {
    width: 144px;
}

.custom-text-button {
    color: #121926;
    padding: 10px 24px;
    font-size: 17px;
    font-weight: 500;
}

.custom-text-button:hover {
    color: #121926;
}

.custom-text-button.btn_active {
    color: rgb(93, 43, 244);
    border-color: transparent;
    border: none;
}

.custom-rounded-button {
    border-radius: 8px;
    background-color: #fff;
    color: #364152;
    font-size: 16px;
    border: 1px solid #121926;
    padding: 10px 16px;
    font-weight: 600;
    line-height: 150%;
    letter-spacing: -0.02em;
    margin-left: 12px;
    box-sizing: border-box;
}

/* ---------- ≤1200px (landing_mo.css) ---------- */
@media (max-width: 1200px) {
    .custom-header .custom-header-container {
        max-width: 100vw;
        padding: 0 2vw;
    }

    .custom-header-menu-logo {
        width: 6.6667vw;
    }

    .custom-header-logo {
        width: 12vw;
    }

    .custom-text-button {
        padding: 0.8333vw 1.6vw;
        font-size: 1.6167vw;
    }

    .custom-rounded-button {
        border-radius: 0.6667vw;
        font-size: 1.6vw;
        padding: 0.8333vw 1.3333vw;
        margin-left: 1.6667vw;
    }
}

/* ---------- PC ≥1051px (landing.css) ---------- */
@media (min-width: 1051px) {
    .custom-header .custom-header-container {
        max-width: none !important;
        padding-left: 60px !important;
        padding-right: 60px !important;
        justify-content: flex-start !important;
    }

    .custom-header .custom-header-button-list {
        flex: 1;
    }

    .custom-header .custom-header-menu-adcalc {
        margin-left: auto;
    }

    .custom-header .custom-header-menu-tv {
        margin-left: 24px;
    }

    .custom-header .custom-rounded-button {
        margin-left: 12px;
    }
}

/* ---------- 햄버거 드로우 ≤1050px (landing.css · landing_mo.css) ---------- */
@media (max-width: 1050px) {
    .custom-header .custom-header-close-button {
        display: block;
        width: 28px;
        height: 28px;
        background: url(/bootstrap/m/custom-assets/images/landing/icon-close.svg) no-repeat center center;
        background-size: 100% auto;
        margin: 0 0 0 auto;
        border: 0;
    }

    .custom-header::before {
        content: '';
        opacity: 0;
    }

    .custom-header.show::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 100%;
        height: 100dvh;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1;
        opacity: 1;
        transition: all 0.3s ease-in-out;
    }

    .custom-header-menu-button {
        display: block;
        width: 24px;
        height: 24px;
        background: url(/bootstrap/m/custom-assets/images/landing/icon-hamburger.svg) no-repeat center center;
        background-size: 100% auto;
        border: 0;
    }

    .custom-header.show .custom-header-menu-button {
        display: none;
    }

    .custom-header-button-list {
        flex-direction: column;
        position: fixed;
        top: 0;
        bottom: 0;
        right: -100%;
        width: 280px;
        background: #fff;
        z-index: 1000;
        border-top: 1px solid #f4f4f5;
        transition: all 0.3s ease;
    }

    .custom-header-button-list.show {
        right: 0;
    }

    .custom-header-menu-top {
        position: relative;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 14px 16px;
        margin-bottom: 14px;
        width: 100%;
        border-bottom: 1px solid #f4f4f5;
    }

    .custom-header-menu-logo {
        width: 96px;
    }

    .custom-text-button {
        font-size: 14px;
        font-weight: 600;
        width: 100%;
        padding: 12px 0;
    }

    .custom-header-button-list .custom-header-menu-adcalc,
    .custom-header-button-list .custom-rounded-button {
        width: calc(100% - 24px);
        margin: 0 12px 12px;
        padding: 10px 0;
        border-radius: 9px;
        box-sizing: border-box;
        font-size: 14px;
        font-weight: 600;
        line-height: 1.5;
        text-align: center;
    }

    .custom-header-button-list .custom-rounded-button {
        background-color: rgb(93, 43, 244);
        border: 1px solid rgb(93, 43, 244);
        color: #fff;
    }

    .custom-header-button-list .custom-header-menu-adcalc {
        margin-top: auto;
        background: #fff;
        color: #5d2bf4;
        border: 1px solid #5d2bf4;
    }
}

/* ---------- ≤768px (landing_mo.css) ---------- */
@media (max-width: 768px) {
    .custom-header .custom-header-container {
        max-width: 100vw;
        padding: 0 4.1667vw;
    }

    .custom-header-logo {
        width: 24vw;
    }
}
