/* トップページ専用スタイル */

/* ReasonページのFV説明文をスマホ幅でも1行に収める */
@media screen and (max-width: 768px) {
  body:has(.reason-detail) .page-fv__description {
    font-size: clamp(10px, 2.9vw, 13px);
    text-wrap: wrap;
  }
}

/* Reason Detail セクション */
.reason-detail {
  margin-top: 30px;
  background-color: #fff;
  color: #333;
  font-family: "Shippori Mincho", "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-weight: 400;
}

/* Reason一覧 */
.reason-detail__list {
  display: flex;
  flex-direction: column;
  max-width: 600px;
  margin-inline: auto;
}

/* PC */
@media screen and (min-width: 1024px) {
  .reason-detail__list {
    max-width: none;
    margin-inline: 0;
  }
}

/* Reason各項目 */
.reason-detail__item {
  position: relative;
  isolation: isolate;
  width: 100%;
  margin-top: 50px;
}

@media screen and (min-width: 769px) {
  .reason-detail__item {
    margin-top: 70px;
  }
}

@media screen and (min-width: 1024px) {
  .reason-detail__item {
    margin-top: 90px;
  }
}

/* 奇数Reasonの背景画像 */

/* Reason 背景画像 */
.reason-detail__item--bg::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: url("/system_panel/uploads/images/reason_bg.png");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  pointer-events: none;
}

/* 600〜1023pxでは、600px幅の一覧から背景を画面の両端まで広げる */
@media screen and (min-width: 600px) and (max-width: 1023px) {
  .reason-detail__item--bg::before {
    left: calc(50% - 50vw);
    right: calc(50% - 50vw);
  }
}

/* PC：背景画像を上へ移動 */
@media screen and (min-width: 1024px) {
  .reason-detail__item--bg::before {
    top: -70px;
    bottom: -92px;
    transform: none;
  }
}

/* Reason Detail インナー */
.reason-detail__inner {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 30px;
  width: 100%;
  max-width: 1920px;
  margin-inline: auto;
  padding-inline: 20px;
}

/* タブレット */
@media screen and (min-width: 769px) {
  .reason-detail__inner {
    gap: 40px;
    padding-inline: 25px;
  }
}

/* PC */
@media screen and (min-width: 1024px) {
  .reason-detail__inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    padding-inline: 0;
  }
}

/* テキストエリア */
.reason-detail__content {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
}

/* PC */
@media screen and (min-width: 1024px) {
  .reason-detail__content {
    width: calc(100% - clamp(30px, 5.46875vw, 105px) - 25px);
    max-width: 495px;
  }
  /* 奇数：左側テキスト */
  .reason-detail__item:not(.reason-detail__item--reverse) .reason-detail__content {
    grid-column: 1;
    grid-row: 1;
    justify-self: end;
    margin-right: clamp(30px, 5.46875vw, 105px);
  }
  /* 偶数：右側テキスト */
  .reason-detail__item--reverse .reason-detail__content {
    grid-column: 2;
    grid-row: 1;
    justify-self: start;
    margin-left: clamp(30px, 5.46875vw, 105px);
  }
}

/* 英字Reason番号 */
.reason-detail__number {
  margin: 0;
  color: #c0b1a3;
  font-family: "Mrs Saint Delafield", cursive;
  font-size: 28px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.05em;
}

@media screen and (min-width: 769px) {
  .reason-detail__number {
    font-size: 30px;
  }
}

@media screen and (min-width: 1024px) {
  .reason-detail__number {
    font-size: 32px;
  }
}

/* 日本語タイトル */
.reason-detail__title {
  margin: 15px 0 0;
  color: #333;
  font-size: 24px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.05em;
  overflow-wrap: anywhere;
}

/* 眉だけでなく、目元や唇にも対応 */
@media screen and (max-width: 768px) {
  .reason-detail__title {
    font-size: 22px;
    letter-spacing: 0;
    word-break: normal;
    overflow-wrap: normal;
    line-break: strict;
  }
}

@media screen and (min-width: 1024px) {
  .reason-detail__title {
    font-size: 36px;
  }
}

/* リード文 */
.reason-detail__lead {
  margin: 25px 0 0;
  color: #665f53;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: 0.05em;
  overflow-wrap: anywhere;
}

@media screen and (min-width: 769px) {
  .reason-detail__lead {
    font-size: 20px;
  }
}

@media screen and (min-width: 1024px) {
  .reason-detail__lead {
    margin-top: 30px;
    font-size: 24px;
  }
}

