/*
 * whats-new.css - WHAT'S NEW セクション
 * Why: Figmaデザインに合わせて、グレー背景の上に
 *      2段3列の縦長カードとピンク装飾を配置する。
 */

.section-whats-new {
  --wn-bg-max-width: 1472px;
  position: relative;
  padding: clamp(84px, 8vw, 144px) 0 clamp(96px, 9vw, 160px);
  overflow: hidden;
}

.section-whats-new .section-inner {
  position: relative;
  z-index: 1;
  padding-left: clamp(24px, 5.2vw, 96px);
  padding-right: clamp(24px, 5.2vw, 96px);
}

.section-whats-new .section-heading {
  margin-bottom: clamp(28px, 3.2vw, 54px);
}

.section-whats-new .section-heading__en {
  color: var(--color-magenta);
  /* font-size: clamp(2.75rem, 5vw, 5rem); */
}

.section-whats-new .section-heading__ja {
  margin-top: 10px;
  color: var(--color-black);
}

.section-whats-new__list {
  display: flex;
  flex-direction: column;
  gap: clamp(44px, 6vw, 88px);
}

.section-whats-new__list--mobile {
  display: none;
}

.section-whats-new__list--desktop {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.section-whats-new__list--desktop .section-whats-new__row {
  width: 100vw;
  padding: 0 5vw;
  overflow: visible;
}

.section-whats-new__row {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 0;
  row-gap: 0;
  align-items: start;
}

.section-whats-new__row::before {
  content: "";
  position: absolute;
  z-index: 0;
  /* Overflow rule: odd rows (left bg) are anchored to the left edge. */
  left: 0;
  right: auto;
  top: auto;
  bottom: 18px;
  width: clamp(700px, 100vw, var(--wn-bg-max-width));
  aspect-ratio: 1472 / 768;
  background: url("../../img/top/whatsNew/background_left.png") no-repeat left
    center / cover;
  transform: none;
  pointer-events: none;
}

.section-whats-new__row:nth-child(even)::before {
  /* Overflow rule: even rows (right bg) are anchored to the right edge. */
  left: auto;
  right: 0;
  top: auto;
  bottom: 18px;
  background-image: url("../../img/top/whatsNew/background_right.png");
  background-position: right center;
}

.section-whats-new__item {
  position: relative;
  z-index: 1;
}

.section-whats-new__item:nth-child(2) {
  margin-top: clamp(-56px, -2.8vw, -32px);
}

.section-whats-new__item:nth-child(3) {
  margin-top: clamp(-112px, -5.6vw, -64px);
}

.section-whats-new .article-card-large {
  display: block;
  color: inherit;
  cursor: pointer;
}

.section-whats-new .article-card-large__frame {
  display: flex;
  flex-direction: column;
  min-height: clamp(490px, 50vw, 570px);
  padding: 0px 18px 22px;
  border: 1.5px solid var(--color-black);
  border-radius: 34px;
  background: var(--color-white);
}

.section-whats-new .article-card-large__category {
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 106px;
  min-height: 20px;
  padding: 3px 14px;
  border-radius: 6px;
  border-top-left-radius: 0px;
  border-top-right-radius: 0px;
  background: var(--color-magenta);
  color: var(--color-white);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.section-whats-new .article-card-large__thumb-wrap {
  position: relative;
  margin-top: 6px;
  padding: 0 18px;
}

.section-whats-new .article-card-large__thumb {
  position: relative;
  z-index: 1;
  overflow: hidden;
  border: 1.5px solid var(--color-black);
  border-radius: 24px;
  background: #f3f3f3;
}

.section-whats-new .article-card-large__thumb-wrap::after {
  content: "";
  position: absolute;
  z-index: 0;
  top: 6px;
  left: 24px;
  right: 12px;
  bottom: -6px;
  border: 1.5px solid var(--color-black);
  border-radius: 24px;
  pointer-events: none;
}

.section-whats-new .article-card-large__thumb img,
.section-whats-new .article-card-large__thumb .placeholder-image {
  width: 100%;
  aspect-ratio: 556 / 740;
  object-fit: cover;
}

.section-whats-new .article-card-large__side-text {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-en-ui);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  line-height: 1;
  white-space: nowrap;
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

.section-whats-new .article-card-large__side-text--left {
  left: -4px;
}

.section-whats-new .article-card-large__side-text--right {
  right: -4px;
}

.section-whats-new .article-card-large__arrow {
  position: absolute;
  right: -14px;
  top: auto;
  bottom: 23px;
  width: 52px;
  height: 52px;
  z-index: 1;
}

.section-whats-new .article-card-large__arrow img {
  width: 100%;
  height: 100%;
  display: block;
}

.section-whats-new .article-card-large__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 14px 12px 0;
}

.section-whats-new .article-card-large__title {
  margin: 0;
  color: var(--color-black);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.45;
}

.section-whats-new .article-card-large__title span {
  background: none;
  padding: 0;
}

.section-whats-new .article-card-large__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  margin-top: auto;
  padding-top: 18px;
}

