/* ===========================
   보금자리톡 - 홈 (index)
   =========================== */

/* --- 공통 레이아웃 --- */
main {
  background: #f4f5f8;
  padding-bottom: 8rem;
}

main > section {
  background: #fff;
  margin-bottom: 0.8rem;
}

main > section:last-child {
  margin-bottom: 0;
}

.container {
  padding: 0 1.6rem;
}

.sec-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: #111;
  margin-bottom: 1.4rem;
}


/* ===========================
   가점 진단 배너
   =========================== */
.sec-banner {
  padding: 1.6rem 0;
}

.banner-card {
  display: flex;
  align-items: center;
  background: linear-gradient(120deg, #dce8ff 0%, #c8dcff 100%);
  border-radius: 1.4rem;
  padding: 2rem 1.6rem 2rem 2rem;
  text-decoration: none;
  gap: 0.8rem;
  min-height: 13rem;
  position: relative;
  overflow: hidden;
}

.banner-text {
  flex: 1;
  min-width: 0;
}

.banner-sub {
  font-size: 1.25rem;
  color: #2563eb;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.banner-title {
  font-size: 1.85rem;
  font-weight: 800;
  color: #111;
  line-height: 1.35;
  margin-bottom: 0.9rem;
}

.banner-stats {
  font-size: 1.15rem;
  color: #4b5563;
  margin-bottom: 1.4rem;
  white-space: nowrap;
}

.banner-stats strong {
  color: #1d4ed8;
  font-weight: 700;
}

.banner-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: #1d4ed8;
  color: #fff;
  font-size: 1.2rem;
  font-weight: 600;
  padding: 0.75rem 1.4rem;
  border-radius: 10rem;
  white-space: nowrap;
}

.banner-img {
  flex-shrink: 0;
  width: 9rem;
  height: 9rem;
  align-self: flex-end;
}

.banner-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}


/* ===========================
   TOP5 가로 스크롤
   =========================== */
.sec-top5 {
  padding: 2rem 0 2.4rem;
}

.sec-top5 .container {
  padding-bottom: 0;
}

.top5-track {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 0.4rem 1.6rem 0.4rem;
  scrollbar-width: none;
}

.top5-track::-webkit-scrollbar {
  display: none;
}

.top5-card {
  display: flex;
  flex-direction: column;
  flex: 0 0 38vw;
  background: #fffdf0;
  border-radius: 1.4rem;
  padding: 1.6rem 1.4rem;
  text-decoration: none;
  scroll-snap-align: start;
  box-shadow: 0 0.1rem 0.6rem rgba(0,0,0,0.06);
}

