/* =========================================================
   생활정보 — 화이트톤 디자인 (공통 / 데스크톱)
   ========================================================= */
:root {
  --primary: #2563eb;          /* 메인 블루 */
  --primary-dark: #1d4ed8;
  --primary-soft: #eff4ff;
  --accent: #0ea5e9;
  --text: #1f2329;
  --text-muted: #5f6b7a;
  --text-light: #8a94a3;
  --border: #e8ebef;
  --border-soft: #f1f3f6;
  --bg: #ffffff;
  --bg-soft: #f7f9fb;
  --bg-soft2: #f0f3f7;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 2px 10px rgba(20, 30, 50, 0.06);
  --shadow-lg: 0 8px 28px rgba(20, 30, 50, 0.10);
  --header-h: 62px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 15px;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
h1, h2, h3 { margin: 0 0 .5em; font-weight: 700; line-height: 1.3; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 18px; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 200;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1240px; margin: 0 auto; padding: 0 18px;
  height: var(--header-h);
  display: flex; align-items: center; gap: 18px;
}
.logo { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.15rem; flex-shrink: 0; }
.logo-icon { font-size: 1.4rem; }
.logo-text { color: var(--text); }

.nav-desktop { flex: 1; min-width: 0; }
.nav-menu {
  display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0;
  overflow-x: auto; scrollbar-width: none;
}
.nav-menu::-webkit-scrollbar { display: none; }
.nav-link {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 8px 11px; border-radius: 999px;
  font-size: .9rem; font-weight: 500; color: var(--text-muted);
  white-space: nowrap; transition: background .15s, color .15s;
}
.nav-emoji { font-size: 1rem; }
.nav-link:hover { background: var(--bg-soft); color: var(--text); }
.nav-link.active { background: var(--primary-soft); color: var(--primary-dark); font-weight: 700; }

.menu-toggle {
  display: none; flex-direction: column; gap: 4px;
  width: 42px; height: 42px; padding: 10px; background: none; border: none; cursor: pointer;
}
.menu-toggle span { display: block; height: 2px; background: var(--text); border-radius: 2px; transition: .3s; }

/* ---------- Mobile sidebar / bottom nav (hidden on desktop) ---------- */
.mobile-nav-overlay, .mobile-nav-sidebar, .mobile-bottom-nav { display: none; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(180deg, var(--primary-soft), #ffffff);
  border-bottom: 1px solid var(--border-soft);
}
.hero-inner { max-width: 1120px; margin: 0 auto; padding: 54px 18px 46px; text-align: center; }
.hero-title { font-size: 2rem; letter-spacing: -.5px; }
.hero-title strong { color: var(--primary); }
.hero-sub { color: var(--text-muted); font-size: 1.02rem; margin: 0; }

/* ---------- Category grid ---------- */
.cat-section { padding: 40px 0 60px; }
.section-title { font-size: 1.3rem; margin-bottom: 18px; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 16px; }
.cat-card {
  position: relative; display: flex; flex-direction: column;
  padding: 22px 20px 18px; background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: #d5ddea; }
.cat-card-emoji { font-size: 2rem; margin-bottom: 10px; }
.cat-card-name { font-size: 1.12rem; font-weight: 700; }
.cat-card-desc { color: var(--text-muted); font-size: .86rem; margin-top: 4px; flex: 1; }
.cat-card-count {
  position: absolute; top: 18px; right: 18px;
  background: var(--primary-soft); color: var(--primary-dark);
  font-size: .76rem; font-weight: 700; padding: 3px 9px; border-radius: 999px;
}
.cat-card-actions { display: flex; gap: 8px; margin-top: 14px; }
.cat-chip {
  font-size: .78rem; font-weight: 600; padding: 5px 12px; border-radius: 999px;
  background: var(--bg-soft); color: var(--text-muted); border: 1px solid var(--border);
}
.cat-chip-map { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 18px; border-radius: var(--radius-sm); font-weight: 600; font-size: .92rem;
  border: 1px solid var(--border); background: var(--bg); color: var(--text); cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--bg-soft); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }

/* ---------- Doc / error pages ---------- */
.doc-page { padding: 40px 18px 70px; max-width: 820px; }
.doc-page h1 { font-size: 1.6rem; margin-bottom: 18px; }
.doc-page h2 { font-size: 1.15rem; margin-top: 28px; }
.doc-page p, .doc-page li { color: var(--text-muted); }
.doc-date { margin-top: 36px; font-size: .85rem; color: var(--text-light); }
.error-page { text-align: center; padding: 80px 18px; }
.error-emoji { font-size: 3rem; }
.error-code { font-size: 3rem; margin: 8px 0 4px; color: var(--primary); }
.error-msg { color: var(--text-muted); margin-bottom: 24px; }

/* ---------- Footer ---------- */
.footer { margin-top: 40px; background: var(--bg-soft); border-top: 1px solid var(--border); }
.footer-inner { max-width: 1120px; margin: 0 auto; padding: 36px 18px 44px; }
.footer-cats { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-bottom: 20px; }
.footer-cats a { font-size: .86rem; color: var(--text-muted); }
.footer-cats a:hover { color: var(--primary); }
.footer-links { display: flex; flex-wrap: wrap; gap: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.footer-links a { font-size: .86rem; color: var(--text-muted); }
.footer-links a:hover { color: var(--primary); }
.footer-copyright { margin: 14px 0 0; font-size: .8rem; color: var(--text-light); }
.footer-feedback { margin-top: 22px; }
.footer-feedback-copy { font-size: .88rem; color: var(--text-muted); margin: 0 0 8px; }
.footer-feedback-button {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--primary); font-weight: 600; font-size: .88rem; cursor: pointer; transition: background .15s;
}
.footer-feedback-button:hover { background: var(--primary-soft); }

/* ---------- Feedback modal ---------- */
.feedback-modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 18px; }
.feedback-modal[hidden] { display: none; }
.feedback-modal-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .5); }
.feedback-dialog {
  position: relative; width: 100%; max-width: 460px; background: #fff;
  border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden;
}
.feedback-dialog-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.feedback-dialog-header h2 { display: flex; align-items: center; gap: 8px; font-size: 1.08rem; margin: 0; color: var(--primary); }
.feedback-modal-close { background: none; border: none; font-size: 1.5rem; color: var(--text-light); cursor: pointer; line-height: 1; }
.feedback-form { padding: 18px 20px 22px; }
.feedback-honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.feedback-field { margin-bottom: 14px; }
.feedback-field label { display: block; font-size: .86rem; font-weight: 600; margin-bottom: 6px; }
.feedback-field label em { color: var(--text-light); font-style: normal; font-weight: 400; }
.feedback-field textarea, .feedback-field input {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font: inherit; font-size: .9rem; resize: vertical; background: var(--bg-soft);
}
.feedback-field textarea:focus, .feedback-field input:focus { outline: none; border-color: var(--primary); background: #fff; }
.feedback-count { text-align: right; font-size: .76rem; color: var(--text-light); margin-top: 4px; }
.feedback-status { font-size: .85rem; min-height: 1.2em; margin: 4px 0 10px; }
.feedback-status.success { color: #15803d; }
.feedback-status.error { color: #dc2626; }
.feedback-submit { width: 100%; padding: 12px; background: var(--primary); color: #fff; border: none; border-radius: var(--radius-sm); font-weight: 700; font-size: .95rem; cursor: pointer; transition: background .15s; }
.feedback-submit:hover { background: var(--primary-dark); }
.feedback-submit:disabled { opacity: .6; cursor: default; }

/* ---------- Ads ---------- */
.ad-top, .ad-bottom, .ad-container { text-align: center; }
.ad-notice { display: block; font-size: 10px; color: var(--text-light); margin-top: 6px; }
.ad-mobile-only { display: none; }
.ad-sidebar { position: fixed; top: 50%; transform: translateY(-50%); width: 160px; height: 600px; z-index: 90; }
.ad-left { left: 12px; }
.ad-right { right: 12px; }
@media (max-width: 1579px) { .ad-sidebar { display: none !important; } }
.ad-mobile-anchor { display: none; }
/* unfilled 슬롯 숨김 */
ins.adsbygoogle[data-ad-status="unfilled"] { display: none !important; }

/* =========================================================
   카테고리 페이지 (목록 / 지도 / 상세)
   ========================================================= */
.cat-page { padding: 26px 0 50px; }
.container--narrow { max-width: 820px; }
.page-head { margin-bottom: 18px; }
.page-title { display: flex; align-items: center; gap: 10px; font-size: 1.5rem; }
.page-emoji { font-size: 1.6rem; }
.page-sub { color: var(--text-muted); font-size: .92rem; margin: 4px 0 0; }

/* 필터 바 */
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end;
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 22px;
}
.filter-group { display: flex; flex-direction: column; gap: 5px; }
.filter-group label { font-size: .76rem; font-weight: 600; color: var(--text-muted); }
.filter-group--grow { flex: 1; min-width: 150px; }
.filter-group select, .filter-group input {
  padding: 9px 11px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font: inherit; font-size: .9rem; background: #fff; min-width: 130px;
}
.filter-group--grow input { width: 100%; }
.filter-actions { flex-direction: row; gap: 8px; }

/* 시설 리스트 */
.fac-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.fac-ad { grid-column: 1 / -1; }
.fac-card {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm);
  transition: border-color .15s, box-shadow .15s, transform .12s;
}
.fac-card:hover { border-color: #cdd7e6; box-shadow: var(--shadow); transform: translateY(-1px); }
.fac-dot { width: 12px; height: 12px; border-radius: 50%; flex: 0 0 auto; }
.fac-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.fac-name { font-weight: 600; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fac-addr { font-size: .8rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fac-go { color: var(--text-light); font-size: 1.2rem; flex: 0 0 auto; }

.empty-state { text-align: center; padding: 50px 18px; color: var(--text-muted); }
.empty-state p { margin: 0 0 14px; }

/* 페이지네이션 */
.pagination { display: flex; justify-content: center; gap: 6px; margin: 28px 0 10px; flex-wrap: wrap; }
.pg-btn {
  min-width: 38px; height: 38px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: .9rem; color: var(--text-muted); background: #fff;
}
.pg-btn:hover { background: var(--bg-soft); }
.pg-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); font-weight: 700; }
.pg-gap { padding: 0 4px; color: var(--text-light); align-self: center; }

/* =========================================================
   지도
   ========================================================= */
.map-wrap { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.map-canvas { width: 100%; height: 560px; }
.map-area-search-btn {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 50;
  background: var(--primary); color: #fff; border: none; border-radius: 999px;
  box-shadow: 0 4px 16px rgba(37,99,235,.32); padding: 6px 13px; font: inherit; font-size: .76rem; font-weight: 700; cursor: pointer;
  white-space: nowrap;
}
.map-area-search-btn:hover { background: var(--primary-dark); }
.map-area-search-btn:disabled { opacity: .6; cursor: wait; }

/* 마커 핀 / 클러스터 / 내위치 */
.map-pin { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--pin); border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.map-pin span { transform: rotate(45deg); font-size: 13px; line-height: 1; }
.map-cluster { display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--c); color: #fff; font-weight: 700; font-size: 13px; border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.3); opacity: .92; }
.my-location-marker { width: 16px; height: 16px; border-radius: 50%; background: #2563eb; border: 3px solid #fff; box-shadow: 0 0 0 0 rgba(37,99,235,.45); animation: mypulse 2s infinite; }
@keyframes mypulse { 0% { box-shadow: 0 0 0 0 rgba(37,99,235,.45); } 70% { box-shadow: 0 0 0 13px rgba(37,99,235,0); } 100% { box-shadow: 0 0 0 0 rgba(37,99,235,0); } }
.map-iw { padding: 12px 14px; min-width: 180px; background: #fff; border-radius: 10px; box-shadow: 0 4px 16px rgba(0,0,0,.18); }
.map-iw strong { display: block; font-size: 14px; }
.map-iw p { margin: 6px 0 0; font-size: 12px; color: var(--text-muted); }
.map-iw a { display: inline-block; margin-top: 9px; color: var(--primary); font-size: 13px; font-weight: 600; }

.map-geo-banner { display: none; align-items: center; gap: 10px; background: var(--primary-soft); color: #1e3a8a; border: 1px solid #c7dbff; border-radius: var(--radius-sm); padding: 10px 14px; margin-bottom: 12px; font-size: .88rem; }
.map-geo-banner.show { display: flex; }
.map-geo-banner .mgb-text { flex: 1; }
.map-geo-banner .mgb-allow { background: var(--primary); color: #fff; border: none; border-radius: 999px; padding: 7px 14px; font: inherit; font-size: .82rem; font-weight: 700; cursor: pointer; }
.map-geo-banner .mgb-close { background: none; border: none; color: #3b5bdb; font-size: 20px; cursor: pointer; }

.map-list-section { margin-top: 26px; }
.map-list-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.list-count { font-size: .84rem; color: var(--text-muted); }

/* =========================================================
   상세
   ========================================================= */
.detail-page { padding: 22px 0 50px; }
.breadcrumb { font-size: .82rem; color: var(--text-muted); margin-bottom: 14px; }
.breadcrumb a { color: var(--primary); }
.breadcrumb span { margin: 0 4px; color: var(--text-light); }
.detail-head { margin-bottom: 18px; }
.detail-title { font-size: 1.5rem; }
.detail-addr { color: var(--text-muted); margin: 6px 0 0; }
.detail-map-wrap { margin-bottom: 22px; }
.detail-map { width: 100%; height: 300px; border-radius: var(--radius); border: 1px solid var(--border); }
.detail-map-actions { display: flex; gap: 8px; margin-top: 10px; }
.btn-sm { padding: 7px 14px; font-size: .84rem; }

.detail-section { margin: 26px 0; }
.detail-section-title { font-size: 1.12rem; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 2px solid var(--primary-soft); }
.detail-table { width: 100%; border-collapse: collapse; }
.detail-table th, .detail-table td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--border-soft); font-size: .92rem; vertical-align: top; }
.detail-table th { width: 130px; color: var(--text-muted); font-weight: 600; background: var(--bg-soft); }
.detail-table a { color: var(--primary); }
.detail-back { margin-top: 30px; }

/* 실시간 */
.realtime-box { background: var(--primary-soft); border: 1px solid #c7dbff; border-radius: var(--radius); padding: 18px 20px; margin-bottom: 22px; text-align: center; }
.rt-big { font-size: 1.1rem; color: var(--text); }
.rt-big .rt-num { font-size: 2rem; font-weight: 800; color: var(--primary); }
.rt-sub { font-size: .8rem; color: var(--text-light); margin-top: 6px; }

/* EV 충전기 */
.charger-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.charger-card { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; text-align: center; }
.charger-id { font-weight: 700; font-size: .9rem; }
.charger-meta { font-size: .78rem; color: var(--text-muted); margin: 4px 0 8px; }
.charger-stat { font-size: .82rem; font-weight: 700; padding: 4px 0; border-radius: 6px; color: #fff; background: #9ca3af; }
.charger-stat.stat-2 { background: #16a34a; } /* 충전대기 */
.charger-stat.stat-3 { background: #f59e0b; } /* 충전중 */
.charger-stat.stat-1, .charger-stat.stat-4, .charger-stat.stat-5 { background: #dc2626; }
.charger-stat.stat-9, .charger-stat.stat-x { background: #9ca3af; }

/* 발급서류 태그 */
.doc-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.doc-tag { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 999px; padding: 5px 12px; font-size: .82rem; color: var(--text); }
