/* ========================================
   헤더
   ======================================== */
.header {
    width: 100%;
    max-width: 1440px;
    height: clamp(50px, 4.17vw, 60px);
    background: white;
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.header-container {
    width: 100%;
    max-width: 1440px;
    height: 100%;
    margin: 0 auto;
    padding: 0 clamp(16px, 1.67vw, 24px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    background: white;
}

.header-logo {
    position: relative;
    left: auto;
    top: auto;
    display: flex;
    align-items: center;
    width: clamp(80px, 6.6vw, 95px);
    height: clamp(21px, 1.74vw, 25px);
    flex-shrink: 0;
}

.header-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.header-nav {
    position: relative;
    left: auto;
    top: auto;
    display: flex;
    align-items: center;
    gap: clamp(16px, 1.67vw, 24px);
    height: clamp(18px, 1.53vw, 22px);
    margin-left: clamp(30px, 3.06vw, 44px);
}

.nav-link {
    color: #171719;
    font-size: clamp(12px, 0.97vw, 14px);
    font-weight: 400;
    line-height: 1.57;
    text-decoration: none;
    transition: color 0.2s;
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--Primary-Normal);
}

.nav-link.active {
    color: var(--Primary-Normal);
    font-weight: 600;
}

.header-button {
    position: relative;
    left: auto;
    top: auto;
    width: clamp(90px, 7.57vw, 109px);
    height: clamp(28px, 2.22vw, 32px);
    padding: 0;
    background: var(--Primary-Normal);
    color: white;
    font-size: clamp(12px, 0.97vw, 14px);
    font-weight: 600;
    border-radius: clamp(6px, 0.56vw, 8px);
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-left: auto;
}

.header-button:hover {
    background: #0047b3;
}

/* ========================================
   Header Mobile Styles
   ======================================== */
@media (max-width: 767px) {
    /* 모바일 헤더는 375px 기준 크기 이상으로 커지지 않음 */
    .header {
        width: 100% !important;
        max-width: 100% !important;
        height: min(16vw, 60px) !important;
        background: #F5F5F5 !important;
        backdrop-filter: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        transform: none !important;
        z-index: 1000 !important;
    }

    .header-container {
        width: 100% !important;
        max-width: 100% !important;
        height: min(16vw, 60px) !important;
        padding: 0 !important;
        margin: 0 !important;
        background: #F5F5F5 !important;
        position: relative !important;
    }

    /* 로고 (Figma: 20,15.5 / 95×25) */
    .header-logo {
        position: absolute !important;
        left: min(5.33vw, 20px) !important;
        top: min(4.13vw, 15.5px) !important;
        width: min(25.33vw, 95px) !important;
        height: min(6.67vw, 25px) !important;
    }

    .header-logo img {
        width: 100% !important;
        height: 100% !important;
    }

    /* 네비게이션 숨김 */
    .header-nav {
        display: none !important;
    }

    /* 앱 시작하기 버튼 숨김 */
    .header-button {
        display: none !important;
    }

    /* 모바일 아이콘 (검색 + 햄버거) - 375px 기준 이상으로 커지지 않음 */
    /* 검색 아이콘 (Figma: 오른쪽에서 60px, 14px / 24×28) */
    .header-container::after {
        content: '' !important;
        position: absolute !important;
        right: min(16vw, 60px) !important;
        top: min(3.73vw, 14px) !important;
        width: min(6.4vw, 24px) !important;
        height: min(7.47vw, 28px) !important;
        background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23171719' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") no-repeat center !important;
        background-size: contain !important;
        display: block !important;
    }

    /* 햄버거 아이콘 (Figma: 오른쪽에서 20px, 14px / 24×28) */
    .header-container::before {
        content: '' !important;
        position: absolute !important;
        right: min(5.33vw, 20px) !important;
        top: min(3.73vw, 14px) !important;
        width: min(6.4vw, 24px) !important;
        height: min(7.47vw, 28px) !important;
        background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23171719' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='3' y1='12' x2='21' y2='12'/%3E%3Cline x1='3' y1='6' x2='21' y2='6'/%3E%3Cline x1='3' y1='18' x2='21' y2='18'/%3E%3C/svg%3E") no-repeat center !important;
        background-size: contain !important;
        display: block !important;
    }
}