.section-whats-new .article-card-large__tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 3px 10px;
  border-radius: 4px;
  background: var(--color-black);
  color: var(--color-white);
  font-size: 10px;
  line-height: 1;
  white-space: nowrap;
}

.section-whats-new__cta-stack {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-top: clamp(18px, 2.4vw, 34px);
}

.section-whats-new__view-all {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-base);
}

.section-whats-new__view-all:hover {
  transform: translateY(-2px);
}

.section-whats-new__view-all img {
  width: 96px;
  height: auto;
  display: block;
}

@media (min-width: 1025px) {
  .section-whats-new__list--desktop {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
  }

  .section-whats-new__list--desktop .section-whats-new__row {
    width: 100vw;
    padding: 0 5vw;
    grid-template-columns: repeat(3, 344px);
    justify-content: center;
    row-gap: 0;
  }

  .section-whats-new .article-card-large__frame {
    width: 344px;
    max-width: 100%;
  }

  .section-whats-new__list--desktop .section-whats-new__row::before {
    top: auto;
    bottom: -50px;
  }

  .section-whats-new__list--desktop
    .section-whats-new__row:nth-child(even)::before {
    top: auto;
    bottom: -50px;
  }
}

@media (max-width: 1024px) {
  .section-whats-new {
    padding-top: 72px;
    padding-bottom: 96px;
  }

  .section-whats-new__list {
    gap: 56px;
  }

  .section-whats-new__row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .section-whats-new__item:nth-child(2) {
    margin-top: -26px;
  }

  .section-whats-new__item:nth-child(3) {
    margin-top: -52px;
  }

  .section-whats-new .article-card-large__frame {
    min-height: 0;
  }
}

@media (max-width: 767px) {
  .section-whats-new {
    padding-top: 60px;
    padding-bottom: 30px;
  }

  .section-whats-new .section-heading {
    margin-bottom: 26px;
  }

  /* .section-whats-new .section-heading__en {
    font-size: clamp(2.3rem, 12vw, 3.4rem);
  } */
  .section-heading__en {
    font-size: 44px;
  }
  .section-whats-new__list {
    gap: 34px;
  }

  .section-whats-new__list--desktop {
    display: none;
  }

  .section-whats-new__list--mobile {
    display: flex;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding-top: 20px;
  }

  .section-whats-new__list--mobile .section-whats-new__row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 0;
    row-gap: 0;
    width: 100vw;
    padding: 0 5vw;
    overflow: visible;
  }

  .section-whats-new__list--mobile .section-whats-new__row::before {
    /* SP: max 1000px to avoid oversized backgrounds at wider SP viewports. */
    width: min(184.6vw, 1000px);
    left: -326px;
    right: auto;
    top: auto;
    bottom: -36px;
    transform: none;
  }

  .section-whats-new__list--mobile
    .section-whats-new__row:nth-child(even)::before {
    left: auto;
    right: -326px;
    top: auto;
    bottom: 36px;
    transform: none;
  }

  .section-whats-new__item:nth-child(2) {
    margin-top: -16px;
  }

  .section-whats-new__item:nth-child(3) {
    margin-top: 0;
  }

  .section-whats-new .article-card-large__frame {
    padding: 0px 12px 18px;
    border-radius: 28px;
  }

  .section-whats-new .article-card-large__thumb-wrap {
    padding: 0 14px;
  }

  .section-whats-new .article-card-large__thumb {
    border-radius: 22px;
  }

  .section-whats-new .article-card-large__thumb-wrap::after {
    top: 5px;
    left: 19px;
    right: 9px;
    bottom: -5px;
    border-radius: 22px;
  }

  .section-whats-new .article-card-large__side-text {
    top: 50%;
    transform: translateY(-50%);
    font-size: 6px;
    letter-spacing: 0.12em;
  }

  .section-whats-new .article-card-large__arrow {
    right: -8px;
    top: auto;
    bottom: -2px;
    width: 44px;
    height: 44px;
  }

  .section-whats-new .article-card-large__title {
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .section-whats-new .article-card-large__body {
    padding-left: 0px;
    padding-right: 0px;
  }

  .section-whats-new__cta-stack {
    margin-top: 20px;
    gap: 0;
  }

  .section-whats-new__view-all img {
    width: 96px;
  }
}
