/* =========================================================
   업무분야 전용 컴포넌트 (style.css 다음에 불러옵니다)
   토큰은 style.css :root 변수만 사용 — 새 색·새 브레이크포인트 금지
   ========================================================= */

/* ---------- 헤더: 현재 페이지 표시 (신규 페이지 전용) ---------- */
/* aria-current="page": 지금 보는 페이지 / "true": 사례 상세에서 속한 분야 목록 (README 6장) */
.gnb__nav a[aria-current],
.gnb__item:has([aria-current]) > a { color: var(--c-primary); font-weight: 700; }

/* ---------- 브레드크럼 ---------- */
.breadcrumb ol { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 15px; color: var(--c-muted); }
.breadcrumb li + li::before { content: ">"; margin-right: 8px; color: var(--c-line); }
.breadcrumb a:hover { color: var(--c-primary); }
.breadcrumb [aria-current="page"] { color: var(--c-title); font-weight: 700; }

/* ---------- 등록 전문분야 뱃지 (부동산·학교폭력만) ---------- */
.badge { display: inline-flex; align-items: center; min-height: 30px; padding: 0 12px; border-radius: var(--radius-pill); font-size: 14px; font-weight: 700; line-height: 1.3; white-space: nowrap; }
.badge--registered { border: 1.5px solid var(--c-primary); color: var(--c-primary); background: var(--c-bg); }

/* ---------- 페이지 히어로 (서브페이지 상단) ---------- */
.page-hero { position: relative; overflow: hidden; padding: 56px 0 72px; }
.page-hero > .container { position: relative; z-index: 1; }
.page-hero__title { margin-top: 24px; font-family: var(--font-title); font-weight: 700; font-size: 44px; line-height: 1.35; color: var(--c-title); }
.page-hero__sub { margin-top: 16px; max-width: 40em; font-size: 18px; }

/* ---------- 허브: 분야 카드 ---------- */
.areas-hub__grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; }
.areas-hub__side { display: grid; gap: 40px; }
.areas-hub .link-more { margin-top: 28px; }
.area__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* 이혼 큰 카드 */
.area-feature__img { aspect-ratio: 4 / 3; margin-bottom: 28px; }
.area-feature .area__name { font-size: 30px; }
/* 이미지가 없을 때: 내용을 세로 가운데로 모으고 소나무 라인 장식을 오른쪽 아래에 (README 13장 DR-02) */
.area-feature { position: relative; overflow: hidden; }
.area-feature:not(:has(.area-feature__img)) { justify-content: center; }
.area-feature:not(:has(.area-feature__img)) .area__body { flex: 0 0 auto; }
.area-feature > :not(.area-feature__deco) { position: relative; }
.area-feature__deco { right: 32px; bottom: 24px; width: 260px; }

/* 그 외 상담 분야 (띠) */
.area-others { display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 16px 32px; margin-top: 40px; padding: 28px 36px; background: var(--c-bg-alt); border-radius: var(--radius-lg); }
.area-others__title { font-size: 19px; font-weight: 700; color: var(--c-title); }
.area-others .chip { background: var(--c-bg); }
.area-others__text { color: var(--c-text); }

/* ---------- 상세 페이지 히어로: 텍스트 55% + 이미지 슬롯 45% ---------- */
.page-hero__inner { display: grid; grid-template-columns: 55fr 45fr; gap: 56px; align-items: center; }
.page-hero__inner:not(:has(.page-hero__media)) { grid-template-columns: 1fr; } /* 이미지 슬롯을 지운 경우 */
.page-hero__lead { margin-top: 12px; font-size: 21px; font-weight: 700; line-height: 1.5; color: var(--c-primary); }
.page-hero__text .btn-group { margin-top: 32px; }
.page-hero__note { margin-top: 14px; font-size: 15px; color: var(--c-muted); }
.page-hero__text .badge { margin-top: 24px; }
.page-hero__text .badge + .page-hero__title { margin-top: 12px; }
.page-hero__media--5x4 { aspect-ratio: 5 / 4; }
.page-hero__media--4x3 { aspect-ratio: 4 / 3; }

