/* Events page foundations and empty state */
.events-page {
  position: relative;
  overflow: hidden;
  padding: 150px 20px 100px;
  background: #fff;
  color: #000;
  font-family: var(--font-body, 'Noto Sans JP', 'Yu Gothic', Meiryo, sans-serif);
  font-size: 15px;
  line-height: 1.8;
}

.events-page *, .events-page *::before, .events-page *::after {
  box-sizing: border-box;
}

.events-page p, .events-page h1, .events-page h2 {
  margin: 0;
}

.events-page a {
  color: inherit;
  text-decoration: none;
}

.events-page button {
  font: inherit;
}

.events-empty-state {
  box-sizing: border-box;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 170px;
  padding: 40px 24px;
  border: 1px solid #f1d4df;
  border-radius: 20px;
  background: #fff7fa;
  color: #4a4245;
  text-align: center;
}

.events-empty-state p {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.8;
}

.hc-events-group > .events-empty-state {
  margin-top: 30px;
}

.hc-events-group .events-empty-state + .hc-outline-link {
  margin-top: 30px;
}

.events-page a:focus-visible, .events-page button:focus-visible {
  outline: 3px solid #3baaa3;
  outline-offset: 5px;
}

.events-background {
  position: absolute;
  inset: 0 0 auto;
  height: 502px;
  pointer-events: none;
  overflow: hidden;
}

.events-background-pc {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: 1440px;
  height: 502px;
  max-width: none;
}

.events-background-sp {
  display: none;
}

.events-content {
  position: relative;
  width: min(100%, 1000px);
  margin: 0 auto;
}

.events-heading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  margin-bottom: 100px;
  text-align: center;
}

.events-heading-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.events-english {
  font-family: var(--font-display, 'Arial Rounded MT Bold', 'Trebuchet MS', sans-serif);
  font-size: 35px;
  font-weight: 900;
  line-height: 1.5;
}

