/* ui-list.css — 목록 화면(히어로·검색·카드 격자·페이지 번호). split from ui.css (RULE-code-19) */

/* ─── 목록 화면 ──────────────────────────── */
/* 히어로 — 본사이트(menteimo.com)와 같은 보라 배경·장식 */
.sv-hero {
  position: relative;
  display: flex;
  align-items: center;
  height: 280px;
  margin-bottom: 32px;
  padding: 0 max(24px, calc((100% - 1200px) / 2));
  background: var(--sv-brand-bg);
  overflow: hidden;
}

.sv-hero__text {
  position: relative;
  z-index: 2;
  color: #fff;
}

.sv-hero__title {
  margin: 0 0 12px;
  font-size: 44px;
  font-weight: 800;
  letter-spacing: 16px;
  line-height: var(--lh-base, 1.5);
}

.sv-hero__desc {
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 17px;
  line-height: 1.5;
}

/* 장식 그림 — 글자 뒤에 깔린다 */
.sv-hero__deco {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 100%;
  z-index: 1;
}

.sv-hero__deco-text {
  position: absolute;
  top: -48px;
  right: -120px;
  width: 140px;
}

.sv-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding-bottom: 20px;
}

.sv-search {
  position: relative;
  flex: 1;
  min-width: 220px;
}

.sv-search i {
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
  color: var(--sv-ink-soft);
}

.sv-search input {
  width: 100%;
  height: 44px;
  padding: 0 16px 0 40px;
  border: 1px solid var(--sv-line);
  border-radius: 12px;
  background: var(--sv-surface);
  font: inherit;
}

.sv-search input:focus { outline: 2px solid var(--sv-brand-soft); border-color: var(--sv-brand); }

.sv-chips { display: flex; flex-wrap: wrap; gap: 8px; }

.sv-chip {
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--sv-line);
  border-radius: 999px;
  background: var(--sv-surface);
  color: var(--sv-ink-soft);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.sv-chip.is-on { border-color: var(--sv-brand); background: var(--sv-brand-soft); color: var(--sv-brand-dark); }

/* 카드 격자 */
.sv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  padding-bottom: 40px;
}

.sv-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--sv-line);
  border-radius: var(--sv-radius);
  background: var(--sv-surface);
  box-shadow: var(--sv-shadow);
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.15s;
}

.sv-card:hover { transform: translateY(-2px); box-shadow: var(--sv-shadow-lift); }

.sv-card__thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #e8ecff, #f6f7fb);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 이미지가 있으면 그 위를 덮어 제목 글자를 가린다 (없으면 글자가 그대로 보인다) */
.sv-card__thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sv-card__thumb-empty {
  padding: 16px;
  color: var(--sv-brand-dark);
  font-size: 15px;
  font-weight: 700;
  text-align: center;
}

.sv-card__flag {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(27, 33, 48, 0.78);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.sv-card__flag--best { background: #ffb020; color: #3b2600; }

.sv-card__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  padding: 16px;
}

.sv-card__title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  line-height: var(--lh-base, 1.5);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sv-card__meta {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--sv-ink-soft);
  font-size: 13px;
}

.sv-state {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;      /* '진행 중'·'시작 전' 이 좁은 카드에서 두 줄로 꺾이지 않게 */
  flex-shrink: 0;
}

.sv-state--open { background: #e6f5ef; color: var(--sv-ok); }
.sv-state--soon { background: #fff2e0; color: var(--sv-warn); }
.sv-state--closed { background: #eceff4; color: var(--sv-ink-soft); }

.sv-empty {
  padding: 64px 16px;
  color: var(--sv-ink-soft);
  text-align: center;
}

.sv-pager {
  display: flex;
  justify-content: center;
  gap: 4px;
  padding-bottom: 48px;
}

.sv-pager button {
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  border: 1px solid var(--sv-line);
  border-radius: 8px;
  background: var(--sv-surface);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.sv-pager button.is-on { border-color: var(--sv-brand); background: var(--sv-brand); color: #fff; }
.sv-pager button:disabled { opacity: 0.4; cursor: default; }