/* ---------- 이런 고민이 있으신가요 (체크 카드) ---------- */
.concern-list { display: grid; gap: 4px; max-width: 760px; margin: 40px auto 0; } /* 카드 대신 1열 체크 리스트 (README 13장 DR-05·06) */
.concern-list__item { position: relative; padding: 14px 0 14px 56px; font-size: 18px; color: var(--c-title); }
.concern-list__item::before { content: ""; position: absolute; left: 0; top: 13px; width: 36px; height: 36px; border-radius: 50%; background: var(--c-bg-alt) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232F5D4A' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 20px no-repeat; }

/* ---------- 다루는 업무 (서비스 카드) ---------- */
.service-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; margin-top: 48px; }
.service-card { display: flex; flex-direction: column; padding: 32px; }
.service-card__num { font-family: var(--font-title); font-size: 18px; font-weight: 700; line-height: 1; color: var(--c-primary); } /* accent는 글자색 금지(4장) */
.service-card__name { margin-top: 14px; font-family: var(--font-title); font-size: 21px; font-weight: 700; line-height: 1.4; color: var(--c-title); }
.service-card__desc { margin-top: 10px; flex: 1; }
.service-card .chips { margin-top: 20px; }
.service-card .chip { min-height: 30px; padding: 0 12px; background: transparent; border: 1px solid var(--c-line); color: var(--c-muted); font-size: 14px; font-weight: 600; } /* 설명보다 칩이 먼저 보이지 않게 (README 13장 DR-07) */
.service-grid__note { margin-top: 32px; padding: 20px 28px; background: var(--c-bg); border-radius: var(--radius); }
.service-grid__note strong { color: var(--c-title); }

/* ---------- 다른 분야로 이어주는 안내 ---------- */
/* 카드 안 안내 박스 */
.crosslink { margin-top: 20px; padding: 14px 18px; background: var(--c-bg-alt); border-radius: 14px; font-size: 15px; }
.crosslink a { font-weight: 700; color: var(--c-primary); text-decoration: underline; text-underline-offset: 3px; }
/* 섹션 하단 단독 안내 박스 (카드 그리드 아래) */
.crosslink--wide { margin-top: 32px; padding: 20px 28px; background: var(--c-bg); border-radius: var(--radius); font-size: 16px; text-align: center; }
/* 다른 분야 미니 카드 */
.crosslink-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; max-width: 1040px; margin: 48px auto 0; }
.crosslink--card { display: flex; gap: 20px; margin: 0; padding: 32px; background: var(--c-white); border-radius: var(--radius-lg); font-size: 16px; }
.crosslink__body { display: flex; flex-direction: column; flex: 1; }
.crosslink__name { font-family: var(--font-title); font-size: 21px; font-weight: 700; color: var(--c-title); }
.crosslink__lead { margin-top: 6px; flex: 1; font-weight: 700; color: var(--c-primary); }
.crosslink--card .link-more { margin-top: 18px; text-decoration: none; }

