/* ============================================================
   PAGE LAB CLINIC — common.css
   공통: 폰트 · 기본 리셋 · 헤더 · 푸터 · 모바일 하단 바 · 팝업
   모바일 분기점은 @media (max-width: 959px) 하나만 사용
   ============================================================ */
/* ---------- 0. 폰트 ---------- */
/* 영문·숫자 서체는 이 변수 하나로 관리 (2026-09-22: Helvetica → Inter 로 복귀, 사용자 요청. Google Fonts 200~700 은 partials/head.html 에서 로드).
   Inter 가 안 뜨는 환경에서는 Helvetica Neue → Helvetica → Arial 순서로 폴백. */
:root { --font-en: 'Inter', "Helvetica Neue", Helvetica, Arial, sans-serif; }
/* 고정 헤더 높이 — 이 값 하나로 관리. 헤더 아래에 붙는 sticky 요소(목록 메뉴·문의 왼쪽·뉴스 제목·About 탭 등)는 모두 이 값 + 원래 간격으로 계산.
   2026-09-29 사용자 요청 '헤더 위아래 여백 더': PC 68 → 84 → 86, 모바일 66 → 72 → 68 */
:root { --pl-header-h: 86px; }
@media (max-width: 959px) { :root { --pl-header-h: 68px; } }
/* Pretendard 자체 호스팅 */
@font-face { font-family: 'Pretendard'; src: url('../fonts/Pretendard-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Pretendard'; src: url('../fonts/Pretendard-Medium.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Pretendard'; src: url('../fonts/Pretendard-SemiBold.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Pretendard'; src: url('../fonts/Pretendard-Bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }

/* ---------- 1. 기본 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  padding-top: var(--pl-header-h);  /* 고정 헤더 높이 */
  font-family: 'Pretendard', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: #1d1d1d;
  background: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 700; line-height: 1.3; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img { max-width: 100%; height: auto; display: block; border: 0; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }

/* 본문 래퍼 — 리빌 푸터 위에 흰 배경으로 올라감 */
.pl-main { position: relative; z-index: 1; background: #fff; }

/* 영문 모드(섹션 EN 버튼이 body.lang-en 부여) — 기존 메인 규칙 유지 */
body.lang-en, body.lang-en h1, body.lang-en h2, body.lang-en h3,
body.lang-en p, body.lang-en span, body.lang-en div, body.lang-en a {
  font-family: var(--font-en) !important;
}

/* 공통 밑줄+화살표 링크 (VIEW ORIGINAL / READ MORE / 전체 보기) */
.pl-link {
  font-family: var(--font-en);
  display: inline-flex;
  width: max-content;
  align-items: center;
  color: #1d1d1d;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.pl-link .txt { position: relative; padding-bottom: 4px; }
.pl-link .txt::after { content: ''; position: absolute; left: 0; bottom: 0; width: 100%; height: 2px; background-color: #d3d3d3; }
.pl-link .txt::before { content: ''; position: absolute; left: 0; bottom: 0; width: 100%; height: 2px; background-color: #000; z-index: 1; transform: scaleX(0); transform-origin: left; transition: transform 0.3s ease-out; }
.pl-link:hover .txt::before { transform: scaleX(1); }
.pl-link::after { content: ''; display: inline-block; width: 8px; height: 8px; margin: 0 0 2px 6px; background: url('../img/sub_black_arrow.png') no-repeat center; background-size: contain; }

/* ---------- 2. 헤더 ---------- */
.pl-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--pl-header-h);
  background: #fff;
  z-index: 2000;
}
.pl-header__inner {
  height: 100%;
  padding: 0 72px;
  display: flex;
  align-items: center;
}
.pl-header__logo { display: flex; align-items: center; flex-shrink: 0; margin-right: 22px; }
.pl-header__logo img { height: 15px; width: auto; }

.pl-nav { display: flex; align-items: center; }
.pl-nav__list { display: flex; align-items: center; }
.pl-nav__link {
  display: block;
  padding: 3px 14px 0;
  font-family: var(--font-en);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  color: #1d1d1d;
  white-space: nowrap;
}
.pl-nav__link:hover { text-decoration: underline; text-underline-offset: 4px; }

.pl-header__lang { margin-left: auto; display: flex; align-items: center; gap: 12px; margin-right: 28px; }
.pl-lang__btn {
  font-family: var(--font-en);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.01em;
  color: #999;
  transition: color 0.2s;
}
.pl-lang__btn:hover { color: #1d1d1d; }
.pl-lang__btn.active {
  font-weight: 600;
  color: #1d1d1d;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
}

.pl-header__cta { padding-right: 15px; }
.pl-cta {
  display: inline-block;
  padding: 6px 18px;
  border: 1px solid #1d1d1d;
  background: #fff;
  font-family: var(--font-en);
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  color: #1d1d1d;
  text-align: center;
  transition: all .25s ease;
}
.pl-cta:hover { background: #000; color: #fff; border-color: #000; }   /* 테두리 유지 → 크기 변화 없음 */

.pl-header__toggle, .pl-header__close, .pl-header__mobile-logo, .pl-nav-overlay { display: none; }

/* ---------- 3. 푸터 (리빌) ---------- */
.custom-footer-wrap {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  z-index: -10;
  background-color: #000;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow-y: auto;
}
.footer-logo-center { flex: 1; display: flex; align-items: center; justify-content: center; margin-bottom: 0; }
.footer-logo-center img { width: 108px; height: auto; }

.footer-grid-menu {
  width: 100%;
  max-width: 1444px;
  margin: 0 auto 80px;
  padding: 0 72px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
}
.footer-grid-menu .footer-col:nth-child(1) { justify-self: start; }
.footer-grid-menu .footer-col:nth-child(2),
.footer-grid-menu .footer-col:nth-child(3) { justify-self: center; }
.footer-grid-menu .footer-col:nth-child(4) { justify-self: end; }

.footer-col-title { font-family: var(--font-en); font-size: 13px; font-weight: 600; color: #fff; margin: 0 0 10px; }
.footer-col-list li { font-size: 13px; font-weight: 400; line-height: 1.6; color: #999; margin-bottom: 4px; word-break: keep-all; }
.footer-col-list li.mt-8 { margin-top: 12px; }
.footer-col-list a { color: #999; transition: color 0.3s ease; }
.footer-col-list a:hover { color: #fff; }

.footer-bottom-wrapper { width: 100%; max-width: 1444px; margin: 0 auto 28px; }
.footer-bottom-links { display: flex; justify-content: flex-start; gap: 18px; padding: 0 72px; margin-bottom: 14px; }
.footer-bottom-links a { font-size: 12px; font-weight: 400; color: #999; transition: color 0.3s ease; }
.footer-bottom-links a:hover { color: #fff; }
.footer-bottom-bar { position: relative; padding: 16px 72px 0; display: flex; align-items: center; }
.footer-bottom-bar::before { content: ""; position: absolute; top: 0; left: 72px; right: 72px; border-top: 1px solid #333; }
.footer-copyright { font-family: var(--font-en); font-size: 12px; color: #999; }

/* ---------- 4. 모바일 하단 바 (PC 숨김) ---------- */
.mobile-bottom-bar { display: none; }

/* ---------- 5. 메인 팝업 ---------- */
.pagelab-popup-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.7); z-index: 9999999;
  display: flex; justify-content: center; align-items: center;
  opacity: 0; visibility: hidden; transition: opacity 0.3s ease;
}
.pagelab-popup-overlay.show { opacity: 1; visibility: visible; }
.pagelab-popup-content {
  width: 90%; max-width: 450px;
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.3); margin: 0;
}
.pagelab-popup-body picture img { width: 100%; height: auto; display: block; }
.pagelab-popup-footer { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; background: #1d1d1d; color: #fff; }
.pagelab-popup-footer label { cursor: pointer; display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 400; line-height: 1; margin: 0; }
.pagelab-popup-footer input[type="checkbox"] { width: 14px; height: 14px; margin: 0; cursor: pointer; }
.pagelab-popup-close { background: none; border: none; color: #fff; cursor: pointer; font-size: 12px; padding: 0; font-weight: 400; line-height: 1; }

/* ============================================================
   모바일 (≤ 959px)
   ============================================================ */
@media (max-width: 959px) {

  /* 헤더 */
  .pl-header__inner { padding: 0 20px; }
  .pl-header__logo img { height: 14px; }
  .pl-header__cta { display: none; }

  /* 언어 버튼 — 비활성 언어만 작은 테두리 버튼으로 (기존 모바일 규칙과 동일) */
  .pl-header__lang { margin-right: 14px; gap: 0; }
  .pl-lang__btn.active { display: none; }
  .pl-lang__btn {
    display: inline-flex; align-items: center; justify-content: center;
    height: 21px; padding: 0 13px;
    border: 1px solid #222; background: #fff;
    font-size: 12px; font-weight: 600; letter-spacing: -0.01em; color: #1d1d1d;
    text-decoration: none;
  }
  body.open-overlay-menu .pl-header__lang { visibility: hidden; }

  .pl-header__toggle {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    margin-left: 0; width: 28px; height: 28px; padding: 0 0 0 4px;
    background: none; border: 0;
  }
  .pl-header__toggle { gap: 4px; }
  /* 워드프레스(Uncode) 햄버거와 같은 크기: 20×2px, 둥근 끝, 선 간격 6px (2026-09-28) */
  .pl-header__toggle span { display: block; width: 20px; height: 2px; border-radius: 5px; background: #1d1d1d; }

  /* 오프캔버스 메뉴 (우측에서 등장) */
  .pl-nav {
    position: fixed; top: 0; right: 0;
    width: 88%; max-width: 400px;
    height: 100vh; height: 100dvh;
    background: #101213;
    display: flex; flex-direction: column;
    padding: 52px 0 68px;
    transform: translateX(100%);
    transition: transform 0.6s cubic-bezier(0.785, 0.135, 0.15, 0.86);
    overflow-y: auto;
    z-index: 100000;
    align-items: stretch;   /* 데스크톱의 가운데 정렬을 끊고 왼쪽 정렬 (2026-09-28) */
  }
  body.open-overlay-menu .pl-nav { transform: none; }
  .pl-nav__list { flex-direction: column; align-items: stretch; flex: 1 1 auto; }
  .pl-nav__link { padding: 6px 20px 14px; font-size: 17px; line-height: 1.3; color: #fff; }   /* 검은 영역 왼쪽에서 20px (2026-09-28 사용자 요청) */
  .pl-nav__link:hover { text-decoration: none; }

  .pl-header__close {
    display: block; position: absolute; top: calc(var(--pl-header-h) / 2 - 9px); right: 34px;   /* 햄버거와 같은 높이(헤더 가운데) */
    width: 20px; height: 20px; background: none; border: 0; padding: 0;
  }
  .pl-header__close::before, .pl-header__close::after {
    content: ''; position: absolute; left: 0; top: 50%; width: 20px; height: 1.5px; background: #fff;
  }
  .pl-header__close::before { transform: rotate(45deg); }
  .pl-header__close::after { transform: rotate(-45deg); }

  .pl-header__mobile-logo { display: block; margin-top: auto; padding: 0 0 0 20px; }
  .pl-header__mobile-logo img { width: 80px; height: auto; }

  .pl-nav-overlay {
    display: block; position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0; pointer-events: none; transition: opacity 0.4s ease;
    z-index: 99999;
  }
  body.open-overlay-menu .pl-nav-overlay { opacity: 1; pointer-events: auto; }
  body.open-overlay-menu { overflow: hidden; }
  /* 메뉴가 열리면 헤더(메뉴·덮개가 헤더 안에 있음)를 페이지·하단 바보다 위로 올린다 — 덮개가 메뉴 위를 가려 링크가 눌리지 않던 문제(2026-09-28).
     닫을 때는 메뉴가 다 빠져나간 뒤(0.6초) 원래 높이로 내려간다. */
  .pl-header { transition: z-index 0s 0.6s; }
  body.open-overlay-menu .pl-header { z-index: 100001; transition-delay: 0s; }

  /* 푸터 — 일반 흐름 */
  .custom-footer-wrap { position: relative; height: auto; z-index: 1; padding-top: 60px; padding-bottom: 100px; }
  .footer-logo-center { margin-top: 0; margin-bottom: 80px; }
  .footer-logo-center img { width: 120px; }
  .footer-grid-menu { grid-template-columns: 1fr; gap: 38px; padding: 0 20px; margin-bottom: 48px; text-align: center; }
  /* 데스크톱의 1열 시작/4열 끝 정렬을 해제해 모든 열을 가운데로 (원본은 min-width 미디어 안에 있던 규칙) */
  .footer-grid-menu .footer-col:nth-child(1),
  .footer-grid-menu .footer-col:nth-child(2),
  .footer-grid-menu .footer-col:nth-child(3),
  .footer-grid-menu .footer-col:nth-child(4) { justify-self: stretch; }
  .footer-col-title { font-size: 12px; margin-bottom: 6px; text-align: center; }
  .footer-col-list li { font-size: 12px; line-height: 1.5; text-align: center; }
  .footer-bottom-wrapper { margin-bottom: 20px; }
  .footer-bottom-links { padding: 0 20px; margin-bottom: 12px; justify-content: center; }
  .footer-bottom-links a { font-size: 12px; }
  .footer-bottom-bar { padding: 12px 20px 0; justify-content: center; }
  .footer-bottom-bar::before { left: 20px; right: 20px; }
  .footer-copyright { font-size: 11px; text-align: center; }

  /* 모바일 하단 고정 바 */
  .mobile-bottom-bar {
    position: fixed;
    bottom: -40px;
    left: 0;
    width: 100%;
    background-color: #000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px calc(56px + env(safe-area-inset-bottom)) 20px;
    margin: 0;
    z-index: 9999;
  }
  .mobile-bottom-bar .nav-item {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    color: #fff; font-size: 10px; gap: 8px; width: 18%;
  }
  .mobile-bottom-bar .nav-item img { width: 24px; height: 24px; display: block; object-fit: contain; }
}

/* ===== 시술 상세: 2블록 제목이 사진 영역으로 넘어가지 않게 (2026-09-21 사용자 요청) =====
   원본은 제목 래퍼가 56% 폭으로 우측 사진(58%)과 겹치게 설계돼 있고 수동 줄바꿈(<br>)으로 짧게 유지했으나,
   자동 줄바꿈으로 바꾸면서 국·영문 모두 PC 에서 래퍼 폭을 사진 왼쪽 여백(약 42%) 안으로 제한해 줄바꿈시킨다. */
@media (min-width: 960px) {
  .pl-main .sb02-title-wrap { width: 40%; }   /* 페이지 CSS(56%)보다 뒤에 오지 않아도 이기도록 특이도 +1 */
}