.events-english span:nth-child(3n + 1) {
  color: var(--pink, #f09cb4);
}

.events-english span:nth-child(3n + 2) {
  color: var(--green, #3baaa3);
}

.events-english span:nth-child(3n) {
  color: var(--blue, #45b1e6);
}

.events-heading h1 {
  border: 2px solid var(--pink, #f09cb4);
  padding: 0 10px;
  border-radius: 10px;
  background: #fff;
  color: var(--pink, #f09cb4);
  box-shadow: 4px 4px 0 var(--pink, #f09cb4);
  font-family: var(--font-display, 'Arial Rounded MT Bold', 'Yu Gothic', sans-serif);
  font-size: 32px;
  font-weight: 900;
  line-height: 1.7;
  letter-spacing: -.1em;
}

/* Event card components */
.events-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 50px;
}

.event-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  min-width: 0;
  padding: 20px;
  border: 1px solid #dcdcdc;
  border-radius: 30px;
  background: #fff;
}

.event-card-image-link {
  display: block;
  width: 100%;
  border-radius: 20px;
}

.event-image {
  position: relative;
  width: 100%;
  aspect-ratio: 433 / 325;
  overflow: hidden;
  border-radius: 20px;
  background: #e0e0e0;
}

.event-photo {
  position: absolute;
  right: 0;
  top: 0;
  width: 112.934%;
  height: 100.308%;
  object-fit: cover;
  max-width: none;
}

.event-image-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  opacity: .8;
  font-weight: 500;
  font-size: 98.864px;
  line-height: 1.8;
  pointer-events: none;
}

.event-image-logo {
  background: #ebffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.event-logo-slot {
  display: block;
  position: relative;
  width: 225.793px;
  height: 165.084px;
  transform: translateY(.69px);
}

.event-logo-slot img {
  display: block;
  width: 225.793px;
  height: 165.084px;
  max-width: none;
}

.event-ribbon {
  position: absolute;
  right: 20px;
  top: 0;
  width: 70px;
  height: 70px;
}

.event-ribbon > img {
  position: absolute;
  inset: 0;
  display: block;
  width: 70px;
  height: 70px;
  max-width: none;
}

.event-ribbon > span {
  position: absolute;
  left: 11px;
  top: 14px;
  color: #fff;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 1.5px;
  font-size: 15px;
}

.event-ribbon-mobile {
  display: none;
}

.event-card-copy {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.event-card h2 {
  font-size: 22px;
  line-height: 1.7;
  font-weight: 700;
}

.event-card h2 a:hover {
  color: var(--green, #3baaa3);
}

.event-meta p {
  line-height: 1.8;
}

.events-page .event-action, .current-event-card .event-action {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: min(300px, 100%);
  min-height: 60px;
  padding: 12px 16px;
  border: 0;
  border-radius: 50px;
  background: var(--red, #f55f5f);
  color: #fff;
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.8;
  cursor: pointer;
  transition: background-color .2s;
}

.events-page .event-action:hover, .current-event-card .event-action:hover {
  background: #dc4949;
}

.current-event-card {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: clamp(20px, 4vw, 50px);
  margin-top: 30px;
}

.current-event-banner {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
}

.current-event-detail {
  max-width: 760px;
  margin-inline: auto;
}

.current-event-detail .current-event-banner {
  max-width: 540px;
}

.current-event-detail section {
  margin-top: 2em;
}

.current-event-detail h2 {
  font-size: 1.35em;
}

.current-event-detail p + p, .current-event-detail h2 + p {
  margin-top: .7em;
}

.events-back {
  margin-top: 100px;
  min-height: 40px;
  display: flex;
  align-items: center;
}

.events-back a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  color: #969696;
  font-size: 15px;
  line-height: 1.8;
  font-weight: 700;
}

.events-back img {
  width: 6.41421px;
  height: 10px;
  max-width: none;
  transform: rotate(180deg);
}

.events-back a:hover {
  color: var(--green, #3baaa3);
}

/* Event detail components */
.event-article {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 50px;
}

.event-image-hero {
  width: min(600px, 100%);
  aspect-ratio: 600 / 450;
  background: #ebffff;
}

.event-image-hero .event-photo {
  width: 112.5%;
  height: 100%;
}

.event-image-hero .event-image-placeholder, .event-gallery .event-image-placeholder {
  font-size: 120px;
}

.event-intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  width: 100%;
  letter-spacing: .05em;
}

.event-date {
  color: var(--pink, #f09cb4);
  font-weight: 700;
  line-height: 1.6;
}

.event-intro h1 {
  font-size: 30px;
  line-height: 1.6;
  font-weight: 700;
}

.event-article-text {
  width: 100%;
  letter-spacing: .05em;
}

.event-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  width: 100%;
}

.event-gallery .event-image {
  aspect-ratio: 490 / 368;
  background: #d9d9d9;
}

.event-gallery .event-photo {
  width: 113.266%;
  height: 100.544%;
}

.event-article-link {
  width: 100%;
}

.event-article-link button {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #000;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.8;
  letter-spacing: .05em;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

/* Event notice dialog */
.event-information-dialog {
  width: min(480px, calc(100% - 40px));
  max-height: calc(100% - 40px);
  padding: 30px;
  border: 2px solid var(--pink, #f09cb4);
  border-radius: 20px;
  background: #fff;
  color: #000;
}

.event-information-dialog::backdrop {
  background: rgba(0, 0, 0, .35);
}

.event-dialog-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.event-dialog-body h2 {
  font-size: 22px;
}

@media (max-width: 767px) {
  .current-event-card {
    grid-template-columns: minmax(0, 1fr);
  }
  .events-empty-state {
    min-height: 140px;
    padding: 30px 20px;
  }
  .events-empty-state p {
    font-size: 16px;
  }
  .events-page {
    padding: 100px 20px;
  }
  .events-background {
    height: 500px;
  }
  .events-background-pc {
    display: none;
  }
  .events-background-sp {
    display: block;
    position: absolute;
    left: calc(50% - 209.1px);
    top: 0;
    width: 477.878px;
    height: 500px;
    max-width: none;
  }
  .events-content {
    width: 100%;
    max-width: 500px;
  }
  .events-heading {
    margin-bottom: 70px;
  }
  .events-heading h1 {
    padding-right: 20px;
    padding-left: 20px;
  }
  .events-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 50px;
  }
  .event-card {
    align-items: center;
  }
  .event-card .event-image {
    aspect-ratio: 293 / 220;
  }
  .event-card .event-photo {
    width: 112.969%;
    height: 100.455%;
  }
  .event-card .event-image-placeholder {
    font-size: 80px;
  }
  .event-logo-slot {
    transform: translateY(-.25px) scale(.676672);
  }
  .event-ribbon-mobile {
    display: block;
  }
  .events-list-page .events-back {
    margin-top: 70px;
  }
  .event-image-hero {
    width: 100%;
    aspect-ratio: 335 / 251;
  }
  .event-image-hero .event-photo, .event-gallery .event-photo {
    width: 112.836%;
    height: 100.398%;
  }
  .event-intro h1 {
    font-size: 20px;
  }
  .event-intro > p:not(.event-date), .event-intro .event-meta {
    letter-spacing: normal;
  }
  .event-gallery {
    grid-template-columns: minmax(0, 1fr);
  }
  .event-gallery .event-image {
    aspect-ratio: 335 / 251;
  }
}

@media (prefers-reduced-motion: reduce) {
  .events-page .event-action {
    transition: none;
  }
}
