/* 휴대폰 메뉴(햄버거) — 홈 · 소개 · 서비스 · 상담 공통 (10-22)
   site-header.css 뒤에 읽는다. 900px 이하에서만 햄버거가 보이고, 누르면 머리 띠 아래로 흰 메뉴판이 내려옴.
   site-header.css가 .hd.hd .hd-nav{display:none}이라 열린 상태는 .hd.hd.menu-open으로 한 단계 더 세게 */
.hd .hd-burger { display: none; }

@media (max-width: 900px) {
  /* 세 줄 단추: 빨간 상담 단추 바로 오른쪽 끝. 색은 머리 띠 글자색을 따름 */
  .hd.hd .hd-burger { position: relative; display: inline-flex; flex: none; flex-direction: column; justify-content: center; align-items: center; gap: 5px;
    width: 40px; height: 40px; margin: 0 -10px 0 -6px; padding: 0; border: 0; border-radius: 4px; background: transparent; color: inherit;
    cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .hd.hd .hd-burger span { display: block; width: 20px; height: 2px; border-radius: 1px; background: currentColor; transition: transform .25s ease, opacity .2s ease; }
  .hd.hd .hd-burger:focus-visible { outline: 2px solid #c4121c; outline-offset: 0; }
  /* 열리면 X */
  .hd.hd.menu-open .hd-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .hd.hd.menu-open .hd-burger span:nth-child(2) { opacity: 0; }
  .hd.hd.menu-open .hd-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* 메뉴판: 머리 띠 바로 아래 전체 폭 흰 판, 글자는 크게 세로로 */
  .hd.hd.menu-open .hd-nav { position: absolute; top: 100%; left: 0; right: 0; z-index: 41; display: flex; flex-direction: column; gap: 0; margin: 0;
    max-height: calc(100vh - 46px); max-height: calc(100dvh - 46px); overflow-y: auto; overscroll-behavior: contain;
    background: #fff; color: #111; border-top: 1px solid #eee; border-radius: 0 0 4px 4px;
    box-shadow: 0 14px 30px rgba(17, 17, 17, .1); font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    animation: hd-menu-in .26s ease both; }
  .hd.hd.menu-open .hd-nav > a,
  .hd.hd.menu-open .hd-nav > button { display: flex; align-items: center; gap: 10px; width: 100%; margin: 0; padding: 16px 20px; border: 0; border-bottom: 1px solid #eee; border-radius: 0;
    background: transparent; box-shadow: none; color: #111; font: inherit; font-size: 18px; font-weight: 600; letter-spacing: -.01em; line-height: 1.4; text-align: left;
    justify-content: flex-start; cursor: pointer; }
  .hd.hd.menu-open .hd-nav > a:last-child,
  .hd.hd.menu-open .hd-nav > button:last-child { border-bottom: 0; }
  .hd.hd.menu-open .hd-nav > a:hover,
  .hd.hd.menu-open .hd-nav > button:hover { color: #c4121c; background: #f6f6f7; }
  /* 지금 보고 있는 페이지는 크림슨 + 왼쪽 짧은 빨강 선 */
  .hd.hd.menu-open .hd-nav > a[aria-current="page"] { color: #c4121c; box-shadow: inset 3px 0 0 #c4121c; }
  .hd.hd.menu-open .hd-nav > a:focus-visible,
  .hd.hd.menu-open .hd-nav > button:focus-visible { outline: 2px solid #c4121c; outline-offset: -4px; border-radius: 4px; }
}
@keyframes hd-menu-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .hd.hd .hd-burger span { transition: none; }
  .hd.hd.menu-open .hd-nav { animation: none; }
}
