/* /assets/css/pages/town_home.css */
/* ============================================================
   우리마을 홈 – 섹션 / 카드 / 지도 / 공지 스타일
   ============================================================ */

/* ── 히어로 기본 패딩 (hero.css에서 덮어씀) ── */
.town-hero { padding: 0; }

.town-hero-inner { max-width: 980px; }

/* ── 섹션 공통 ── */
.section {
  margin-top: 40px;
}

.section-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.section-title {
  min-width: 0;
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.3px;
  color: var(--text);
}

.section-tools {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

@media (max-width: 640px) {
  .section-h      { align-items: flex-start; }
  .section-title  { font-size: 19px; }
  .section-tools  { width: 100%; justify-content: flex-start; }
}

/* ── 우리마을 회원 덱 ── */
.family-deck { position: relative; padding-top: 4px; }

.family-deck-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 860px) {
  .family-deck-grid { grid-template-columns: repeat(3, 1fr); }
}

/* 기본 플레이스홀더 카드 */
.ph-card {
  padding: 18px;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.ph-title { font-size: 16px; font-weight: 700; margin: 0 0 8px; color: var(--text); }
.ph-desc  { margin: 0; color: var(--muted); line-height: 1.50; font-size: 14px; }

/* ── 회원 카드 테마 (Stay / Play / Must-Go) ── */
.family-card {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid var(--line);
  padding: 20px 20px 22px;
  background: var(--card);
  box-shadow: var(--shadow-md);
  transition: transform .20s ease, box-shadow .20s ease, border-color .20s ease;
  min-height: 110px;
}
.family-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 40px rgba(26,39,68,.14), 0 2px 8px rgba(26,39,68,.06);
  border-color: rgba(37,99,235,.20);
}

/* 카드 컬러 하이라이트 (상단 바) */
.family-card--stay::after,
.family-card--play::after,
.family-card--mustgo::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  border-radius: 18px 18px 0 0;
}
.family-card--stay::after   { background: linear-gradient(90deg, #2563eb, #06b6d4); }
.family-card--play::after   { background: linear-gradient(90deg, #f59e0b, #ef4444); }
.family-card--mustgo::after { background: linear-gradient(90deg, #7c3aed, #2563eb); }

.family-card .ph-title,
.family-card .ph-desc { position: relative; z-index: 1; }

.family-card .ph-title { font-size: 17px; margin-bottom: 6px; }
.family-card .ph-desc  { font-size: 14px; max-width: 42ch; }

/* 회원 칩 */
.family-chip {
  display: inline-block;
  margin-top: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .3px;
  background: var(--card2);
  border: 1px solid var(--line);
  color: var(--muted);
}

/* 등록 버튼 */
.btn-family-register {
  border-radius: 999px;
  padding: 10px 18px;
  box-shadow: 0 4px 14px rgba(37,99,235,.25);
}

@media (max-width: 640px) {
  .family-card { min-height: 90px; }
}

/* ── 지도 ── */
.map-panel-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 980px) {
  .map-panel-inner { grid-template-columns: 1.2fr .8fr; align-items: stretch; }
}

.map-box {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card2);
  min-height: 240px;
  overflow: hidden;
}
.map-frame-wrapper { width: 100%; height: 100%; min-height: 300px; }
.map-frame-wrapper iframe { display: block; }

.map-title { font-size: 17px; font-weight: 700; margin: 0 0 8px; color: var(--text); }
.map-desc  { color: var(--muted); margin: 0 0 14px; line-height: 1.50; font-size: 14px; }
.map-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── 사진관(슬라이더) ── */
.photo-panel  { padding: 14px; }
.photo-slider {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  gap: 10px;
  align-items: center;
}
.ps-stage {
  position: relative;
  border: 1px solid var(--line);
  background: var(--card2);
  border-radius: 16px;
  overflow: hidden;
  min-height: 220px;
}
.ps-img {
  width: 100%; height: 100%;
  display: block; object-fit: contain;
  min-height: 220px;
}
.ps-btn {
  width: 44px; height: 44px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background .15s ease;
}
.ps-btn:hover { background: var(--card2); }
.ps-meta {
  position: absolute;
  right: 10px; bottom: 10px;
  background: rgba(0,0,0,.50);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  color: #fff;
}

/* ── 공지사항 ── */
.notice-panel { padding: 14px; }
.notice-list  { margin: 0; padding-left: 18px; color: var(--text); }
.notice-list li { margin: 8px 0; line-height: 1.55; color: var(--muted); }

.notice-row { list-style: decimal; margin: 6px 0; }
.notice-head {
  width: 100%; text-align: left;
  border: 0; background: transparent;
  color: inherit; padding: 8px 10px;
  border-radius: 12px; cursor: pointer;
  transition: background .12s ease;
}
.notice-head:hover { background: var(--card2); }
.notice-body {
  padding: 6px 12px 10px;
  opacity: .85; line-height: 1.55;
  white-space: pre-wrap; color: var(--muted);
}

/* ── 마을 그리드 ── */
.town-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 860px) {
  .town-grid { grid-template-columns: repeat(3, 1fr); }
}

.town-card {
  display: block;
  padding: 16px;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 16px;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.town-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(37,99,235,.18);
}

.tc-title { font-size: 18px; font-weight: 700; margin: 0 0 6px; color: var(--text); }
.tc-desc  { color: var(--muted); margin: 0 0 6px; font-size: 14px; }
.tc-meta  { color: var(--muted); font-size: 13px; opacity: .75; }

/* sponsor rotator */
.sponsor-panel { padding: 12px; }
.sponsor-rotator {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(120deg, #eff6ff, #f8fafc);
  min-height: 120px;
}
.sponsor-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  text-decoration: none;
  color: #0f172a;
  transition: opacity .35s ease;
}
.sponsor-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}
.sponsor-slide-logo {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, .08);
  object-fit: cover;
  background: #fff;
  flex: 0 0 auto;
}
.sponsor-slide-copy {
  display: grid;
  gap: 4px;
}
.sponsor-slide-copy strong {
  font-size: 16px;
  line-height: 1.2;
}
.sponsor-slide-copy span {
  font-size: 13px;
  color: #475569;
}
.sponsor-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
}
.sponsor-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: 0;
  background: #cbd5e1;
  cursor: pointer;
}
.sponsor-dot.is-active {
  width: 20px;
  background: #2563eb;
}
@media (max-width: 640px) {
  .sponsor-slide { padding: 12px; }
  .sponsor-slide-logo { width: 58px; height: 58px; border-radius: 10px; }
  .sponsor-slide-copy strong { font-size: 14px; }
  .sponsor-slide-copy span { font-size: 12px; }
}

/* index mobile compact actions */
@media (max-width: 760px) {
  .shortcut-row {
    gap: 6px;
  }

  .shortcut-card {
    padding: 8px 8px !important;
    gap: 2px !important;
    border-radius: 9px !important;
    box-shadow: none !important;
  }

  .shortcut-icon {
    font-size: 0.9rem !important;
    line-height: 1;
  }

  .shortcut-label {
    font-size: 0.74rem !important;
    line-height: 1.1;
  }

  .shortcut-sub {
    font-size: 0.6rem !important;
    line-height: 1.2;
  }

  .section-h > .btn,
  .section-h .section-tools .btn {
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: none;
  }

  .section-h > .btn.btn--ghost,
  .section-h .section-tools .btn.btn--ghost {
    background: #f8fafc;
    border-color: #dbe2ea;
    color: #475569;
  }

  .section-h > .btn.btn--primary,
  .section-h .section-tools .btn.btn--primary {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.18);
  }
}
