/* ==========================================================================
   옐로우페이지 — 목록(yellowpage.php) + 상세(yellowpage_detail.php) 공용.
   nabid.css 토큰/버튼 재사용, 확장만. 다크 네이비 톤 유지.
   ========================================================================== */

.yp { color: var(--ink); }

/* ── 목록 히어로 ─────────────────────────────────────── */
.yp-hero { padding: 120px 0 28px; border-bottom: 1px solid var(--line); background: var(--paper); }
.yp-hero .hero__eyebrow { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .14em; color: var(--gold); text-transform: uppercase; margin-bottom: 14px; }
.yp-hero__h1 { font-family: var(--display); font-size: clamp(26px, 4vw, 42px); font-weight: 600; line-height: 1.15; letter-spacing: -.02em; margin: 0 0 10px; }
.yp-hero__lead { color: var(--sub); font-size: 15px; margin: 0 0 24px; }
.yp-hero__lead b { color: var(--gold-soft); font-weight: 700; }

.yp-portals { display: flex; flex-wrap: wrap; gap: 8px; }
.yp-portal { padding: 10px 18px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg); color: var(--sub); font-size: 14px; font-weight: 600; text-decoration: none; transition: all .2s var(--ease); }
.yp-portal:hover { color: var(--forest); border-color: var(--forest); }
.yp-portal.is-on { background: var(--forest-solid); border-color: var(--forest-solid); color: #fff; }

/* ── 필터 ─────────────────────────────────────────── */
.yp-body { padding: 28px 0 100px; }
.yp-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.yp .chip { display: inline-block; padding: 8px 16px; border-radius: var(--radius); border: 1px solid var(--line); background: transparent; font-size: 13.5px; font-weight: 600; color: var(--sub); text-decoration: none; transition: all .2s var(--ease); }
.yp .chip:hover { border-color: var(--forest); color: var(--forest); }
.yp .chip.is-active { background: var(--glass); border-color: var(--forest); color: var(--ink); }

.yp-filter { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--paper); margin-bottom: 26px; }
.yp-select, .yp-input { height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); color: var(--ink); font-size: 14px; font-family: inherit; }
.yp-select:disabled { opacity: .45; }
.yp-select { min-width: 140px; }
.yp-input { flex: 1 1 200px; min-width: 160px; }
.yp-select:focus, .yp-input:focus { outline: none; border-color: var(--forest); }

