/* 엉클샘 메인 서비스 그리드 + 호버 안내 패널
   토큰 값은 엉클샘코리아 디자인 시스템(tokens.json) 기준
   (사이트에 붙이며: 원본 시안 us114-service-hover.zip 2026-10-16 그대로, 값 이름만 사이트 전체(:root)가 아니라 이 판(.svc) 안에서 쓰게 묶음)
   (2026-10-16 사장님 「자세히 보기 · 견적 요청하기 있는 박스들 톤앤매너 다른 것과 맞춰」: 판의 남색을 사이트 청록으로 —
    바로가기 FBAR 카드 · 사이트 큰 단추(about-big-btn1 · 2) · 검색 맵과 같은 값. 모서리는 검색 맵 상자 10 · 사이트 단추 5) */
.svc {
  --accent: #099fa7;        /* 사이트 청록(about-big-btn2 · 바로가기 FBAR 카드 · 검색 맵 단추) */
  --accent-700: #088b92;    /* 마우스를 올렸을 때(검색 맵 단추와 같은 값) */
  --accent-text: #1d88a1;   /* 작은 글자용 짙은 청록(about-big-btn1 · 검색 맵 링크) */
  --accent-50: #eaf6f7;
  --accent-line: #a9d8dc;
  --ink: #333;
  --ink-2: #444;
  --sub: #636b72;
  --muted: #636b72;
  --surface: #FFFFFF;
  --surface-soft: #f0f2f6;
  --line: #dfe5ea;
  --line-2: #d5dde4;

  --radius-md: 5px;
  --radius-lg: 10px;
  --radius-xl: 10px;
  --radius-pill: 999px;

  /* 모션 */
  --hover-ease: 200ms ease;
  --panel-dur: 320ms;
  --panel-stagger: 50ms;
  --panel-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

.svc {
  box-sizing: border-box;
  max-width: 1200px;
  margin: 0 auto;
  padding: 72px 24px 96px;
  font-family: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  color: var(--ink);
  letter-spacing: -0.01em;
  word-break: keep-all;
}
.svc *, .svc *::before, .svc *::after { box-sizing: border-box; }

/* ---------- 그리드 ----------
   카드 모양은 지금 사이트 바로가기(PLUGIN_unclesam style.css · style_m.css 의 .service-type-btn) 그대로(사장님 2026-10-16 「박스들 디자인만 원본으로, 파란색이 톤앤매너가 안 맞음」).
   마우스를 올리면 판이 바뀌고 누르면 고정되는 동작은 시안 그대로. 켜진 카드는 원본의 마우스 올림 모양(떠오름 · 화살표 색)에 옅은 그림자를 더했다. */
.svc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 20px;
}
.svc-title { height: 120px; display: flex; flex-direction: column; justify-content: center; padding-left: 10px; color: #333; }
.svc-title b, .svc-title span { font-size: 36px; line-height: 1.2; letter-spacing: normal; }
.svc-title b { font-weight: 700; }
.svc-title span { font-weight: 400; }

.svc-card {
  position: relative;
  width: 100%;
  height: 120px;
  padding: 0 18px 0 35px;
  border: 0;
  border-radius: 20px;
  background-image: linear-gradient(130deg, #eceff4, #f0f2f6);
  color: #333;
  display: flex; flex-direction: column; justify-content: center;
  line-height: 1.2;
  cursor: pointer;
  font: inherit; text-align: left;
  text-decoration: none;    /* 메인 화면에서는 카드가 링크(a)다 */
  transition: all ease .35s;
}
.svc-card__text { display: flex; flex-direction: column; }
.svc-card__ko { font-size: 25px; color: #333; letter-spacing: -1px; font-weight: 500; }
.svc-card__en { font-size: 20px; color: #636b72; letter-spacing: 0; font-weight: 300; padding-top: 3px; }
.svc-card__en:empty { display: none; }
.svc-card__arrow {
  position: absolute; right: 18px; top: 50%; transform: translate(0, -50%);
  width: 32px; height: 32px; border-radius: 50%;
  background: #fff; color: #b2bcc3; font-size: 19px;
  display: flex; align-items: center; justify-content: center;
  transition: color ease .35s;
}

/* 위 세 장(FBAR · 1040 · FATCA) — 원본 -color1 · -color2 · -color3 */
.svc-card--featured .svc-card__ko { color: #fff; font-size: 23.5px; font-weight: 400; letter-spacing: -1px; }
.svc-card--featured .svc-card__en { color: #fff; font-size: 30px; font-weight: 700; letter-spacing: .5px; }
.svc-card[data-id="fbar"] { background-image: linear-gradient(130deg, #099fa7, #00b2bb); }
.svc-card[data-id="1040"] { background-image: linear-gradient(130deg, #1d88a1, #1da3c2); }
.svc-card[data-id="fatca"] { background-image: linear-gradient(130deg, #1e3c72, #2a5298); }

/* 마우스를 올렸을 때 · 켜졌을 때 — 원본 마우스 올림 모양 */
.svc-card:hover, .svc-card.is-active { transform: translate(0, -6px); }
.svc-card.is-active { box-shadow: 0 10px 22px rgba(30, 60, 114, .14); }
.svc-card:hover .svc-card__arrow, .svc-card.is-active .svc-card__arrow { color: #ffc234; }
.svc-card[data-id="fbar"]:hover .svc-card__arrow, .svc-card[data-id="fbar"].is-active .svc-card__arrow { color: #099fa7; }
.svc-card[data-id="1040"]:hover .svc-card__arrow, .svc-card[data-id="1040"].is-active .svc-card__arrow { color: #1d88a1; }
.svc-card[data-id="fatca"]:hover .svc-card__arrow, .svc-card[data-id="fatca"].is-active .svc-card__arrow { color: #1e3c72; }

.svc-card:focus-visible { outline: 3px solid #099fa7; outline-offset: 3px; }

/* ---------- 안내 ---------- */
.svc-hint { display: flex; align-items: center; gap: 8px; margin: 28px 4px 20px; font-size: 13px; color: var(--muted); }

/* ---------- 패널 ---------- */
.svc-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 32px 36px;
  display: flex; flex-direction: column; gap: 28px;
  background: var(--surface);
}
.svc-panel__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.svc-panel__name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; }
.svc-panel__name h2 { margin: 0; font-size: 26px; line-height: 1.35; font-weight: 700; letter-spacing: -1px; color: var(--ink); }
.svc-panel__en { font-size: 15px; font-weight: 500; color: var(--muted); }
.svc-panel__en:empty { display: none; }

.svc-chips { align-self: center; display: inline-flex; flex-wrap: wrap; gap: 6px; }
.svc-chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 13px; font-weight: 700; color: var(--accent-text);
  background: var(--accent-50); border-radius: var(--radius-pill);
  padding: 5px 12px 5px 10px;
}

.svc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.svc-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; font-size: 15px; font-weight: 700; color: var(--accent-text); text-decoration: none; }
.svc-link:hover { text-decoration: underline; }
.svc-btn {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px;
  border-radius: var(--radius-md); font-size: 15px; font-weight: 500; text-decoration: none;
  background: var(--surface); color: var(--accent-text); border: 1px solid var(--accent-line);
  transition: background-color var(--hover-ease);
}
.svc-btn:hover { background: var(--accent-50); }
.svc-btn--primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.svc-btn--primary:hover { background: var(--accent-700); border-color: var(--accent-700); }

.svc-cols { display: flex; flex-wrap: wrap; gap: 40px; }
.svc-col { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.svc-col__label { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; color: var(--accent-text); }

.svc-prep, .svc-steps { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.svc-prep li, .svc-steps li { display: flex; gap: 10px; font-size: 15px; line-height: 1.55; color: var(--ink-2); }
.svc-prep svg { flex: none; margin-top: 3px; color: var(--accent); }
.svc-steps li { gap: 12px; align-items: flex-start; }
.svc-steps__num {
  flex: none; width: 22px; height: 22px; margin-top: 1px; border-radius: var(--radius-pill);
  background: var(--accent); color: #fff; font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.svc-note { font-size: 13px; line-height: 1.5; color: var(--muted); }
.svc-note:empty { display: none; }

.svc-mode { background: linear-gradient(130deg, #eceff4, #f0f2f6); border-radius: var(--radius-lg); padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; }
.svc-mode__title { font-size: 14px; font-weight: 700; }
.svc-mode__title span { font-weight: 400; color: var(--muted); }
.svc-mode__desc { font-size: 14px; line-height: 1.55; color: var(--ink-2); }

/* ---------- 전환 애니메이션 ----------
   서비스가 바뀌면 JS가 .is-entering을 다시 붙여 애니메이션을 재시작합니다.
   제목 줄은 페이드, 세 칸은 아래에서 10px 올라오며 순차 등장. */
@keyframes svcFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes svcRise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.svc-panel.is-entering .svc-panel__head { animation: svcFade var(--panel-dur) var(--panel-ease) both; }
.svc-panel.is-entering .svc-col { animation: svcRise var(--panel-dur) var(--panel-ease) both; }
.svc-panel.is-entering .svc-col:nth-child(1) { animation-delay: calc(var(--panel-stagger) * 1); }
.svc-panel.is-entering .svc-col:nth-child(2) { animation-delay: calc(var(--panel-stagger) * 2); }
.svc-panel.is-entering .svc-col:nth-child(3) { animation-delay: calc(var(--panel-stagger) * 3); }

/* ---------- 메인 화면(home.php) ----------
   2026-10-16 사장님 「메인의 UNCLE SAM SERVICES 를 새로 만든 것으로, 대신 두 줄로 — 제목은 맨 왼쪽 첫 칸」(가안):
   서비스 화면의 4칸 × 3줄을 6칸 × 2줄로(제목 1칸 + 카드 11장 = 12칸). 카드 · 판 모양과 동작은 같고 글자만 조금 작게.
   넓은 화면(1025 이상 — 메인은 1024 이하면 휴대폰 화면으로 다시 열린다)만 6칸, 그보다 좁으면 서비스 화면과 같은 4칸, 휴대폰은 두 칸(아래 640 규칙).
   가로는 바로 아래 자가진단 줄과 같게(사장님 2026-10-16 「가로를 밑에 자가진단 박스만큼」): 같은 ABA-wrap-box 안에서
   그 줄(.main-layout-row: 최소 1400 · 최대 1700 · 폭 100%, 가운데 맞춤)과 같은 값. */
.svc--main { padding: 20px 0 60px; }
@media (min-width: 1025px) {
  .svc--main { min-width: 1400px; max-width: 1700px; width: 100%; margin: 0; }
  .svc--main .svc-grid { grid-template-columns: repeat(6, 1fr); gap: 16px; }
  .svc--main .svc-title { height: 110px; padding-left: 6px; }
  .svc--main .svc-title b, .svc--main .svc-title span { font-size: 30px; }
  .svc--main .svc-card { height: 110px; padding: 0 12px 0 22px; border-radius: 16px; text-decoration: none; }
  .svc--main .svc-card__ko { font-size: 20px; }
  .svc--main .svc-card__en { font-size: 16px; }
  .svc--main .svc-card--featured .svc-card__ko { font-size: 18px; }
  .svc--main .svc-card--featured .svc-card__en { font-size: 25px; }
  .svc--main .svc-card__arrow { width: 28px; height: 28px; right: 12px; font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .svc-card, .svc-card__arrow, .svc-card__ko, .svc-btn { transition: none; }
  .svc-card:hover, .svc-card.is-active { transform: none; }
  .svc-panel.is-entering .svc-panel__head,
  .svc-panel.is-entering .svc-col { animation: none; }
}

@media (max-width: 640px) {
  .svc { padding: 48px 16px 64px; }
  .svc-panel { padding: 24px 20px; }
  /* 휴대폰 — 원본 style_m.css 그대로(두 줄 · 화면 폭에 맞춘 크기 · 떠오름 없음 · 화살표는 늘 그 색) */
  .svc-grid { grid-template-columns: 1fr 1fr; gap: 2vw; }
  .svc-title { height: 20vw; }
  .svc-title b, .svc-title span { font-size: 6vw; }
  .svc-card { height: 20vw; border-radius: 10px; padding-left: 4vw; }
  .svc-card__ko, .svc-card__en { font-size: 4vw; }
  .svc-card--featured .svc-card__ko { font-size: 4vw; }
  .svc-card--featured .svc-card__en { font-size: 5vw; }
  .svc-card__arrow { width: 7vw; height: 7vw; right: 15px; font-size: 4vw; }
  .svc-card:hover { transform: none; }
}