.top5-card.rank2 { background: #f7f7f7; }
.top5-card.rank3 { background: #fff8f2; }
.top5-card.rank4 { background: #f5f7ff; }
.top5-card.rank5 { background: #f5f7ff; }

.rank-badge {
  display: block;
  width: 3rem;
  height: 3rem;
  margin-bottom: 1.2rem;
}

.rank-badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.top5-card .ratio {
  font-size: 2rem;
  font-weight: 800;
  color: #1d4ed8;
  margin-bottom: 0.5rem;
  line-height: 1;
}

.top5-card.rank2 .ratio { color: #6b7280; }
.top5-card.rank3 .ratio { color: #d97706; }
.top5-card.rank4 .ratio,
.top5-card.rank5 .ratio { color: #4338ca; }

.top5-card .name {
  font-size: 1.2rem;
  color: #6b7280;
  font-weight: 500;
}


/* ===========================
   청약 공고 그리드
   =========================== */
.sec-notice {
  padding: 2rem 0;
}

.notice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.notice-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 1.4rem;
  padding: 1.6rem 1.4rem 1.4rem;
  text-decoration: none;
  min-height: 12rem;
  position: relative;
  overflow: hidden;
  background: #f0f4ff;
}

.notice-card:nth-child(2) { background: #f3f0ff; }
.notice-card:nth-child(3) { background: #f0faf2; }
.notice-card:nth-child(4) { background: #f5f6fa; }

.notice-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}

.notice-name {
  font-size: 1.6rem;
  font-weight: 700;
  color: #111;
  line-height: 1.35;
}

.notice-more .notice-name {
  font-size: 1.45rem;
}

.notice-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.8rem;
  height: 2.8rem;
  background: #fff;
  border-radius: 50%;
  font-size: 1.15rem;
  color: #374151;
  box-shadow: 0 0.15rem 0.5rem rgba(0,0,0,0.1);
  flex-shrink: 0;
}

.notice-sub {
  font-size: 1.25rem;
  color: #6b7280;
  margin-bottom: 0;
}

.notice-sub strong {
  color: #ef4444;
  font-weight: 700;
}

.notice-sub.notice-purple {
  color: #7c3aed;
}

.notice-bottom {
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
}

.notice-img {
  width: 6rem;
  height: 6rem;
}

.notice-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}


/* ===========================
   지역별 가점 커트라인
   =========================== */
.sec-cutline {
  padding: 2rem 0;
}

.cutline-card {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  background: #eef3ff;
  border-radius: 1.4rem;
  padding: 2rem 1.8rem 0;
  text-decoration: none;
  overflow: hidden;
  position: relative;
}

.cutline-text {
  flex: 1;
  min-width: 0;
}

.cutline-date {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
  font-size: 1.15rem;
  font-weight: 600;
  padding: 0.45rem 1rem;
  border-radius: 10rem;
  margin-bottom: 1.2rem;
}

.cutline-title {
  font-size: 1.85rem;
  font-weight: 800;
  color: #111;
  line-height: 1.4;
  margin-bottom: 1.6rem;
}

.cutline-title span {
  color: #1d4ed8;
}

.cutline-sub {
  font-size: 1.2rem;
  color: #6b7280;
  margin-bottom: 0.3rem;
}

.cutline-score {
  font-size: 4.4rem;
  font-weight: 900;
  color: #111;
  line-height: 1;
  margin-bottom: 2rem;
  letter-spacing: -0.1rem;
}

.cutline-score span {
  font-size: 2rem;
  font-weight: 700;
  color: #374151;
  margin-left: 0.3rem;
}

.cutline-img {
  width: 9.5rem;
  height: 9.5rem;
  flex-shrink: 0;
  margin-left: 1rem;
  align-self: center;
}

.cutline-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cutline-btn {
  display: block;
  width: calc(100% + 3.6rem);
  margin-left: -1.8rem;
  background: #1d4ed8;
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  padding: 1.7rem 0;
  margin-top: 0;
  border-radius: 0 0 1.4rem 1.4rem;
  letter-spacing: 0.02rem;
}


/* ===========================
   청약 공지사항
   =========================== */
.sec-news {
  padding: 2rem 0;
}

.news-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}

.news-header .sec-title {
  margin-bottom: 0;
}

.news-more {
  font-size: 1.3rem;
  color: #9ca3af;
  text-decoration: none;
}

.news-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.news-list li + li {
  border-top: 1px solid #f1f2f4;
}

.news-item {
  display: block;
  padding: 1.5rem 0;
  text-decoration: none;
}

.news-title {
  font-size: 1.4rem;
  font-weight: 500;
  color: #111;
  margin-bottom: 0.6rem;
  line-height: 1.45;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.news-meta {
  font-size: 1.2rem;
  color: #9ca3af;
}


/* ===========================
   배지 - 건수
   =========================== */
.badge-count {
  display: inline-block;
  background: #1d4ed8;
  color: #fff;
  font-size: 1.2rem;
  font-weight: 700;
  padding: 0.25rem 0.85rem;
  border-radius: 10rem;
  vertical-align: middle;
  margin-left: 0.5rem;
}