/* ---------- 상담 전 준비 자료 (체크 리스트 2열) ---------- */
.prep-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 48px; max-width: 1040px; margin: 40px auto 0; padding: 20px 40px; background: var(--c-white); border-radius: var(--radius-lg); }
.prep-list__item { position: relative; padding: 16px 0 16px 36px; border-bottom: 1px solid var(--c-line); }
.prep-list__item::before { content: ""; position: absolute; left: 0; top: 19px; width: 22px; height: 22px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232F5D4A' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 20px no-repeat; }

/* ---------- FAQ (기존 .faq 재사용, 섹션 여백만 조정) ---------- */
.area-faq .faq { margin: 40px auto 0; }

/* ---------- 학교폭력 입구 탭 ---------- */
/* 기존 .tabs/.tab 스타일 재사용. 두 탭은 같은 크기 (선택 탭만 딥그린 채움) */
.entry { padding-bottom: 0; scroll-margin-top: 88px; }
.entry__tabs { margin-top: 32px; gap: 16px; }
.entry .tab { display: inline-flex; align-items: center; justify-content: center; flex: 0 1 320px; min-width: 220px; min-height: 60px; padding: 12px 24px; font-size: 17px; line-height: 1.35; text-align: center; }
.entry .tab:not(.is-active):hover { border-color: var(--c-primary); color: var(--c-primary); }
.entry .tab:focus-visible { outline: 3px solid var(--c-primary); outline-offset: 3px; }
.entry__note { margin-top: 16px; font-size: 15px; color: var(--c-muted); text-align: center; }
.entry-panel__concern { padding-top: 64px; }
.entry-panel__label { margin-bottom: 8px; text-align: center; font-size: 15px; font-weight: 700; color: var(--c-primary); }
/* JS가 켜진 경우에만 선택되지 않은 패널을 숨김 */
.has-entry-tabs .entry-panel:not(.is-active) { display: none; }

/* 진행 절차 아래 작은 안내 */
.steps-note { margin-top: 32px; font-size: 15px; color: var(--c-muted); text-align: center; }

/* ---------- 링크가 있는 카드: 마우스오버 표시 (README 13장 DR-09, 신규 페이지 전용) ---------- */
.card:has(.link-more) { transition: border-color .2s; }
.card:has(.link-more):hover { border-color: var(--c-primary); }
.link-more:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- 최종 CTA: 크림 섹션 다음에 오므로 위 여백 복원 ---------- */
.cta.cta--spaced { padding-top: var(--section-y); }

/* ---------- 업무분야 상세 (areas.html): 이미지 배너 → 번호·분야명 → 업무 목록 ---------- */
.practice-wrap { padding-top: 56px; }
.practice-nav ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.practice-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 22px; border: 1.5px solid var(--c-line); border-radius: var(--radius-pill); background: var(--c-white); font-size: 16px; font-weight: 700; color: var(--c-title); transition: border-color .2s, color .2s; }
.practice-nav a:hover { border-color: var(--c-primary); color: var(--c-primary); }

.practice { margin-top: 80px; scroll-margin-top: 100px; }
.practice__img { width: 100%; aspect-ratio: 16 / 5; object-fit: cover; border-radius: var(--radius-lg); line-height: 1.7; }
img.practice__img { display: block; height: auto; padding: 0; }
.practice__img strong { font-size: 17px; color: var(--c-title); }
.practice__body { display: grid; grid-template-columns: 360px 1fr; gap: 64px; margin-top: 40px; }
.practice__head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; align-content: start; }
.practice__num { flex-basis: 100%; font-family: var(--font-title); font-size: 18px; font-weight: 700; line-height: 1; color: var(--c-primary); }
.practice__name { font-family: var(--font-title); font-size: 34px; font-weight: 700; line-height: 1.3; color: var(--c-title); }
.practice__lead { flex-basis: 100%; margin-top: 6px; font-size: 17px; line-height: 1.7; color: var(--c-muted); word-break: keep-all; }
.practice__list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 40px; border-top: 2px solid var(--c-title); align-self: start; }
.practice__list li { position: relative; padding: 18px 0 18px 22px; border-bottom: 1px solid var(--c-line); font-size: 17px; line-height: 1.5; color: var(--c-text); word-break: keep-all; }
.practice__list li::before { content: ""; position: absolute; left: 2px; top: 27px; width: 8px; height: 8px; border-radius: 50%; background: var(--c-primary); }

