/* ========================================
   TOP page
======================================== */

/* ---- KV ---- */
.l-kv {
  position: relative;
  height: 620px;
  overflow: hidden;
  background: #F0EDE8;
}
.l-kv__bg-wrap {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  background: #F0EDE8;
}
.l-kv__bg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* ブラウザ幅が広がっても上端を基準に表示し、選手の頭が切れないようにする */
  object-position: center top;
  background: #F0EDE8;
}
.l-kv__title {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  padding: 0;
  pointer-events: none;
}
.l-kv__title h1 {
  margin: 0;
  line-height: 0;
  width: 90%;
  max-width: 1200px;
}
.l-kv__title-picture {
  display: block;
  width: 100%;
}
.l-kv__title-img {
  display: block;
  width: 100%;
  height: auto;
}

@media (max-width: 640px) {
  .l-kv {
    height: 420px;
  }
  .l-kv__title h1 {
    max-width: none;
  }
}

/* ---- Panels (tab contents) ---- */
.l-panel {
  display: none;
  position: relative;
}
.l-panel.is-active {
  display: block;
}

.l-panel--worldcup,
.l-panel--olympic {
  background: #F0EDE8;
}
/* 年ナビ下から背景画像の一番上が見えるようにする */
.l-panel--worldcup .p-challenge::before,
.l-panel--olympic .p-challenge::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  margin-left: -50vw;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(240, 237, 232, 0.4), rgba(240, 237, 232, 0.4)),
    url("../images/bg_img.png") center top / 100% auto repeat-y;
}
.l-panel--olympic .p-challenge::before {
  background:
    linear-gradient(180deg, rgba(240, 237, 232, 0.4), rgba(240, 237, 232, 0.4)),
    url("../images/bg_ol_img.png") center top / 100% auto repeat-y;
}

.p-challenge {
  position: relative;
  z-index: 1;
  max-width: var(--page-max);
  margin: 0 auto;
  /* 最後のカードの margin が抜けて背景が途切れるのを防ぐため下側にも padding を持つ */
  padding: 40px 20px 24px;
}
.p-challenge__head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-bottom: 40px;
  min-height: clamp(10rem, 12vw, 14rem);
  overflow: hidden;
}
.p-challenge__bg-label {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  font-family: var(--font-en-title);
  font-weight: 400;
  font-style: normal;
  font-size: clamp(10rem, 12vw, 14rem);
  line-height: 100%;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  border: none;
  -webkit-text-stroke: 0;
}
.p-challenge__bg-label--img {
  font-size: 0;
  line-height: 0;
  letter-spacing: 0;
  color: transparent;
  width: auto;
  max-width: 92%;
  white-space: normal;
}
.p-challenge__bg-label--img picture,
.p-challenge__bg-label--img img {
  display: block;
  width: min(90vw, 1100px);
  height: auto;
  margin: 0 auto;
}
.p-challenge__heading {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 8px 16px;
  background: linear-gradient(90deg, rgba(0, 30, 85, 0.9) 0%, rgba(150, 96, 255, 0.9) 50%, rgba(225, 0, 110, 0.9) 100%);
  color: var(--color-white);
  font-family: var(--font-body);
  font-weight: 700;
  font-style: normal;
  font-size: 3.6rem;
  letter-spacing: 0.06em;
  border-radius: 4px;
  text-align: center;
  width: fit-content;
  line-height: 100%;
}

@media (max-width: 640px) {
  .p-challenge {
    padding: 24px 16px 16px;
  }
  .p-challenge__head {
    margin-bottom: 28px;
    min-height: auto;
    padding: 24px 0;
    overflow: visible;
  }
  .p-challenge__bg-label {
    width: 5em;
    font-size: 20vw;
    white-space: normal;
    overflow-wrap: break-word;
    word-break: break-word;
    line-height: 1;
  }
  .p-challenge__bg-label--img {
    width: auto;
    max-width: 94%;
  }
  .p-challenge__bg-label--img picture,
  .p-challenge__bg-label--img img {
    width: min(94vw, 420px);
  }
  .p-challenge__heading {
    font-size: 1.8rem;
    padding: 4px 8px;
  }
}

/* ---- Tournament cards ---- */
.c-card {
  position: relative;
  z-index: 1;
  max-width: var(--content-max);
  margin: 0 auto 56px;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  color: var(--color-white);
  background: var(--color-navy);
}
.c-card--wc {
  background: var(--color-navy);
}
.c-card--ol {
  background: var(--color-navy);
  color: var(--color-white);
}
.c-card--champion {
  /* 2011 special: keep magenta accent, gold optional later */
}

