/* ===== 공통 스타일 — 허브 + 단지 상세 페이지 전부 이 파일 하나로 관리 ===== */

:root {
  --primary: #1a2e4a;
  --primary-light: #2d4a6e;
  --gold: #c9a84c;
  --light: #f8f6f1;
  --text: #333;
  --line: #e5e5e5;
  --kakao: #fee500;
  --kakao-text: #191600;
}

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

body {
  font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Malgun Gothic', sans-serif;
  color: var(--text);
  background: #fff;
  /* 모바일 하단 플로팅 바에 콘텐츠가 가리지 않도록 */
  padding-bottom: 64px;
}
img { max-width: 100%; display: block; }

/* ===== 헤더 ===== */
header {
  position: fixed; top: 0; width: 100%; z-index: 100;
  background: rgba(26,46,74,0.95); backdrop-filter: blur(8px);
  padding: 16px 40px; display: flex; justify-content: space-between; align-items: center;
}
.logo { color: #fff; font-size: 18px; font-weight: 700; letter-spacing: 2px; text-decoration: none; }
.logo span { color: var(--gold); }
nav a { color: rgba(255,255,255,0.8); text-decoration: none; margin-left: 28px; font-size: 14px; }
nav a:hover { color: var(--gold); }

/* ===== 버튼 ===== */
.btn-primary {
  background: var(--gold); color: var(--primary); padding: 16px 40px;
  border: none; border-radius: 4px; font-size: 16px; font-weight: 700;
  cursor: pointer; text-decoration: none; transition: opacity 0.2s;
  display: inline-block; text-align: center;
}
.btn-primary:hover { opacity: 0.9; }
.btn-outline {
  background: transparent; color: #fff; padding: 16px 40px;
  border: 2px solid rgba(255,255,255,0.5); border-radius: 4px;
  font-size: 16px; cursor: pointer; text-decoration: none; transition: border-color 0.2s;
  display: inline-block; text-align: center;
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }
.btn-kakao {
  background: var(--kakao); color: var(--kakao-text); padding: 16px 40px;
  border: none; border-radius: 4px; font-size: 16px; font-weight: 700;
  cursor: pointer; text-decoration: none; display: inline-block; text-align: center;
}

/* ===== 섹션 공통 ===== */
section { padding: 80px 40px; max-width: 1100px; margin: 0 auto; }
.section-tag { color: var(--gold); font-size: 13px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 12px; }
.section-title { font-size: clamp(26px, 4vw, 40px); font-weight: 800; color: var(--primary); line-height: 1.2; margin-bottom: 48px; }

/* ===== 허브 히어로 ===== */
.hub-hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff; text-align: center;
  padding: 160px 20px 80px;
}
.hub-hero h1 { font-size: clamp(28px, 5vw, 52px); font-weight: 800; line-height: 1.2; margin-bottom: 16px; }
.hub-hero h1 span { color: var(--gold); }
.hub-hero p { font-size: clamp(15px, 2vw, 19px); opacity: 0.85; margin-bottom: 36px; }
.hub-search {
  max-width: 520px; margin: 0 auto; display: flex; gap: 8px;
}
.hub-search input {
  flex: 1; padding: 16px 20px; border: none; border-radius: 4px;
  font-size: 16px; font-family: inherit;
}
.hub-search input:focus { outline: 2px solid var(--gold); }

/* ===== 필터 ===== */
.filters {
  position: sticky; top: 56px; z-index: 50;
  background: #fff; border-bottom: 1px solid var(--line);
  padding: 16px 40px; display: flex; gap: 24px; flex-wrap: wrap;
  max-width: 100%; overflow-x: auto;
}
.filter-group { display: flex; align-items: center; gap: 8px; }
.filter-group .filter-label {
  font-size: 12px; font-weight: 700; color: #888; letter-spacing: 1px;
  white-space: nowrap; margin-right: 4px;
}
.chip {
  border: 1px solid var(--line); background: #fff; color: #555;
  padding: 7px 15px; border-radius: 999px; font-size: 13px; font-family: inherit;
  cursor: pointer; white-space: nowrap; transition: all 0.15s;
}
.chip:hover { border-color: var(--gold); color: var(--primary); }
.chip[aria-pressed="true"] {
  background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 700;
}

