/* ========================================================================
   [HOME COMMON R2 | 2026-10-30]
   북부 · 크라임 메인 공통 보완
   - 두 변호사 배너 / 성공사례 표기 / 차영욱 사례 3열 레일
   - 관할 법원·경찰서 탭 / 지도 제목 / 긴급 전화 CTA
   ======================================================================== */

/* 전달 받은 두 변호사 배너: 단 5% 성공사례 바로 위 */
.shared-prosecution-banner {
  background: #fff;
  padding: clamp(20px, 4vw, 52px) max(12px, env(safe-area-inset-right)) clamp(26px, 5vw, 70px);
}

.shared-prosecution-banner__inner,
.section2-banners.shared-prosecution-banner .section2-banners__inner {
  width: min(100%, 1820px);
  margin: 0 auto;
}

.shared-prosecution-banner img,
.section2-banners.shared-prosecution-banner img {
  display: block !important;
  width: 100%;
  max-width: 1820px;
  height: auto;
  margin: 0 auto;
}

/* 분야 탭과 카드의 관계를 명확히 하는 제목 */
.cases-eyebrow {
  margin: clamp(22px, 4vw, 40px) 0 clamp(14px, 2.2vw, 24px);
  color: #123474;
  font-size: clamp(18px, 2.1vw, 30px);
  font-weight: 800;
  letter-spacing: -.045em;
  line-height: 1.2;
  text-align: center;
}

/* ------------------------------------------------------------------------
   모바일 차영욱 사례: 3장씩 보이는 공통 가로 레일
   폭·높이는 JS가 실제 화면 너비를 계산해 인라인으로 고정한다.
   ------------------------------------------------------------------------ */
@media (max-width: 767.98px) {
  #section2 .viewport.shared-three-up-rail,
  .crime-judgement__scroll.shared-three-up-rail {
    scrollbar-width: thin !important;
    scrollbar-color: #cbd0d9 transparent !important;
    -webkit-overflow-scrolling: touch;
  }

  #section2 .viewport.shared-three-up-rail::-webkit-scrollbar,
  .crime-judgement__scroll.shared-three-up-rail::-webkit-scrollbar {
    display: block !important;
    height: 4px !important;
  }

  #section2 .viewport.shared-three-up-rail::-webkit-scrollbar-thumb,
  .crime-judgement__scroll.shared-three-up-rail::-webkit-scrollbar-thumb {
    background: #cbd0d9;
    border-radius: 999px;
  }

  #section2 .shared-three-up-track,
  .crime-judgement__scroll.shared-three-up-rail {
    scroll-behavior: smooth;
  }

  /* 카드 내부는 가독성 우선의 3열 축소형 표면으로 맞춘다. */
  #section2 .shared-three-up-track .card,
  .crime-judgement__scroll.shared-three-up-rail .crime-quote-card {
    position: relative;
    overflow: hidden !important;
    box-sizing: border-box;
    background: #fff;
    border: 1px solid #edf0f4;
    border-radius: 12px !important;
    box-shadow: 0 6px 15px rgba(19, 35, 65, .10) !important;
  }

  #section2 .shared-three-up-track .card .excerpt,
  .crime-judgement__scroll.shared-three-up-rail .crime-quote-card p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    text-overflow: ellipsis;
  }
}

/* ------------------------------------------------------------------------
   관할 법원 · 관할 경찰서 전환
   기존 법원 카드의 구성과 동일한 표면을 유지한다.
   ------------------------------------------------------------------------ */
#section5-court.is-shared-jurisdiction .shared-jurisdiction-tabs {
  display: inline-flex;
  gap: 8px;
  margin: 0 0 24px;
  padding: 5px;
  border-radius: 999px;
  background: #eef2f8;
}

#section5-court.is-shared-jurisdiction .shared-jurisdiction-tab {
  min-width: 126px;
  padding: 11px 20px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #526078;
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

#section5-court.is-shared-jurisdiction .shared-jurisdiction-tab.is-active {
  background: #17357c;
  color: #fff;
  box-shadow: 0 4px 10px rgba(23, 53, 124, .22);
}

#section5-court.is-shared-jurisdiction .shared-jurisdiction-panels {
  display: flex;
  flex: 0 0 55%;
  flex-direction: column;
  justify-content: center;
  max-width: 690px;
  min-width: 300px;
}

