/* ===========================================================
   layout-fix.css
   - style.css 의 section.container 규칙을 확실히 덮어쓰기 위해
     main > section.container 형태(specificity 0,2,2)를 사용
   =========================================================== */

html {
  scrollbar-gutter: stable both-edges;
}

/* ===== 컨테이너 가운데 정렬 ===== */
body .container {
  width: 100%;
  max-width: 1140px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 2rem;
  padding-right: 2rem;
}

/* ===== 섹션 상하 여백 (핵심 수정) ===== */
main > section,
main > section.container {
  padding-top: 6rem;
  padding-bottom: 6rem;
  margin-top: 0;
  margin-bottom: 0;
  overflow: visible;
}

main > section.hero,
main > section.page-hero {
  padding-top: 4rem;
  padding-bottom: 5rem;
}

/* 섹션 사이 구분선 */
main > section + section {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

main > section.hero + section {
  border-top: none;
}

/* ===== 제목 영역 ===== */
main > section > .section-title,
.section-title {
  margin-top: 0;
  margin-bottom: 0.9rem;
  line-height: 1.4;
  text-align: center;
}

main > section > .section-desc,
.section-desc {
  margin-top: 0;
  margin-bottom: 3rem;
  line-height: 1.7;
  text-align: center;
}

.section-action {
  text-align: center;
  margin-top: 2.6rem;
}

.donation-note {
  text-align: center;
  margin-top: 2rem;
  color: var(--text-sub);
  font-size: 0.9rem;
}

/* ===== 서버 현황 카드 (히어로 내부) ===== */
.status-card {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.6rem;
  width: fit-content;
  max-width: 100%;
  margin: 2rem auto 2.4rem;
  padding: 1.2rem 2.2rem;
  background: var(--bg-card, #1a1b22);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 999px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.3);
}

.status-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  min-width: 96px;
}

.status-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--text-sub, #9aa0ad);
  letter-spacing: 0.02em;
}

.status-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main, #f2f3f5);
  white-space: nowrap;
}

.status-live {
  color: #4ade80;
}

.status-divider {
  width: 1px;
  height: 30px;
  background: rgba(255, 255, 255, 0.1);
}

.online-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.8);
  display: inline-block;
}

/* 기존 hero-stats 는 숨김 (중복 방지) */
.hero-stats {
  display: none;
}

/* 디스코드 위젯 잔여 요소 제거 */
.discord-widget {
  display: none !important;
}

/* ===== 히어로 ===== */
.hero-tagline { margin-bottom: 0.7rem; }
.hero-subtext { margin-bottom: 0; color: var(--text-sub); }
.hero-emojis  { margin: 1.4rem 0 1.6rem; display: flex; justify-content: center; gap: 0.9rem; }
.hero-buttons { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; }

/* ===== 빈 영역 방어 ===== */
.js-emoji-grid:empty,
.js-accordion:empty,
.js-role-groups:empty,
.js-review-grid:empty,
.js-gallery-grid:empty {
  display: block;
  min-height: 140px;
  border-radius: var(--radius-md, 14px);
  background: var(--bg-card, #1a1b22);
  position: relative;
}

.js-emoji-grid:empty::after,
.js-accordion:empty::after,
.js-role-groups:empty::after,
.js-review-grid:empty::after,
.js-gallery-grid:empty::after {
  content: "내용을 준비 중입니다.";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-sub, #9aa0ad);
  font-size: 0.92rem;
}

.empty-box {
  grid-column: 1 / -1;
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.9;
  color: var(--text-sub);
  background: var(--bg-card);
  border-radius: var(--radius-md, 14px);
  padding: 2.5rem 1.5rem;
}

/* ===== 카드 ===== */
.card { padding: 2rem 1.8rem; }

.intro-card {
  max-width: 760px;
  margin: 0 auto;
  padding: 2.4rem 2.2rem;
}
.intro-card p { color: var(--text-sub); line-height: 1.9; }

.feature-card h3 { margin-bottom: 0.7rem; }
.feature-card p  { line-height: 1.75; }

.emoji-card { padding: 1.8rem 0.8rem 1.5rem; }
.emoji-card .emoji-face { margin-bottom: 0.9rem; }
.emoji-card .emoji-name { margin-bottom: 0.3rem; }

/* ===== 그리드 간격 ===== */
.feature-grid   { gap: 2rem; }
.emoji-grid     { gap: 1.6rem; }
.role-grid      { gap: 1.4rem; }
.review-grid    { gap: 1.8rem; }
.contact-grid   { gap: 1.8rem; }
.accordion-list { gap: 1.2rem; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.8rem;
}

.role-group { margin-bottom: 3.5rem; }
.role-group:last-child { margin-bottom: 0; }
.role-group h3 { margin-bottom: 1.5rem; }

/* ===== 리스트 ===== */
.steps-list,
.rules-list {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  gap: 1rem;
  display: flex;
  flex-direction: column;
}

.steps-list li,
.rules-list li {
  padding: 1.2rem 1.8rem;
  gap: 1.1rem;
  display: flex;
  align-items: center;
  line-height: 1.6;
}

.steps-list li .num { min-width: 1.5rem; flex-shrink: 0; }
.rules-list li::before { flex-shrink: 0; }

/* ===== 후기 ===== */
.review-card {
  padding: 2.2rem 1.8rem;
  min-height: 190px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.review-card h3 { margin-bottom: 1.1rem; }
.review-text { color: var(--text-sub); line-height: 1.8; margin-bottom: 0.8rem; }
.empty-state { color: var(--text-sub); line-height: 1.8; font-size: 0.9rem; }

/* ===== 문의 ===== */
.contact-card .contact-desc {
  color: var(--text-sub);
  font-size: 0.9rem;
  line-height: 1.75;
  margin-bottom: 1.2rem;
}

/* ===== 아코디언 ===== */
.accordion-header { padding: 1.3rem 1.6rem; }
.accordion-item.open .accordion-body { padding: 1.2rem 1.6rem 1.5rem; }
.accordion-body li { padding: 0.5rem 0; }

/* ===== 갤러리 ===== */
.gallery-thumb { margin-bottom: 1rem; }
.gallery-thumb img { width: 100%; border-radius: 10px; }
.gallery-title { font-weight: 700; margin-bottom: 0.35rem; }
.gallery-cat { color: var(--text-sub); font-size: 0.85rem; }

/* ===== 최종 CTA ===== */
.final-cta {
  padding: 4rem 2.5rem;
  margin: 0 auto;
  max-width: 820px;
  text-align: center;
}
.final-cta h2 { margin-bottom: 0.9rem; }
.final-cta p  { margin-bottom: 2rem; color: var(--text-sub); }

/* ===== 반응형 ===== */
@media (max-width: 1024px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 767px) {
  body .container { padding-left: 1.4rem; padding-right: 1.4rem; }

  main > section,
  main > section.container {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }

  .section-desc { margin-bottom: 2.2rem; }
  .card { padding: 1.6rem 1.4rem; }
  .intro-card { padding: 1.8rem 1.5rem; }
  .steps-list li, .rules-list li { padding: 1.1rem 1.3rem; }

  .status-card {
    border-radius: 18px;
    padding: 1.1rem 1.4rem;
    gap: 1rem;
    width: 100%;
  }
  .status-divider { display: none; }
  .status-item { min-width: 80px; flex: 1; }
  .status-value { font-size: 0.9rem; }

  .final-cta { padding: 2.8rem 1.5rem; }
  .gallery-grid { grid-template-columns: 1fr; }
}