.c-card__visual {
  position: relative;
  line-height: 0;
}
.c-card__visual img {
  width: 100%;
  height: auto;
  display: block;
  /* 曲線は画像側で加工済みのため clip-path なし */
}
.c-card__visual .c-photo-credit {
  position: absolute;
  right: 8px;
  top: 8px;
  bottom: auto;
  z-index: 3;
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.8rem;
  line-height: 1.2;
  color: #fff;
  text-shadow:
    0 0 6px rgba(0, 0, 0, 1),
    0 0 12px rgba(0, 0, 0, 1),
    0 2px 6px rgba(0, 0, 0, 1);
  pointer-events: none;
  white-space: nowrap;
}
.c-card__visual .c-photo-credit--jfa {
  text-shadow: none;
  line-height: 0;
  filter:
    drop-shadow(0 0 3px rgba(0, 0, 0, 1))
    drop-shadow(0 0 6px rgba(0, 0, 0, 1));
}
.c-card__visual .c-photo-credit--jfa img {
  display: block;
  height: 10px;
  width: auto;
}

.c-card__body {
  position: relative;
  z-index: 2;
  padding: 24px 56px 64px;
}
.c-card__meta {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  margin-top: -120px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
/* WC: 左寄せ / OL(PCのみ): 右寄せ */
.c-card--wc .c-card__meta {
  justify-content: flex-start;
  text-align: left;
}
.c-card--ol .c-card__meta {
  justify-content: flex-end;
  text-align: right;
}
.c-card__year {
  font-family: var(--font-en-title);
  font-size: 14rem;
  letter-spacing: -0.06em;
  line-height: 0.8;
  font-weight: 700;
  color: var(--color-white);
  order: 2;
}
.c-card--wc .c-card__year {
  order: 1;
}
.c-card--ol .c-card__year {
  color: var(--color-white);
  text-shadow: 0 2px 12px rgba(0, 30, 85, 0.25);
}
.c-card__place {
  font-family: var(--font-en-title);
  font-weight: 400;
  font-style: normal;
  font-size: 6rem;
  background: linear-gradient(90deg, #CEB4FF 0%, #E1A0E1 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  border: none;
  line-height: 100%;
  order: 1;
}
.c-card--wc .c-card__place {
  order: 2;
}
.c-card__place--multi {
  font-size: 4rem;
  line-height: 1;
}
.c-card__place--img {
  background: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  color: inherit;
  line-height: 0;
}
.c-card__place--img img {
  display: block;
  height: 0.75em;
  width: auto;
}
/* 2行ロゴ（AUSTRALIA & NEW ZEALAND） */
.c-card__place--img-2line img {
  height: 1.25em;
}
/* 2行ロゴは幅が広いので段落ちさせない */
.c-card__meta:has(.c-card__place--img-2line) {
  flex-wrap: nowrap;
}
.c-card--ol .c-card__place--img {
  background: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
}
.c-card__text {
  font-size: 15px;
  line-height: 1.9;
  margin-bottom: 32px;
}
.c-card__text p + p {
  margin-top: 1em;
}
.c-card--ol .c-card__text {
  color: var(--color-white);
}
.c-card__action {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.c-card__coming-soon {
  display: none;
  font-family: var(--font-en-sub);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.85);
  text-transform: none;
}
/* is-coming-soon を外すと通常の MORE に戻る */
.c-card__action.is-coming-soon .c-more {
  pointer-events: none;
  cursor: default;
  background: #8a8a8a;
  box-shadow: 5px 5px 0 0 rgba(255, 255, 255, 0.45);
  color: #fff;
}
.c-card__action.is-coming-soon .c-more:hover,
.c-card__action.is-coming-soon .c-more:focus {
  background: #8a8a8a;
  color: #fff;
  box-shadow: 5px 5px 0 0 rgba(255, 255, 255, 0.45);
}
.c-card__action.is-coming-soon .c-more:hover::after,
.c-card__action.is-coming-soon .c-more:focus::after {
  transform: none;
}
.c-card__action.is-coming-soon .c-card__coming-soon {
  display: block;
}

@media (max-width: 640px) {
  .c-card {
    margin-bottom: 32px;
    border-radius: 20px;
  }
  .c-card__visual .c-photo-credit {
    font-size: 10px;
  }
  .c-card__body {
    padding: 16px 20px 40px;
  }
  .c-card__meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    margin-top: -40px;
    margin-bottom: 16px;
  }
  .c-card--wc .c-card__meta,
  .c-card--ol .c-card__meta {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    text-align: left;
  }
  .c-card__year {
    font-size: 6rem;
    line-height: 0.7;
    order: unset;
  }
  .c-card__place {
    font-size: 4rem;
    order: unset;
  }
  .c-card__place--multi {
    font-size: 2.4rem !important;
  }
  .c-card__text {
    font-size: 13px;
    margin-bottom: 24px;
  }
}
