/* layout/footer.css — 부모 컴포넌트 오버라이드
   로드 순서: 부모 archf-* → common → animation → layout/* → page/{슬러그} */

/* ── 푸터 ── */

/* 부모가 정의하지 않는 변수 — SNS hover·라벨·메뉴 hover 가 모두 이 값을 쓴다 */
.site-footer {
    --footer-accent: var(--main-color);
}

.site-footer__bar-inner{
    align-items: stretch;
}
.site-footer__right{
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
@media (max-width: 1023px) {
    .site-footer__bar {
        padding: 2rem var(--one-space-safe) 5rem;
    }
}

/* 푸터 링크 — 비급여수가표 + 개인정보처리방침·이용약관 (inc/footer-links.php) */

.site-footer__link-sep {
    margin: 0 6px;
    opacity: 0.4;
}

/* 푸터 링크 모달 — 마크업 inc/footer-links.php */

.ft-modal {
    position: fixed;
    inset   : 0;
    z-index : var(--z-modal, 400);
    display : flex;
    align-items: center;
    justify-content: center;
    padding : 20px;
}

.ft-modal[hidden] { display: none; }

.ft-modal-bd {
    position  : absolute;
    inset     : 0;
    background: rgba(0, 0, 0, 0.55);
}

.ft-modal-box {
    position     : relative;
    display      : flex;
    flex-direction: column;
    width        : 100%;
    max-width    : 860px;
    max-height   : 100%;
    border-radius: 8px;
    background   : #fff;
    color        : var(--one-txt-color);
}

.ft-modal-hd {
    display    : flex;
    align-items: center;
    gap        : 16px;
    flex-shrink: 0;
    padding    : 24px 28px;
    border-bottom: 1px solid var(--gray-color02);
}

.ft-modal-tit {
    margin     : 0;
    font-size  : var(--one-p-tit);
    font-weight: 600;
    line-height: 1.3;
}

.ft-modal-x {
    margin-left: auto;
    padding    : 0 4px;
    border     : 0;
    background : none;
    color      : var(--gray-color01);
    font-size  : 28px;
    line-height: 1;
    cursor     : pointer;
}

/* 본문만 스크롤된다 — 머리줄은 남는다.
   약관은 분량이 많아 .txt-wrap 기본 본문(19px)으로는 너무 크다.
   크기 기준을 여기 한 값으로 두고 제목은 em 으로 따라가게 한다 */
.ft-modal-body {
    --ft-modal-size: 16px;
    overflow-y : auto;
    padding    : 24px 28px 32px;
    font-size  : var(--ft-modal-size);
    line-height: 1.75;
}

.ft-modal-body > * + * { margin-top: 1em; }

/* 조문 머리는 앞 문단과 떼어 놓는다 */
.ft-modal-body > * + h3,
.ft-modal-body > * + h4,
.ft-modal-body > * + h5 { margin-top: 2.2em; }

.ft-modal-body h3,
.ft-modal-body h4,
.ft-modal-body h5 {
    font-weight: 600;
    line-height: 1.4;
}

.ft-modal-body h3 { font-size: 1.35em; }
.ft-modal-body h4 { font-size: 1.15em; }
.ft-modal-body h5 { font-size: 1em; }

/* 부모 리셋이 list-style 을 지운다 — 약관 목록은 점이 있어야 읽힌다 */
.ft-modal-body ul {
    padding-left: 1.2em;
    list-style  : disc;
}

.ft-modal-body li + li { margin-top: 0.4em; }

/* 불러오는 중 · 원고가 아직 없는 페이지 */
.ft-modal-load,
.ft-modal-empty {
    padding   : 40px 0;
    color     : var(--gray-color01);
    text-align: center;
}

@media all and (max-width: 639px) {
    .ft-modal { padding: 0; }

    .ft-modal-box {
        height       : 100%;
        max-width    : none;
        border-radius: 0;
    }

    .ft-modal-hd { padding: 18px 20px; }

    .ft-modal-body {
        --ft-modal-size: 15px;
        padding: 20px 20px 28px;
    }
}

/* 맨 위로 버튼 */

/* 퀵메뉴와 같은 층으로 내린다 — 바로 위아래로 붙어 있어 따로 놀면
   메뉴가 열렸을 때 바는 가려지고 버튼만 떠 있는다.
   부모 기본값은 --z-modal(400) 이라 메가 패널·모바일 풀스크린 메뉴 위로 올라온다 */
.back-to-top {
    z-index: var(--one-z-quick, 90);
}

/* 부모 아이콘 55%/55% 축소 */
.back-to-top__icon {
    width: 33%;
    height: auto;
    display: block;
    flex-shrink: 0;
}