/* PC·태블릿(768px 이상): 이미지·텍스트 좌우 교차 배치, 분야명은 초록 선 위에 */
@media (min-width: 768px) {
  .practice:not(.practice--others) { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
  .practice--reverse .practice__img { order: 2; }
  .practice__img { aspect-ratio: 4 / 3; }
  .practice__body { display: block; margin-top: 0; }
  .practice:not(.practice--others) .practice__head { padding-bottom: 20px; border-bottom: 2px solid var(--c-primary); }
  .practice:not(.practice--others) .practice__list { grid-template-columns: 1fr; border-top: 0; }
  .practice__list li { padding: 15px 0 15px 22px; }
  .practice__list li::before { top: 24px; }
}

.practice--others { display: grid; grid-template-columns: 360px 1fr; gap: 64px; padding: 48px; background: var(--c-bg-alt); border-radius: var(--radius-lg); }
.practice--others .practice__list { border-top-color: var(--c-primary); }

/* =========================================================
   Tablet (≤1200px)
   ========================================================= */
@media (max-width: 1200px) {
  .practice__body, .practice--others { grid-template-columns: 1fr; gap: 28px; }
  .practice:not(.practice--others) { gap: 40px; }
  .practice__lead { margin-top: 2px; }
  .areas-hub__grid, .areas-hub__side { gap: 24px; }
  .area-others { grid-template-columns: auto 1fr; }
  .area-others__text { grid-column: 1 / -1; }
  .page-hero__inner { gap: 32px; }
  .service-grid, .crosslink-list { gap: 24px; }
}

/* =========================================================
   Mobile (≤767px)
   ========================================================= */
@media (max-width: 767px) {
  .practice-wrap { padding-top: 32px; }
  .practice-nav ul { justify-content: flex-start; gap: 8px; }
  .practice-nav a { padding: 0 16px; font-size: 15px; }
  .practice { margin-top: 56px; scroll-margin-top: 80px; }
  .practice__img { aspect-ratio: 4 / 3; border-radius: var(--radius); font-size: 13px; padding: 0 16px; }
  .practice__body { margin-top: 24px; gap: 20px; }
  .practice__name { font-size: 26px; }
  .practice__lead { font-size: 15px; }
  .practice__list { grid-template-columns: 1fr; }
  .practice__list li { padding: 14px 0 14px 20px; font-size: 16px; }
  .practice__list li::before { top: 22px; }
  .practice--others { padding: 28px 20px; gap: 20px; border-radius: var(--radius); }
  .page-hero { padding: 32px 0 48px; }
  .page-hero__title { margin-top: 16px; font-size: 30px; }
  .page-hero__sub { font-size: 16px; }
  .breadcrumb ol { font-size: 14px; }
  .breadcrumb a { display: inline-flex; align-items: center; min-height: 44px; } /* 터치 영역 */

  .areas-hub__grid, .areas-hub__side { grid-template-columns: 1fr; gap: 20px; }
  .area-feature__img { display: none; } /* 이미지 슬롯 모바일 숨김 */
  .area-feature__deco { display: none; }
  .area-feature .area__name { font-size: 24px; }

  .area-others { grid-template-columns: 1fr; gap: 14px; margin-top: 32px; padding: 24px; border-radius: var(--radius); }
  .area-others__title { font-size: 18px; }

  /* 상세: 텍스트·CTA 먼저, 이미지 슬롯 숨김 */
  .page-hero__inner { grid-template-columns: 1fr; }
  .page-hero__media { display: none; }
  .page-hero__lead { font-size: 18px; }
  .page-hero__text .btn-group { margin-top: 24px; }
  .page-hero__text .btn { width: 100%; }
  .page-hero__note { font-size: 14px; }
  .page-hero__text .badge { margin-top: 16px; }

  .concern-list { gap: 0; margin-top: 24px; }
  .concern-list__item { padding: 12px 0 12px 48px; font-size: 17px; }
  .concern-list__item::before { left: 0; top: 12px; width: 34px; height: 34px; }

  .service-grid { grid-template-columns: 1fr; gap: 16px; margin-top: 28px; }
  .service-card { padding: 24px; }
  .service-card__name { font-size: 20px; }
  .service-grid__note { margin-top: 20px; padding: 18px 20px; }
  .crosslink a { display: inline-flex; align-items: center; min-height: 44px; } /* 터치 영역 */
  .crosslink--wide { margin-top: 20px; padding: 18px 20px; text-align: left; }

  .prep-list { grid-template-columns: 1fr; margin-top: 28px; padding: 8px 20px; border-radius: var(--radius); }
  .prep-list__item:last-child { border-bottom: 0; }

  .area-faq .faq { margin-top: 28px; }

  .crosslink-list { grid-template-columns: 1fr; gap: 16px; margin-top: 28px; }
  .crosslink--card { padding: 24px; gap: 16px; border-radius: var(--radius); }
  .crosslink--card .icon--lg { width: 48px; height: 48px; }

  /* 입구 탭: 두 탭이 한 줄을 반씩 채움, 줄바꿈돼도 높이 동일 */
  .entry { scroll-margin-top: 64px; }
  .entry__tabs { margin-top: 24px; gap: 10px; align-items: stretch; }
  .entry .tab { flex: 1 1 0; min-width: 0; min-height: 64px; padding: 10px 12px; font-size: 15px; }
  .entry__note { font-size: 14px; text-align: left; }
  .entry-panel__concern { padding-top: 40px; }
  .steps-note { margin-top: 8px; font-size: 14px; text-align: left; }
}
