/* 이벤트 목록(IN0008/MIN0008)·상세 페이지 리뉴얼 스타일 */

/* ============================================================
   Page scope tokens
   ============================================================ */
.page-event {
  --color-skt-red: #ea002c;
  --nav-link-active-color: #ea002c;
  --color-text-primary: #000000;
  --color-text-secondary: #666666;
  --color-border-card: #dddddd;
  --color-border-light: #eeeeee;
  --color-bg-page: #ffffff;
  --color-bg-muted: #f3f5f6;
  --color-bg-footer: #f3f5f6;
  --color-floating-pill: #000000;
  --color-floating-chat: #333333;
  --font-stack: var(--font-family-sans);
  --header-height: 64px;
  --container-max: 1280px;
  --gutter-desktop: 40px;
  --gutter-mobile: 20px;
  --letter-tight: -0.01em;
  --radius-pill: 36px;
  --shadow-header: 0 1px 0 rgba(0, 0, 0, 0.06);
  min-width: 320px;
  font-family: var(--font-stack);
  font-size: 16px;
  line-height: 24px;
  color: var(--color-text-primary);
  background: var(--color-bg-page);
}

.event-page__content {
  position: relative;
  width: 100%;
  padding-top: var(--header-height);
}

/* ============================================================
   목록 — /roaming/event (Figma IN0008)
   ============================================================ */
.event-list {
  box-sizing: border-box;
  max-width: var(--container-max);
  margin: 0 auto;
}

.event-list__header {
  width: 100%;
  /* 타이틀 위 100px(프레임 144 내 하단 정렬) */
  padding: 100px var(--gutter-desktop) 0;
}

