/* ==========================================
   BusanSangga.com - Shared Stylesheet
   부산 상가 부동산 전문 플랫폼
   ========================================== */

/* ==========================================
   TYPOGRAPHY SYSTEM — v2 Premium
   - Display: Noto Serif KR (클래식 명조 헤드라인)
   - Accent: Cormorant Garamond (럭셔리 세리프)
   - Body: Pretendard (한국 최고 가독성 산스)
   - Mono: JetBrains Mono (모던 기술 타이포)
   ========================================== */
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable.css');
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=Noto+Serif+KR:wght@300;400;500;600;700;900&family=JetBrains+Mono:wght@300;400;500;600&display=swap');

:root {
  /* Brand Colors - 부산 바다 & 네온 (고급화 보정) */
  --ocean-deep: #08253f;
  --ocean-mid: #1a3855;
  --ocean-light: #2d5a87;
  --neon-coral: #e84756;
  --neon-coral-dim: #c73847;
  --neon-amber: #d4a257;
  --neon-gold: #c9a96e;
  --neon-cyan: #00d4ff;
  --sand: #f2e8d8;
  --sand-light: #f9f4ea;
  --ivory: #fbf7f0;
  --cream: #f5efe2;
  --charcoal: #14181d;
  --gray-900: #1f2329;
  --gray-800: #2d3139;
  --gray-700: #4a5159;
  --gray-600: #6c727a;
  --gray-500: #8a9099;
  --gray-400: #a8adb5;
  --gray-300: #c9cdd3;
  --gray-200: #e4e6ea;
  --gray-100: #f1f2f5;
  --white: #ffffff;
  --shadow: 0 4px 24px rgba(8, 37, 63, 0.06);
  --shadow-lg: 0 20px 60px rgba(8, 37, 63, 0.12);
  --shadow-glow: 0 0 30px rgba(232, 71, 86, 0.18);

  /* Layout */
  --container: 1280px;
  --radius: 4px;
  --radius-lg: 12px;

  /* ============================================
     TYPOGRAPHY
     ============================================ */
  --font-display: 'Noto Serif KR', 'Cormorant Garamond', serif;
  --font-serif: 'Cormorant Garamond', 'Noto Serif KR', serif;
  --font-body: 'Pretendard Variable', 'Pretendard', -apple-system, BlinkMacSystemFont, 'Noto Sans KR', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* Letter spacing presets */
  --tracking-tight: -0.02em;
  --tracking-normal: -0.005em;
  --tracking-wide: 0.08em;
  --tracking-ultra: 0.22em;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--ivory);
  color: var(--charcoal);
  line-height: 1.7;
  letter-spacing: var(--tracking-normal);
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "ss02", "cv11";
  text-rendering: optimizeLegibility;
}

/* 공통 헤딩 타이포 — Noto Serif KR 기반 클래식 */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: var(--tracking-tight);
  line-height: 1.3;
  color: var(--charcoal);
}

/* 영문 엑센트 — Cormorant Garamond italic/serif */
.serif, .accent-en, em.refined {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* 대문자 레이블 — 공통 전역 */
.eyebrow, .label-upper {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: var(--tracking-ultra);
  text-transform: uppercase;
  color: var(--neon-gold);
}

/* 부드러운 링크 인터랙션 */
a.refined-link {
  position: relative;
  transition: color .2s ease;
}
a.refined-link::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 1px;
  background: currentColor;
  transition: width .3s cubic-bezier(.4,0,.2,1);
}
a.refined-link:hover::after { width: 100%; }

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* ============================
   HEADER
   ============================ */
.topbar {
  background: var(--ocean-deep);
  color: var(--sand);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: var(--tracking-wide);
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.topbar-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.topbar-left span { margin-right: 24px; opacity: 0.65; }
.topbar-right a { margin-left: 20px; opacity: 0.7; transition: opacity 0.2s; font-weight: 500; }
.topbar-right a:hover { opacity: 1; color: var(--neon-gold); }

.header {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 22px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
}

.logo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  flex-shrink: 0;
  line-height: 1;
}

