/* ========================================
   Events Archive (アートに会いに行こう)
   Loaded on is_post_type_archive('events') and on the front page,
   whose events preview reuses the .event-card component (#166)
======================================== */

/* ----------------------------------------
   Page Shell
---------------------------------------- */
.events-archive {
  --max-width: calc(822px + 2 * var(--content-padding));

  padding-bottom: 99px;

  @media screen and (min-width: 768px) {
    padding-bottom: 160px;
  }
}

.events-archive__header {
  padding-top: 47px;

  @media screen and (min-width: 768px) {
    padding-top: 72px;
    text-align: center;
  }
}

.events-archive__title {
  font-size: 32px;
  font-weight: var(--font-weight-regular);
  line-height: 1.6;
  letter-spacing: -0.01em;

  @media screen and (min-width: 768px) {
    font-size: 48px;
    letter-spacing: normal;
  }
}

.events-archive__lead {
  margin-top: 26px;
  font-size: 16px;
  font-weight: var(--font-weight-medium);
  line-height: 1.75;

  @media screen and (min-width: 768px) {
    max-width: 772px;
    margin-top: 48px;
    margin-inline: auto;
    font-size: 18px;
    line-height: 2;
  }

  p {
    margin-bottom: 1em;

    &:last-child {
      margin-bottom: 0;
    }
  }
}

.events-archive__list {
  display: grid;
  grid-template-columns: 1fr;
  row-gap: 40px;
  margin-top: 45px;
  list-style: none;

  @media screen and (min-width: 768px) {
    grid-template-columns: repeat(2, 1fr);
    column-gap: 62px;
    row-gap: 60px;
    margin-top: 33px;
  }
}

.events-archive__empty {
  margin-top: 45px;
  text-align: center;
}

/* ----------------------------------------
   Event Card
---------------------------------------- */
.event-card {
  display: block;
  padding: 22px 20px 21px;
  background-color: var(--color-background-warm);
  border-radius: 10px;

  @media screen and (min-width: 768px) {
    padding: 22px 22px 20px;
  }
}

.event-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 35px;
  padding-right: 20px;
  background-color: var(--color-primary);
  border-radius: 50px;
  margin: 0 0 16px;

  @media screen and (min-width: 768px) {
    min-height: 40px;
  }

  /* No avatar (related work unset/unpublished): keep the pill's left inset */
  .event-card__badge-label:first-child {
    margin-left: 16px;
  }
}

.event-card__badge-avatar {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  object-fit: cover;

  @media screen and (min-width: 768px) {
    width: 40px;
    height: 40px;
  }
}

.event-card__badge-label {
  font-size: 14px;
  font-weight: var(--font-weight-medium);
  line-height: 1.75;

  @media screen and (min-width: 768px) {
    font-size: 16px;
  }
}

.event-card__title {
  margin: 0 0 13px;
  font-size: 22px;
  font-weight: var(--font-weight-medium);
  line-height: 1.5;
  color: var(--color-text-secondary);
}

.event-card__summary {
  margin: 13px 0 0;
  font-size: 14px;
  line-height: 1.75;

  @media screen and (min-width: 768px) {
    font-size: 16px;
  }
}

.event-card__meta {
  display: flex;
  flex-direction: column;
  row-gap: 8px;
  margin-top: 16px;
  list-style: none;
}

.event-card__meta-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 14px;
  line-height: 1.75;

  @media screen and (min-width: 768px) {
    font-size: 16px;
  }
}

/* One 20px icon column for all rows; object-fit keeps the narrower
   pin icon centered without stretching */
.event-card__meta-icon {
  flex-shrink: 0;
  width: 20px;
  height: 21px;
  margin-top: 2px;
  object-fit: contain;

  @media screen and (min-width: 768px) {
    margin-top: 3px;
  }
}

.event-card__meta-link {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: inherit;
  text-decoration: none;

  &:hover {
    opacity: 0.7;
  }
}

.event-card__meta-link-text {
  text-decoration: underline;
}
