/* ===== 시공사례: 분야 버튼 · 현장 카드 · 사진 뷰어 (works.js) ===== */

/* 분야 버튼 */
.wk-filter { display:flex; flex-wrap:wrap; gap:8px; margin:0 0 clamp(22px,3vw,32px); }
.wk-filter button {
  display:inline-flex; align-items:center; gap:8px; min-height:44px; padding:0 16px;
  border:1px solid var(--line); background:var(--paper); color:var(--ink);
  font-family:var(--kr); font-weight:700; font-size:15px; letter-spacing:-.01em; cursor:pointer;
  transition:background .15s ease, color .15s ease, border-color .15s ease;
}
.wk-filter button b { font-family:var(--display); font-weight:800; font-size:13px; color:var(--amber); }
.wk-filter button:hover { border-color:var(--ink); }
.wk-filter button.on { background:var(--steel); border-color:var(--steel); color:#fff; }
.wk-filter button.on b { color:#FFB27E; }
.wk-filter button:focus-visible, .wk-ph:focus-visible { outline:3px solid var(--amber); outline-offset:2px; }

/* 현장 카드 */
.wk-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:clamp(14px,1.6vw,22px); }
.wk { background:var(--paper); border:1px solid var(--line); display:flex; flex-direction:column; }
.wk[hidden] { display:none; }
.wk-ph { position:relative; display:block; width:100%; padding:0; border:0; background:var(--steel-2); cursor:zoom-in; overflow:hidden; aspect-ratio:4/3; }
.wk-ph img { display:block; width:100%; height:100%; object-fit:cover; transition:transform .35s ease; }
.wk-ph:hover img { transform:scale(1.04); }
.wk-n {
  position:absolute; right:10px; bottom:10px; display:inline-flex; align-items:center; gap:6px; padding:5px 9px;
  background:rgba(14,23,34,.78); color:#fff; font-family:var(--display); font-weight:700; font-size:13px; line-height:1;
}
.wk-n svg { width:15px; height:15px; }
.wk-go {
  position:absolute; left:0; right:0; bottom:0; padding:30px 16px 12px; text-align:left;
  background:linear-gradient(transparent, rgba(14,23,34,.82)); color:#fff; font-weight:700; font-size:14.5px;
  opacity:0; transform:translateY(6px); transition:opacity .2s ease, transform .2s ease;
}
.wk-go .ar { font-family:var(--display); font-weight:800; }
.wk-ph:hover .wk-go, .wk-ph:focus-visible .wk-go { opacity:1; transform:none; }
.wk-meta { padding:18px 20px 22px; flex:1; }
.wk-ct { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.wk-cat { font-family:var(--display); font-weight:800; font-size:12px; letter-spacing:.06em; color:var(--amber); }
.wk-yr { font-family:var(--display); font-weight:700; font-size:12.5px; color:var(--muted); white-space:nowrap; }
.wk h3 { margin:10px 0 0; font-size:18.5px; font-weight:800; letter-spacing:-.02em; }
.wk p { margin:8px 0 0; color:var(--muted); font-size:14.5px; line-height:1.6; word-break:keep-all; }
html:not(.dmt-admin) .wk { cursor:pointer; }
html:not(.dmt-admin) .wk:hover h3 { color:var(--steel); text-decoration:underline; text-decoration-color:var(--amber); text-underline-offset:4px; }
@media (hover:none) { .wk-go { opacity:1; transform:none; padding-top:22px; font-size:13.5px; } }
@media (max-width:960px) { .wk-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:560px) {
  .wk-grid { grid-template-columns:1fr; }
  .wk-filter { flex-wrap:nowrap; overflow-x:auto; margin-left:calc(-1 * var(--gut)); margin-right:calc(-1 * var(--gut));
    padding:0 var(--gut) 4px; scrollbar-width:none; }
  .wk-filter::-webkit-scrollbar { display:none; }
  .wk-filter button { flex:none; }
}

/* 사진 뷰어 */
html.wv-open { overflow:hidden; }
.wv { position:fixed; inset:0; z-index:10050; display:flex; flex-direction:column; background:#0A1018; color:#fff; }
.wv[hidden] { display:none; }
.wv-top { display:flex; align-items:center; gap:14px; padding:12px clamp(12px,3vw,28px); min-height:64px; border-bottom:1px solid rgba(255,255,255,.08); }
.wv-title { flex:1; min-width:0; }
.wv-title small { display:block; font-family:var(--display); font-weight:800; font-size:11.5px; letter-spacing:.08em; color:var(--amber); }
.wv-title b { display:block; margin-top:3px; font-size:17px; font-weight:800; letter-spacing:-.02em; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.wv-count { font-family:var(--display); font-weight:700; font-size:14px; color:#B7C4D2; white-space:nowrap; }
.wv-btn { flex:none; display:grid; place-items:center; width:44px; height:44px; padding:0; border:1px solid rgba(255,255,255,.28); background:transparent; color:#fff; cursor:pointer; }
.wv-btn:hover { background:#fff; color:var(--ink); }
.wv-btn:focus-visible, .wv-strip button:focus-visible { outline:3px solid var(--amber); outline-offset:2px; }
.wv-btn svg { width:22px; height:22px; }
.wv-stage { position:relative; flex:1; min-height:0; display:flex; align-items:center; justify-content:center;
  padding:12px clamp(8px,6vw,88px); touch-action:pan-y pinch-zoom; user-select:none; }
.wv-img { display:block; max-width:100%; max-height:100%; object-fit:contain; transition:filter .25s ease, opacity .2s ease; -webkit-user-drag:none; }
.wv-img.lo { filter:blur(6px); }
.wv-stage .wv-btn { position:absolute; top:50%; transform:translateY(-50%); width:52px; height:64px; border:0; background:rgba(22,39,58,.72); }
.wv-stage .wv-btn:hover { background:var(--amber); color:#fff; }
.wv-prev { left:clamp(6px,1.5vw,20px); }
.wv-next { right:clamp(6px,1.5vw,20px); }
.wv-stage .wv-btn[disabled] { opacity:.25; cursor:default; background:rgba(22,39,58,.72); }
.wv-spin { position:absolute; left:50%; top:50%; width:34px; height:34px; margin:-17px 0 0 -17px; border:3px solid rgba(255,255,255,.25);
  border-top-color:var(--amber); border-radius:50%; animation:wv-spin .8s linear infinite; display:none; }
.wv.busy .wv-spin { display:block; }
@keyframes wv-spin { to { transform:rotate(360deg); } }
.wv-strip { display:flex; gap:6px; overflow-x:auto; padding:10px clamp(12px,3vw,28px) 14px; border-top:1px solid rgba(255,255,255,.08); scrollbar-width:thin; scrollbar-color:#3A5470 transparent; }
.wv-strip button { flex:none; width:76px; height:57px; padding:0; border:2px solid transparent; background:#1E3650 center/cover no-repeat; opacity:.5; cursor:pointer; }
.wv-strip button:hover { opacity:.85; }
.wv-strip button.on { border-color:var(--amber); opacity:1; }
@media (max-width:600px) {
  .wv-top { min-height:56px; gap:10px; }
  .wv-title b { font-size:15.5px; }
  .wv-stage { padding:6px 0; }
  .wv-stage .wv-btn { width:40px; height:52px; background:rgba(22,39,58,.5); }
  .wv-strip button { width:58px; height:44px; }
}
@media (prefers-reduced-motion:reduce) { .wk-ph img, .wv-img, .wk-go { transition:none; } }