.logo-mark {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 600;
  color: var(--ocean-deep);
  letter-spacing: -0.01em;
  line-height: 1;
  font-feature-settings: "liga", "dlig";
}

.logo-mark .accent {
  color: var(--neon-coral);
  font-style: italic;
  font-weight: 600;
}

.logo-mark .dot {
  color: var(--neon-gold);
  font-weight: 700;
}

.logo-tag {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-700);
  letter-spacing: 0.25em;
  margin-top: 3px;
  padding-left: 1px;
}

.nav {
  display: flex;
  gap: 32px;
  flex: 1;
}

.nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-800);
  letter-spacing: -0.005em;
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease;
  position: relative;
}

.nav a:hover,
.nav a.active {
  color: var(--neon-coral);
  border-bottom-color: var(--neon-coral);
}

.header-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.btn {
  padding: 10px 20px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.btn {
  padding: 12px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: var(--tracking-wide);
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.btn-ghost {
  color: var(--gray-900);
}
.btn-ghost:hover {
  background: var(--gray-100);
}

.btn-primary {
  background: var(--neon-coral);
  color: white;
}
.btn-primary:hover {
  background: var(--neon-coral-dim);
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
}

.btn-dark {
  background: var(--ocean-deep);
  color: white;
}
.btn-dark:hover {
  background: var(--ocean-mid);
}

.btn-outline {
  background: transparent;
  color: var(--ocean-deep);
  border: 1.5px solid var(--ocean-deep);
}
.btn-outline:hover {
  background: var(--ocean-deep);
  color: white;
}

.btn-lg {
  padding: 15px 32px;
  font-size: 13px;
  letter-spacing: var(--tracking-wide);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 12px;
}

/* ============================
   CONTAINER
   ============================ */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 96px 0;
}

.section-sm {
  padding: 56px 0;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 48px;
  gap: 24px;
  flex-wrap: wrap;
}

.section-title {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 700;
  color: var(--ocean-deep);
  letter-spacing: var(--tracking-tight);
  line-height: 1.2;
}

.section-title .accent {
  color: var(--neon-coral);
  font-style: normal;
}

/* 세리프 엑센트를 위한 변형 */
.section-title .serif-accent {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  color: var(--neon-gold);
  letter-spacing: 0;
}

.section-subtitle {
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--neon-gold);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--tracking-ultra);
  margin-bottom: 12px;
  display: inline-block;
  position: relative;
  padding-left: 28px;
}
.section-subtitle::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  width: 20px; height: 1px;
  background: var(--neon-gold);
}

.section-desc {
  color: var(--gray-700);
  font-size: 15px;
  line-height: 1.75;
  max-width: 620px;
  margin-top: 12px;
}

.view-all {
  font-size: 12px;
  font-weight: 600;
  color: var(--ocean-deep);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--ocean-deep);
  transition: all .25s ease;
}
.view-all:hover {
  color: var(--neon-coral);
  border-bottom-color: var(--neon-coral);
  gap: 12px;
}

/* ============================
   CARDS
   ============================ */
.card {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--gray-100);
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}
.card:hover .card-media img {
  transform: scale(1.05);
}

