/* =====================================================
   common.css — 아파트 분양 모바일 공통 스타일
   ★ 교체 시 이 파일 하나만 수정하면 전 페이지 반영
===================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Pretendard', 'Noto Sans KR', system-ui, sans-serif;
  font-size: 14px;
  color: #111;
  background: #fff;
  max-width: 480px;
  margin: 0 auto;
  padding-top: 52px;   /* 헤더 높이 */
  padding-bottom: 60px; /* 하단 네비 높이 */
}

/* ── 색상 변수 ── */
:root {
  --gold: #b8975a;
  --gold-light: #d4b483;
  --dark: #0f0f0f;
  --dark2: #1a1a1a;
  --gray: #f4f4f4;
  --border: #eee;
}

/* ── 공통 섹션 ── */
.sec { padding: 44px 20px; }
.sec-en {
  font-size: 10px; letter-spacing: 0.15em;
  color: var(--gold); text-transform: uppercase; margin-bottom: 5px;
}
.sec-title {
  font-size: 20px; font-weight: 800;
  letter-spacing: -0.04em; line-height: 1.3;
}
.gold-bar { width: 28px; height: 2px; background: var(--gold); margin: 10px 0 18px; }
.sec-sub { font-size: 12px; color: #888; line-height: 1.7; margin-bottom: 20px; }
.divider { height: 8px; background: var(--gray); }

/* ── 버튼 ── */
.btn-gold {
  background: var(--gold); color: #fff;
  border: none; border-radius: 4px;
  padding: 12px 20px; font-size: 13px; font-weight: 700;
  cursor: pointer; font-family: inherit;
}
.btn-dark {
  background: var(--dark); color: #fff;
  border: none; border-radius: 4px;
  padding: 12px 20px; font-size: 13px; font-weight: 700;
  cursor: pointer; font-family: inherit;
}
.btn-line {
  background: transparent; color: #fff;
  border: 1px solid rgba(255,255,255,0.45);
  border-radius: 4px;
  padding: 12px 20px; font-size: 13px;
  cursor: pointer; font-family: inherit;
}

/* ════════════════════════════════
   HEADER
════════════════════════════════ */
#header {
  position: fixed; top: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 16px; z-index: 100;
}
.hd-logo { font-size: 14px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.25; color: #111; text-decoration: none; }
.hd-logo small { display: block; font-size: 10px; font-weight: 400; color: #999; }
.hd-right { display: flex; gap: 8px; align-items: center; }
.hd-call {
  display: flex; align-items: center; gap: 5px;
  background: #111; color: #fff;
  border: none; border-radius: 20px;
  padding: 7px 13px; font-size: 12px; font-weight: 700;
  cursor: pointer; text-decoration: none; white-space: nowrap;
}
.hd-menu {
  background: none; border: none;
  display: flex; flex-direction: column; gap: 4px;
  cursor: pointer; padding: 4px;
}
.hd-menu span { display: block; width: 20px; height: 2px; background: #111; border-radius: 2px; }

/* 드롭다운 메뉴 */
#nav-drawer {
  position: fixed; top: 52px; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px;
  background: #fff; border-bottom: 1px solid var(--border);
  z-index: 99; display: none;
}
#nav-drawer.open { display: block; }
#nav-drawer a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 20px; font-size: 14px; font-weight: 600;
  color: #111; text-decoration: none;
  border-bottom: 1px solid var(--gray);
}
#nav-drawer a.active { color: var(--gold); }
#nav-drawer a:after { content: '›'; color: #ccc; font-size: 18px; }

/* ════════════════════════════════
   BOTTOM NAV
════════════════════════════════ */
#bottom-nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px;
  background: #fff; border-top: 1px solid var(--border);
  display: flex; z-index: 100;
  padding-bottom: env(safe-area-inset-bottom);
}
.bnav-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; gap: 3px;
  padding: 8px 0 10px; text-decoration: none; color: #bbb;
}
.bnav-item.active { color: var(--gold); }
.bnav-item svg {
  width: 22px; height: 22px;
  stroke: currentColor; fill: none; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
}
.bnav-item span { font-size: 10px; font-weight: 600; }

