/* ══════════════════════════════════════
   라원 안내도 — dgw (donggungwon widget)
   ══════════════════════════════════════ */

:root {
  --gold: #FFD23C;
  --pink: #FF6987;
  --bg: #eef0f4;
  --white: #ffffff;
  --dark: #1a2236;
  --text: #2d3748;
  --muted: #475569;
  --border: #dde2ea;
  --panel: #f4f6f9;
}


/* ── Card header (세이지 그린 파스텔) ── */

.dgw-card-head {
  flex-shrink: 0;
  background: var(--dg-primary-gradient);
  border-radius: 14px;
  padding: .5rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  border-bottom: none;
}

.dgw-card-head{background:linear-gradient(135deg,#d7e6cf 0%,#f1f6ed 100%);}
.dgw-head-title{color:#1f421b;}
.dgw-head-eyebrow{color:#4b6c3c;}
.dgw-head-desc{color:#385a2d;}
.dgw-pill-pink{background:#c93d5d;color:#fff;}
.dgw-pill-gold{background:#e6a817;color:#1f2937;}

.dgw-head-icon {
  width: 38px; height: 38px;
  background: rgba(45,74,30,.10);
  border: none;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0; color: #2d4a1e;
}

.dgw-head-text {
  display: flex; flex-direction: column; gap: 2px; min-width: 0;
}

.dgw-head-eyebrow {
  font-size: 10px; font-weight: 700;
  color: rgba(45,74,30,.5);
  letter-spacing: 1.6px; text-transform: uppercase;
}

.dgw-head-title {
  font-size: 20px; font-weight: 800; color: #2d4a1e;
  letter-spacing: -0.3px; line-height: 1.15;
  font-family: 'Noto Serif KR', serif;
}

.dgw-head-desc {
  font-size: 12px; color: rgba(45,74,30,.5); margin-top: 2px;
}

.dgw-head-pills {
  margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap;
  justify-content: flex-end;
}

.dgw-pill {
  padding: 5px 14px; border-radius: 20px;
  font-size: 11px; font-weight: 700; letter-spacing: .3px;
  display: inline-flex; align-items: center; gap: 5px;
}
.dgw-pill-pink {
  background: #FF6987; border: none; color: #fff;
}
.dgw-pill-gold {
  background: #e6a817; border: none; color: #fff;
}
.dgw-pill-dot { width: 6px; height: 6px; border-radius: 50%; }
.dgw-pill-pink .dgw-pill-dot { background: #fff; }
.dgw-pill-gold .dgw-pill-dot { background: #fff; }


/* ── Main body (지도 + 사이드바 좌우) ── */

.dgw-card-body {
  display: flex; gap: 12px; overflow: hidden;
  align-items: flex-start;
}


/* ── 지도 영역 ── */

.dgw-map-col {
  flex: 1; min-width: 0;
  position: relative; overflow: hidden;
  align-self: flex-start;
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.10);
}

.dgw-map-inner {
  position: relative;
  display: inline-block;
  line-height: 0;
  min-width: 100%;
}

.dgw-map-img {
  display: block; width: 100%; height: auto;
}


/* ── 번호 마커 (전시+시설 스팟) ── */

.dgw-spot {
  position: absolute; transform: translate(-50%,-50%);
  cursor: pointer; z-index: 10;
}

.dgw-spot-ring {
  width: 44px; height: 44px;
  background: rgba(255,105,135,0.18);
  border: 2px solid rgba(255,105,135,0.52);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: all .22s;
  animation: none;
}

.dgw-spot:hover .dgw-spot-ring {
  background: rgba(255,105,135,0.55);
  border-color: #FF6987;
  transform: scale(1.22); animation: none;
}

.dgw-spot-num {
  width: 22px; height: 22px; background: #FF6987;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; color: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(255,105,135,0.45); }
  50%     { box-shadow: 0 0 0 8px rgba(255,105,135,0); }
}


/* ── 편의시설 마커 (골드 아이콘만) ── */

.dgw-util {
  position: absolute; transform: translate(-50%,-50%);
  cursor: pointer; z-index: 11;
}

.dgw-util-badge {
  width: 26px; height: 26px; background: #FFD23C;
  border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  transition: transform .18s;
}
.dgw-util:hover .dgw-util-badge { transform: scale(1.28); }
.dgw-util-badge i { font-size: 13px; color: #1a1a1a; }


/* ── 지도 위 텍스트 라벨 ── */

.dgw-label {
  position: absolute; transform: translate(-50%,-50%);
  z-index: 8;
  font-size: 12px; font-weight: 700;
  color: rgba(255,255,255,.92);
  text-shadow: 0 1px 4px rgba(0,0,0,.6), 0 0 2px rgba(0,0,0,.4);
  white-space: nowrap; pointer-events: none;
  letter-spacing: .3px; text-align: center; line-height: 1.4;
  font-family: 'Noto Sans KR', sans-serif;
}


/* ── 툴팁 ── */

.dgw-tip {
  position: absolute; bottom: calc(100% + 7px); left: 50%;
  transform: translateX(-50%);
  background: rgba(26,34,54,0.95);
  border: 1px solid rgba(255,105,135,0.4);
  color: #fff; padding: 4px 10px; border-radius: 7px;
  font-size: 11px; font-weight: 600; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity .15s;
  z-index: 60;
}
.dgw-tip::after {
  content: ''; position: absolute; top: 100%; left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: rgba(255,105,135,0.4);
}
.dgw-spot:hover .dgw-tip,
.dgw-util:hover .dgw-tip { opacity: 1; }


/* ── 사이드바 ── */

.dgw-sidebar {
  width: 340px; flex-shrink: 0;
  display: flex; flex-direction: column;
  gap: 10px; overflow: hidden;
  align-self: stretch;
}


/* ── 섹션 카드 공통 ── */

.dgw-sec-card {
  background: var(--white);
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.07);
  display: flex; flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
}

.dgw-sec-head {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 14px 10px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.dgw-sec-bar {
  width: 3px; height: 15px; border-radius: 2px; flex-shrink: 0;
}
.dgw-sec-bar.dgw-pink { background: #FF6987; }
.dgw-sec-bar.dgw-gold { background: #FFD23C; }

.dgw-sec-title {
  font-size: 13.5px; font-weight: 700;
  color: var(--text); letter-spacing: .2px;
}

.dgw-sec-badge {
  margin-left: auto;
  font-size: 10px; font-weight: 700; color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 2px 8px; border-radius: 10px;
}


/* ══════════════════════════════════════
   디테일 카드 (사이드바 상단)
   ══════════════════════════════════════ */

.dgw-detail-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

.dgw-detail-img-wrap {
  position: relative;
  flex-shrink: 0;
  height: 200px;
  overflow: hidden;
}

.dgw-detail-img {
  display: block; width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.dgw-detail-card:hover .dgw-detail-img {
  transform: scale(1.03);
}

.dgw-detail-img-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 40%, rgba(10,14,26,0.75) 100%);
  pointer-events: none;
}

.dgw-detail-badge-wrap {
  position: absolute; bottom: 12px; left: 12px;
  display: flex; align-items: center; gap: 7px;
}

.dgw-detail-num {
  width: 26px; height: 26px;
  background: #FF6987; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #fff;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}
.dgw-detail-num:empty { display: none; }

.dgw-detail-hall {
  font-size: 11px; font-weight: 700;
  color: rgba(255,255,255,0.9);
  letter-spacing: 0.3px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

.dgw-detail-body {
  flex: 1;
  padding: 16px 16px 12px;
  display: flex; flex-direction: column; gap: 10px;
  overflow-y: auto; min-height: 0;
}
.dgw-detail-body::-webkit-scrollbar { width: 3px; }
.dgw-detail-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.dgw-detail-time-row {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; color: #9f1239;
}
.dgw-detail-time-row[hidden] { display: none; }
.dgw-detail-time-row i { font-size: 9px; }

.dgw-detail-title {
  font-size: 14.5px; font-weight: 700;
  color: var(--text); line-height: 1.5; letter-spacing: -0.2px;
}

.dgw-detail-divider {
  height: 1px; background: var(--border); flex-shrink: 0;
}

.dgw-detail-desc {
  font-size: 12.5px; color: var(--muted);
  line-height: 1.7; font-weight: 400;
}

.dgw-detail-hint {
  flex-shrink: 0;
  padding: 9px 14px;
  background: var(--panel);
  border-top: 1px solid var(--border);
  font-size: 10.5px; color: var(--muted);
  display: flex; align-items: center; gap: 6px;
}
.dgw-detail-hint i { color: #8ca078; font-size: 11px; }

/* 페이드 트랜지션 */
.dgw-detail-img,
.dgw-detail-title,
.dgw-detail-desc,
.dgw-detail-time-row,
.dgw-detail-hall,
.dgw-detail-num {
  transition: opacity 0.25s ease;
}
.dgw-detail-card.dgw-updating .dgw-detail-img,
.dgw-detail-card.dgw-updating .dgw-detail-title,
.dgw-detail-card.dgw-updating .dgw-detail-desc,
.dgw-detail-card.dgw-updating .dgw-detail-time-row,
.dgw-detail-card.dgw-updating .dgw-detail-hall,
.dgw-detail-card.dgw-updating .dgw-detail-num {
  opacity: 0;
}


/* ══════════════════════════════════════
   편의시설 (사이드바 하단)
   ══════════════════════════════════════ */

.dgw-sidebar .dgw-amenity {
  flex-shrink: 0;
}

.dgw-amenity-body { padding: 8px 10px; }

.dgw-amenity-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.dgw-a-item {
  display: flex; align-items: center; gap: 8px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px; padding: 7px 9px;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.dgw-a-item:hover {
  background: rgba(255,210,60,0.08);
  border-color: rgba(255,210,60,0.4);
}
.dgw-a-item.dgw-active {
  background: rgba(255,210,60,0.18);
  border-color: rgba(255,210,60,0.7);
}

.dgw-a-icon {
  width: 26px; height: 26px; background: #FFD23C;
  border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.dgw-a-icon i { font-size: 13px; color: #1a1a1a; }

.dgw-a-name {
  font-size: 12px; color: var(--text);
  font-weight: 500; line-height: 1.25;
}


/* ══════════════════════════════════════
   반응형 — 태블릿 (≤ 900px)
   ══════════════════════════════════════ */

@media (max-width: 900px) {

  html, body { overflow-x: hidden !important; }

  .dgw-card-head { padding: 10px 14px; gap: 10px; }
  .dgw-head-pills { display: none; }
  .dgw-head-desc  { display: none; }
  .dgw-head-title { font-size: 16px; }
  .dgw-head-icon  { width: 32px; height: 32px; font-size: 18px; }

  .dgw-card-body {
    flex-direction: column !important;
    align-items: stretch !important;
    overflow: hidden !important;
    gap: 10px;
  }

  .dgw-map-col {
    flex: none !important;
    width: 100% !important;
    height: 420px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-padding-inline: 110px;
    -webkit-overflow-scrolling: touch;
    border-radius: 10px;
  }
  .dgw-map-img {
    width: auto !important;
    height: 420px !important;
    min-width: 900px !important;
    max-width: none !important;
  }

  .dgw-sidebar {
    width: 100% !important;
    overflow: hidden !important;
    gap: 8px;
  }

  .dgw-sec-card {
    width: 100% !important;
    border-radius: 10px;
  }

  .dgw-amenity-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }

  .dgw-label { font-size: 11px; }

  .dgw-tip {
    white-space: nowrap !important;
    z-index: 9999 !important;
  }

  .dgw-detail-img-wrap { height: 160px; }
  .dgw-detail-body { padding: 12px 12px 10px; }
}

/* ── 시설 마커 (이름 표시, 틸 컬러) ── */
.dgw-fspot {
  position: absolute; transform: translate(-50%,-50%);
  cursor: pointer; z-index: 10;
  display: flex; flex-direction: column;
  align-items: center; gap: 3px;
}
.dgw-fspot-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px;
  background: rgba(38,166,154,.85);
  border: 2px solid rgba(38,166,154,.5);
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
  transition: all .22s;
  animation: none;
}
.dgw-fspot:hover .dgw-fspot-badge {
  background: rgba(38,166,154,.95);
  border-color: #26a69a;
  transform: scale(1.1);
  animation: none;
}
.dgw-fspot-badge i {
  font-size: 11px; color: #fff;
}
.dgw-fspot-name {
  font-size: 10px; font-weight: 700;
  color: #fff; white-space: nowrap;
  letter-spacing: .2px;
}
@keyframes fpulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(38,166,154,0.45); }
  50%     { box-shadow: 0 0 0 8px rgba(38,166,154,0); }
}

/* 툴팁 — 시설 마커 */
.dgw-fspot .dgw-tip {
  border-color: rgba(38,166,154,0.4);
}
.dgw-fspot .dgw-tip::after {
  border-top-color: rgba(38,166,154,0.4);
}
.dgw-fspot:hover .dgw-tip { opacity: 1; }

/* 반응형 */
@media (max-width: 900px) {
  .dgw-fspot-badge { padding: 3px 8px; }
  .dgw-fspot-badge i { font-size: 10px; }
  .dgw-fspot-name { font-size: 9px; }
}
@media (max-width: 480px) {
  .dgw-fspot-badge { padding: 2px 6px; gap: 3px; }
  .dgw-fspot-name { font-size: 8px; }
}

/* 웹 접근성: 지도와 목록은 같은 상세 정보를 제공하며, 모든 조작은 키보드로 가능하다. */
.dgw-a11y-heading,.dgw-sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important;}
button.dgw-spot,button.dgw-fspot,button.dgw-util{margin:0;padding:0;border:0;background:transparent;font:inherit;line-height:1;}
button.dgw-spot:focus-visible,button.dgw-fspot:focus-visible,button.dgw-util:focus-visible,.dgw-map-list-button:focus-visible,.dgw-a-item:focus-visible{outline:3px solid #111827!important;outline-offset:3px!important;}
button.dgw-spot.is-selected .dgw-spot-ring{background:#a51d3d!important;border-color:#7f1734!important;transform:scale(1.28);animation:none;}
button.dgw-fspot.is-selected .dgw-fspot-badge{background:#0f766e!important;border-color:#115e59!important;transform:scale(1.12);animation:none;}
.dgw-spot-num{background:#a51d3d!important;}
.dgw-fspot-badge{background:#0f766e!important;}
.dgw-map-list{margin-top:18px;padding:18px;border:1px solid rgba(15,81,50,.15);border-radius:14px;background:#fff;}
.dgw-map-list h2{margin:0;color:#1f2937;font-size:18px;font-weight:800;}
.dgw-map-list p{margin:6px 0 12px;color:#475569;font-size:14px;}
.dgw-map-list-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;}
.dgw-map-list-button{min-height:42px;padding:8px 11px;border:1px solid #cbd5e1;border-radius:9px;background:#fff;color:#1e293b;text-align:left;font-size:14px;font-weight:700;}
.dgw-map-list-button:hover,.dgw-map-list-button.is-selected{border-color:#2d4a1e;background:#edf5e9;color:#2d4a1e;}
.dgw-a-item{border:1px solid transparent;font:inherit;cursor:pointer;}
.dgw-a-item.is-selected{border-color:#2d4a1e!important;}
@media (prefers-reduced-motion: reduce){.dgw-spot-ring,.dgw-fspot-badge{animation:none!important;transition:none!important;}}
@media (max-width:600px){.dgw-map-list-grid{grid-template-columns:1fr;}}

/* 시설·전시 목록은 선택 상세 이미지 바로 아래의 오른쪽 패널에서 제공한다. */
.dgw-detail-card>.dgw-map-list{margin:0;padding:12px 16px;border:0;border-radius:0;border-bottom:1px solid #e2e8f0;background:#f8fafc;}
.dgw-detail-card>.dgw-map-list h2{font-size:16px;}
.dgw-detail-card>.dgw-map-list p{font-size:13px;line-height:1.45;}
.dgw-detail-card>.dgw-map-list .dgw-map-list-grid{max-height:none;overflow:visible;padding-right:0;}
.dgw-detail-card>.dgw-map-list .dgw-map-list-button{display:flex;align-items:center;gap:7px;min-height:38px;padding:7px 9px;font-size:13px;}
.dgw-map-list-number{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;flex:0 0 22px;border-radius:50%;background:#a51d3d;color:#fff;font-size:12px;font-weight:800;line-height:1;}
.dgw-map-list-name{min-width:0;white-space:normal;overflow-wrap:anywhere;line-height:1.4;word-spacing:-2px;letter-spacing:-.35px;}

/* Top guide card: keep all text and badges readable on the pale green surface. */
.dgw-card-head.rw-head-logo{background:linear-gradient(135deg,#d7e6cf 0%,#f1f6ed 100%);}
.dgw-card-head .dgw-head-title{color:#1f421b;}
.dgw-card-head .dgw-head-eyebrow{color:#4b6c3c;}
.dgw-card-head .dgw-head-desc{color:#385a2d;}
.dgw-card-head .dgw-pill-pink{background:#c93d5d;color:#fff;}
.dgw-card-head .dgw-pill-gold{background:#e6a817;color:#1f2937;}

/* 지도 마커의 보조 안내: 마우스와 키보드 초점에 동일하게 노출한다. */
.dgw-map-tooltip{position:absolute;bottom:calc(100% + 8px);left:50%;z-index:80;width:max-content;max-width:190px;padding:6px 9px;border-radius:7px;background:#111827;color:#fff;font-size:12px;font-weight:700;line-height:1.35;white-space:normal;overflow-wrap:anywhere;pointer-events:none;opacity:0;visibility:hidden;transform:translateX(-50%);transition:opacity .16s ease;}
.dgw-map-tooltip::after{content:"";position:absolute;top:100%;left:50%;border:5px solid transparent;border-top-color:#111827;transform:translateX(-50%);}
.dgw-map-tooltip--left{left:auto;right:0;transform:none;}
.dgw-map-tooltip--right{left:0;transform:none;}
.dgw-map-tooltip--below{top:calc(100% + 8px);bottom:auto;}
.dgw-map-tooltip--below::after{top:auto;bottom:100%;border-top-color:transparent;border-bottom-color:#111827;}
button.dgw-spot:hover,button.dgw-fspot:hover,button.dgw-util:hover,button.dgw-spot:focus-visible,button.dgw-fspot:focus-visible,button.dgw-util:focus-visible{z-index:100!important;}
button.dgw-spot:hover .dgw-map-tooltip,button.dgw-fspot:hover .dgw-map-tooltip,button.dgw-util:hover .dgw-map-tooltip,button.dgw-spot:focus-visible .dgw-map-tooltip,button.dgw-fspot:focus-visible .dgw-map-tooltip,button.dgw-util:focus-visible .dgw-map-tooltip{opacity:1;visibility:visible;}
@media (prefers-reduced-motion: reduce){.dgw-map-tooltip{transition:none;}}

/* 편의시설은 보조 텍스트 없이 아이콘 버튼만 제공한다. */
.dgw-amenity-body{padding:10px!important;}
.dgw-amenity-grid{display:flex;justify-content:center;gap:8px;}
.dgw-amenity-grid .dgw-a-item{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-width:86px;height:46px;min-height:46px;padding:0 10px;border:1px solid #d8e2d4!important;border-radius:12px;background:#fff;}
.dgw-amenity-grid .dgw-a-item:hover,.dgw-amenity-grid .dgw-a-item.is-selected{background:#edf5e9;border-color:#2d4a1e!important;}
.dgw-amenity-grid .dgw-a-icon{width:30px;height:30px;border-radius:9px;}
.dgw-amenity-grid .dgw-a-name{display:block;font-size:12px;font-weight:600;white-space:nowrap;}
.dgw-sec-title{margin:0;line-height:1.5;}
.dgw-detail-hall{padding:3px 6px;border-radius:4px;background:#1f2937;color:#fff;text-shadow:none;}

/* Keep the map card at the image height and avoid an oversized blank area before the footer. */
.content.content>.dg-footer{margin-top:28px!important;}

/* ══════════════════════════════════════
   반응형 — 모바일 (≤ 480px)
   ══════════════════════════════════════ */

@media (max-width: 480px) {

  .dgw-head-title { font-size: 15px; }

  .dgw-amenity-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }

  .dgw-spot-ring  { width: 30px; height: 30px; }
  .dgw-spot-num   { width: 17px; height: 17px; font-size: 8px; }
  .dgw-util-badge { width: 20px; height: 20px; }
  .dgw-util-badge i { font-size: 10px; }

  .dgw-tip   { font-size: 10px; padding: 3px 8px; }
  .dgw-label { font-size: 10px; }
}
