/* 시공사례 (샘플) — js/refmap.js 와 한 짝. sample-references.html 에서만 불러옵니다.
   목록: 사진 벽 + "사진 | 지도" 전환 / 현장 페이지: 옆으로 넘기는 사진 띠 + 위치 지도 · 가까운 현장 · 설치 제품 */

.rmx { --g: 4px; }
.rmx [hidden] { display: none !important; }
.rm-dot { display: inline-block; flex: none; width: 8px; height: 8px; border-radius: 50%; }
.rm-empty { padding: 48px 0; color: var(--ink-3); }

/* ── 목록: 머리글 · 붙어 있는 막대(분류 칩 + 사진 | 지도) ── */
.rg-head { padding-bottom: clamp(14px, 1.8vw, 26px); }
.rw-bar { position: sticky; top: var(--hd-c); z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px var(--pad); background: var(--page); }
.rg-head h1 { color: #fff; }
/* 분류 · 사진|지도: 같은 모양의 알약 받침 위에서 고른 것만 흰 알약으로 (애플의 구간 선택 버튼 모양) */
.rg-chips, .rg-seg { display: flex; padding: 3px; border-radius: 980px; background: var(--bg); }
.rg-chips { min-width: 0; overflow-x: auto; scrollbar-width: none; } .rg-chips::-webkit-scrollbar { display: none; }
.rg-seg { flex: none; }
.rg-chips button, .rg-seg button { display: inline-flex; flex: none; align-items: center; gap: 7px; height: 32px; padding: 0 16px; border-radius: 980px; font-size: 14px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; color: var(--ink-2); transition: background .25s var(--ease), color .2s; }
.rg-chips button:hover, .rg-seg button:hover { color: var(--ink); }
.rg-chips button.is-active, .rg-seg button.is-active { background: var(--ink); color: var(--page); }
.rg-chips i { font: 400 12px var(--font-en); font-style: normal; color: var(--ink-3); } .rg-chips button.is-active i { color: rgba(0, 0, 0, .5); }
.rg-chips .rm-dot { width: 6px; height: 6px; }

/* 사진 벽: 여섯 칸 격자에 작은 사진(2칸) · 큰 사진(4칸 × 2줄)이 빈틈없이 붙음. 사진마다 왼쪽 아래에 이름 · 위치 · 연도 */
.rw-wall { padding-bottom: clamp(56px, 8vw, 120px); }
.rw-grid { --col: calc((100vw - 5 * var(--g)) / 6); display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-rows: calc((var(--col) * 2 + var(--g)) * .7); grid-auto-flow: dense; gap: var(--g); }
.rw-item { position: relative; grid-column: span 2; overflow: hidden; background: var(--bg); }
.rw-item.is-big { grid-column: span 4; grid-row: span 2; }
.rw-item.is-big.is-r { grid-column: 3 / span 4; }
.rw-item.is-full { grid-column: 1 / -1; grid-row: span 2; }
.rw-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease), opacity .35s; }
.rw-cap { position: absolute; inset: auto 0 0 0; display: grid; gap: 5px; padding: 64px 20px 18px; background: linear-gradient(to top, rgba(0, 0, 0, .8), rgba(0, 0, 0, 0)); color: #fff; }
.rw-cap b { font-size: clamp(16px, 1.35vw, 20px); font-weight: 600; letter-spacing: -.018em; line-height: 1.25; }
.rw-item.is-big .rw-cap b, .rw-item.is-full .rw-cap b { font-size: clamp(20px, 2.1vw, 32px); letter-spacing: -.022em; }
.rw-cap em { display: flex; align-items: center; gap: 7px; font-size: 12px; font-style: normal; color: rgba(255, 255, 255, .78); }
@media (hover: hover) { /* 커서를 올린 사진만 또렷하게, 나머지는 한 걸음 물러남 */
  .rw-item:hover img { transform: scale(1.04); }
  .rw-grid:hover .rw-item:not(:hover) img { opacity: .45; }
}

/* ── 지도 (네이버 지도) ── */
.rm-map { position: relative; z-index: 0; isolation: isolate; width: 100%; height: 100%; background: #e9e7e2; }
.rm-map > .rm-empty { display: grid; place-items: center; height: 100%; padding: 0; }
.rg-mapview { position: relative; height: calc(100vh - var(--hd-c) - 60px); min-height: 460px; }
/* 핀: 분류 색 점 · 묶음 숫자 · 현장 사진이 든 둥근 핀 */
.rm-ico { display: grid; place-items: center; cursor: pointer; }
.rm-ico.is-other { opacity: .6; } .rm-ico.is-other:hover { opacity: 1; } .rm-ico.is-main { cursor: default; }
.rm-pin { display: block; width: 14px; height: 14px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px #fff, 0 2px 8px rgba(0, 0, 0, .7); transition: transform .2s var(--ease); }
.rm-ico:hover .rm-pin { transform: scale(1.25); }
.rm-ico.is-main .rm-pin { width: 20px; height: 20px; box-shadow: 0 0 0 3px #fff, 0 0 0 10px rgba(255, 255, 255, .16), 0 2px 10px rgba(0, 0, 0, .7); }
.rm-clu { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; background: #1d1d1f; box-shadow: 0 0 0 6px rgba(29, 29, 31, .16), 0 4px 12px rgba(0, 0, 0, .3); color: #fff; font: 600 14px/1 var(--font-en); font-style: normal; transition: background .2s, color .2s; }
.rm-ico:hover .rm-clu { background: var(--lime); color: #1c2606; }
.rm-ph { display: block; width: 44px; height: 44px; border-radius: 50%; overflow: hidden; background: #000; box-shadow: 0 0 0 2.5px #fff, 0 4px 14px rgba(0, 0, 0, .45); transition: transform .25s var(--ease), box-shadow .2s; }
.rm-map .rm-ico .rm-ph img { display: block; width: 100% !important; height: 100% !important; max-width: 100% !important; object-fit: cover; }
.rm-ico:hover .rm-ph { transform: scale(1.14); box-shadow: 0 0 0 3px var(--lime), 0 8px 20px rgba(0, 0, 0, .7); }

/* ── 현장 페이지 ── */
.rd-head { padding-bottom: clamp(18px, 2.2vw, 30px); }
.rd-head h1 { font-size: clamp(34px, 5vw, 76px); font-weight: 600; line-height: 1.08; letter-spacing: -.03em; }
.rd-meta { display: flex; flex-wrap: wrap; margin-top: clamp(18px, 2.2vw, 30px); border-top: 1px solid var(--line); }
.rd-meta div { display: flex; align-items: baseline; gap: 10px; padding: 14px 26px 0 0; font-size: 15px; }
.rd-meta div + div { padding-left: 26px; border-left: 1px solid var(--line); }
.rd-meta dt { color: var(--ink-3); } .rd-meta dd { display: flex; align-items: center; gap: 7px; font-weight: 600; }
/* 사진 띠: 높이가 같은 틀. 사진은 제 비율대로(가로 사진은 넓게, 세로 사진은 좁게) 들어가고 옆으로 넘김 */
.rd-car { padding-bottom: clamp(40px, 5.5vw, 80px); }
.rd-track { position: relative; display: flex; gap: 12px; height: clamp(220px, min(66vh, 62vw), 840px); padding-inline: var(--pad); overflow-x: auto; scrollbar-width: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.rd-track::-webkit-scrollbar { display: none; }
.rd-track.is-drag { cursor: grabbing; }
.rd-slide { flex: none; height: 100%; overflow: hidden; background: var(--bg); cursor: inherit; }
.rd-slide img { display: block; width: auto; height: 100%; max-width: calc(100vw - var(--pad) * 2); object-fit: cover; pointer-events: none; }
.rd-car.is-single .rd-slide { flex: 1; } .rd-car.is-single .rd-slide img { width: 100%; }
@media (hover: none) { .rd-track { scroll-snap-type: x mandatory; scroll-padding-inline: var(--pad); } .rd-slide { scroll-snap-align: start; } }
.rd-nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px var(--pad) 0; }
.rd-thumbs { display: flex; gap: 8px; min-width: 0; overflow-x: auto; scrollbar-width: none; } .rd-thumbs::-webkit-scrollbar { display: none; }
.rd-thumbs button { flex: none; height: 58px; overflow: hidden; opacity: .4; transition: opacity .25s; } .rd-thumbs button:hover { opacity: .75; } .rd-thumbs button.is-active { opacity: 1; }
.rd-thumbs img { display: block; width: auto; height: 100%; }
.rd-step { display: flex; flex: none; align-items: center; gap: 8px; font: 13px var(--font-en); color: var(--ink-3); } .rd-count { margin-right: 6px; }
.rd-step button { width: 40px; height: 40px; padding-bottom: 3px; border-radius: 50%; background: var(--bg); font: 300 24px/1 var(--font-en); color: var(--ink); transition: background .2s; } .rd-step button:hover { background: var(--bg-2); }
/* 아래: 왼쪽 위치 지도 · 길찾기(· 영상) / 오른쪽 가까운 현장 → 설치 제품 */
.rd-body { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); align-items: start; gap: clamp(24px, 5vw, 84px); padding-bottom: clamp(48px, 6vw, 96px); }
.rd-main h2 { margin-bottom: 18px; font-size: clamp(24px, 2.4vw, 34px); font-weight: 600; letter-spacing: -.02em; } .rd-main h2:not(:first-child) { margin-top: 56px; }
.rd-main .rd-map.rm-map { height: clamp(280px, 30vw, 430px); }
.rd-addr { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-top: 16px; } .rd-addr p { font-size: 17px; font-weight: 600; letter-spacing: -.015em; }
.rd-side h3 { margin-bottom: 14px; font-size: 13px; font-weight: 600; color: var(--ink-3); } .rd-side h3:not(:first-child) { margin-top: 44px; }
.rm-near { display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: center; gap: 14px; margin-bottom: 12px; }
.rm-near-img { aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg-2); } .rm-near-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); } .rm-near:hover img { transform: scale(1.05); }
.rm-near b { display: block; font-size: 15px; font-weight: 600; line-height: 1.3; } .rm-near em { font-size: 12px; font-style: normal; color: var(--ink-3); }
.rd-prods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 8px; }
.rd-prod { display: grid; align-content: start; gap: 8px; }
.rd-prod span { display: block; aspect-ratio: 1; padding: 8%; overflow: hidden; background: #fff; }
.rd-prod img { width: 100%; height: 100%; object-fit: contain; transition: transform .6s var(--ease); } .rd-prod:hover img { transform: scale(1.06); }
.rd-prod b { font-size: 12.5px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.rd-prodtext { margin-top: 16px; font-size: 13px; line-height: 1.6; color: var(--ink-2); }

@media (max-width: 1100px) {
  .rw-grid { --col: calc((100vw - 3 * var(--g)) / 4); grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .rw-item.is-big, .rw-item.is-big.is-r { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .rd-body { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .rd-meta div { padding-right: 16px; } .rd-meta div + div { padding-left: 16px; }
}
@media (max-width: 760px) {
  .rw-bar { flex-wrap: wrap; row-gap: 10px; } .rw-bar .rg-seg { order: -1; }
  .rw-grid { --col: calc((100vw - var(--g)) / 2); grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: calc(var(--col) * .86); }
  .rw-item { grid-column: span 1; }
  .rw-cap { gap: 3px; padding: 40px 12px 11px; } .rw-cap b { font-size: 13.5px; } .rw-cap em { align-items: baseline; font-size: 11px; line-height: 1.35; }
  .rw-item.is-big .rw-cap, .rw-item.is-full .rw-cap { padding: 56px 16px 14px; }
  .rg-mapview { height: calc(100vh - var(--hd-c) - 112px); }
  .rd-meta { display: grid; } .rd-meta div, .rd-meta div + div { padding: 12px 0; border-left: 0; border-bottom: 1px solid var(--line); }
  .rd-thumbs button { height: 44px; } .rd-step button { display: none; }
}
