/* ===== 모바일 (기본): 상단 고정 헤더 + 펼침 메뉴 ===== */
.site-header {
    position: sticky; top: 0; z-index: 50;
    display: flex; align-items: center; justify-content: space-between;
    height: 60px; padding: 0 8px 0 var(--gutter);
    background: #fff;
    border-bottom: 1px solid var(--line);
}
.site-logo__pc { display: none; }
.site-logo__m { width: auto; height: 24px; }
.site-header__btns { display: flex; }
.icon-btn { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; }
.icon-btn img { width: 22px; height: 22px; opacity: .8; }

.menu-btn__bar, .menu-btn__bar::before, .menu-btn__bar::after {
    display: block; width: 22px; height: 2px; background: var(--ink); border-radius: 2px;
    transition: transform .25s, opacity .25s;
}
.menu-btn__bar { position: relative; }
.menu-btn__bar::before, .menu-btn__bar::after { content: ""; position: absolute; left: 0; }
.menu-btn__bar::before { top: -7px; }
.menu-btn__bar::after { top: 7px; }
.menu-open .menu-btn__bar { background: transparent; }
.menu-open .menu-btn__bar::before { transform: translateY(7px) rotate(45deg); }
.menu-open .menu-btn__bar::after { transform: translateY(-7px) rotate(-45deg); }
.menu-open { overflow: hidden; }

.gnb {
    position: fixed; top: 60px; left: 0; right: 0; bottom: 0;
    padding: 20px var(--gutter) 40px;
    background: #fff;
    overflow-y: auto;
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity .25s, transform .25s, visibility .25s;
}
.menu-open .gnb { visibility: visible; opacity: 1; transform: none; }
.gnb__item { border-bottom: 1px solid var(--line); }
.gnb__link { display: block; padding: 16px 4px; font-size: 18px; font-weight: 700; color: var(--ink); }
.gnb__link .ext { margin-left: 4px; font-size: 13px; color: var(--muted); }
.gnb__sub { display: flex; flex-wrap: wrap; gap: 4px 20px; padding: 0 4px 16px; margin-top: -6px; }
.gnb__sub a { display: block; padding: 4px 0; font-size: 15px; color: var(--text); }
.gnb__sub a:hover { color: var(--brand); }

.search { position: relative; margin-top: 24px; }
.search input {
    width: 100%; height: 48px; padding: 0 48px 0 16px;
    border: 1px solid var(--line); border-radius: 999px; background: var(--soft);
    outline: none; transition: border-color .2s, background .2s;
}
.search input:focus { border-color: var(--ink); background: #fff; }
.search input::placeholder { color: var(--muted); }
.search button { position: absolute; right: 4px; top: 4px; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; }
.search button img { width: 18px; height: 18px; }

.site-main { min-height: 60vh; }

.site-footer {
    padding: 32px var(--gutter) 40px;
    border-top: 1px solid var(--line);
    background: var(--soft);
    font-size: 13px; line-height: 1.7; color: var(--muted);
}
.site-footer__tel { margin-bottom: 14px; font-size: 14px; color: var(--text); }
.site-footer__tel a { margin-left: 4px; font-weight: 700; color: var(--ink); }
.site-footer__logo { margin-bottom: 10px; opacity: .7; }
.site-footer__copy { margin-top: 8px; font-size: 12px; }

/* ===== PC (1024px 이상): 왼쪽 고정 사이드 메뉴 — 기존 사이트 형태 유지 ===== */
@media (min-width: 1024px) {
    .site-header {
        position: fixed; top: 0; left: 0; bottom: 0;
        width: var(--side); height: auto;
        display: block; padding: 48px 36px 0;
        background: #fff; border: 0;
        box-shadow: 1px 0 0 var(--line);
    }
    .site-logo { display: inline-block; }
    .site-logo__pc { display: block; width: 190px; }
    .site-logo__m, .site-header__btns { display: none; }

    .gnb {
        position: static; margin-top: 56px; padding: 0;
        overflow: visible; visibility: visible; opacity: 1; transform: none;
        background: none;
    }
    .gnb__list { margin-right: -36px; }
    .gnb__item { position: relative; border: 0; padding-right: 36px; }
    .gnb__link {
        position: relative; display: inline-block; padding: 11px 0;
        font-size: 17px; font-weight: 500; color: var(--text);
        transition: color .2s;
    }
    .gnb__link::after {
        content: ""; position: absolute; left: 0; right: 0; bottom: 8px; height: 2px;
        background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform .25s;
    }
    .gnb__item:hover > .gnb__link, .gnb__item.is-current > .gnb__link { color: var(--ink); font-weight: 700; }
    .gnb__item:hover > .gnb__link::after, .gnb__item.is-current > .gnb__link::after { transform: scaleX(1); }

    /* 하위 메뉴: 사이드 메뉴 오른쪽으로 펼침 (본문을 밀어내지 않음) */
    .gnb__sub {
        position: absolute; left: 100%; top: -6px; z-index: 60;
        display: block; min-width: 220px; margin: 0; padding: 12px 0;
        background: #fff; border-radius: 0 var(--radius) var(--radius) 0;
        box-shadow: var(--shadow);
        visibility: hidden; opacity: 0; transform: translateX(-8px);
        transition: opacity .2s, transform .2s, visibility .2s;
    }
    .gnb__item:hover > .gnb__sub, .gnb__item:focus-within > .gnb__sub { visibility: visible; opacity: 1; transform: none; }
    .gnb__sub a { padding: 9px 24px; font-size: 15px; }
    .gnb__sub a:hover { background: var(--soft); color: var(--ink); }

    .search { margin-top: 28px; }
    .search input { height: 44px; font-size: 14px; }
    .search button { top: 2px; }

    .site-main { margin-left: var(--side); min-height: 100vh; }

    .site-footer {
        position: fixed; left: 0; bottom: 0; z-index: 51;
        width: var(--side); padding: 22px 36px 28px;
        background: #fff; border-top: 1px solid var(--line);
        font-size: 12px;
    }
    .site-footer__tel { font-size: 13px; }
}

/* PC지만 화면 높이가 낮으면 푸터를 본문 아래로 (메뉴와 겹침 방지) */
@media (min-width: 1024px) and (max-height: 780px) {
    .site-footer { position: static; width: auto; margin-left: var(--side); padding: 32px 48px 40px; background: var(--soft); }
}
