/* ─────────────────────────────────────────
   Wildfish — work.css
───────────────────────────────────────── */

/* ══════════════════════════════════════
   WORK ARCHIVE — joonghochoi.com PRODUCT 목록과 동일 구성
   실측(2560px 뷰포트): 좌우 47px · 4열 · 열 간격 34px · 이미지 2:3
   서체: Open Sans 12px / 1.4 · #000 · 대문자
══════════════════════════════════════ */
body.post-type-archive-wf_work { background: #fff; }
body.post-type-archive-wf_work .wf-nav:not(.scrolled) { background: #fff; border-bottom-color: transparent; }

.wf-work-archive {
  --wg-pad: 47px;
  --wg-gap: 34px;
  --wg-font: 'Open Sans', 'PretendardVariable', 'Pretendard', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  padding: 68px var(--wg-pad) 0;
  background: #fff;
  min-height: 100vh;
  font-family: var(--wg-font);
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: 0;
  color: #000;
}

/* ─── 카테고리 메뉴 ─── */
.wg-menu { padding: 2px 0 0; }
.wg-menu-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0 32px;
  min-height: 46px;
  align-items: center;
}
.wg-menu-row--sub { min-height: 36px; margin-top: -6px; }
.wg-menu-link {
  position: relative;
  padding: 8px 0 9px;
  font-family: var(--wg-font);
  font-size: 12px;
  line-height: 1.4;
  text-transform: uppercase;
  color: #000;
  white-space: nowrap;
}
.wg-menu-row--sub .wg-menu-link { color: #777; }
.wg-menu-row--sub .wg-menu-link.is-active,
.wg-menu-row--sub .wg-menu-link:hover { color: #000; }
.wg-menu-link::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px; background: #000;
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.wg-menu-link:hover::after,
.wg-menu-link.is-active::after { transform: scaleX(1); }

/* ─── 그리드 ─── */
.wg-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: var(--wg-gap);
  row-gap: 30px;
  padding-top: 10px;
  padding-bottom: 90px;
}
.wg-item { min-width: 0; border-bottom: 1px solid #ddd; padding-bottom: 30px; }
.wg-item-link { display: block; color: inherit; }

.wg-item-img {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #efefef;
}
.wg-item-img img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; max-width: none;
  object-fit: cover; object-position: center;
  transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease;
}
.wg-item-link:hover .wg-item-img img { transform: scale(1.03); opacity: 0.92; }
.wg-item-placeholder { position: absolute; inset: 0; background: #e6e6e6; }

/* 텍스트: [빈 줄] 제목 라벨 [빈 줄] 정보 3줄 — 한 줄 = 16.8px */
.wg-item-text { padding-top: 1.4em; text-transform: uppercase; }
.wg-item-title { margin-bottom: 1.4em; }
.wg-item-title span {
  background: #000;
  color: #fff;
  padding: 0 0.33em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.wg-item-meta { color: #000; min-height: 4.2em; }

.wg-empty { grid-column: 1 / -1; padding: 80px 0; color: #777; text-transform: uppercase; }

/* 등장 애니메이션 (work.js) */
.wf-js .wg-item { opacity: 0; transform: translate3d(0, 40px, 0); }
.wf-js .wg-item.is-in {
  opacity: 1; transform: none;
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1) calc(var(--n, 0) * 90ms),
              transform 1.1s cubic-bezier(0.22, 1, 0.36, 1) calc(var(--n, 0) * 90ms);
}
.wf-js .wg-item .wg-item-img img { transform: scale(1.12); }
.wf-js .wg-item.is-in .wg-item-img img { transform: none; transition-delay: calc(var(--n, 0) * 90ms); }
.wf-js .wg-item.is-in .wg-item-link:hover .wg-item-img img { transform: scale(1.03); transition-delay: 0s; }
@media (prefers-reduced-motion: reduce) {
  .wf-js .wg-item, .wf-js .wg-item .wg-item-img img { opacity: 1; transform: none; transition: none; }
}

/* ─── 반응형 ─── */
@media (max-width: 1440px) {
  .wf-work-archive { --wg-pad: 40px; --wg-gap: 28px; }
}
@media (max-width: 1024px) {
  .wf-work-archive { --wg-pad: 24px; --wg-gap: 20px; }
  .wg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wg-menu-row { gap: 0 22px; }
}
@media (max-width: 600px) {
  .wf-work-archive { --wg-pad: 16px; --wg-gap: 12px; font-size: 11px; }
  .wg-menu-row { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; margin: 0 calc(var(--wg-pad) * -1); padding: 0 var(--wg-pad); }
  .wg-menu-row::-webkit-scrollbar { display: none; }
  .wg-menu-link { font-size: 11px; }
  .wg-grid { row-gap: 22px; padding-bottom: 56px; }
  .wg-item { padding-bottom: 22px; }
}


/* ══════════════════════════════════════
   WORK SINGLE (상세페이지) — joonghochoi 스타일
══════════════════════════════════════ */
.wf-work-single {
  padding-top: 68px;
  background: var(--color-offwhite);
  min-height: 100vh;
}

/* 1. 대표 이미지 풀폭 */
.wjs-hero {
  width: 100%;
  line-height: 0;
}
.wjs-hero img {
  width: 100%;
  height: auto;
  display: block;
}

/* 2. 제목 + 설명 / 메타 레이아웃 */
.wjs-info-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 60px;
  padding: 32px 40px 40px;
  border-bottom: 0.5px solid var(--color-border);
}
.wjs-info-left { padding-right: 20px; }
.wjs-title {
  font-family: 'Montserrat', 'PretendardVariable', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-black);
  margin-bottom: 16px;
  line-height: 1.4;
}
.wjs-desc {
  font-family: 'PretendardVariable', 'Pretendard', sans-serif;
  font-size: 12px;
  font-weight: 300;
  line-height: 1.85;
  letter-spacing: -0.01em;
  color: var(--color-dark);
}
.wjs-desc p { margin-bottom: 1em; }
.wjs-desc p:last-child { margin-bottom: 0; }

/* 메타 정보 */
.wjs-info-right {
  padding-top: 2px;
}
.wjs-meta-row {
  display: flex;
  gap: 8px;
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  letter-spacing: 0.03em;
  line-height: 1.75;
  color: var(--color-dark);
}
.wjs-meta-key {
  color: var(--color-dark);
  font-weight: 500;
  white-space: nowrap;
}
.wjs-meta-key::after { content: ' :'; }
.wjs-meta-val { color: var(--color-dark); font-weight: 300; }
.wjs-link { color: var(--color-dark); transition: opacity 0.2s; }
.wjs-link:hover { opacity: 0.55; }

/* 3. 갤러리 영역 */
.wjs-gallery {
  padding: 0;
}
.wjs-gallery img {
  cursor: zoom-in;
  display: block;
  width: 100%;
  height: auto;
  transition: opacity 0.2s;
}
.wjs-gallery img:hover { opacity: 0.9; }

/* 블록 에디터 이미지 — 풀폭 */
.wjs-gallery .wp-block-image {
  margin: 0 0 4px !important;
}
.wjs-gallery .wp-block-image:last-child { margin-bottom: 0 !important; }
.wjs-gallery figure { margin: 0 0 4px; }
.wjs-gallery figure:last-child { margin-bottom: 0; }
.wjs-gallery p { margin: 0; line-height: 0; }

/* 갤러리 블록 — 2열 */
.wjs-gallery .wp-block-gallery {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 4px !important;
  margin: 0 0 4px !important;
  padding: 0 !important;
}
.wjs-gallery .wp-block-gallery .wp-block-image {
  margin: 0 !important;
}
.wjs-gallery .wp-block-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* 갤러리 사이 간격 */
.wjs-gallery > * + * { margin-top: 4px; }

/* 이전/다음 */
.work-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 40px 40px;
  border-top: 0.5px solid var(--color-border);
}
.work-nav-item { display: flex; flex-direction: column; gap: 5px; transition: opacity 0.2s; }
.work-nav-item:hover { opacity: 0.6; }
.work-nav-item--next { text-align: right; }
.work-nav-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-light);
}
.work-nav-title {
  font-family: 'Montserrat', 'PretendardVariable', sans-serif;
  font-size: 11px;
  font-weight: 500;
  color: var(--color-black);
  letter-spacing: 0.03em;
}
.work-nav-all {
  font-family: 'Montserrat', sans-serif;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-mid);
  text-align: center;
  transition: color 0.2s;
}
.work-nav-all:hover { color: var(--color-black); }

