@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@400;500;600;700&display=swap');
:root {
  --navy:      #003361;
  --navy-deep: #0b3558;
  --navy-soft: #1a3351;
  --ink:       #1a1a1a;
  --gray:      #6d6e71;
  --gray-2:    #9a9ea3;
  --line:      #e8e8e8;
  --bg:        #f2f2f2;
  --bg-soft:   #f2f2f2;
  --serif: 'Nanum Myeongjo', serif;
  --sans: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--sans); color: var(--ink); background: var(--bg); line-height: 1.6; -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column; word-break: keep-all; overflow-wrap: break-word; }
/* flex 컬럼에서 margin:auto 섹션이 콘텐츠 너비로 줄어드는 것 방지 */
body > * { width: 100%; }
/* 짧은 페이지에서 푸터가 화면 하단에 붙도록 (아래 빈 공간 방지) */
#site-footer { margin-top: auto; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
/* 드래그(텍스트 선택) 배경 — 수륜 네이비 */
::selection { background: var(--navy); color: #fff; }
::-moz-selection { background: var(--navy); color: #fff; }

/* ── Header ── */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: #f2f2f2;
  border-bottom: 1px solid #e2e2e2;
}
.header-container {
  max-width: 1256px; margin: 0 auto; padding: 0 48px;
  height: 64px; display: flex; align-items: center; justify-content: space-between;
}
.logo-area { display: flex; align-items: center; }
.logo-image { height: 29px; width: auto; display: block; }
.nav { height: 100%; }
.nav-list { display: flex; gap: 30px; list-style: none; height: 100%; }
.nav-list li { height: 100%; }
.nav-list a {
  position: relative; height: 100%; display: flex; align-items: center;
  padding: 0 8px;
  font-family: var(--serif); font-size: 16px; font-weight: 400;
  color: var(--gray-2); transition: color .18s;
}
.nav-list a:hover { color: var(--navy); }
.nav-list a.active { color: var(--navy); font-weight: 700; }
.nav-list a.active::after {
  content: ''; position: absolute; left: 50%; transform: translateX(-50%); bottom: -2px;
  width: calc(100% + 10px); min-width: 44px; height: 3px; background: var(--navy);
}
.mobile-menu-button { display: none; background: none; border: 0; cursor: pointer; width: 28px; height: 22px; position: relative; }
.hamburger-line { position: absolute; left: 0; width: 100%; height: 2px; background: var(--navy); }
.hamburger-line:nth-child(1) { top: 0; }
.hamburger-line:nth-child(2) { top: 10px; }
.hamburger-line:nth-child(3) { top: 20px; }
/* 열림 시: 같은 두께의 선 두 개로 X (애니메이션 없음) */
.mobile-menu-button.open .hamburger-line:nth-child(2) { display: none; }
.mobile-menu-button.open .hamburger-line:nth-child(1) { top: 10px; transform: rotate(45deg); }
.mobile-menu-button.open .hamburger-line:nth-child(3) { top: 10px; transform: rotate(-45deg); }

/* 모바일 메뉴 (좌: 메인 / 우: 서브) */
.mnav { display: none; }

/* ── Hero (홈) ── */
.hero {
  position: relative; min-height: 72vh; display: flex; align-items: center;
  background: #04294c;
  color: #fff; overflow: hidden;
}
.hero-slides { position: absolute; inset: 0; z-index: 0; }
.hero-slide {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0; transition: opacity 1.6s ease-in-out;
  transform-origin: center; will-change: opacity, transform;
}
/* 줌 시간 = 전환 간격(6.5s)으로 맞춰 멈춤 없이 계속 축소되다 전환 순간 완료 → 튐 없음 */
.hero-slide.active { opacity: 1; animation: heroZoom 6.5s linear forwards; }
@keyframes heroZoom { from { transform: scale(1.09); } to { transform: scale(1); } }
.hero::after {
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, rgba(3,18,38,0.86) 0%, rgba(3,18,38,0.62) 45%, rgba(3,18,38,0.38) 100%);
}
.hero-inner { max-width: 1200px; margin: 0 auto; padding: 120px 32px 80px; position: relative; z-index: 2; }
.hero-eyebrow { font-family: 'Raleway', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; letter-spacing: 4px; color: #fff; text-transform: uppercase; margin-bottom: 28px; }
.hero h1 {
  font-family: var(--serif); font-weight: 800; font-size: 58px; line-height: 1.35;
  letter-spacing: -1px; margin-bottom: 30px; color: #fff;
}
.hero h1 .em { color: #fff; }
.hero-desc { font-size: 18px; line-height: 1.9; color: #fff; max-width: 560px; margin-bottom: 44px; }
.hero-actions { display: flex; gap: 14px; }
/* 데스크톱: 히어로 상단 여백(헤더 ~ 아이브로우)을 화면 높이에 비례해 조절 */
@media (min-width: 901px) {
  .hero { align-items: flex-start; }
  .hero-inner { padding-top: clamp(150px, 22vh, 300px); padding-bottom: clamp(150px, 22vh, 300px); }
}
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 600; padding: 15px 30px; border-radius: 2px; transition: .2s;
}
.btn-primary { background: #fff; color: var(--navy); }
.btn-primary:hover { background: #e9f0f8; }
.btn-ghost { border: 1px solid rgba(255,255,255,0.35); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,0.1); }
.btn-line { border: 1px solid var(--line); color: var(--navy); }
.btn-line:hover { background: rgba(0,0,0,0.05); color: var(--navy); }

/* ── Section base ── */
.section { max-width: 1200px; margin: 0 auto; padding: 120px 32px; }
.section-eyebrow { font-family: 'Raleway', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; letter-spacing: 3px; color: var(--navy); text-transform: uppercase; margin-bottom: 18px; }
.section-title { font-family: var(--serif); font-weight: 800; font-size: 40px; line-height: 1.4; letter-spacing: -0.5px; color: var(--navy); }
.section-lead { font-size: 17px; line-height: 1.9; color: var(--gray); margin-top: 22px; max-width: 640px; }

/* 서브페이지 상단 여백 (고정 헤더 회피) */
.page-head {
  max-width: 1200px; margin: 0 auto; padding: 148px 32px 60px;
}
.page-head .section-eyebrow { margin-bottom: 16px; }
.page-head .page-title { font-family: var(--serif); font-weight: 800; font-size: 46px; letter-spacing: -1px; color: var(--navy); }
.page-head .page-sub { font-size: 16px; color: var(--gray); margin-top: 16px; }

/* ── About teaser (홈) ── */
.about { text-align: center; }
.about .section-title { margin: 0 auto; }
.about .section-lead { margin: 22px auto 0; }

/* ── Services (홈) ── */
.services { background: var(--bg-soft); }
.services-inner { max-width: 1200px; margin: 0 auto; padding: 120px 32px; }
.services-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 54px; flex-wrap: wrap; }
.services-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.service-card {
  position: relative; overflow: hidden;
  background: var(--bg); padding: 40px 30px; min-height: 256px;
  display: flex; flex-direction: column; justify-content: space-between; transition: color .22s;
}
/* 데스크톱 호버: 관련 이미지 + 어두운 딤 레이어 */
.service-card::before {
  content: ''; position: absolute; inset: 0; z-index: 0;
  background-image: linear-gradient(rgba(0,20,44,0.76), rgba(0,20,44,0.76)), var(--svc-bg);
  background-size: cover; background-position: center;
  opacity: 0; transition: opacity .35s ease;
}
.service-card > * { position: relative; z-index: 1; }
.service-num { font-family: 'Raleway', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 13px; color: var(--gray-2); letter-spacing: 1px; }
.service-name { font-family: var(--serif); font-weight: 700; font-size: 22px; line-height: 1.4; letter-spacing: -0.3px; color: var(--navy); }
.service-name .svc-2nd { display: block; }
.service-desc { font-size: 13.5px; line-height: 1.65; color: rgba(255,255,255,0.92); margin-top: 12px; opacity: 0; word-break: keep-all; transition: opacity .3s ease; }
.service-arrow { font-size: 18px; color: var(--gray-2); }
/* 호버 효과는 데스크톱(그리드)에서만 */
@media (min-width: 901px) {
  .service-card:hover::before { opacity: 1; }
  .service-card:hover { color: #fff; }
  .service-card:hover .service-num { color: rgba(255,255,255,0.7); }
  .service-card:hover .service-name { color: #fff; }
  .service-card:hover .service-desc { opacity: 1; }
  .service-card:hover .service-arrow { color: #fff; }
}

/* ── Footer (가운데 정렬) ── */
.footer { background: var(--bg); border-top: 1px solid #e2e2e2; }
.footer-inner { max-width: 1000px; margin: 0 auto; padding: 54px 24px 48px; text-align: center; }
.footer-brand-logo { height: 30px; width: auto; display: inline-block; margin: 0 auto 22px; }
.footer-links { margin-bottom: 18px; font-size: 14px; }
.footer-links a { color: #6b7280; transition: color .15s; }
.footer-links a:hover { color: var(--navy); }
.footer-info { font-size: 13.5px; color: #9299a2; line-height: 1.95; word-break: keep-all; }
.footer-sep { color: #cbd0d6; margin: 0 12px; }
.footer-copy { font-size: 12.5px; color: #aeb3ba; margin-top: 16px; letter-spacing: 0.3px; }
@media (max-width: 640px) {
  /* 모바일: 각 항목을 한 줄씩, 구분자·강제 줄바꿈 숨김 */
  .footer-info .footer-item { display: block; }
  .footer-info .footer-sep, .footer-info .footer-br { display: none; }
}

/* 배너 사진 보정 — 채도 낮추고 톤다운(차분한 느낌) */
.pd-banner img, .about-banner img { filter: saturate(0.32) brightness(1.04) contrast(0.9); }

/* 업무분야 상세 탭 — 좁은 화면에서 두 줄 방지: 한 줄 가로 스크롤 */
@media (max-width: 900px) {
  nav.pd-tabs { flex-wrap: nowrap; overflow-x: auto; gap: 22px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  nav.pd-tabs::-webkit-scrollbar { display: none; }
  .pd-tabs .pd-tab { flex: 0 0 auto; white-space: nowrap; }
  /* 모바일: 배너 이미지 확대(줌인)로 꽉 차 보이게 */
  .pd-banner img, .about-banner img { transform: scale(1.8); }
}

/* 변호사 개인 페이지 하단 전체보기 버튼 */
.lp-more { margin-top: 72px; padding-top: 8px; text-align: center; }
.lp-more.flush { margin-top: 40px; }
.lp-more-btn {
  display: inline-block; min-width: 280px; padding: 17px 44px;
  background: var(--navy); color: #fff; font-size: 15px; font-weight: 600;
  border-radius: 2px; letter-spacing: -0.2px; transition: background .18s;
}
.lp-more-btn:hover { background: #002a52; }

/* ── Mobile ── */
@media (max-width: 900px) {
  .header-container { padding: 0 20px; }
  .nav-list { display: none; }
  .mobile-menu-button { display: block; }
  .mnav {
    display: flex; position: fixed; top: 64px; left: 0; right: 0; bottom: 0; z-index: 99;
    background: #f2f2f2; opacity: 0; pointer-events: none; transition: opacity .2s ease;
  }
  .mnav.open { opacity: 1; pointer-events: auto; }
  .mnav-main { width: 42%; max-width: 220px; padding: 12px 0; border-right: 1px solid #e0e0e0; overflow-y: auto; }
  .mnav-main ul, .mnav-sub ul { list-style: none; }
  .mnav-item {
    display: block; width: calc(100% - 20px); margin: 3px 10px; background: none; border: 0; cursor: pointer;
    padding: 15px 8px; text-align: center; font-family: var(--serif); font-size: 16px;
    color: var(--gray-2); border-radius: 8px; transition: background .12s, color .15s;
  }
  .mnav-item.active { color: var(--navy); font-weight: 700; }
  .mnav-sub { flex: 1; background: #e9e9e9; padding: 12px 0; overflow-y: auto; }
  .mnav-sub a {
    display: block; margin: 3px 12px; padding: 15px 16px; border-radius: 8px;
    font-family: var(--serif); font-size: 15px; color: #5b6068; transition: background .12s;
  }
  .mnav-sub a:hover, .mnav-sub a:active { background: #dadbdd; color: var(--navy); }
  /* 모바일: 중앙정렬 대신 상단 기준 + 콘텐츠 높이 → 위아래 여백 축소 */
  .hero { align-items: flex-start; min-height: auto; }
  .hero-inner { padding: 152px 24px 88px; }
  .hero h1 { font-size: 38px; }
  .hero-desc { font-size: 16px; }
  .section, .services-inner { padding: 80px 24px; }
  .section-title { font-size: 30px; }
  .page-head { padding: 120px 24px 48px; }
  .page-head .page-title { font-size: 32px; }
  /* 모바일: 가로 구분선만 있는 리스트 (박스·세로선·번호 제거, 이름 한 줄) */
  .services-grid { grid-template-columns: 1fr; gap: 0; background: none; border: 0; border-top: 1px solid var(--line); }
  .service-card {
    flex-direction: row; align-items: center; justify-content: flex-start;
    gap: 0; min-height: 0; padding: 22px 6px; background: transparent;
    border-bottom: 1px solid var(--line);
  }
  .service-card::before { display: none; }      /* 모바일: 이미지 없음 */
  .service-card:active { background: rgba(0,0,0,0.05); }  /* 탭 dim */
  .service-desc { display: none; }
  .service-num { display: none; }
  .service-name { font-size: 17px; }
  .service-name .svc-2nd { display: inline; }
  .service-name .svc-2nd::before { content: "·"; }
  .service-arrow { margin-left: auto; flex-shrink: 0; }
}
@media (max-width: 560px) {
  .hero h1 { font-size: 32px; }
}
