/* 법무법인 JS 홈페이지 - PC 공통 */
:root {
  --green: #182A23;
  --green-deep: #122B23;
  --beige: #E6E0D0;
  --beige-light: #F2F0EA;
  --beige-mid: #E7E4DE;
  --gold: #6B5A2E;
  --text: #26282A;
  --text-2: #414549;
  --text-3: #5A5F64;
  --line: #D8D3C6;
  --line-2: #CFC9BA;
  --on-dark: #D9DDDA;
  --en: 'Montserrat', sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Noto Sans KR', 'Malgun Gothic', 'Apple SD Gothic Neo', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: #FFFFFF;
  word-break: keep-all;
  overflow-wrap: break-word;
}
/* 화면 폭에 맞춘 자동 확대·축소: 비율은 pc-scale.js 가 <html> 의 --pc-zoom 에 적습니다. 인쇄에는 적용하지 않습니다. */
@media screen { body { zoom: var(--pc-zoom, 1); } }
a { color: var(--green); text-decoration: none; }
a:hover { color: var(--gold); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
img { max-width: 100%; }
h1, h2, h3, p { margin: 0; }
.nowrap { white-space: nowrap; }
/* 담당 분야 이름: 이름 중간에서는 줄을 바꾸지 않되, 한 줄보다 긴 이름은 칸 안에서 줄을 바꿉니다. */
.field { display: inline-block; max-width: 100%; overflow-wrap: anywhere; }
.container { max-width: 1168px; width: 100%; margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--green); color: #FFFFFF; padding: 12px 20px; z-index: 100; }
.skip:focus { left: 0; color: #FFFFFF; }

/* 상단 */
.site-header { min-height: 84px; display: flex; align-items: center; background: #FFFFFF; }
.site-header__in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.site-header__logo img { display: block; height: 40px; width: auto; }
.gnb { display: flex; flex-wrap: wrap; gap: 40px; font-size: 16px; font-weight: 500; }
.gnb a { padding-bottom: 4px; border-bottom: 2px solid transparent; }
.gnb a.is-active { font-weight: 700; border-bottom-color: var(--green); }

/* 하위 화면 제목 영역 */
.subhero { min-height: 260px; background: var(--green); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 24px; }
.subhero__en { font-family: var(--en); font-size: 15px; font-weight: 600; letter-spacing: 6px; color: var(--beige); margin-bottom: 16px; }
.subhero__title { margin: 0 0 16px; font-size: 40px; line-height: 56px; font-weight: 700; color: #FFFFFF; letter-spacing: -0.5px; }
/* 제목 아래 한 줄 문구(구성원 화면) */
.subhero__copy { margin: -4px 0 16px; max-width: 100%; font-size: 18px; line-height: 28px; color: var(--beige); overflow-wrap: anywhere; }
.subhero__crumbs { font-size: 14px; line-height: 20px; color: var(--on-dark); }

/* 하위 메뉴 줄 */
.subnav { min-height: 64px; background: var(--beige-light); display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 44px; padding: 12px 24px; font-size: 16px; font-weight: 500; }
.subnav--tight { gap: 8px 32px; }
.subnav a { max-width: 100%; padding-bottom: 4px; border-bottom: 2px solid transparent; overflow-wrap: anywhere; }
.subnav a.is-active { font-weight: 700; border-bottom-color: var(--green); }

/* 구역 */
.sec { padding: 80px 0; }
.sec--white { background: #FFFFFF; }
.sec--beige { background: var(--beige-light); }
.sec--dark { background: var(--green); color: #FFFFFF; }
.sec-head { min-height: 72px; display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
.sec-head__en { font-family: var(--en); font-size: 13px; line-height: 18px; font-weight: 700; letter-spacing: 3px; color: var(--gold); }
.sec-head__title { font-size: 28px; line-height: 40px; font-weight: 700; color: var(--green); }
.sec-head__more { flex: none; font-size: 15px; font-weight: 500; line-height: 58px; }
.sec--dark .sec-head__en { color: var(--beige); }
.sec--dark .sec-head__title { color: #FFFFFF; }
.sec--dark .sec-head__more { color: var(--beige); }
.sec--dark .sec-head__more:hover { color: #FFFFFF; }

/* 격자 */
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.grid-3--wide { gap: 24px; }
@media (max-width: 960px) { .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-3 { grid-template-columns: minmax(0, 1fr); } }

/* 글 카드 */
.post-card { min-height: 220px; padding: 28px; display: flex; flex-direction: column; justify-content: space-between; gap: 12px; color: var(--text); }
.post-card--beige { background: var(--beige-light); }
.post-card--white { background: #FFFFFF; min-height: 200px; }
.post-card__cat { font-size: 13px; color: var(--gold); font-weight: 700; }
.post-card__title { font-size: 20px; line-height: 30px; font-weight: 700; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-card--white .post-card__title { font-size: 19px; }
.post-card__meta { font-size: 14px; color: var(--text-3); }
.post-card:hover { color: var(--text); }
.post-card:hover .post-card__title { color: var(--gold); }

/* 글 한 줄 */
.post-rows { border-bottom: 1px solid var(--line-2); }
.post-row { min-height: 80px; padding: 16px 0; border-top: 1px solid var(--line-2); display: flex; align-items: center; justify-content: space-between; gap: 24px; color: var(--text); }
.post-row__title { min-width: 0; font-size: 17px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-row__meta { flex: none; font-size: 14px; color: var(--text-3); }
.post-row:hover .post-row__title { color: var(--gold); }

/* 분류 단추(어두운 배경) */
.chips { min-height: 44px; display: flex; flex-wrap: wrap; gap: 8px; font-size: 15px; }
.chips a { display: inline-flex; align-items: center; min-height: 44px; max-width: 100%; padding: 4px 20px; overflow-wrap: anywhere; border: 1px solid #5E6F68; color: #EAE4D4; }
.chips a:hover { color: #FFFFFF; border-color: #FFFFFF; }
.chips a.is-active { background: var(--beige); border-color: var(--beige); color: var(--green); font-weight: 700; }

/* 꼬리표 */
.tags { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; }
.tag { display: inline-flex; align-items: center; min-height: 36px; max-width: 100%; padding: 4px 16px; overflow-wrap: anywhere; background: var(--beige-light); color: var(--green); font-weight: 500; }
.tag--dark { background: var(--green); color: #FFFFFF; }
a.tag--dark:hover { color: var(--beige); }

/* 단추 */
.btn-dark, .btn-beige, .btn-line { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 36px; font-size: 16px; font-weight: 700; }
.btn-dark { background: var(--green); color: #FFFFFF; }
.btn-dark:hover { color: var(--beige); }
.btn-beige { background: var(--beige); color: var(--green); }
.btn-line { border: 1px solid #FFFFFF; color: #FFFFFF; font-weight: 500; }
.btn-line:hover { color: var(--beige); border-color: var(--beige); }

/* 변호사 사진 배열 */
.lineup { display: flex; justify-content: center; align-items: flex-end; }
.lineup img { display: block; height: 330px; width: 220px; max-width: none; object-fit: cover; object-position: top; }
.lineup img + img { margin-left: -56px; }
/* 창이 좁으면(6장 × 220px − 겹침 5 × 56px = 1040px 이 들어가지 않으면) 창 폭에 맞춰 같은 비율로 줄여 6장이 모두 보이게 합니다. */
@media (max-width: 1120px) {
  .lineup { --lineup-w: calc((100vw - 80px) / 4.7273); }
  .lineup img { width: var(--lineup-w); height: calc(var(--lineup-w) * 1.5); }
  .lineup img + img { margin-left: calc(var(--lineup-w) * -0.2545); }
}

/* 쪽 번호 */
.pagination { margin-top: 48px; display: flex; justify-content: center; gap: 8px; font-family: var(--en); font-size: 15px; font-weight: 700; }
.pagination a, .pagination span { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line); }
.pagination a.is-current { background: var(--green); border-color: var(--green); color: #FFFFFF; }
.pagination .is-disabled { color: #B9B4A8; }

/* 안내 문구 */
.empty { padding: 56px 0; text-align: center; font-size: 16px; color: var(--text-3); }
.sec--dark .empty { color: var(--on-dark); }
.empty-page { padding: 120px 24px; text-align: center; }
.empty-page h1 { font-size: 32px; color: var(--green); margin-bottom: 12px; }
.empty-page p { color: var(--text-2); margin-bottom: 32px; }

/* 하단 */
.site-footer { min-height: 200px; background: var(--green-deep); color: #C9D2CD; display: flex; align-items: center; }
.site-footer__in { padding-top: 32px; padding-bottom: 32px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; font-size: 14px; line-height: 24px; }
.site-footer__logo { display: block; height: 32px; width: auto; margin-bottom: 12px; }
.site-footer__right { text-align: right; }
.site-footer__links { margin-top: 8px; }
.site-footer__links a { color: #C9D2CD; text-decoration: underline; text-underline-offset: 3px; }
.site-footer__links a:hover { color: #FFFFFF; }

/* 전화 상담 바(화면에 고정하지 않고 쪽 맨 아래에 둠) */
.callbar { min-height: 88px; background: var(--beige); display: flex; align-items: center; }
.callbar__in { padding-top: 12px; padding-bottom: 12px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.callbar__tel { display: flex; align-items: baseline; gap: 16px; }
.callbar__label { font-size: 15px; font-weight: 700; color: var(--green); }
.callbar__num { font-family: var(--en); font-size: 30px; font-weight: 800; color: var(--green); }
.callbar__btns { display: flex; flex-wrap: wrap; gap: 10px; font-size: 15px; }
.callbar__btn { display: inline-flex; align-items: center; min-height: 52px; padding: 0 24px; background: #FFFFFF; color: var(--green); font-weight: 500; }
.callbar__btn--primary { padding: 0 36px; background: var(--green); color: #FFFFFF; font-weight: 700; }
.callbar__btn--primary:hover { color: var(--beige); }
/* 전화번호가 비어 있어 단추만 있을 때에는 오른쪽에 둡니다. */
.callbar--notel .callbar__in { justify-content: flex-end; }


/* 하단 이메일 */
.site-footer__right > div > a { color: #C9D2CD; }
.site-footer__right > div > a:hover { color: #FFFFFF; }

/* 메인 화면 배경 사진(서서히 바뀜) */
.hero-slides { position: absolute; inset: 0; z-index: 0; overflow: hidden; background: var(--green); }
/* 새 사진(is-active)은 이전 사진(is-leaving) 위에서 서서히 나타납니다. 이전 사진은 그동안 불투명한 채로, 확대된 크기도 그대로 두었다가
   새 사진이 다 나타난 뒤에 숨깁니다(hero.js). 그래서 전환 중에 어두운 바탕이 비치거나 사진 크기가 갑자기 바뀌지 않습니다. */
.hero-slides video { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.hero-slides video::-webkit-media-controls, .hero-slides video::-webkit-media-controls-start-playback-button { display: none !important; -webkit-appearance: none; }
.hero-slide { position: absolute; inset: 0; z-index: 0; opacity: 0; }
.hero-slide.is-leaving { z-index: 1; opacity: 1; }
.hero-slide.is-active { z-index: 2; opacity: 1; transition: opacity 1.8s ease; }
.hero-slide img { display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; transform: scale(1.02); }
.hero-slide.is-active img, .hero-slide.is-leaving img { animation: hero-zoom 14s ease-out forwards; }
.hero-slides::after { content: ''; position: absolute; inset: 0; z-index: 3; background: linear-gradient(180deg, rgba(24, 42, 35, 0.72) 0%, rgba(24, 42, 35, 0.52) 55%, rgba(24, 42, 35, 0.78) 100%); }
@keyframes hero-zoom { from { transform: scale(1.02); } to { transform: scale(1.1); } }
/* 움직임 줄이기 설정: 사진을 바꾸지 않고 첫 사진만 보여 줍니다(hero.js 도 전환을 하지 않음). */
@media (prefers-reduced-motion: reduce) {
  .hero-slide.is-active { transition: none; }
  .hero-slide.is-active img, .hero-slide.is-leaving img { animation: none; }
}

/* 인스타그램 게시물 칸의 본문 띠(한 줄, 넘치면 말줄임) */
.ig-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 8px 12px; background: rgba(24, 42, 35, 0.88); color: #FFFFFF; font-size: 13px; line-height: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; }

/* 초점 테두리: 어두운 배경 위에서는 금색이 잘 보이지 않으므로 밝은 색으로 바꿉니다. */
.subhero a:focus-visible, .sec--dark a:focus-visible, .sec--dark button:focus-visible, .site-footer a:focus-visible { outline-color: #FFFFFF; }
/* 밝은 띠 위의 어두운 단추는 단추 안쪽에 밝은 테두리를 그립니다. */
.callbar__btn--primary:focus-visible { outline-color: #FFFFFF; outline-offset: -5px; }

/* 띄어쓰기 없는 긴 글(주소 등)이 들어와도 화면이 옆으로 밀리지 않게 합니다. 보통 글의 줄바꿈(단어 단위)은 그대로입니다. */
.subhero__title, .subhero__crumbs, .sec-head__title, .post-card__title, .post-card__cat, .empty-page h1 { overflow-wrap: anywhere; }
.subhero__title, .subhero__crumbs { max-width: 100%; }
.sec-head > div { min-width: 0; }
.site-footer__in > div { min-width: 0; overflow-wrap: anywhere; }
.callbar__tel { min-width: 0; flex-wrap: wrap; overflow-wrap: anywhere; }

/* 인쇄: 메뉴·전화 바·지도·배경 사진은 빼고, 어두운 구역은 흰 바탕에 검은 글씨로 찍습니다. */
@media print {
  .skip, .gnb, .subnav, .callbar, .pagination, .chips, .column-cats, .hero-slides, .hero__quick, .site-footer__links, .site-footer__logo, iframe { display: none !important; }
  body { background: #FFFFFF; }
  .site-header { min-height: 0; padding: 12px 0; }
  .hero, .subhero, .sec--dark, .home-sec--dark, .about-team, .practice-box, .instagram-bar, .site-footer { background: #FFFFFF !important; color: #26282A !important; }
  .hero *, .subhero *, .sec--dark *, .home-sec--dark *, .about-team *, .practice-box *, .instagram-bar *, .site-footer * { color: #26282A !important; }
  .hero, .subhero, .about-team { min-height: 0 !important; padding-top: 32px !important; padding-bottom: 32px !important; }
  .subhero, .site-footer { border-top: 1px solid #D8D3C6; border-bottom: 1px solid #D8D3C6; }
  .site-footer { min-height: 0; }
  .sec, .home-sec { padding: 32px 0 !important; }
  .practice-box, .instagram-bar, .btn-line { border: 1px solid #D8D3C6; }
  /* 어두운 바탕의 작은 단추·꼬리표도 배경 없이 찍히므로 글자를 검게 */
  .btn-dark, .tag--dark, .notice-row__badge--dark { background: #FFFFFF !important; color: #26282A !important; border: 1px solid #D8D3C6; }
  a[class*="card"], [class*="-card"], .post-row, .notice-row, .home-column, .home-lawyer, .home-practice, .about-point, .consult-step, .consult-office, .consult-call, .practice-lawyer, .practice-services li, .lawyer-row > *, .instagram-item, img { break-inside: avoid; page-break-inside: avoid; }
  h1, h2, h3, .sec-head, .home-head { break-after: avoid; page-break-after: avoid; }
}