.card-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--neon-coral);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 2px;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}
.card-badge.new { background: var(--neon-amber); color: var(--charcoal); }
.card-badge.hot { background: var(--neon-coral); }
.card-badge.premium {
  background: linear-gradient(135deg, var(--ocean-deep), var(--neon-gold));
}
.card-badge.sale { background: #10b981; }

.card-fav {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(255,255,255,0.92);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.2s;
}
.card-fav:hover {
  background: white;
  transform: scale(1.1);
}
.card-fav.active {
  color: var(--neon-coral);
}

.card-body {
  padding: 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-type {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 600;
  color: var(--neon-gold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-ultra);
  margin-bottom: 10px;
}

.card-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 10px;
  line-height: 1.4;
  letter-spacing: var(--tracking-tight);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-price {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--ocean-deep);
  margin-bottom: 14px;
  letter-spacing: var(--tracking-tight);
}
.card-price .unit {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  color: var(--gray-600);
  letter-spacing: 0;
}

.card-meta {
  font-size: 13px;
  color: var(--gray-700);
  line-height: 1.8;
  margin-bottom: 14px;
  font-weight: 400;
}
.card-meta .dot { color: var(--gray-300); margin: 0 8px; }

.card-features {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--gray-200);
}

.tag {
  background: var(--cream);
  color: var(--ocean-mid);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 2px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* ============================
   FOOTER
   ============================ */
.footer {
  background: var(--ocean-deep);
  color: var(--sand);
  padding: 60px 0 24px;
  margin-top: 80px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer {
  background: var(--ocean-deep);
  color: var(--sand);
  padding: 72px 0 28px;
  margin-top: 96px;
  position: relative;
}
.footer::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 80px; height: 2px;
  background: var(--neon-gold);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand .logo-mark,
.footer-col .footer-logo {
  color: white;
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
  display: block;
}
.footer-col .footer-logo .accent {
  color: var(--neon-coral);
  font-style: italic;
}
.footer-col .footer-logo .dot {
  color: var(--neon-gold);
}
.footer-col .footer-logo-tag,
.footer-brand .logo-tag {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,0.65);
  letter-spacing: 0.22em;
  display: block;
  margin-bottom: 14px;
}

.footer-brand p,
.footer-col .footer-desc {
  font-size: 13px;
  opacity: 0.7;
  line-height: 1.85;
  margin-top: 14px;
  letter-spacing: 0;
}
.footer-col .footer-meta {
  font-size: 12px;
  opacity: 0.55;
  line-height: 2;
  margin-top: 14px;
}

.footer h4 {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  color: var(--neon-gold);
  margin-bottom: 18px;
  letter-spacing: var(--tracking-ultra);
  text-transform: uppercase;
}

.footer ul {
  list-style: none;
}

.footer li, .footer-col ul li {
  margin-bottom: 10px;
  font-size: 13px;
  opacity: 0.72;
  transition: all 0.2s ease;
}
.footer li a, .footer-col ul li a {
  transition: all .2s ease;
}
.footer li:hover, .footer-col ul li:hover {
  opacity: 1;
  color: var(--neon-gold);
  padding-left: 4px;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  letter-spacing: var(--tracking-wide);
  opacity: 0.5;
  flex-wrap: wrap;
  gap: 12px;
}

/* ============================
   GRID
   ============================ */
.grid { display: grid; gap: 28px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

/* ============================
   BREADCRUMB
   ============================ */
.breadcrumb {
  padding: 22px 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--gray-600);
  letter-spacing: var(--tracking-wide);
  background: white;
  border-bottom: 1px solid var(--gray-200);
}
.breadcrumb a { color: var(--gray-700); transition: color .2s; }
.breadcrumb a:hover { color: var(--neon-coral); }
.breadcrumb .sep { margin: 0 10px; color: var(--gray-300); }

/* ============================
   UTILITY
   ============================ */
.text-center { text-align: center; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; } .mb-4 { margin-bottom: 32px; }

/* ============================
   RESPONSIVE
   ============================ */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav { display: none; }
  .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .section { padding: 50px 0; }
  .section-title { font-size: 28px; }
  .footer-grid { grid-template-columns: 1fr; }
  .topbar-left span:not(:first-child) { display: none; }
  .logo-tag { display: none; }
}

@media (max-width: 480px) {
  .grid-4, .grid-3 { grid-template-columns: 1fr; }
  .header-actions .btn-ghost { display: none; }
}

/* ============================
   COMPARE BAR (v2)
   ============================ */