/* 라이트박스 */
.wf-lightbox {
  position: fixed; inset: 0;
  z-index: 900;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
}
.wf-lightbox.active { opacity: 1; pointer-events: all; }
.lightbox-backdrop {
  position: absolute; inset: 0;
  background: rgba(10,10,10,0.95);
  cursor: zoom-out;
}
.lightbox-inner {
  position: relative; z-index: 1;
  width: 100vw; height: 100vh;
  display: flex; align-items: center; justify-content: center;
}
.lightbox-inner img {
  width: 100vw; height: 100vh;
  object-fit: contain; display: block;
  transform: scale(0.97);
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
}
.wf-lightbox.active .lightbox-inner img { transform: scale(1); }
.lightbox-close {
  position: fixed; top: 24px; right: 28px; z-index: 2;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.8);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
  cursor: pointer !important;
}
.lightbox-close:hover { background: rgba(255,255,255,0.2); color:#fff; }

/* 모바일 */
@media (max-width: 768px) {
  .wjs-info-wrap {
    grid-template-columns: 1fr;
    gap: 24px 0;
    padding: 24px 16px 32px;
  }
  .wjs-info-left { padding-right: 0; }
  .wjs-title { font-size: 12px; }
  .wjs-desc { font-size: 12px; }
  .wjs-meta-row { font-size: 11px; }
  .wjs-gallery .wp-block-gallery {
    grid-template-columns: 1fr !important;
  }
  .work-nav { grid-template-columns: 1fr; gap: 16px; padding: 28px 16px; }
  .work-nav-item--next { text-align: left; }
  .work-nav-all { text-align: left; order: -1; }
}

/* List 레이아웃 (기존 호환) */
.work-list-wrap {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 48px 96px;
}
.wl-item {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 0 64px;
  align-items: center;
  padding: 64px 0;
  border-top: 0.5px solid var(--color-border);
  transition: opacity 0.2s;
}
.wl-item:last-child { border-bottom: 0.5px solid var(--color-border); }
.wl-item:hover { opacity: 0.72; }
.wl-item-text { display: flex; gap: 28px; align-items: flex-start; }
.wl-item-num {
  font-family: 'Montserrat', sans-serif;
  font-size: 11px; letter-spacing: 0.1em;
  color: var(--color-light); padding-top: 4px; flex-shrink: 0;
}
.wl-item-cat {
  font-family: 'Montserrat', sans-serif;
  font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--color-mid); margin-bottom: 12px;
}
.wl-item-title {
  font-family: 'Montserrat', 'PretendardVariable', sans-serif;
  font-size: 24px; font-weight: var(--fw-light);
  color: var(--color-black); letter-spacing: -0.02em;
  line-height: 1.2; margin-bottom: 12px;
}
.wl-item-client { font-size: 12px; color: var(--color-mid); letter-spacing: -0.01em; }
.wl-item-img { overflow: hidden; aspect-ratio: 16/9; background: #e8e5e0; }
.wl-item-img img { width:100%; height:100%; object-fit:cover; display:block; transition: transform 0.7s cubic-bezier(0.4,0,0.2,1); }
.wl-item:hover .wl-item-img img { transform: scale(1.03); }
.wl-item-placeholder { width:100%; height:100%; background:#dedad5; }
@media (max-width: 768px) {
  .work-list-wrap { padding: 0 20px 64px; }
  .wl-item { grid-template-columns: 1fr; gap: 20px; padding: 40px 0; }
  .wl-item-title { font-size: 18px; }
  .wl-item-text { order: 1; }
  .wl-item-img  { order: 2; aspect-ratio: 4/3; }
}