/* 説明文 */
.reason-detail__text {
  margin: 25px 0 0;
  color: #333;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.875;
  letter-spacing: 0.05em;
  text-wrap: initial;
  overflow-wrap: anywhere;
}

@media screen and (min-width: 769px) {
  .reason-detail__text {
    font-size: 15px;
  }
}

@media screen and (min-width: 1024px) {
  .reason-detail__text {
    margin-top: 30px;
    font-size: 16px;
  }
}

/* Reason Detail 画像 */
.reason-detail__image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 930/600;
  object-fit: cover;
  object-position: center;
}

/* PC */
@media screen and (min-width: 1024px) {
  .reason-detail__image {
    width: 100%;
    max-width: 930px;
    height: auto;
  }
  /* 奇数：右側画像 */
  .reason-detail__item:not(.reason-detail__item--reverse) .reason-detail__image {
    grid-column: 2;
    grid-row: 1;
    justify-self: start;
  }
  /* 偶数：左側画像 */
  .reason-detail__item--reverse .reason-detail__image {
    grid-column: 1;
    grid-row: 1;
    justify-self: end;
  }
}

/* Reason05と06の間の文章ボックス */
.reason-detail__notice {
  position: relative;
  z-index: 2;
  box-sizing: border-box;
  width: calc(100% - 40px);
  max-width: 950px;
  margin: 40px auto;
  padding: 30px 20px;
  border: 1px solid #c0b1a3;
  background-color: #fff;
}

@media screen and (min-width: 769px) {
  .reason-detail__notice {
    width: calc(100% - 50px);
    padding: 35px 40px;
  }
}

@media screen and (min-width: 1024px) {
  .reason-detail__notice {
    margin-top: 40px;
    margin-bottom: 60px;
    padding: 40px 50px;
  }
}

/* 文章ボックス内の見出し */
.reason-detail__notice-title {
  width: fit-content;
  max-width: 100%;
  margin: 0;
  padding-bottom: 4px;
  border-bottom: 1px solid #c0b1a3;
  color: #665f53;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: 0.05em;
}

@media screen and (min-width: 1024px) {
  .reason-detail__notice-title {
    font-size: 22px;
  }
}

/* 文章ボックス説明文 */
.reason-detail__notice-text {
  margin: 15px 0 0;
  color: #333;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.875;
  letter-spacing: 0.05em;
  overflow-wrap: anywhere;
}

@media screen and (min-width: 769px) {
  .reason-detail__notice-text {
    font-size: 15px;
  }
}

@media screen and (min-width: 1024px) {
  .reason-detail__notice-text {
    font-size: 16px;
  }
}

/* Related セクション（共通） */
.related {
  padding-block: 80px;
  background-color: #fff;
  color: #665f53;
  font-family: "Shippori Mincho", "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-weight: 400;
}

@media screen and (min-width: 769px) {
  .related {
    padding-block: 100px;
  }
}

@media screen and (min-width: 1024px) {
  .related {
    padding-block: 120px;
  }
}

/* Related インナー */
.related__inner {
  box-sizing: border-box;
  width: 100%;
  max-width: 1250px;
  margin-inline: auto;
  padding-inline: 20px;
}

@media screen and (min-width: 769px) {
  .related__inner {
    padding-inline: 25px;
  }
}

/* Related 共通見出し */
.related__heading {
  text-align: center;
}

/* Related 日本語タイトル */
.related .section-title__ja {
  margin-top: 20px;
}

@media screen and (min-width: 769px) {
  .related .section-title__ja {
    font-size: 32px;
  }
}

@media screen and (min-width: 1024px) {
  .related .section-title__ja {
    font-size: 40px;
    line-height: 1.5;
  }
}

/* Related ボタン一覧 */
.related__buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  margin-top: 50px;
}

@media screen and (min-width: 769px) {
  .related__buttons {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 25px;
  }
}

@media screen and (min-width: 1024px) {
  .related__buttons {
    gap: 35px;
    margin-top: 60px;
  }
}

/* Keep content clear of the fixed desktop buttons. */
@media screen and (min-width: 1024px) and (max-width: 1399px) {
  .reason-detail__inner {
    padding-inline-end: 110px;
  }
  .reason-detail__notice,
  .related__inner {
    width: calc(100% - 135px);
    margin-inline-end: 110px;
  }
  .reason-detail__notice {
    margin-inline-end: max(110px, (100% - 950px) / 2);
  }
}