#section5-court.is-shared-jurisdiction .shared-jurisdiction-panels > .s5-left {
  display: flex;
  flex: 1 1 auto;
  width: 100%;
  max-width: none;
  min-width: 0;
}

#section5-court.is-shared-jurisdiction .shared-jurisdiction-panels > .s5-left[hidden] {
  display: none !important;
}

#section5-court.is-shared-jurisdiction .shared-police-pin {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: currentColor;
  color: currentColor;
  font-size: 0;
}

#section5-court.is-shared-jurisdiction .shared-police-pin::after {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff;
  content: '';
}

#section5-court.is-shared-jurisdiction .s5-map-heading {
  margin: 0 0 14px;
  color: #17357c;
  font-size: clamp(18px, 1.65vw, 25px);
  font-weight: 800;
  letter-spacing: -.045em;
  line-height: 1.25;
  text-align: center;
}

#section5-court.is-shared-jurisdiction .s5-map {
  position: relative;
  isolation: isolate;
}

#section5-court.is-shared-jurisdiction .s5-map img {
  position: relative;
  z-index: 1;
}

/* ------------------------------------------------------------------------
   관할 경찰서: 법원 지도와 선택 카드에 묶지 않고 아래 독립 목록으로 표시한다.
   ------------------------------------------------------------------------ */
#section5-court.is-shared-jurisdiction-stacked .s5-map-heading {
  margin: 0 0 14px;
  color: #17357c;
  font-size: clamp(18px, 1.65vw, 25px);
  font-weight: 800;
  letter-spacing: -.045em;
  line-height: 1.25;
  text-align: center;
}

#section5-court.is-shared-jurisdiction-stacked .s5-map {
  position: relative;
  isolation: isolate;
}

#section5-court.is-shared-jurisdiction-stacked .s5-map img {
  position: relative;
  z-index: 1;
}

#section5-court.is-shared-jurisdiction-stacked .shared-police-section {
  width: 100%;
  max-width: 690px;
  margin: 34px auto 0;
}

#section5-court.is-shared-jurisdiction-stacked .shared-police-heading {
  margin: 0 0 14px;
  color: #17357c;
  font-size: clamp(21px, 2.2vw, 29px);
  font-weight: 800;
  letter-spacing: -.045em;
  line-height: 1.2;
  text-align: center;
}

#section5-court.is-shared-jurisdiction-stacked .shared-police-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

#section5-court.is-shared-jurisdiction-stacked .shared-police-item {
  cursor: default;
}

#section5-court.is-shared-jurisdiction-stacked .shared-police-item .desc {
  overflow: visible;
  text-align: center;
  text-overflow: clip;
  white-space: normal;
  word-break: keep-all;
}

#section5-court.is-shared-jurisdiction-stacked .shared-police-pin {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: currentColor;
  color: currentColor;
  font-size: 0;
}

#section5-court.is-shared-jurisdiction-stacked .shared-police-pin::after {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff;
  content: '';
}

/* ------------------------------------------------------------------------
   긴급 대응: 대표번호·휴대폰번호를 각각 누를 수 있는 2줄 CTA
   ------------------------------------------------------------------------ */
#section7-visit .s7-phones.shared-urgent-phones {
  display: block;
  width: min(100%, 560px);
  margin: 0 auto;
  border: 0;
}

#section7-visit .shared-urgent-phone-cta {
  /* 아이콘·번호·손가락을 하나의 가운데 묶음으로 배치한다. */
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(5px, 1.6vw, 10px);
  min-height: 70px;
  margin: 0;
  padding: 12px 16px;
  border: 2px solid #171717;
  border-radius: 10px;
  background: #fff;
  color: #121212;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .08);
}

#section7-visit .shared-urgent-phone-cta + .shared-urgent-phone-cta {
  margin-top: 10px;
}

#section7-visit .shared-urgent-phone-cta__icon {
  display: block;
  flex: 0 0 auto;
  width: clamp(30px, 8vw, 42px);
  height: clamp(30px, 8vw, 42px);
  background: center / contain no-repeat var(--shared-phone-icon);
}