.event-list__header-inner {
  width: 100%;
  padding: 0 10px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.event-list__title {
  margin: 0;
  font-size: 32px;
  line-height: 44px;
  font-weight: 700;
  letter-spacing: -0.32px;
  color: var(--color-text-primary);
}

.event-list__grid {
  box-sizing: border-box;
  display: grid;
  /* Figma IN0008: 2열 595×244, gap 10, 타이틀↔그리드 60 */
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 10px;
  width: 100%;
  padding: 60px var(--gutter-desktop) 120px; /* 하단 여백 80 → 120 */
}

.event-card {
  display: flex;
  min-width: 0;
}

.event-card__link {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  width: 100%;
  border: 1px solid var(--color-border-card);
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
  color: var(--color-text-primary);
  text-decoration: none;
  transition: box-shadow 0.2s ease;
}

/* .event-card__link:hover,
.event-card__link:focus-visible {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
} */

.event-card__link:focus-visible,
.event-detail__back:focus-visible {
  outline: 2px solid var(--nav-link-active-color);
  outline-offset: 4px;
}

.event-card__media {
  display: block;
  width: 100%;
  /* Figma IN0008 banner: 595×160 */
  aspect-ratio: 595 / 160;
  overflow: hidden;
  background: #f2f4f6;
}

/* PC/모바일(_mo) 이미지 분기용 picture 래퍼 — 이미지 height:100% 가 적용되도록 블록 처리 */
.event-card__media picture {
  display: block;
  width: 100%;
  height: 100%;
}

.event-card__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Figma 카드 바디 84px / pad 30 — 진행 중: 흰 배경 */
.event-card__body {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  flex: 1 1 auto;
  gap: 10px;
  min-height: 84px;
  padding: 30px;
  box-sizing: border-box;
  background: #ffffff;
}

.event-card__meta {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.event-card__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-sizing: border-box;
  min-height: 24px;
  padding: 2px 5px;
  border-radius: 4px;
  font-size: 14px;
  line-height: 20px;
  font-weight: 700;
  letter-spacing: -0.14px;
  color: #ffffff;
  background: var(--color-skt-red);
}

.event-card__badge--ended {
  background: #666666;
}

.event-card__title {
  margin: 0;
  min-width: 0;
  overflow: hidden;
  font-size: 16px;
  line-height: 24px;
  font-weight: 700;
  letter-spacing: -0.16px;
  color: var(--color-text-primary);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.event-card__more {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  gap: 5px;
  font-size: 16px;
  line-height: 24px;
  font-weight: 400;
  letter-spacing: -0.16px;
  color: var(--color-text-primary);
  white-space: nowrap;
  text-decoration: none;
}

.event-card__link:hover .event-card__more,
.event-card__link:hover .event-card__title {
  text-decoration: none;
}

.event-card__more-icon {
  display: block;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: inherit;
}

/* Figma 마감 카드: 바디 #f3f5f6 · 배지 #666 · 타이틀 #666 (자세히 보기는 #000 유지) */
.event-card--ended .event-card__body {
  background: var(--color-bg-muted);
}

.event-card--ended .event-card__title {
  color: var(--color-text-secondary);
}

.event-list__empty {
  grid-column: 1 / -1;
  padding: 80px 20px;
  text-align: center;
  font-size: 16px;
  line-height: 24px;
  letter-spacing: var(--letter-tight);
  color: var(--color-text-secondary);
}

/* ============================================================
   상세 — /roaming/event_detail
   ============================================================ */
.event-detail {
  box-sizing: border-box;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 100px 20px 120px;
}

.event-detail__header {
  padding: 0 10px;
}

.event-detail__title {
  margin: 0;
  font-size: 32px;
  line-height: 44px;
  font-weight: 700;
  letter-spacing: -0.32px;
  color: var(--color-text-primary);
  padding:0 20px;
}

.event-detail__rule {
  box-sizing: border-box;
  width: 100%;
  max-width: 1200px;
  height: 1px;
  margin: 60px auto 0;
  border: 0;
  background: var(--color-border-light);
}

.event-detail__label {
  margin: 40px 0 0;
  padding: 0 30px;
  font-size: 20px;
  line-height: 30px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--color-text-primary);
  word-break: keep-all;
}

.event-detail__label + .event-detail__rule {
  margin-top: 40px;
  display: none;
}

.event-detail__content {
  box-sizing: border-box;
  width: 100%;
  max-width: 1200px;
  margin: 40px auto 0;
}

.event-detail__content img {
  max-width: 100%;
  height: auto !important;
}

.event-detail__actions {
  display: flex;
  justify-content: center;
  margin-top: 60px;
}

.event-detail__back {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 265px;
  min-height: 56px;
  padding: 16px 40px;
  border-radius: 50px;
  background: #f3f5f6;
  color: var(--color-text-primary);
  text-decoration: none;
  font-size: 16px;
  line-height: 24px;
  font-weight: 700;
  letter-spacing: var(--letter-tight);
  transition: filter 0.2s ease;
}

/* .event-detail__back:hover {
  filter: brightness(0.96);
} */

/* ============================================================
   Mobile — Figma MIN0008
   ============================================================ */
@media (max-width: 1279.98px) {
  .page-event {
    --header-height: 56px;
  }

  .event-list__title,
  .event-detail__title {
    font-size: 28px;
    line-height: 40px;
    letter-spacing: -0.28px;
  }

  .event-list__header {
    padding: 40px var(--gutter-mobile) 0;
  }

  /* 1열 스택, GNB 아래 40px 부터 카드 (서브 GNB 시 본문 H1 숨김) */
  .event-list__grid {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 40px var(--gutter-mobile) 80px; /* 하단 여백 60 → 80 */
  }

  body.is-mobile-sub-gnb .event-list__grid {
    padding-top: 40px;
  }

  .event-card__media {
    /* Figma MIN0008 banner: 320×140 */
    aspect-ratio: 320 / 140;
  }

  .event-card__body {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 10px;
    min-height: 121px;
    padding: 20px;
  }

  .event-card__meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    width: 100%;
  }

  .event-card__badge {
    min-height: 22px;
    padding: 2px 5px;
    border-radius: 2px;
    font-size: 12px;
    line-height: 18px;
    letter-spacing: -0.12px;
  }

  .event-card__title {
    width: 100%;
    font-size: 14px;
    line-height: 22px;
    letter-spacing: -0.14px;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .event-card__more {
    font-size: 14px;
    line-height: 22px;
    letter-spacing: -0.14px;
    gap: 2px;
  }

  .event-card__more-icon {
    width: 16px;
    height: 16px;
  }

  .event-detail {
    padding: 40px 20px 80px;
  }

  .event-detail__rule,
  .event-detail__label + .event-detail__rule {
    margin: 0;
    background: none;
  }

  .event-detail__label {
    margin-top: 0;
    font-size: 18px;
    line-height: 26px;
    padding:0 10px;
  }

  .event-detail__content {
    margin-top: 20px;
  }

  .event-detail__actions {
    margin-top: 40px;
  }
  .event-detail__back {
    box-sizing: border-box;
    width: 265px;
    min-height: 48px;
    height: 48px;
    padding: 0 40px;
    font-size: 14px;
    line-height: 22px;
  }
}
