/* ===== MESSAGE CONTENT ===== */
.msg-content {
  background: var(--bg);
  padding: 80px 0 120px;
  position: relative;
  overflow: hidden;
}
.msg-content__inner {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 max(40px, calc((100% - 1300px) / 2));
  display: flex;
  flex-direction: column;
  gap: 80px;
  position: relative;
  z-index: 1;
}

/* 記事アイテム */
.msg-item {
  display: flex;
  align-items: flex-end;
  gap: 40px;
  position: relative;
}
.msg-item--reverse {
  flex-direction: row-reverse;
}
.msg-item__photo {
  flex-shrink: 0;
  width: 597px;
  height: 446px;
  overflow: hidden;
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity .65s ease, transform .65s ease;
}
.msg-item.is-inview .msg-item__photo {
  opacity: 1;
  transform: translateX(0);
}
.msg-item__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.msg-item__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 17px;
  position: relative;
  z-index: 1;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .55s ease .2s, transform .55s ease .2s;
}
.msg-item.is-inview .msg-item__body {
  opacity: 1;
  transform: translateY(0);
}
.msg-item__heading {
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 500;
  font-size: 32px;
  line-height: 1.2;
  color: #000;
}
.msg-item__num {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: 64px;
  line-height: 1;
  color: var(--orange);
  vertical-align: text-bottom;
  margin-right: 2px;
}
.msg-item__text {
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 31px;
  color: #000;
}

/* アイテム内透かしアイコン（テキスト部の後ろ） */
.msg-item__deco {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(calc(-50% + 80px));
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
}
.msg-item--reverse .msg-item__deco {
  right: auto;
  left: 0;
}
.msg-item__deco img {
  width: 378px;
  height: auto;
  display: block;
  filter: brightness(0) saturate(100%) invert(83%) sepia(15%) saturate(210%) hue-rotate(340deg);
}

/* 装飾アイコン */
.msg-deco {
  position: absolute;
  bottom: 80px;
  right: calc(max(40px, calc((100% - 1300px) / 2)) - 40px);
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity .6s ease .4s;
}
.msg-deco.is-inview {
  opacity: 1;
}
.msg-deco img {
  width: 500px;
  height: auto;
  aspect-ratio: 469.49 / 329.08;
  display: block;
  filter: brightness(0) saturate(100%) invert(83%) sepia(15%) saturate(210%) hue-rotate(340deg);
}

/* ===== 1101px以上 ===== */
@media (min-width: 1101px) {
  .msg-item__deco {
    transform: translateY(calc(-50% + 130px));
  }
}

/* ===== 901px〜1100px: 白枠右端をコンテンツ内側に揃える ===== */
@media (min-width: 901px) and (max-width: 1100px) {
  .page-hero__intro {
    margin-right: max(40px, calc((100vw - 1300px) / 2));
  }
}

/* ===== 1100px以下 ===== */
@media (max-width: 1100px) {
  .msg-item__photo { width: 45%; height: auto; aspect-ratio: 4 / 3; }
  .msg-deco img { width: 380px; }
}

/* ===== 900px以下 ===== */
@media (max-width: 900px) {
  .msg-content { padding: 30px 0 80px; }
  .msg-content__inner { padding: 0 24px; gap: 60px; }

  .msg-item,
  .msg-item--reverse {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
  .msg-item__photo {
    width: 100%;
    height: 240px;
    aspect-ratio: unset;
  }
  .msg-item__heading { font-size: 26px; }
  .msg-item__text { font-size: 15px; line-height: 1.9; }
  .msg-item__deco img { width: 331px; }
  .msg-item__deco,
  .msg-item--reverse .msg-item__deco {
    right: 0;
    left: auto;
  }
  .msg-deco {
    bottom: 70px;
    right: 14px;
    opacity: 1;
  }
  .msg-deco img { width: 260px; }
}

/* ===== 500px以下 ===== */
@media (max-width: 500px) {
  .msg-item__heading { font-size: 22px; }
  .msg-deco {
    position: absolute;
    top: 350px;
    bottom: auto;
    right: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 1;
    padding: 0;
    display: block;
  }
  .msg-deco img { width: 200px; }
}