#section7-visit .shared-urgent-phone-cta__pointer {
  display: block;
  flex: 0 0 auto;
  width: clamp(25px, 6.4vw, 35px);
  height: clamp(25px, 6.4vw, 35px);
  background: center / contain no-repeat var(--shared-tap-pointer);
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .16));
  pointer-events: none;
  animation: shared-phone-tap .9s ease-in-out infinite;
}

#section7-visit .shared-urgent-phone-cta strong {
  color: #111;
  flex: 0 0 auto;
  font-size: clamp(24px, 3.2vw, 38px);
  font-weight: 900;
  letter-spacing: -.035em;
  line-height: 1;
  white-space: nowrap;
}

#section7-visit .shared-urgent-phone-cta:focus-visible {
  outline: 3px solid #17357c;
  outline-offset: 3px;
}

/* ------------------------------------------------------------------------
   변호사 소개·관할지역 뒤 상담 CTA
   메인에만 있던 하단 전화 CTA를 동일한 구조의 센터 페이지에도 안전하게
   주입하는 전용 클래스다. 기존 .mobile-callout/.crime-mobile-callout과
   이름을 분리해 기존 페이지의 완성된 스타일을 덮어쓰지 않는다.
   ------------------------------------------------------------------------ */
.shared-mobile-callout {
  display: none;
}

@media (max-width: 767.98px) {
  .shared-mobile-callout {
    display: block;
    padding: clamp(26px, 6vw, 38px) 0;
    background: #fff;
    text-align: center;
  }

  .shared-mobile-callout > a {
    position: relative;
    display: block;
    width: min(calc(100% - 28px), 620px);
    min-height: 118px;
    margin: 0 auto;
    padding: 12px 38px 10px;
    overflow: hidden;
    border: 2px solid #171717;
    border-radius: 9px;
    background: #fff;
    color: #111;
    box-shadow: 0 3px 10px rgba(0, 0, 0, .10);
    box-sizing: border-box;
    text-decoration: none;
  }

  .shared-mobile-callout__copy {
    display: block;
    color: #111;
    font-family: Pretendard, "Noto Sans KR", system-ui, sans-serif;
    font-size: clamp(16px, 4.55vw, 21px);
    font-weight: 800;
    letter-spacing: -.035em;
    line-height: 1.12;
    white-space: nowrap;
  }

  .shared-mobile-callout__copy .consult-lead {
    color: #111;
    font: inherit;
    font-weight: 900;
  }

  .shared-mobile-callout__copy .consult-lead > span {
    font-size: .82em;
    font-weight: 500;
  }

  .shared-mobile-callout__copy i {
    font-size: .86em;
    font-style: normal;
    font-weight: 500;
  }

  .shared-mobile-callout__copy b {
    color: #ad0040;
    font-size: clamp(25px, 6.5vw, 31px);
    font-weight: 900;
    letter-spacing: 0;
    -webkit-text-stroke: 1.15px #fff;
    paint-order: stroke fill;
    text-shadow: 1px 0 0 #fff, -1px 0 0 #fff, 0 1px 0 #fff, 0 -1px 0 #fff, 0 1px 1px rgba(0, 0, 0, .14);
  }

  .shared-mobile-callout__number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: clamp(4px, 1.3vw, 7px);
    margin-top: 3px;
    color: #111;
    line-height: 1;
    white-space: nowrap;
  }

  .shared-mobile-callout__number b {
    color: #ad0040;
    font-size: clamp(30px, 9.3vw, 42px);
    font-weight: 900;
    letter-spacing: .012em;
    line-height: 1;
    animation: shared-number-blink .8s ease-in-out infinite;
  }

  .shared-mobile-callout__icon {
    display: block;
    width: clamp(25px, 8.2vw, 38px);
    height: clamp(25px, 8.2vw, 38px);
    background: center / contain no-repeat var(--shared-phone-icon);
  }

  .shared-mobile-callout__pointer {
    display: block;
    width: clamp(24px, 7vw, 31px);
    height: clamp(24px, 7vw, 31px);
    margin-left: -2px;
    background: center / contain no-repeat var(--shared-tap-pointer);
    filter: drop-shadow(0 1px 1px rgba(255, 255, 255, .9));
    animation: shared-phone-tap .9s ease-in-out infinite;
  }

}