.compare-bar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ocean-deep);
  color: #fff;
  padding: 14px 24px;
  border-radius: 999px;
  display: none;
  align-items: center;
  gap: 16px;
  box-shadow: 0 12px 32px rgba(0,0,0,.25);
  z-index: 900;
  font-size: 14px;
}
.compare-bar .cmp-count {
  background: var(--neon-amber);
  color: var(--ocean-deep);
  font-family: var(--font-display);
  padding: 2px 12px;
  border-radius: 999px;
  font-size: 15px;
}
.compare-bar .cmp-link {
  color: var(--neon-amber);
  text-decoration: none;
  font-weight: 700;
  padding: 8px 18px;
  border: 1px solid var(--neon-amber);
  border-radius: 999px;
  transition: all .2s;
}
.compare-bar .cmp-link:hover {
  background: var(--neon-amber);
  color: var(--ocean-deep);
}
.card-cmp {
  background: rgba(255,255,255,.95);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  padding: 6px 12px;
  font-size: 12px;
  color: var(--gray-700);
  cursor: pointer;
  transition: all .2s;
  font-weight: 700;
}
.card-cmp:hover { border-color: var(--neon-coral); color: var(--neon-coral); }
.card-cmp.active {
  background: var(--neon-coral);
  color: #fff;
  border-color: var(--neon-coral);
}

/* ============================
   TOAST (v2)
   ============================ */
@keyframes bsToast {
  0% { opacity: 0; transform: translateX(-50%) translateY(20px); }
  15%, 85% { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-10px); }
}

/* ============================
   MAP PAGE (v2)
   ============================ */
.map-wrap {
  display: grid;
  grid-template-columns: 420px 1fr;
  min-height: calc(100vh - 200px);
  gap: 0;
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.map-list {
  border-right: 1px solid var(--gray-200);
  overflow-y: auto;
  max-height: calc(100vh - 200px);
}
.map-canvas {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 50%, #90caf9 100%);
  position: relative;
  min-height: 600px;
}
.map-pin {
  position: absolute;
  background: var(--neon-coral);
  color: #fff;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(0,0,0,.2);
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
}
.map-pin::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid var(--neon-coral);
}
.map-pin:hover, .map-pin.active {
  background: var(--ocean-deep);
  transform: scale(1.1);
  z-index: 10;
}
.map-pin:hover::after, .map-pin.active::after {
  border-top-color: var(--ocean-deep);
}
.map-region-label {
  position: absolute;
  background: rgba(255,255,255,.85);
  padding: 4px 10px;
  border-radius: var(--radius);
  font-size: 11px;
  font-weight: 700;
  color: var(--ocean-deep);
  letter-spacing: 1px;
}
.map-item {
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  gap: 14px;
  cursor: pointer;
  transition: background .2s;
}
.map-item:hover { background: var(--gray-50); }
.map-item.active { background: var(--sand); }
.map-item img {
  width: 96px;
  height: 72px;
  object-fit: cover;
  border-radius: var(--radius);
  flex-shrink: 0;
}
.map-item-info { flex: 1; min-width: 0; }
.map-item .t { font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.map-item .p { color: var(--neon-coral); font-weight: 700; font-size: 13px; }
.map-item .m { font-size: 12px; color: var(--gray-700); }

@media (max-width: 1024px) {
  .map-wrap { grid-template-columns: 1fr; }
  .map-list { max-height: 400px; }
}

/* ==========================================
   MOBILE OPTIMIZATION — Global v7
   ========================================== */

/* 모바일 네비 햄버거 버튼 */
.mobile-menu-btn {
  display: none;
  background: transparent;
  border: none;
  padding: 10px;
  cursor: pointer;
  color: var(--ocean-deep);
  z-index: 101;
  position: relative;
  flex-shrink: 0;
  order: 10;
}
.mobile-menu-btn span {
  display: block;
  width: 26px; height: 2px;
  background: var(--ocean-deep);
  margin: 6px 0;
  transition: all .25s;
  border-radius: 2px;
}
.mobile-menu-btn.open {
  position: fixed;
  top: 14px;
  right: 16px;
}
.mobile-menu-btn.open span { background: var(--ocean-deep); }
.mobile-menu-btn.open span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}
.mobile-menu-btn.open span:nth-child(2) { opacity: 0; }
.mobile-menu-btn.open span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* 모바일 메뉴 오버레이 (배경 딤) */
.mobile-menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(8, 37, 63, 0.5);
  z-index: 998;
  opacity: 0;
  transition: opacity .3s;
}
.mobile-menu-overlay.open {
  display: block;
  opacity: 1;
}

