/* ═══════════════════════════════════════════════════════════════════════════
   머리 메뉴 · 상담 버튼 정리 (2026-10-29 · 홈 관제탑 · 랩2 시안 A 확정본)

   조변: «위쪽에 네비게이션바» → 랩2 시안 셋(지금 · A · B) 중 A 확정(«개인적으로 A가 좋아»).
   <html class="lh-a"> 가 켠다. 한 벌의 마크업을 넓은 화면(1100px~)은 가로 줄, 좁은 화면은 ☰ 카드로 보여 준다.
   중간 메뉴 줄(GNB)은 마크업째 지웠다(봇이 읽는 메뉴 글이 두 벌이 되지 않게).

   원칙: 머리는 투명 그대로(하늘 사진 위 흰 글자 · 메모리 homepage-design-transparency-intent).
         흰 바탕은 펼친 메뉴 카드에만 쓴다(머리 띠에는 쓰지 않는다).
   ═══════════════════════════════════════════════════════════════════════════ */

.lh-nav, .lh-tel, .lh-burger { display: none; }

html.lh-a .header { z-index: 40; }

html.lh-a .header-container { gap: 0.9rem; }

/* 즐겨찾기 필터 버튼 대신: 즐겨찾기가 있으면 «즐겨찾기» 칸이 원래부터 저절로 뜬다. «순서 되돌리기»만 업무도구 제목 옆으로 옮긴다 */
.section-more-group .reset-order-btn {
    font-family: var(--font-body); font-size: 0.82rem; font-weight: 600; cursor: pointer;
    padding: 0.3rem 0.7rem; border-radius: 999px; border: 1px solid var(--line, #d9e2ea); background: #fff; color: var(--accent, #0b4a76);
}

/* ── 메뉴 줄 (넓은 화면)─────────────────────────────────────────────── */
html.lh-a .lh-nav { display: block; margin-left: auto; }

.lh-menu { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 0.15rem; }
.lh-menu > li { position: relative; }

.lh-link {
    display: inline-flex; align-items: center; gap: 0.25rem;
    padding: 0.45rem 0.7rem; border-radius: 8px;
    font-family: var(--font-body); font-size: 0.93rem; font-weight: 600; letter-spacing: -0.01em;
    color: #fff; text-decoration: none; background: none; border: 0; cursor: pointer;
    text-shadow: 0 1px 10px rgba(6, 18, 34, 0.55);
    white-space: nowrap;
}
.lh-link:hover, .lh-link:focus-visible, .lh-has-sub.open > .lh-link { background: rgba(255, 255, 255, 0.14); }
.lh-link:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.lh-link svg { width: 14px; height: 14px; transition: transform .2s; }
.lh-has-sub.open > .lh-link svg { transform: rotate(180deg); }

/* 펼침 카드 — 흰 바탕은 여기만 */
.lh-sub {
    list-style: none; margin: 0; padding: 0.45rem;
    position: absolute; top: calc(100% + 6px); left: 50%; transform: translateX(-50%);
    min-width: 13.5rem; background: #fff; border-radius: 14px;
    box-shadow: 0 18px 44px -12px rgba(11, 40, 70, 0.35), 0 0 0 1px rgba(16, 32, 58, 0.06);
    display: none; z-index: 50;
}
.lh-has-sub.open > .lh-sub { display: block; }
.lh-sub::before { content: ""; position: absolute; left: 0; right: 0; top: -8px; height: 8px; } /* 마우스가 틈에서 빠지지 않게 */
@media (hover: hover) and (min-width: 1100px) {
    .lh-has-sub:hover > .lh-sub, .lh-has-sub:focus-within > .lh-sub { display: block; }
    /* 2026-11-12 에코: 펼쳐진 것을 화살표로 닫으면(lh-shut) 마우스가 나갈 때까지 닫힌 채 · 화살표 방향도 보이는 상태를 따른다 */
    .lh-has-sub.lh-shut > .lh-sub { display: none; }
    .lh-has-sub:hover:not(.lh-shut) > .lh-link svg, .lh-has-sub:focus-within:not(.lh-shut) > .lh-link svg { transform: rotate(180deg); }
}
.lh-sub a {
    display: flex; align-items: baseline; justify-content: space-between; gap: 0.8rem;
    padding: 0.55rem 0.75rem; border-radius: 9px;
    font-family: var(--font-body); font-size: 0.93rem; font-weight: 600; color: var(--ink, #10203a); text-decoration: none;
}
.lh-sub a small { font-size: 0.74rem; font-weight: 500; color: #6b7b8c; }
.lh-sub a:hover, .lh-sub a:focus-visible { background: #eef4f9; color: var(--accent, #0b4a76); }
.lh-sub .lh-sub-child a { justify-content: flex-start; gap: 0; padding-left: 1.1rem; font-weight: 500; font-size: 0.86rem; }
.lh-sub .lh-sub-child a::before { content: "└"; color: #9aa8b6; margin-right: 0.3rem; }

/* 전화 — 흰 테두리 알약 */
html.lh-a .lh-tel {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.42rem 0.85rem; border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    font-family: var(--font-body); font-size: 0.92rem; font-weight: 700; letter-spacing: 0.01em;
    color: #fff; text-decoration: none; text-shadow: 0 1px 8px rgba(6, 18, 34, 0.5);
    white-space: nowrap; flex: none;
}
.lh-tel:hover { background: rgba(255, 255, 255, 0.14); }
.lh-tel svg { width: 16px; height: 16px; }

/* «홈 화면에 추가»는 넓은 화면에서 아이콘만 */
html.lh-a .browser-tip::after { content: none; }
html.lh-a .browser-tip { padding: 6px 8px; border-color: transparent; background: transparent; }

.lh-only-m { display: none; }

/* ── 좁은 화면: 상호 · 전화 · ☰ ─────────────────────────────────────── */
@media (max-width: 1099px) {
    html.lh-a .lh-burger {
        display: inline-flex; align-items: center; justify-content: center;
        width: 40px; height: 40px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.6); background: none; cursor: pointer;
        color: #fff; filter: drop-shadow(0 1px 6px rgba(6, 18, 34, 0.5)); flex: none;
    }
    /* 2026-11-05 조변 «메뉴 버튼이 너무 작다»: 전화 버튼과 같은 흰 테두리 동그라미로 한 쌍(세 줄만 보여 16px로 읽혔다) */
    .lh-burger:hover { background: rgba(255, 255, 255, 0.14); }
    .lh-burger svg { width: 24px; height: 24px; }
    .lh-burger .lh-x { display: none; }
    .header.lh-open .lh-burger .lh-x { display: block; }
    .header.lh-open .lh-burger .lh-3 { display: none; }
    .lh-burger:focus-visible { outline: 2px solid #fff; }

    html.lh-a .lh-nav {
        display: none; position: absolute; left: 12px; right: 12px; top: calc(100% + 4px);
        background: #fff; border-radius: 16px; padding: 0.6rem;
        box-shadow: 0 22px 50px -14px rgba(11, 40, 70, 0.45), 0 0 0 1px rgba(16, 32, 58, 0.06);
        max-height: calc(100vh - 90px); overflow-y: auto; z-index: 60;
    }
    html.lh-a .header.lh-open .lh-nav { display: block; }

    .lh-menu { flex-direction: column; align-items: stretch; gap: 0; }
    .lh-menu > li + li { border-top: 1px solid #edf1f5; }
    .lh-link {
        width: 100%; justify-content: space-between; padding: 0.85rem 0.8rem;
        color: var(--ink, #10203a); text-shadow: none; font-size: 1rem;
    }
    .lh-link:hover, .lh-has-sub.open > .lh-link { background: #f3f7fa; }
    /* 폰도 PC처럼 접어 둔다(2026-10-29 2차 조변 «PC에선 안 보이는데 폰에서만 왜 두각되나»). 누르면 두 칸 격자로 펼친다 */
    .lh-sub {
        display: none; grid-template-columns: 1fr 1fr; gap: 0.35rem;
        position: static; transform: none; min-width: 0; box-shadow: none; padding: 0 0.4rem 0.7rem;
    }
    .lh-has-sub.open > .lh-sub { display: grid; }
    .lh-sub a { background: #f3f7fa; justify-content: center; padding: 0.6rem 0.4rem; font-size: 0.9rem; }
    .lh-sub a small { display: none; }
    .lh-sub .lh-sub-child a { padding-left: 0.4rem; font-size: 0.86rem; }
    .lh-sub .lh-sub-child a::before { content: none; }
    .lh-only-m { display: block; }
    .lh-only-m button {
        width: 100%; text-align: left; padding: 0.85rem 0.8rem; border: 0; background: none; cursor: pointer;
        font-family: var(--font-body); font-size: 0.92rem; font-weight: 500; color: #5c6b7a;
    }

    html.lh-a .header-container { gap: 0.4rem; }
    html.lh-a .browser-tip { display: none; }
}

/* 아주 좁으면 전화는 동그란 아이콘만 */
@media (max-width: 599px) {
    html.lh-a .lh-tel { width: 40px; height: 40px; padding: 0; justify-content: center; margin-left: auto; }
    .lh-tel span { display: none; }
    .lh-tel svg { width: 19px; height: 19px; }
}
@media (min-width: 600px) and (max-width: 1099px) {
    html.lh-a .lh-tel { margin-left: auto; }
}

/* ── A·B 공통: 상담 버튼·패널 정리 (PC·폰 같게) ─────────────────────────
   ① 패널이 열리면 상담 버튼은 숨긴다: 패널 머리에 × 가 이미 있어 × 가 둘이었고, 폰에서는 버튼이 패널 아래 글을 가렸다.
      닫기는 패널 × · 바깥 어두운 곳 누르기로 한다.
   ② 패널 머리를 옛 회청 그라데이션에서 상담 버튼과 같은 청람으로. */
html.lh-a .consult-fab.active { opacity: 0 !important; visibility: hidden !important; pointer-events: none !important; transform: scale(0.9) !important; }
html.lh-a .consult-panel-header { background: linear-gradient(180deg, #165f96 0%, #0b4a76 100%); }
@media (min-width: 769px) {
    html.lh-a .consult-panel { bottom: 28px; }
}


/* ── 메뉴 보강 (2026-10-30) ─ 더보기 ───────────────────────────
   조변 «변호사 소개를 2번째로 · 오시는 길, 커피브레이크, 유용한 사이트, 자유게시판 · 월간 메거진란».
   더보기는 head-menu.js 가 붙인다(봇이 먼저 읽는 머리 글을 늘리지 않는다). */
/* 메뉴의 信 은 붓 획으로 · 색은 메뉴 글자와 같게(붉은 기본색은 하늘 사진 위에서 안 보인다) */
.lh-link .hanja-shin { color: inherit !important; }
@media (max-width: 1099px) { .lh-link.lh-mag { justify-content: flex-start; gap: 0.3rem; } }
.lh-more .lh-sub { min-width: 11rem; }
.lh-more .lh-sub a { justify-content: flex-start; }

/* 메뉴가 늘어 좁은 PC 폭에서 상호와 부딪히지 않게 */
@media (min-width: 1100px) and (max-width: 1320px) {
    .lh-link { padding: 0.45rem 0.5rem; font-size: 0.88rem; }
    html.lh-a .lh-tel { padding: 0.42rem 0.7rem; font-size: 0.86rem; }
}

@media (max-width: 1099px) {
    /* 폰: 더보기 단추 없이 아래쪽 작은 두 칸 격자 */
    .lh-more > .lh-link { display: none; }
    .lh-menu > li.lh-more { border-top: 2px solid #dfe6ed; }
    .lh-more > .lh-sub { display: grid; grid-template-columns: 1fr 1fr; gap: 0.1rem 0.4rem; padding: 0.45rem 0.4rem; }
    .lh-more > .lh-sub a { background: none; justify-content: flex-start; padding: 0.6rem 0.4rem; font-size: 0.92rem; font-weight: 500; color: #44546a; }
    .lh-more > .lh-sub a:hover { background: #f3f7fa; }
}