@media (max-width: 380px) {
  .shared-mobile-callout > a { min-height: 104px; padding-inline: 26px; }
  .shared-mobile-callout__copy b { font-size: 26px; }
  .shared-mobile-callout__number b { font-size: 30px; }
}

@keyframes shared-number-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: .58; }
}

@keyframes shared-phone-tap {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-2px, -2px) scale(.95); }
}

@media (max-width: 980px) {
  #section5-court.is-shared-jurisdiction .shared-jurisdiction-tabs {
    display: flex;
    width: 100%;
    margin-bottom: 18px;
  }

  #section5-court.is-shared-jurisdiction .shared-jurisdiction-tab {
    flex: 1 1 0;
    min-width: 0;
    padding: 10px 12px;
    font-size: 14px;
  }

  #section5-court.is-shared-jurisdiction .shared-jurisdiction-panels {
    order: 2;
    width: 100%;
    max-width: none;
    min-width: 0;
  }

  #section5-court.is-shared-jurisdiction .s5-map-heading {
    margin-top: 18px;
    font-size: 19px;
  }

  /* 관할 경찰서가 잘리지 않도록 한 카드에 정확히 두 줄로 보인다. */
  #section5-court.is-shared-jurisdiction .shared-jurisdiction-panels .s5-left {
    gap: 12px;
  }

  #section5-court.is-shared-jurisdiction .shared-jurisdiction-panels .s5-item {
    min-height: 136px;
    padding: 16px 14px;
  }

  #section5-court.is-shared-jurisdiction .shared-jurisdiction-panels .s5-item .badge {
    margin-bottom: 12px;
  }

  #section5-court.is-shared-jurisdiction .shared-jurisdiction-panels .s5-item .desc {
    display: block !important;
    overflow: visible !important;
    color: inherit;
    font-size: 14px;
    line-height: 1.7;
    text-align: center;
    text-overflow: clip !important;
    white-space: normal !important;
    word-break: keep-all;
  }

  /* 법원 카드 다음에 독립적으로 이어지는 관할 경찰서 목록 */
  #section5-court.is-shared-jurisdiction-stacked .shared-police-section {
    margin-top: 28px;
  }

  #section5-court.is-shared-jurisdiction-stacked .shared-police-heading {
    margin-bottom: 13px;
    font-size: 23px;
  }

  #section5-court.is-shared-jurisdiction-stacked .shared-police-list {
    gap: 12px;
  }

  #section5-court.is-shared-jurisdiction-stacked .shared-police-item {
    min-height: 136px;
    padding: 16px 14px;
  }

  #section5-court.is-shared-jurisdiction-stacked .shared-police-item .badge {
    margin-bottom: 12px;
  }

  #section5-court.is-shared-jurisdiction-stacked .shared-police-item .desc {
    display: block !important;
    overflow: visible !important;
    color: inherit;
    font-size: 14px;
    line-height: 1.7;
    text-align: center;
    text-overflow: clip !important;
    white-space: normal !important;
    word-break: keep-all;
  }

  #section7-visit .s7-phones.shared-urgent-phones {
    width: 100%;
  }

  #section7-visit .shared-urgent-phone-cta {
    min-height: 62px;
    padding: 10px 13px;
    gap: clamp(5px, 1.8vw, 8px);
  }

  #section7-visit .shared-urgent-phone-cta strong {
    font-size: clamp(22px, 7.3vw, 31px);
  }
}

@media (max-width: 389.98px) {
  .cases-eyebrow { font-size: 17px; }

  #section7-visit .shared-urgent-phone-cta {
    gap: 6px 9px;
    padding: 9px 10px;
  }

  #section7-visit .shared-urgent-phone-cta__icon {
    width: 29px;
    height: 29px;
  }

  #section7-visit .shared-urgent-phone-cta strong { font-size: 22px; }
}

/* 크라임 모바일 상담센터 바로가기: 2행(음주운전·교통사고·학교폭력) 카드 높이와 아이콘 기준선을 고정한다. */
@media (max-width: 767.98px) {
  .crime-main-rebuild #section3-centers .s3-center-grid > .s3-card:nth-child(-n + 5),
  .crime-main-rebuild #section3-centers .s3-center-grid > .s3-card:nth-child(10) {
    height: 120px;
    min-height: 120px;
    box-sizing: border-box;
    align-self: stretch;
  }
}