/* ============= 1024px 이하 ============= */
@media (max-width: 1024px) {
  .header-inner { gap: 20px; }
  .nav { gap: 20px; }
  .nav a { font-size: 13px; }
  .section { padding: 72px 0; }
  .section-title { font-size: 34px; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }
}

/* ============= 768px 이하 (태블릿·모바일) ============= */
@media (max-width: 768px) {
  html { font-size: 15px; }

  /* 탑바 - 일부 텍스트 숨김 */
  .topbar { font-size: 10px; padding: 8px 0; }
  .topbar-left span:nth-child(n+2) { display: none; }
  .topbar-right a { margin-left: 12px; }

  /* 헤더 - 햄버거 메뉴 표시 */
  .header {
    position: sticky;
    top: 0;
    z-index: 100;
  }
  .header-inner {
    padding: 14px 16px;
    gap: 8px;
    justify-content: space-between;
  }
  .logo { flex-shrink: 0; }
  .logo-mark { font-size: 22px; }
  .logo-tag { font-size: 10px; letter-spacing: .18em; }
  .mobile-menu-btn {
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
  }

  /* 데스크탑 nav 완전 숨김 후 드로어 방식 */
  .nav {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: auto !important;
    width: 100% !important;
    max-width: 320px !important;
    height: 100vh !important;
    background: #fff !important;
    flex-direction: column !important;
    gap: 0 !important;
    padding: 80px 0 24px 0 !important;
    transform: translateX(100%) !important;
    transition: transform .3s cubic-bezier(.4,0,.2,1) !important;
    z-index: 999 !important;
    overflow-y: auto !important;
    box-shadow: -8px 0 32px rgba(0,0,0,.15) !important;
    border-left: 1px solid var(--gray-200) !important;
    margin: 0 !important;
    flex: none !important;
  }
  .nav.open {
    transform: translateX(0) !important;
  }
  .nav a {
    padding: 16px 28px;
    font-size: 15px;
    border-bottom: 1px solid var(--gray-200);
    border-top: none;
    width: 100%;
    color: var(--charcoal);
  }
  .nav a.active {
    border-bottom-color: var(--gray-200);
    background: var(--cream);
    color: var(--neon-coral);
    font-weight: 600;
  }

  /* 모바일 메뉴 CTA (자동 주입) */
  .nav .mobile-cta {
    display: block !important;
    margin: 24px 24px 0 !important;
    padding: 16px 24px !important;
    background: var(--neon-coral) !important;
    color: #fff !important;
    text-align: center;
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .12em;
    border: none !important;
    border-bottom: none !important;
    width: calc(100% - 48px) !important;
    transition: background .2s;
  }
  .nav .mobile-cta:hover {
    background: var(--neon-coral-dim) !important;
    color: #fff !important;
  }

  /* 헤더 액션은 숨김, 햄버거 메뉴 안으로 통합 */
  .header-actions {
    display: none;
  }
  .header-actions .btn-primary {
    padding: 10px 14px;
    font-size: 11px;
  }
  .header-actions .btn-primary span { display: none; }

  /* 섹션 */
  .section { padding: 56px 0; }
  .section-sm { padding: 36px 0; }
  .section-title { font-size: 26px; }
  .section-subtitle {
    padding-left: 20px; font-size: 10px;
  }
  .section-subtitle::before { width: 14px; }
  .section-desc { font-size: 14px; }

  /* 히어로 공통 축소 */
  .hero, .hero-inner { padding: 56px 20px 40px !important; }
  .hero-inner { grid-template-columns: 1fr !important; gap: 32px !important; }
  .hero h1 { font-size: 38px !important; line-height: 1.15 !important; }
  .hero p { font-size: 15px !important; }
  .hero-stats {
    max-width: none !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 16px !important;
    padding-top: 24px !important;
    margin-top: 28px !important;
  }
  .hero-stat .num { font-size: 28px !important; }
  .hero-stat .lbl { font-size: 9px !important; }
  .hero-visual { display: none; }

  /* 카드 · 그리드 */
  .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .grid-2 { grid-template-columns: 1fr; }
  .card-body { padding: 16px; }
  .card-title { font-size: 16px; }
  .card-price { font-size: 19px; }

  /* 푸터 */
  .footer { padding: 52px 0 24px; margin-top: 60px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; margin-bottom: 32px; }
  .footer-brand .logo-mark,
  .footer-col .footer-logo { font-size: 22px; }
  .footer h4 { font-size: 11px; margin-bottom: 14px; }
  .footer li a { font-size: 13px; }
  .footer-bottom { flex-direction: column; text-align: center; gap: 8px; }

  /* 브레드크럼 */
  .breadcrumb { padding: 16px 0; font-size: 11px; }
  .breadcrumb .sep { margin: 0 6px; }

  /* 버튼 */
  .btn { padding: 11px 20px; font-size: 12px; }
  .btn-lg { padding: 13px 24px; font-size: 12px; }
  .btn-sm { padding: 7px 14px; font-size: 11px; }

  /* Topbar 숨김 옵션 */
  .topbar-right a:nth-child(n+4) { display: none; }

  /* 이미지 처리 */
  img { max-width: 100%; height: auto; }

  /* 터치 영역 확보 */
  a, button { touch-action: manipulation; }
  a[role="button"], button, .btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  input, select, textarea {
    font-size: 16px !important; /* iOS zoom 방지 */
  }

  /* 테이블 모바일 - 가로 스크롤 */
  table.data-table,
  table.market-table,
  table.rent-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    font-size: 11px;
  }
  table.data-table th, table.data-table td,
  table.market-table th, table.market-table td,
  table.rent-table th, table.rent-table td {
    padding: 10px 8px !important;
  }
}

