/* 이벤트 목록 — 머리 · 상태 탭 · 검색 · 포스터 그리드 · 빈 상태 · 종료 안내 */

/* 피부과 틀은 본문 폭을 내용에 맞추므로, 본문이 내용 폭만큼 넓어지지 않게 막는다 */
.ev-page {
  min-width: 0;
  max-width: 1168px;
  margin: 0 auto;
  /* 위 여백은 고정 머리줄 높이에 시안의 80px 를 더한 값이다 */
  padding: 160px 24px 120px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 40px;
  color: #16181d;
}
.derma-layout .ev-page { width: 100%; max-width: none; margin: 0; padding: 112px 24px 120px 28px; }
/* 1068 이하 피부과는 고정 머리줄(높이 92)이 본문 위를 덮는다 */
@media (max-width: 1068px) {
  .derma-layout .ev-page { padding-top: 132px; }
}
/* PC 는 오른쪽 고정 퀵메뉴(폭 84, 러시아어 102) 앞에서 끝낸다. 퀵메뉴를 감추는 피부과는 그대로 */
@media (min-width: 769px) {
  .ev-page { padding-right: max(24px, calc(92px - max(0px, (100% - 1168px) / 2))); }
  html[lang="ru"] .ev-page { padding-right: max(24px, calc(110px - max(0px, (100% - 1168px) / 2))); }
  .derma-layout .ev-page { padding-right: 24px; }
}

/* 머리 */
.ev-hero { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.ev-hero__eyebrow {
  font-family: Montserrat, 'Noto Sans KR', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 4px;
  color: #6b5992;
}
.ev-hero__title {
  margin: 0;
  font-size: 36px;
  line-height: 1.3;
  font-weight: 300;
  letter-spacing: -1.2px;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.ev-hero__title strong { font-weight: 700; }

/* 상태 탭 · 검색 */
.ev-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #eceef1;
}
.ev-tabs { display: flex; flex-wrap: wrap; gap: 28px; }
.ev-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 52px;
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  box-sizing: border-box;
  font-size: 15px;
  font-weight: 500;
  color: #6b707a;
  text-decoration: none;
  white-space: nowrap;
}
.ev-tab:hover { color: #16181d; }
.ev-tab.is-on { border-bottom-color: #16181d; color: #16181d; font-weight: 700; }
.ev-tab__count { font-family: Montserrat, 'Noto Sans KR', sans-serif; font-size: 12px; font-weight: 600; color: #9a9ea7; }
.ev-tab.is-on .ev-tab__count { color: #6b5992; }
.ev-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 240px;
  max-width: 100%;
  height: 40px;
  margin: 0 0 8px;
  padding: 0 2px 0 4px;
  box-sizing: border-box;
  border-bottom: 1px solid #16181d;
}
.ev-search:focus-within { border-bottom-color: #6b5992; box-shadow: 0 1px 0 #6b5992; }
.ev-search .material-symbols-outlined { font-size: 20px; color: #16181d; }
.ev-search input[type="search"] {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  color: #16181d;
}

/* 포스터 그리드 */
.ev-grid {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 48px 28px;
}
.ev-grid > li { min-width: 0; }
.ev-card { display: flex; flex-direction: column; gap: 18px; color: #16181d; text-decoration: none; }
.ev-card__poster {
  position: relative;
  display: block;
  aspect-ratio: 860 / 960;
  border-radius: 4px;
  overflow: hidden;
  background: #f1f2f4;
}
.ev-card__poster img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.ev-card[href]:not([data-event-status="END"]):hover .ev-card__poster img { transform: scale(1.03); }
.ev-card__poster.is-end img { filter: grayscale(1); opacity: 0.55; }
.ev-card__chips { position: absolute; left: 14px; top: 14px; right: 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.ev-chip { padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: #16181d; color: #fff; white-space: nowrap; }
.ev-chip.is-end { background: #fff; color: #555a64; }
.ev-chip.is-upcoming { background: #fff; color: #6b5992; }
.ev-chip.is-dday { background: #fff; color: #a8322a; }
.ev-card__text { display: flex; flex-direction: column; gap: 6px; }
.ev-card__title { font-size: 19px; line-height: 1.4; font-weight: 700; letter-spacing: -0.4px; word-break: keep-all; overflow-wrap: anywhere; }
.ev-card__period { font-size: 13.5px; color: #555a64; }
.ev-card__more { margin-top: 6px; display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 700; transition: gap .2s; }
.ev-card:hover .ev-card__more { gap: 10px; }
.ev-tab:focus-visible, .ev-card:focus-visible, .ev-empty__all:focus-visible {
  outline: 2px solid #6b5992;
  outline-offset: 2px;
}

/* 빈 상태 */
.ev-empty {
  padding: 80px 24px;
  border-top: 1px solid #eceef1;
  border-bottom: 1px solid #eceef1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.ev-empty strong { font-size: 17px; }
.ev-empty__all {
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid #16181d;
  font-size: 14px;
  color: #16181d;
  text-decoration: none;
}
.ev-note { margin: 16px 0 0; text-align: center; font-size: 12.5px; line-height: 1.7; color: #6b707a; }

/* 종료 카드를 누르면 뜨는 안내 띠 */
.ev-toast {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 40px;
  z-index: 1100;
  width: fit-content;
  max-width: calc(100% - 32px);
  margin: 0 auto;
  padding: 14px 22px;
  box-sizing: border-box;
  border-radius: 999px;
  background: #16181d;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity .2s, transform .2s, visibility .2s;
}
.ev-toast.is-on { opacity: 1; visibility: visible; transform: none; }
/* 768 이하는 아래 퀵메뉴 바 위에 띄운다 */
@media (max-width: 768px) {
  .ev-toast { bottom: calc(108px + env(safe-area-inset-bottom)); }
}

@media (max-width: 1068px) {
  .ev-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 20px; }
}

@media (max-width: 767px) {
  .ev-page { padding: 128px 16px 72px; gap: 28px; }
  .derma-layout .ev-page { padding: 124px 16px 72px; }
  .ev-hero__title { font-size: 28px; letter-spacing: -0.8px; }
  .ev-bar { gap: 0; }
  .ev-tabs { width: 100%; gap: 0; }
  .ev-tab { flex: 1 1 0; justify-content: center; }
  .ev-search { width: 100%; margin: 12px 0 8px; }
  .ev-grid { gap: 32px 12px; }
  .ev-card { gap: 12px; }
  .ev-card__chips { left: 8px; top: 8px; right: 8px; gap: 4px; }
  .ev-chip { padding: 3px 8px; font-size: 11px; }
  .ev-card__title { font-size: 16px; }
  .ev-card__period, .ev-card__more { font-size: 12.5px; }
}