/* ===== 단지 카드 그리드 ===== */
.result-count { max-width: 1100px; margin: 32px auto 0; padding: 0 40px; font-size: 14px; color: #888; }
.result-count b { color: var(--primary); font-size: 18px; }
.grid {
  max-width: 1100px; margin: 20px auto 80px; padding: 0 40px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px;
}
.card {
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
  text-decoration: none; color: inherit; background: #fff;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 10px 30px rgba(0,0,0,0.1); }
.card-thumb {
  aspect-ratio: 4 / 3; background: #e8ecf0 center/cover no-repeat;
  position: relative;
}
.card-badge {
  position: absolute; top: 12px; left: 12px;
  padding: 5px 12px; border-radius: 999px; font-size: 11px; font-weight: 700; color: #fff;
}
.badge-open { background: #1f9d55; }      /* 분양중 */
.badge-soon { background: var(--gold); }   /* 분양예정 */
.badge-last { background: #d94141; }       /* 마감임박 */
.card-body { padding: 18px 20px 22px; flex: 1; display: flex; flex-direction: column; }
.card-type { font-size: 11px; font-weight: 700; color: var(--gold); letter-spacing: 1px; margin-bottom: 6px; }
.card-name { font-size: 18px; font-weight: 800; color: var(--primary); line-height: 1.3; margin-bottom: 8px; }
.card-loc { font-size: 13px; color: #777; margin-bottom: 14px; }
.card-meta {
  margin-top: auto; padding-top: 14px; border-top: 1px solid #f0f0f0;
  display: flex; justify-content: space-between; align-items: baseline; font-size: 13px;
}
.card-meta .units { color: #888; }
.card-meta .price { font-weight: 800; color: var(--primary); font-size: 15px; }
.empty { grid-column: 1 / -1; text-align: center; padding: 80px 20px; color: #999; }

/* ===== 단지 상세: 히어로 ===== */
.hero {
  height: 100vh; min-height: 600px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  display: flex; align-items: center; justify-content: center; text-align: center;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: var(--hero-image, none) center/cover no-repeat;
  opacity: 0.25;
}
.hero-content { position: relative; z-index: 1; color: #fff; padding: 0 20px; }
.hero-badge {
  display: inline-block; background: var(--gold); color: var(--primary);
  padding: 6px 20px; border-radius: 20px; font-size: 13px; font-weight: 700;
  margin-bottom: 20px; letter-spacing: 1px;
}
.hero h1 { font-size: clamp(36px, 6vw, 72px); font-weight: 800; letter-spacing: -1px; line-height: 1.1; margin-bottom: 16px; }
.hero h1 span { color: var(--gold); }
.hero-sub { font-size: clamp(16px, 2vw, 22px); opacity: 0.85; margin-bottom: 40px; }
.cta-group { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ===== 핵심 정보 바 ===== */
.key-info {
  background: var(--primary); padding: 32px 40px;
  display: flex; justify-content: center; gap: 60px; flex-wrap: wrap;
}
.key-info-item { text-align: center; color: #fff; }
.key-info-item .label { font-size: 12px; opacity: 0.6; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 8px; }
.key-info-item .value { font-size: 22px; font-weight: 700; color: var(--gold); }

/* ===== 특장점 ===== */
.features-wrap { padding: 80px 0; background: var(--light); }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.feature-card {
  background: #fff; padding: 36px; border-radius: 8px;
  border-top: 3px solid var(--gold); box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}
.feature-icon { font-size: 36px; margin-bottom: 16px; }
.feature-card h3 { font-size: 18px; font-weight: 700; color: var(--primary); margin-bottom: 10px; }
.feature-card p { font-size: 14px; line-height: 1.7; color: #666; }

/* ===== 평형 ===== */
.types { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.type-card {
  border: 1px solid var(--line); border-radius: 8px; padding: 28px; text-align: center;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.type-card:hover { border-color: var(--gold); box-shadow: 0 4px 16px rgba(201,168,76,0.15); }
.type-card .type { font-size: 28px; font-weight: 800; color: var(--primary); }
.type-card .area { font-size: 13px; color: #888; margin: 6px 0; }
.type-card .price { font-size: 16px; font-weight: 700; color: var(--gold); }

/* ===== 입지 ===== */
.location-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.location-list { list-style: none; }
.location-list li {
  padding: 14px 0; border-bottom: 1px solid #eee;
  display: flex; align-items: center; gap: 12px; font-size: 15px;
}
.location-list li::before { content: '●'; color: var(--gold); font-size: 8px; }
.map-placeholder {
  background: #e8ecf0; border-radius: 8px; height: 300px;
  display: flex; align-items: center; justify-content: center;
  color: #999; font-size: 14px; text-align: center;
}

/* ===== 일정 ===== */
.schedule-wrap { background: var(--primary); color: #fff; padding: 80px 40px; }
.schedule { display: flex; justify-content: center; gap: 0; flex-wrap: wrap; max-width: 900px; margin: 0 auto; }
.schedule-step { flex: 1; min-width: 160px; text-align: center; padding: 24px 16px; position: relative; }
.schedule-step:not(:last-child)::after {
  content: '→'; position: absolute; right: -8px; top: 50%;
  transform: translateY(-50%); color: var(--gold); font-size: 20px;
}
.schedule-step .step-label { font-size: 11px; opacity: 0.6; letter-spacing: 1px; margin-bottom: 8px; }
.schedule-step .step-title { font-size: 16px; font-weight: 700; color: var(--gold); margin-bottom: 6px; }
.schedule-step .step-date { font-size: 13px; opacity: 0.8; }

/* ===== 상담신청 폼 ===== */
.contact-wrap { background: var(--light); }
.lead-layout { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; align-items: start; }

.contact-box {
  background: var(--primary); color: #fff; padding: 40px 36px; border-radius: 12px;
  display: flex; flex-direction: column; gap: 18px; align-items: center; text-align: center;
}
.tel { font-size: clamp(28px, 4vw, 40px); font-weight: 800; color: var(--gold); letter-spacing: 1px; text-decoration: none; }
.hours { font-size: 14px; opacity: 0.7; }
.contact-btns { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; width: 100%; }
.contact-btns > * { flex: 1; min-width: 130px; padding: 14px 20px; font-size: 15px; }

.lead-form {
  background: #fff; padding: 36px; border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.07);
}
.lead-form h3 { font-size: 20px; font-weight: 800; color: var(--primary); margin-bottom: 6px; }
.lead-form .form-sub { font-size: 13px; color: #888; margin-bottom: 24px; }
.field { margin-bottom: 18px; }
.field > label { display: block; font-size: 13px; font-weight: 700; color: var(--primary); margin-bottom: 8px; }
.field .req { color: #d94141; }
.field input[type="text"],
.field input[type="tel"],
.field input[type="date"],
.field input[type="time"],
.field textarea {
  width: 100%; padding: 13px 14px; border: 1px solid var(--line); border-radius: 6px;
  font-size: 15px; font-family: inherit; color: var(--text); background: #fff;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--gold); }
.field textarea { resize: vertical; min-height: 84px; }
.field-row { display: flex; gap: 12px; }
.field-row > * { flex: 1; }

.purpose { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.purpose label {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); border-radius: 6px; padding: 12px 14px;
  font-size: 13.5px; cursor: pointer; transition: all 0.15s; user-select: none;
}
.purpose label:has(input:checked) {
  border-color: var(--gold); background: rgba(201,168,76,0.08); font-weight: 700; color: var(--primary);
}
.purpose input { accent-color: var(--gold); width: 16px; height: 16px; flex-shrink: 0; }

.consent {
  display: flex; align-items: flex-start; gap: 9px;
  font-size: 12.5px; color: #666; line-height: 1.6; margin: 4px 0 20px;
}
.consent input { accent-color: var(--gold); width: 16px; height: 16px; margin-top: 2px; flex-shrink: 0; }
.consent a { color: var(--primary); }

/* 봇 차단용 허니팟 — 사람 눈에 안 보이지만 봇은 채움 */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.lead-form button[type="submit"] {
  width: 100%; padding: 17px; font-size: 17px; font-weight: 800;
  background: var(--gold); color: var(--primary);
  border: none; border-radius: 6px; cursor: pointer; font-family: inherit;
}
.lead-form button[type="submit"]:disabled { opacity: 0.55; cursor: not-allowed; }
.form-msg { margin-top: 14px; font-size: 14px; text-align: center; line-height: 1.6; display: none; }
.form-msg.ok { display: block; color: #1f7a45; }
.form-msg.err { display: block; color: #c0392b; }

/* ===== 모바일 하단 고정 CTA — 전환율의 핵심 ===== */
.floating-cta {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 90;
  display: flex; background: var(--primary); box-shadow: 0 -2px 12px rgba(0,0,0,0.18);
}
.floating-cta a {
  flex: 1; padding: 17px 8px; text-align: center; text-decoration: none;
  font-size: 14px; font-weight: 700; color: #fff;
  border-right: 1px solid rgba(255,255,255,0.14);
}
.floating-cta a:last-child { border-right: none; }
.floating-cta a.fc-kakao { background: var(--kakao); color: var(--kakao-text); }
.floating-cta a.fc-form { background: var(--gold); color: var(--primary); }

/* ===== 푸터 ===== */
footer {
  background: #111; color: rgba(255,255,255,0.45);
  padding: 40px 20px; font-size: 12px; line-height: 1.9; text-align: center;
}
footer a { color: rgba(255,255,255,0.75); }
footer .disclaimer { margin-top: 14px; font-size: 11px; color: rgba(255,255,255,0.3); max-width: 720px; margin-left: auto; margin-right: auto; }

/* ===== 반응형 ===== */
@media (max-width: 900px) {
  .lead-layout { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 768px) {
  header { padding: 14px 20px; }
  nav { display: none; }
  .filters { top: 52px; padding: 12px 20px; gap: 14px; flex-wrap: nowrap; }
  .hub-hero { padding: 120px 20px 56px; }
  .grid, .result-count { padding: 0 20px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
  .card-name { font-size: 15px; }
  .card-body { padding: 14px 14px 18px; }
  .key-info { gap: 28px; padding: 24px 20px; }
  .key-info-item .value { font-size: 18px; }
  section { padding: 60px 20px; }
  .location-grid { grid-template-columns: 1fr; }
  .schedule-step:not(:last-child)::after { display: none; }
  .lead-form { padding: 24px 20px; }
  .contact-box { padding: 32px 24px; }
  .purpose { grid-template-columns: 1fr; }
}

/* 인쇄 / 접근성 */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