/* ============= 480px 이하 (소형 모바일) ============= */
@media (max-width: 480px) {
  .container, .header-inner, .topbar-inner {
    padding-left: 16px; padding-right: 16px;
  }
  .grid-4, .grid-3 { grid-template-columns: 1fr; }
  .section-title { font-size: 22px; }
  .hero h1 { font-size: 30px !important; }
  .hero-stats { grid-template-columns: 1fr !important; }
  .topbar-left span { font-size: 10px; }
  .topbar-right { display: flex; gap: 8px; font-size: 10px; }
  .topbar-right a { margin-left: 0; }

  .logo-tag { display: none; }
  .logo-mark { font-size: 20px; }
  .header-actions .btn-primary { padding: 9px 12px; }

  .footer { padding: 40px 0 20px; }
}

/* ============= 모바일 아티클 본문 ============= */
@media (max-width: 768px) {
  article h1, .article-hero h1 { font-size: 30px !important; }
  article h2, article h3 { font-size: 20px !important; }
  article p, article li { font-size: 15px !important; line-height: 1.85 !important; }
}

/* ============= 인쇄 ============= */
@media print {
  .topbar, .header, .footer, .nav, .mobile-menu-btn,
  .btn, .btn-primary, .btn-outline, .card-fav {
    display: none !important;
  }
  body { color: #000; background: #fff; }
  a { color: #000; text-decoration: none; }
}
