/*
 * MOCA 웹 공통 머리 (fragments/site.html :: site_header).
 * 새 페이지(site.css)와 옛 부트스트랩 페이지(fragments/navbar.html) 모두 이 파일로 머리를 그린다.
 * 옛 페이지의 부트스트랩과 부딪치지 않게 모든 규칙을 .site-top 안으로 한정한다 (:root 색 토큰만 예외)
 */
:root {
    --ink: #212529;        /* 본문 글자 */
    --sub: #868e96;        /* 보조 글자 */
    --line: #eaedef;       /* 얇은 선 */
    --soft: #f8f9fa;       /* 옅은 바탕 */
    --yellow: #fee500;     /* MOCA 노랑 (앱과 같음) */
    --black: #191919;
    --hot: #ff4650;        /* 강조 (혜택·D-day) */
    --gold: #d4a017;
    --wrap: 1256px;
}

.site-top { border-bottom: 1px solid var(--line); background: #fff; color: var(--ink); letter-spacing: -0.01em;
    font-family: "Pretendard Variable", Pretendard, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
    -webkit-font-smoothing: antialiased; line-height: 1.5; }
.site-top *, .site-top *::before, .site-top *::after { box-sizing: border-box; }
.site-top a, .site-top a:hover { color: inherit; text-decoration: none; }
.site-top .wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 40px; }
.site-top .btn { display: inline-flex; align-items: center; justify-content: center; height: 40px; padding: 0 16px; line-height: 1;
    border-radius: 8px; font-size: 14px; font-weight: 700; border: 0; cursor: pointer; white-space: nowrap; }
.site-top .btn-black, .site-top .btn-black:hover { background: var(--black); color: #fff; }

/* 윗줄: 로고 · 메뉴 · 검색 · 오른쪽 */
.site-top .top-row { display: flex; align-items: center; gap: 28px; height: 72px; }
.site-logo { font-size: 26px; font-weight: 800; letter-spacing: -.03em; display: flex; align-items: center; gap: 8px; color: var(--black); }
.site-logo .dot { width: 28px; height: 28px; border-radius: 8px; background: var(--yellow); display: inline-flex;
    align-items: center; justify-content: center; font-size: 15px; color: var(--black); }
.site-menu { display: flex; gap: 22px; font-size: 17px; font-weight: 700; color: #495057; }
.site-menu a { white-space: nowrap; }
.site-menu a:hover, .site-menu a.on { color: var(--black); }
.site-side { margin-left: auto; display: flex; align-items: center; gap: 16px; font-size: 14px; color: #495057; }
.site-side a { white-space: nowrap; }
.site-side .me { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink); }
.site-side .me img, .site-side .me .av { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: #f1f3f5;
    display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; }

/* 검색: PC는 윗줄 가운데 칸, 휴대폰은 돋보기를 누르면 아래 줄로 펼침 */
.site-search { flex: 1; max-width: 380px; margin: 0; }
.site-search label { height: 42px; border-radius: 10px; background: var(--soft); border: 1px solid transparent;
    display: flex; align-items: center; gap: 8px; padding: 0 14px; margin: 0; cursor: text; }
.site-search label:focus-within { background: #fff; border-color: var(--black); }
.site-search i { font-size: 16px; color: #495057; }
.site-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 14px; color: var(--ink); padding: 0; }
.site-search input::placeholder { color: var(--sub); }
.site-search-btn { display: none; font-size: 20px; color: var(--ink); background: none; border: 0; padding: 0; cursor: pointer; line-height: 1; }
.site-search-row { display: none; padding-bottom: 12px; }
.site-search-row .site-search { max-width: none; }
.site-top.searching .site-search-row { display: block; }

/* 아랫줄 탭 (첫 화면은 구역 탭, 다른 페이지는 메뉴 탭 — 메뉴 탭은 윗줄 메뉴가 숨는 폭에서만) */
.site-tabs { display: flex; gap: 26px; height: 48px; align-items: stretch; font-size: 15px; font-weight: 600; color: #495057; }
.site-tabs a { display: flex; align-items: center; white-space: nowrap; }
.site-tabs a.on { color: var(--black); font-weight: 800; box-shadow: inset 0 -2px 0 var(--black); }
.site-tabs .new { font-size: 11px; font-weight: 800; color: var(--hot); margin-left: 4px; }
.site-tabs.menu-tabs { display: none; }
.site-tabs .sm-only { display: none; }
.site-tabs .quiet { color: var(--sub); font-weight: 500; }

/* 옛 부트스트랩 페이지: 예전 머리(navbar mb-5)만큼 아래 여백 */
.site-compat { margin-bottom: 3rem; }

@media (max-width: 1024px) {
    .site-top .wrap { padding: 0 24px; }
    .site-menu { display: none; }
    .site-tabs.menu-tabs { display: flex; }
}

@media (max-width: 640px) {
    .site-top .wrap { padding: 0 16px; }
    .site-top .top-row { height: 60px; gap: 12px; }
    .site-logo { font-size: 22px; }
    .site-logo .dot { width: 24px; height: 24px; font-size: 13px; }
    .site-side { gap: 14px; }
    .site-side .hide-sm { display: none; }
    .site-top .btn { height: 36px; padding: 0 12px; font-size: 13px; }
    .top-row > .site-search { display: none; }
    .site-search-btn { display: inline-flex; }
    .site-tabs { overflow-x: auto; gap: 20px; height: 44px; font-size: 14px; scrollbar-width: none; }
    .site-tabs::-webkit-scrollbar { display: none; }
    .site-tabs .sm-only { display: flex; }
}