/* ── 카드 그리드 ─────────────────────────────────────── */
.yp-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.yp-card a { display: block; height: 100%; text-decoration: none; color: inherit; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--paper); overflow: hidden; transition: transform .2s var(--ease), border-color .2s; }
.yp-card a:hover { transform: translateY(-3px); border-color: var(--forest); }
.yp-card__img { position: relative; aspect-ratio: 16 / 10; background: var(--bg); overflow: hidden; }
.yp-card__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.yp-card__img--ph { display: flex; align-items: center; justify-content: center; background: linear-gradient(150deg, rgba(245,158,11,.14), transparent 60%), var(--bg); }
.yp-card__ph { font-family: var(--display); font-size: 40px; font-weight: 700; color: var(--gold); opacity: .55; }
.yp-card__cat { position: absolute; left: 10px; top: 10px; padding: 4px 9px; border-radius: 999px; background: rgba(4,7,13,.7); color: #fff; font-size: 11.5px; font-weight: 700; backdrop-filter: blur(4px); }
.yp-card__body { padding: 12px 14px 14px; }
.yp-card__name { margin: 0 0 4px; font-size: 15px; font-weight: 700; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.yp-card__meta { margin: 0; font-size: 12.5px; color: var(--sub); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.yp-card__tel { margin: 4px 0 0; font-size: 12.5px; color: var(--ink-2, #cbd5e1); font-family: var(--mono); }
.yp-empty { text-align: center; color: var(--sub); padding: 60px 0; }

/* ── 페이지네이션 ─────────────────────────────────────── */
.yp-pager { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 36px; flex-wrap: wrap; }
.yp-pager a, .yp-pager b, .yp-pager span { min-width: 36px; height: 36px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius); font-size: 14px; }
.yp-pager a { border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.yp-pager a:hover { border-color: var(--forest); color: var(--forest); }
.yp-pager b { background: var(--forest-solid); color: #fff; font-weight: 700; }
.yp-pager span { color: var(--sub); }

/* ── 상세 ─────────────────────────────────────────── */
.yp-detail { padding: 110px 0 100px; }
.yp-crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--sub); margin-bottom: 22px; }
.yp-crumb a { color: var(--sub); text-decoration: none; }
.yp-crumb a:hover { color: var(--forest); }
.yp-crumb span { opacity: .45; }
.yp-crumb em { font-style: normal; color: var(--ink); font-weight: 600; }
.yp-notice { display: inline-block; padding: 6px 12px; border-radius: 999px; background: rgba(248,113,113,.15); color: var(--danger); font-size: 13px; font-weight: 700; margin-bottom: 14px; }

.yp-top { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(320px, 1fr); gap: 26px; align-items: start; margin-bottom: 40px; }
.yp-visual { position: relative; border-radius: var(--radius-lg); overflow: hidden; background: var(--paper); border: 1px solid var(--line); aspect-ratio: 4 / 3; }
.yp-visual img { width: 100%; height: 100%; object-fit: cover; display: block; }
.yp-visual--ph { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: linear-gradient(160deg, rgba(245,158,11,.14), transparent 60%), var(--paper); }
.yp-visual__ph { font-family: var(--display); font-size: 84px; font-weight: 700; color: var(--gold); opacity: .5; line-height: 1; }
.yp-visual__txt { font-size: 13px; color: var(--sub); }
.yp-visual__tag { position: absolute; left: 14px; top: 14px; padding: 6px 12px; border-radius: 999px; background: rgba(4,7,13,.7); color: #fff; font-size: 12.5px; font-weight: 700; backdrop-filter: blur(6px); }

.yp-info { padding: 26px 26px 20px; position: sticky; top: 96px; }
.yp-info__cat { display: inline-block; padding: 5px 12px; border-radius: 999px; background: rgba(245,158,11,.14); color: var(--gold-soft); font-size: 12.5px; font-weight: 700; margin-bottom: 12px; }
.yp-info__name { font-family: var(--display); font-size: 26px; line-height: 1.25; font-weight: 700; margin: 0 0 6px; letter-spacing: -.02em; word-break: keep-all; }
.yp-info__region { color: var(--sub); font-size: 13.5px; margin: 0 0 18px; }
.yp-info__rows { margin: 0 0 18px; border-top: 1px solid var(--line); }
.yp-info__rows > div { display: grid; grid-template-columns: 64px 1fr; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; line-height: 1.55; }
.yp-info__rows dt { color: var(--sub); font-size: 13px; }
.yp-info__rows dd { margin: 0; word-break: break-all; }
.yp-info__rows a { color: var(--ink); text-decoration: none; }
.yp-info__rows a:hover { color: var(--forest); }
.yp-cta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.yp-cta .btn { justify-content: center; text-align: center; }
.yp-cta__wide { grid-column: 1 / -1; }
.yp-info__meta { display: flex; justify-content: space-between; margin: 14px 0 0; font-size: 12px; color: var(--sub); }

.yp-sec { margin-bottom: 40px; }
.yp-sec__title { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 700; margin: 0 0 14px; }
.yp-sec__title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.yp-desc { font-size: 15px; color: var(--ink-2, #cbd5e1); line-height: 1.9; word-break: keep-all; }
.yp-map { width: 100%; height: 360px; border-radius: var(--radius-lg); border: 1px solid var(--line); overflow: hidden; background: var(--paper); }
.yp-grid--rel { grid-template-columns: repeat(3, 1fr); }
.yp-more { text-align: center; margin: 16px 0 0; }
.yp-more a { color: var(--forest); font-weight: 600; text-decoration: none; }

@media (max-width: 1024px) { .yp-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px) {
  .yp-top { grid-template-columns: 1fr; gap: 18px; }
  .yp-info { position: static; padding: 22px 20px 18px; }
  .yp-info__name { font-size: 22px; }
  .yp-grid--rel { grid-template-columns: repeat(2, 1fr); }
  .yp-map { height: 280px; }
}
@media (max-width: 640px) {
  .yp-hero { padding-top: 96px; }
  .yp-grid, .yp-grid--rel { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .yp-filter { padding: 10px; }
  .yp-select { flex: 1 1 45%; min-width: 0; }
}
@media (max-width: 420px) { .yp-grid, .yp-grid--rel { grid-template-columns: 1fr; } .yp-cta { grid-template-columns: 1fr; } }
