/* ============================================================
   HANCOT 1행 헤더 전용 CSS
   위치: static/css/hancot_header.css
   - PC: 좌측 QR/브랜드, 가운데 메뉴, 우측 도구
   - 모바일: 브랜드/도구 1행 + 메뉴 가로 스크롤
   - 기존 domain-header 스타일과 충돌할 경우 이 파일을 나중에 로드
   ============================================================ */
.hc-site-header { width:100%; background:#fff; border-bottom:1px solid #e2e8f0; }
.hc-site-header .hc-header-inner { width:100%; max-width:1920px; margin:0 auto; padding:8px 16px; display:grid; grid-template-columns:minmax(180px,1fr) minmax(0,auto) minmax(260px,1fr); align-items:center; gap:14px; }
/* 01. QR·로고: QR 크기 변경은 width/height 조정 */
.hc-header-brand,.hc-header-brand-link,.hc-header-tools,.hc-header-language {display:flex;align-items:center;}
.hc-header-brand {gap:10px;min-width:0;}
.hc-header-qr {width:48px;height:48px;object-fit:contain;display:block;}
.hc-header-brand-link {gap:8px;min-width:0;text-decoration:none;color:inherit;}
.hc-header-brand-text {display:flex;flex-direction:column;min-width:0;}
.hc-header-brand-text .brand-name {font-weight:750;font-size:1.15rem;line-height:1.3;}
.hc-header-brand-text .brand-sub {font-size:.68rem;color:#64748b;white-space:nowrap;}
/* 02. 중앙 하이브리드 메뉴: 현재 페이지에 aria-current=page 적용 */
.hc-header-nav {display:flex;align-items:center;justify-content:center;gap:3px;white-space:nowrap;min-width:0;}
.hc-header-link {display:inline-flex;align-items:center;gap:5px;min-height:36px;padding:7px 10px;border-radius:8px;color:#334155;text-decoration:none;font-size:.89rem;font-weight:600;}
.hc-header-link:hover {background:#f1f5f9;color:#1d4ed8;}
.hc-header-link[aria-current="page"],.hc-header-link.is-active {background:#eff6ff;color:#1d4ed8;}
.hc-header-count {min-width:18px;height:18px;border-radius:999px;background:#dc2626;color:#fff;font-size:10px;display:inline-flex;align-items:center;justify-content:center;padding:0 4px;}
/* 03. 국가·언어·설정·계정 */
.hc-header-tools {justify-content:flex-end;gap:10px;white-space:nowrap;}
.hc-header-country {font-size:.8rem;color:#475569;}
.hc-header-language {gap:5px;}
.hc-header-language select {border:1px solid #cbd5e1;border-radius:7px;background:#fff;padding:6px;font-size:.83rem;max-width:100px;}
.hc-header-settings {border:1px solid #e2e8f0;background:#fff;border-radius:8px;padding:7px 9px;display:inline-flex;align-items:center;gap:5px;color:#334155;cursor:pointer;}
.hc-header-account {position:relative;}
.hc-header-account summary {list-style:none;cursor:pointer;display:flex;align-items:center;gap:5px;padding:7px;}
.hc-header-account summary::-webkit-details-marker {display:none;}
.hc-header-account-menu {position:absolute;right:0;top:100%;z-index:1000;min-width:170px;padding:7px;background:#fff;border:1px solid #e2e8f0;border-radius:10px;box-shadow:0 8px 24px #0f172a1a;}
.hc-header-account-menu a,.hc-header-account-menu button {display:block;width:100%;padding:9px 10px;border:0;background:none;text-align:left;color:#334155;text-decoration:none;cursor:pointer;}
.hc-header-account-menu a:hover,.hc-header-account-menu button:hover {background:#f1f5f9;}
/* 04. 좁은 PC/태블릿: 중앙 메뉴를 다음 줄에 배치 */
@media(max-width:1199.98px) {
 .hc-site-header .hc-header-inner {grid-template-columns:minmax(0,1fr) auto;}
 .hc-header-nav {grid-column:1/-1;grid-row:2;justify-content:center;overflow-x:auto;max-width:100%;}
}
/* 05. 모바일: 좌우 영역을 압축하고 메뉴는 가로 스크롤 */
@media(max-width:767.98px) {
 .hc-site-header .hc-header-inner {padding:7px 9px;gap:6px;}
 .hc-header-qr {width:36px;height:36px;}
 .hc-header-brand {gap:5px;}
 .hc-header-brand-text .brand-name {font-size:1rem;}
 .hc-header-brand-text .brand-sub,.hc-header-country,.hc-header-settings span,.hc-header-account summary span {display:none;}
 .hc-header-tools {gap:4px;}
 .hc-header-language select {max-width:84px;font-size:.76rem;}
 .hc-header-nav {justify-content:flex-start;scrollbar-width:thin;padding-bottom:2px;}
 .hc-header-link {padding:7px 9px;font-size:.84rem;}
}
@media(prefers-reduced-motion:reduce) {.hc-header-link {transition:none;}}



/* 현재 선택된 헤더 메뉴 */
.hc-header-nav .hc-header-link[aria-current="page"] {
    background-color: #eff6ff;
    color: #2563eb;
    font-weight: 700;
    border-radius: 8px;
}


/* =========================================================
   HANCOT 1행 통합 헤더
   PC / 태블릿 / 모바일 공통
========================================================= */

.hc-site-header {
    width: 100%;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
}

.hc-site-header .hc-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    min-height: 76px;
    padding: 10px 20px;
}

.hc-site-header .hc-header-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.hc-site-header .hc-header-brand-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.hc-site-header .hc-header-qr {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.hc-site-header .hc-header-brand-text {
    display: flex;
    flex-direction: column;
}

.hc-site-header .brand-name {
    font-size: 19px;
    font-weight: 700;
}

.hc-site-header .brand-sub {
    font-size: 11px;
    color: #64748b;
}

/* 중앙 메뉴 */
.hc-site-header .hc-header-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px 16px;
    min-width: 0;
}

.hc-site-header .hc-header-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 4px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: #334155;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
}

.hc-site-header .hc-header-link:hover,
.hc-site-header .hc-header-link.active,
.hc-site-header .hc-header-link.is-active {
    color: #1763b1;
    background: transparent;
}

/* 우측 도구 */
.hc-site-header .hc-header-tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-shrink: 0;
}

.hc-site-header .hc-header-language {
    display: flex;
    align-items: center;
    gap: 5px;
}

.hc-site-header .hc-header-language select {
    max-width: 100px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 5px;
    background: #fff;
}

.hc-site-header .hc-header-settings {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: 0;
    background: transparent;
    color: #475569;
    cursor: pointer;
}

/* 태블릿 */
@media (max-width: 1100px) {
    .hc-site-header .hc-header-inner {
        flex-wrap: wrap;
    }

    .hc-site-header .hc-header-nav {
        order: 3;
        width: 100%;
        justify-content: center;
    }

    .hc-site-header .hc-header-country {
        display: none;
    }
}

/* 모바일 */
@media (max-width: 768px) {
    .hc-site-header .hc-header-inner {
        gap: 10px;
        padding: 8px 12px;
    }

    .hc-site-header .hc-header-qr {
        width: 40px;
        height: 40px;
    }

    .hc-site-header .brand-name {
        font-size: 17px;
    }

    .hc-site-header .brand-sub {
        font-size: 10px;
    }

    .hc-site-header .hc-header-nav {
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 5px;
    }

    .hc-site-header .hc-header-link {
        font-size: 13px;
        flex-shrink: 0;
    }

    .hc-site-header .hc-header-settings span {
        display: none;
    }
}
