/* =========================================================
   내부 페이지 공통 (about / implant 등)
   ========================================================= */
/* 시안 0910 — 밝은 버전 기본 배경은 #F5F6F8 다.
   흰색이면 흰 카드가 배경에 묻혀 경계가 사라진다. 다크 페이지는
   dark.css 가 #0D1B2E 로 덮는다. */
body { background: #f5f6f8; color: #1f2937; }
.page { display: block; }

/* 배너 */
.page-hero {
    position: relative; min-height: 260px;
    display: flex; align-items: center; overflow: hidden; color: #fff;
}
.page-hero__bg {
    position: absolute; inset: 0; z-index: -1;
    background: #263d5e url('/assets/images/hero.webp') center/cover no-repeat;
}
.page-hero--treatment .page-hero__bg {
    background-image: url('/assets/images/clinic/oproom-unit.webp');
    background-position: center 20%;
}
.page-hero__bg::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(90deg, rgba(6,16,38,.72) 0%, rgba(6,16,38,.45) 60%, rgba(6,16,38,.3) 100%);
}
.page-hero__inner {
    position: relative; width: 100%; max-width: 1100px; margin: 0 auto;
    padding: calc(var(--header-h) + 20px) 24px 28px;
}
.page-hero__title { margin: 0 0 8px; font-size: 30px; font-weight: 700; letter-spacing: -.02em; }
.page-hero__subtitle { margin: 0; font-size: 16px; font-weight: 400; color: rgba(255,255,255,.8); }