/* ════════════════════════════════
   PAGE HERO (서브페이지 상단)
════════════════════════════════ */
.page-hero {
  background: var(--dark);
  padding: 36px 20px 32px;
  color: #fff;
}
.page-hero .ph-en { font-size: 10px; letter-spacing: 0.15em; color: var(--gold); text-transform: uppercase; margin-bottom: 8px; }
.page-hero h1 { font-size: 24px; font-weight: 800; letter-spacing: -0.04em; line-height: 1.3; }
.page-hero p { font-size: 12px; color: #888; line-height: 1.7; margin-top: 8px; }

/* ════════════════════════════════
   FOOTER
════════════════════════════════ */
#footer { background: #111; color: #888; padding: 24px 20px; font-size: 11px; line-height: 1.9; }
#footer strong { color: #fff; font-size: 12px; display: block; margin-bottom: 8px; }
#footer a { color: var(--gold); text-decoration: none; }
.footer-links { display: flex; gap: 14px; margin-top: 12px; padding-top: 12px; border-top: 1px solid #222; }
.footer-links a { font-size: 10px; color: #666; text-decoration: none; }
.footer-note { margin-top: 10px; font-size: 10px; color: #444; line-height: 1.7; }

/* ════════════════════════════════
   공통 컴포넌트
════════════════════════════════ */
/* 정보 테이블 */
.info-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.info-table tr { border-bottom: 1px solid #f0f0f0; }
.info-table td { padding: 11px 4px; vertical-align: top; }
.info-table td:first-child { color: #999; width: 90px; }
.info-table td:last-child { font-weight: 600; }

/* 슬라이드 */
.slide-wrap { position: relative; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); background: #f9f9f9; }
.slide-track { display: flex; transition: transform 0.3s ease; }
.slide-item { min-width: 100%; aspect-ratio: 4/3; display: flex; align-items: center; justify-content: center; color: #ccc; font-size: 12px; text-align: center; line-height: 1.6; }
.slide-item img { width: 100%; height: 100%; object-fit: contain; }
.slide-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(0,0,0,0.3); color: #fff;
  border: none; border-radius: 50%;
  width: 32px; height: 32px; font-size: 18px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.slide-btn.prev { left: 8px; }
.slide-btn.next { right: 8px; }
.slide-dots { display: flex; justify-content: center; gap: 5px; margin-top: 10px; }
.slide-dot { width: 6px; height: 6px; border-radius: 50%; background: #ddd; cursor: pointer; }
.slide-dot.on { background: var(--gold); }

/* 예약폼 */
.form-row { margin-bottom: 10px; }
.form-row label { display: block; font-size: 11px; font-weight: 600; color: #666; margin-bottom: 4px; }
.form-row input, .form-row select, .form-row textarea {
  width: 100%; background: #f7f7f7; border: 1px solid #e8e8e8;
  border-radius: 6px; padding: 11px 13px; font-size: 13px; color: #111;
  outline: none; font-family: inherit;
}
.form-row textarea { resize: none; height: 80px; }
.form-row input:focus, .form-row select:focus { border-color: var(--gold); background: #fff; }
.form-check { display: flex; align-items: center; gap: 8px; font-size: 11px; color: #888; }
.form-check input[type=checkbox] { width: auto; }
.form-check a { color: var(--gold); }
.btn-submit {
  width: 100%; background: #111; color: #fff;
  border: none; border-radius: 6px;
  padding: 14px; font-size: 14px; font-weight: 700;
  cursor: pointer; margin-top: 6px; font-family: inherit;
  transition: background 0.2s;
}
.btn-submit:hover { background: var(--gold); }

/* ════════════════════════════════
   최근 상담 예약 위젯
════════════════════════════════ */
#recent-visitors {
  background: #fff;
  border-top: 1px solid #f0f0f0;
  padding: 16px 20px;
}
#recent-visitors .rv-title {
  font-size: 10px; font-weight: 700; letter-spacing: 0.1em;
  color: var(--gold); text-transform: uppercase; margin-bottom: 10px;
}
.rv-list { display: flex; flex-direction: column; gap: 0; }
.rv-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid #f8f8f8;
  animation: rv-fadein 0.4s ease;
}
.rv-item:last-child { border-bottom: none; }
@keyframes rv-fadein {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.rv-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #4caf50; flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(76,175,80,0.15);
}
.rv-name { font-size: 13px; font-weight: 700; color: #111; flex: 1; }
.rv-type { font-size: 11px; color: #999; }
.rv-time { font-size: 10px; color: #bbb; white-space: nowrap; }

/* PC 대응 */
@media (min-width: 480px) {
  #header, #nav-drawer, #bottom-nav { max-width: 480px; }
}