/* 라이트 배너 페이지의 헤더 — 처음부터 흰 배경 + 네이비 로고(흰 로고가 묻히므로) */
body.hero-light .site-header { background: #fff; box-shadow: 0 1px 0 rgba(17, 24, 39, .06); }
body.hero-light .site-header__inner,
body.hero-light .utilnav__user { color: #1f2937; }
body.hero-light .hamburger--header span { background: #4A4C4D; }
body.hero-light .brand__img--light { opacity: 0; }
body.hero-light .brand__img--dark { opacity: 1; }
body.hero-light .hsocial__btn { background: rgba(20, 48, 94, .05); border-color: rgba(20, 48, 94, .18); }
/* SNS 아이콘 — 햄버거와 같은 그레이 계열 (260904) */
body.hero-light .hsocial__btn img { filter: brightness(0) invert(74%); }

/* 라이트 배너 — 메인 히어로와 동일한 풀블리드 사진 배너 (260904)
   치과소개 · 의료진소개 · 임플란트. 메인과 달리 슬라이드 없이 한 장으로 고정한다. */
.page-hero.page-hero--light {
    position: relative; overflow: hidden; isolation: isolate;
    background: #0d1b2e; color: #fff;
    min-height: calc(var(--header-h) + clamp(300px, 40vh, 460px));
    padding-top: var(--header-h);           /* 흰 헤더 아래부터 사진이 시작 */
    display: flex; align-items: flex-end;
}
/* 사진 — 헤더 아래 영역을 가득 채운다 */
.page-hero--light .page-hero__figure {
    position: absolute; left: 0; right: 0; top: var(--header-h); bottom: 0;
    z-index: 0; margin: 0; max-width: none;
}
.page-hero--light .page-hero__figure img,
.page-hero--light .page-hero__figure .img-ph {
    position: absolute; inset: 0;
    width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover;
    display: block; border: 0; border-radius: 0;
}
/* 사진 위 딤 — 좌측 텍스트 가독성 확보 (메인 히어로와 동일 규칙) */
.page-hero.page-hero--light::after {
    content: ''; position: absolute; left: 0; right: 0; top: var(--header-h); bottom: 0;
    z-index: 1; pointer-events: none;
    background:
        linear-gradient(90deg, rgba(13, 27, 46, .74) 0%, rgba(13, 27, 46, .5) 46%, rgba(13, 27, 46, .22) 100%),
        linear-gradient(180deg, rgba(13, 27, 46, .3) 0%, rgba(13, 27, 46, 0) 34%, rgba(13, 27, 46, .42) 100%);
}
.page-hero--light .page-hero__inner {
    position: relative; z-index: 2; display: block;
    padding: clamp(40px, 7vh, 90px) 24px clamp(28px, 4.5vh, 56px);
}
.page-hero--light .page-hero__title {
    margin: 0 0 14px; font-size: clamp(26px, 3.6vw, 42px); font-weight: 700;
    color: #fff; line-height: 1.3; letter-spacing: -.03em;
    text-shadow: 0 2px 18px rgba(13, 27, 46, .45);
}
.page-hero--light .page-hero__subtitle {
    font-size: clamp(14px, 1.6vw, 17px); line-height: 1.7;
    color: rgba(255, 255, 255, .88); text-shadow: 0 1px 12px rgba(13, 27, 46, .4);
}
@media (max-width: 760px) {
    .page-hero.page-hero--light { min-height: calc(var(--header-h) + 54svh); }
    .page-hero.page-hero--light::after {
        background:
            linear-gradient(180deg, rgba(13, 27, 46, .46) 0%, rgba(13, 27, 46, .24) 30%, rgba(13, 27, 46, .5) 62%, rgba(13, 27, 46, .78) 100%);
    }
    .page-hero--light .page-hero__inner { padding: 48px 20px 30px; }
}

/* breadcrumb */
/* 띠섹션을 본문 위 스택 컨텍스트로 (드롭다운이 본문 위에 뜸).
   단, 전체 메뉴 오버레이(50)·모달(100) 보다는 아래여야 메뉴를 열 때 가려짐 → z-index 30 */
.page-nav { border-bottom: 1px solid #e8ebf0; background: #fff; position: relative; z-index: 30; }
.page-nav__inner {
    max-width: 1100px; margin: 0 auto; padding: 16px 24px;
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; font-size: 15px; flex-wrap: wrap;
}
.page-nav__crumb { position: relative; display: flex; align-items: center; gap: 10px; }
.page-nav__group { color: #B0B8C1; }
.page-nav__group:hover { color: #8b96a3; }
.page-nav__current {
    display: inline-flex; align-items: center; gap: 6px;
    color: #333D4B; font-weight: 700; font-size: 15px;
    background: none; border: 0; padding: 0; cursor: pointer;
}
.page-nav__chev { width: 18px; height: 18px; display: block; flex-shrink: 0; transition: transform .2s; }
.page-nav__crumb.is-open .page-nav__chev { transform: rotate(180deg); }

/* 브레드크럼 드롭다운 메뉴 */
.page-nav__menu {
    position: absolute; top: calc(100% + 10px); left: 0; z-index: 40;
    min-width: 200px; padding: 8px; background: #fff;
    border: 1px solid #e8ebf0; border-radius: 12px;
    box-shadow: 0 14px 40px rgba(20, 48, 94, .14);
    display: flex; flex-direction: column;
}
.page-nav__menu[hidden] { display: none; }
.page-nav__menu-link {
    padding: 10px 14px; border-radius: 8px; font-size: 14.5px; color: #4b5563; white-space: nowrap;
}
.page-nav__menu-link:hover { background: #f1f2f2; color: #263d5e; }
.page-nav__menu-link.is-active { color: var(--brand); font-weight: 700; background: #f7ece7; }

/* 목록 카테고리 셀렉트 드롭다운 */
.list-select-wrap { position: relative; }
.list-select__menu {
    position: absolute; top: calc(100% + 8px); left: 0; z-index: 40;
    min-width: 170px; padding: 6px; background: #fff;
    border: 1px solid #e8ebf0; border-radius: 10px;
    box-shadow: 0 12px 32px rgba(20, 48, 94, .12);
    display: flex; flex-direction: column;
}
.list-select__menu[hidden] { display: none; }
.list-select__menu button {
    text-align: left; padding: 9px 12px; border: 0; background: none; cursor: pointer;
    font-size: 14px; color: #4b5563; border-radius: 7px;
}
.list-select__menu button:hover { background: #f1f2f2; }
.list-select__menu button.is-active { color: var(--brand); font-weight: 700; background: #f7ece7; }

/* 섹션 공통 */
.sec { max-width: 1100px; margin: 0 auto; padding: 64px 24px; }
.sec--center { text-align: center; }
.sec__head { margin-bottom: 32px; }
.sec--center .sec__head { margin-bottom: 40px; }
.sec__eyebrow {
    display: block; font-size: 13px; font-weight: 600; letter-spacing: .02em;
    color: #9aa5b1; text-transform: uppercase; margin-bottom: 6px;
}
.sec__title { margin: 0; font-size: 26px; font-weight: 700; color: #111827; }
.sec__lead { margin: 14px auto 0; max-width: 760px; color: #6b7280; font-size: 16px; line-height: 1.7; }

/* 이미지 자리표시자 */
.img-ph {
    background: #e9edf2; color: #97a2af;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; border-radius: 8px;
}

/* 사이트 푸터 */
/* UI 시안(0828) — 배경에서 블루로 떨어지는 그라데이션 */
/* =========================================================
   푸터 — 시안 0910 p6 / p9
   밝은 버전과 다크 버전에 '동일하게' 적용한다. 규칙을 하나로 두는
   비결은 그라데이션을 투명에서 시작하는 것이다. 그러면 위쪽은 그
   페이지의 배경색(밝은 #F5F6F8 / 다크 #0D1B2E)이 그대로 비쳐서
   테마별로 시작색을 따로 지정할 필요가 없고, 경계에 띠도 생기지
   않는다. (예전에는 테마마다 7~8개 스톱을 손으로 찍어 뒀었다.)

   --fb-fade 구간에서 베이비 블루로 넘어가고, 그 아래는 단색이다.
   글씨는 전부 단색 구간 안에만 놓는다 — 시안의 "하늘색 영역 안에
   글씨 (그라데이션 중간쯤 글씨X)". 그래서 안쪽 상단 여백이
   --fb-fade 보다 커야 한다.
   ========================================================= */
.site-footer-b {
    --fb-blue: #6a9fe8;                       /* 베이비 블루 */
    --fb-fade: clamp(200px, 30vh, 300px);     /* 색이 넘어가는 구간 */
    background: linear-gradient(180deg,
        rgba(106, 159, 232, 0) 0,
        var(--fb-blue) var(--fb-fade),
        var(--fb-blue) 100%);
    border-top: 0; color: #fff;
}
.site-footer-b__inner {
    /* 좌우 끝선을 헤더·본문과 맞춘다. 1100px 틀에 가둬 두면 1440 화면에서
       194px 이나 안쪽에서 시작해 위 섹션들과 어긋났다. (요청 260911) */
    max-width: none; margin: 0 auto;
    /* 위: 그라데이션 구간을 지나고 나서 글씨가 시작한다
       아래: 시안 "푸터 글씨 끝선 더 하단으로" — 여백을 88px 에서 줄였다 */
    padding: calc(var(--fb-fade) + 28px) clamp(20px, 3.2vw, 56px) 40px;
}
/* 시안 p9 배치 — 로고는 왼쪽에서 세로 가운데, 메뉴는 오른쪽 한 줄,
   SNS 는 그 메뉴 아래 오른쪽. (요청 260911) */
.site-footer-b__top {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas:
        "brand nav"
        "brand sns";
    align-items: center;
    column-gap: clamp(24px, 3.4vw, 56px);
    row-gap: 18px;
    padding-bottom: 22px;
    /* style.css 의 옛 푸터가 여기에 가로 구분선을 긋고 있었다.
       선언을 빼는 것만으로는 안 지워진다 — 0 으로 덮어야 한다. */
    border-bottom: 0;
}
.site-footer-b__brand { grid-area: brand; align-self: center; }
.site-footer-b__nav   { grid-area: nav; justify-self: end; align-self: end; }
.site-footer-b__sns   { grid-area: sns; justify-self: end; align-self: start; }
.site-footer-b__brand img { height: 38px; width: auto; display: block; }
.site-footer-b__nav { display: flex; flex-wrap: wrap; gap: 22px; }
.site-footer-b__nav a { font-size: 15px; font-weight: 600; color: #ffffff; }
.site-footer-b__nav a:hover { color: rgba(255, 255, 255, .72); }

/* SNS — 흰 원 바탕에 베이비 블루 아이콘 (시안 "아이콘 화이트 + 베이비블루") */
.site-footer-b__sns { display: flex; justify-content: flex-end; gap: 12px; margin-top: 0; }
.site-footer-b__sns-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 50%;
    background: #ffffff; color: var(--fb-blue);
    transition: transform .25s ease, background .25s ease;
}
.site-footer-b__sns-btn:hover { transform: translateY(-2px); background: rgba(255, 255, 255, .88); }
/* 아이콘은 인라인 SVG 가 아니라 <img> 라서 fill/currentColor 가 먹지 않는다.
   원본이 흰색 SVG 이므로 흰 원 위에서는 아예 보이지 않았다.
   이미지를 숨기고 같은 파일을 mask 로 써서 베이비 블루를 정확히 칠한다.
   (filter 체인으로 색을 맞추는 방법은 근사값이라 채널마다 어긋난다.) */
.site-footer-b__sns-btn img { display: none; }
.site-footer-b__sns-btn::before {
    content: ''; display: block; width: 17px; height: 17px;
    background-color: var(--fb-blue);
    -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
    -webkit-mask-position: center;  mask-position: center;
    -webkit-mask-size: contain;     mask-size: contain;
}
.site-footer-b__sns-btn--instagram::before {
    -webkit-mask-image: url('/assets/icons/instagram.svg'); mask-image: url('/assets/icons/instagram.svg'); }
.site-footer-b__sns-btn--youtube::before {
    -webkit-mask-image: url('/assets/icons/youtube.svg');   mask-image: url('/assets/icons/youtube.svg'); }
.site-footer-b__sns-btn--blog::before {
    -webkit-mask-image: url('/assets/icons/blog.svg');      mask-image: url('/assets/icons/blog.svg'); }
.site-footer-b__sns-btn--kakao::before {
    -webkit-mask-image: url('/assets/icons/kakao.svg');     mask-image: url('/assets/icons/kakao.svg'); }
.site-footer-b__sns-btn--naver::before {
    -webkit-mask-image: url('/assets/icons/naver.svg');     mask-image: url('/assets/icons/naver.svg'); }

.site-footer-b__info { margin-top: 28px; }
.site-footer-b__info p { margin: 0 0 8px; font-size: 13.5px; color: rgba(255, 255, 255, .82); line-height: 1.6; }
.site-footer-b__info strong { color: #fff; }
.site-footer-b__info .bar { margin: 0 8px; color: rgba(255, 255, 255, .45); }
.site-footer-b__copy { font-size: 13px; color: rgba(255, 255, 255, .7); }

@media (max-width: 640px) {
    .page-hero__title { font-size: 22px; }
    .page-hero__subtitle { font-size: 14px; }
    .sec { padding: 48px 18px; }
    .sec__title { font-size: 22px; }
    .site-footer-b__top {
        grid-template-columns: 1fr;
        grid-template-areas: "brand" "nav" "sns";
        align-items: start;
    }
    .site-footer-b__brand { align-self: start; }
    .site-footer-b__nav   { justify-self: start; align-self: start; }
    .site-footer-b__sns   { justify-self: stretch; }
    /* SNS 아이콘 가운데 정렬 (요청 260911).
       justify-content 만으로는 안 된다 — 이 nav 는 flex 아이템이라
       내용 폭(126px)까지만 늘어나서 가운데로 볼 것이 없었다.
       폭을 펴 준 뒤에야 가운데 정렬이 의미를 갖는다. */
    .site-footer-b__sns { width: 100%; justify-content: center; align-self: auto; margin-top: 6px; }
}

/* =========================================================
   페이지 진입 트랜지션 (아래 → 위로 올라오며 등장)
   ========================================================= */
@keyframes pageFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pageRiseUp {
    from { opacity: 0; transform: translateY(36px); }
    to   { opacity: 1; transform: translateY(0); }
}
.page > * { animation: pageRiseUp .6s cubic-bezier(.22,.61,.36,1) both; }
.page > :first-child { animation: pageFadeIn .55s ease both; } /* 배너는 페이드만 (상단 공백 방지) */
.page > :nth-child(2) { animation-delay: .06s; }
.page > :nth-child(3) { animation-delay: .13s; }
.page > :nth-child(4) { animation-delay: .20s; }
.page > :nth-child(5) { animation-delay: .27s; }
.page > :nth-child(6) { animation-delay: .34s; }
.page > :nth-child(7) { animation-delay: .41s; }
.page > :nth-child(8) { animation-delay: .48s; }

@media (prefers-reduced-motion: reduce) {
    .page > * { animation: none !important; }
}

/* =========================================================
   공통 컴포넌트 — 카테고리 태그 / 목록 도구 / 페이지네이션
   ========================================================= */
.tag {
    display: inline-block; padding: 4px 11px; border-radius: 6px;
    font-size: 12.5px; font-weight: 600; line-height: 1.3;
}
.tag--implant  { background: #e8f3ff; color: #c1907e; }
.tag--tip      { background: #fff3e0; color: #e08a00; }
.tag--notice   { background: #efeaff; color: #7c5cff; }
.tag--paper    { background: #e7f7ee; color: #12a35f; }
.tag--news     { background: #e2f5f4; color: #0d9488; }
.tag--device   { background: #ffeceb; color: #ef5350; }
.tag--care     { background: #e8f3ff; color: #c1907e; }
.tag--treat    { background: #fff3e0; color: #e08a00; }
.tag--cosmetic { background: #ffecf2; color: #ec4899; }
.tag--cost     { background: #e7f7ee; color: #12a35f; }

/* 목록 상단 도구 (필터 + 검색) */
.list-tools { display: flex; align-items: center; gap: 10px; }
.list-select {
    display: inline-flex; align-items: center; gap: 6px; height: 42px; padding: 0 14px;
    border: 1px solid #e5e8eb; border-radius: 8px; background: #fff;
    color: #4e5968; font-size: 14px; font-weight: 500; cursor: pointer;
}
.list-select__chev { width: 16px; height: 16px; }
.list-search {
    display: flex; align-items: center; height: 42px; padding: 0 6px 0 14px;
    border: 1px solid #e5e8eb; border-radius: 8px; background: #fff;
}
.list-search input { border: 0; outline: 0; width: 200px; background: none; font-size: 14px; color: #333d4b; }
.list-search input::placeholder { color: #b0b8c1; }
.list-search button {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border: 0; background: none; color: #8b95a1; cursor: pointer;
}
.list-search button svg { width: 18px; height: 18px; }

/* 페이지네이션 */
.pager { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 48px; }
.pager__num, .pager__arrow {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 36px; height: 36px; border-radius: 8px; border: 0; background: none;
    color: #8b95a1; font-size: 15px; cursor: pointer; text-decoration: none;
}
.pager__num.is-active { background: #333d4b; color: #fff; font-weight: 700; }
.pager__arrow:hover, .pager__num:hover:not(.is-active) { background: #f1f3f5; color: #4e5968; }

@media (max-width: 768px) {
    .page-nav__aside { width: 100%; }
    .list-tools { width: 100%; }
    .list-search { flex: 1; }
    .list-search input { width: 100%; flex: 1; }
}

/* 고정 헤더에 가리지 않도록 — 앵커 이동 시 여백 확보 */
[id] { scroll-margin-top: calc(var(--header-h) + 16px); }
