@charset "utf-8";

/* 全体の体裁 */
.section_contents_1 {
  margin-top: 3em;
}
.section_contents_2, .section_contents_3, .section_contents_4 {
  margin-top: 5em;
}
.section_contents_2 a {
  color: black;
  text-decoration: none;
}
.column_2, .column_4, .column_5 {
  margin-top: 3em;
}

/* 吹き出し */
.speechBubble {
  position: relative;
  display: inline-block;
  margin-bottom: 20px;
  padding: 15px;
  border-radius: 10px;
  background-color: var(--accent-color);
  text-align: left;
  font-size: clamp(14px, 1.5vw, 20px);
  font-weight: 400;
  line-height: 1.5;
  color: var(--color-white);
}
.speechBubble::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 17%;
  border-style: solid;
  border-width: 20px 10px 0 10px;
  border-color: #ea5532 transparent transparent;
  translate: -50% calc(100% - 1px);
}

/* 小見出し */
.large {
  font-size: clamp(14px, 1.5vw, 20px);
  font-weight: bold;
  margin: 0;
}
h6 .large {
  font-size: clamp(16px, 1.7vw, 22px);
}
/* 小さい注釈 */
.notes {
  line-height: 1.3;
}
.small {
  font-size: clamp(10px, 0.8vw, 14px);
}

/* マーカー */
.marker {
  background:linear-gradient(transparent 50%, var(--line-color) 50%);
  display: inline;
  background-repeat: no-repeat;
  background-size: 0% 100%;
  transition:background-size 1.5s;
}
.marker.on {
  background-size: 100% 100%;
}
.fa-solid {
  font-size: clamp(14px, 1.5vw, 20px);
}

/* 関連記事 */
.article {
  padding: 1.5em 1.5em;
  margin: 2em 0;
  font-weight: bold;
  border: solid 3px var(--main-color);
}
.article_title {
  margin: 0 0 5px 0;
  font-size: clamp(14px, 1.3vw, 20px);
}
.article p {
  margin-left: 0;
}
.article:hover {
  background-color: var(--main-color);
  color: var(--color-white);
}
.space {
  font-weight: 400;
}
.article_link p {
  line-height: 2;
}
.article_link img {
  width: 40%;
}

.btn_box{
  width: 100%;
  margin: 0;
}

.animation{
  color: #000;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .1em;
  text-align: center;
  line-height: 50px;
  width: 220px;
  height: 50px;
  background: #FFF;
  margin: auto;
  position: relative;
  display: block;
  overflow: hidden;
  transition: 0.5s;
  border-radius: 100px;
  text-decoration: none;
}
.animation:after {
  font-family: "FontAwesome";
  content: "\f101";
  position: absolute;
  right: 20px;
}
.animation:hover:after {
  animation: fuwafuwa .5s linear infinite;
}
@keyframes fuwafuwa{
 0%{transform:translateX(0)}
 50%{transform:translateX(-5px)}
 100%{transform:translateX(0)}
}


/* topics1の体裁 */
.emphasis {
  font-weight: bold;
  margin: 0 0 5% 0;
}
.ply_img {
  width: 100%;
  position: relative;
  z-index: 1;
}
.ply p {
  margin: 0;
}
.figure {
  text-align: center;
}
.seal p {
  margin: 0;
}
.ply {
  display: flex;
  gap: 2px;
  line-height: 1.5;
}
.image_1 {
  text-align: center;
}
.image_1 img {
  width: 90%;
  margin-top: 4vw;
  position: relative;
  z-index: 1;
}
.image_3 {
  max-width: 70%;
  margin-top: 4vw;
  position: relative;
  z-index: 1;
}
.seal_img {
  width: 60%;
  position: relative;
  z-index: 1;
}

/* 時差でフェードインする画像 */
.overlap_img {
  position: relative;
  text-align: center;
  overflow: hidden;
}
.image_front {
  text-align: center;
  margin: 1em auto;
  width: 100%;
  height: auto;
  display: block;
}
/* 2枚目以降の重ねる画像 */
.image_behind {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  object-fit: cover; /* 画像比率が微妙にずれても綺麗にフィットさせる */
  /* アニメーション用（初期状態で隠す場合） */
  opacity: 0;
  transform: scale(0.8); /* 0.8倍の大きさ */
  
  /* スムーズなアニメーション設定 */
  transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1), /* 滑らかな動き */
              opacity 1.0s ease-out;
}
/* （例）画面内に入ったら上の画像を表示させる場合 */
.overlap_img.is-active .image_behind {
  opacity: 1;
  transform: scale(1);
}
.ol1 {
  width: 80%;
  margin: 0 auto;
}

/* 矢印 */
.arrow {
  text-align: center;
}
.arrow img {
  width: 10%;
  opacity: 0;
  transform: translateY(-50%);
  animation-fill-mode: forwards;
}
.arrow.is-active img {
  animation: slideInT 2s ease-in-out forwards;
}
@keyframes slideInT {
  from { 
    transform: translateY(-50%);
    opacity: 0;
  }
  to { 
    transform: translateY(0%);
    opacity: 1; 
  }
}
.arrow_right {
  display: none;
}

/* 枠線アニメーション */
.responsive-border-box {
  position: relative;
  /* 横幅の制限を整理（width: 80% と min-width: 100% がぶつかっているため） */
  width: 100%;
  margin: 0 auto;
  /* 【ここを修正】高さを固定せず、中身に合わせて自動で伸ばす */
  height: auto;
  min-height: auto; 
  /* flex を解除するか、上揃え＆縦並びにする */
  display: block; 
  /* 枠線と中身の文字が被らないように内側に余白を作る */
  padding: 24px; 
  box-sizing: border-box;
  background-color: var(--bg-color);
  color: var(--color-black);
}
.responsive-border-box svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* 要素からはみ出ないように設定 */
  pointer-events: none;
}
.responsive-border-box rect {
  fill: transparent;
  stroke: var(--accent-color);
  stroke-width: 4px;
  /* 【最重要】要素のサイズが変わっても線の太さを一定に保つ設定 */
  vector-effect: non-scaling-stroke;
  /* 
    画面幅が変わると外周の長さが変わるため、
    pathLength="1" を使って線全体の長さを「1」として統一管理します
  */
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}
.responsive-border-box.is-active rect {
  animation: drawStroke 2s forwards ease-in-out;
}
@keyframes drawStroke {
  to {
    stroke-dashoffset: 0;
  }
}

.contents_box {
  padding: 5%;
  text-align: center;
}
.contents_box p {
  text-align: left;
  margin: 0 0 7%;
}
.contents_box img{
  width: 100%;
}

.image_7 {
  text-align: center;
}
.image_7 img{
  width: 80%;
  max-width: 700px;
  height: auto;
  position: relative;
  z-index: 1;
}
.image_8 {
  text-align: center;
  width: 100%;
}
.image_8 img {
  width: 100%;
  position: relative;
  z-index: 1;
}

/* 時差でフェードインする画像 */
.overlap2_img .sp {
  display: none;
}
.overlap2_img {
  position: relative;
  text-align: center;
  overflow: hidden;
  max-width: 900px;
  margin: 0 auto;
}
.image2_front {
  text-align: center;
  margin: 1em auto;
  width: 100%;
  height: auto;
  display: block;
}
/* 2枚目以降の重ねる画像 */
.image2_behind {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  object-fit: cover; /* 画像比率が微妙にずれても綺麗にフィットさせる */
  opacity: 0;
  transform: scale(0.8);
  /* アニメーション用（初期状態で隠す場合） */
  transition: transform 2.0s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 1.0s ease-out;
}
/* 画面内に入った時（is-activeが付与された時）の表示状態 */
.overlap2_img.is-active .image2_behind {
  opacity: 1;
  transform: scale(1);
}
/* 表示タイミングを順番に遅らせる設定（transition-delay） */
.overlap2_img.is-active .image2_behind.img_ma { transition-delay: 0.2s; }
.overlap2_img.is-active .image2_behind.img_go { transition-delay: 0.8s; }
.overlap2_img.is-active .image2_behind.img_ha { transition-delay: 1.4s; }
.overlap2_img.is-active .image2_behind.img_ya { transition-delay: 2.0s; }
.overlap2_img.is-active .image2_behind.img_sa { transition-delay: 2.6s; }
.overlap2_img.is-active .image2_behind.img_si { transition-delay: 3.2s; }
.overlap2_img.is-active .image2_behind.img_i { transition-delay: 3.8s; }
.overlap2_img.is-active .image2_behind.img_yo { transition-delay: 4.4s; }


/* レスポンシブ */
/* PC用　画面幅が600px以上の場合に適用 */
@media (min-width: 600px) {
  .article_link {
    display: flex;
  }
  .article_link p {
    line-height: 2.5;
    margin: 0 0 1em 10px;
  }
  .article_link a {
    margin-left: 1em;
  }
  .article_link img {
    width: 30%;
    height: 30%;
  }
  .column_1 {
    display: grid;
    grid-template-columns: 68% 30%;
    grid-template-rows: 55% 45%;
    column-gap: 2%;
    align-items: center;
  }
  .column_1 p {
    grid-row: 1 / 2;
    grid-column: 1 / 2;
  }
  .ply {
    display: block;
    grid-row: 1 / 3;
    grid-column: 2 / 3;
    width: fit-content;
    object-fit: cover;
  }
  .ply img {
    margin-top: 1rem;
  }
  .image_1  img{
    grid-row: 2 / 3;
    grid-column: 1 / 2;
    margin: auto 0;
  }
  .figure {
    display: flex;
    gap: 1rem;
    justify-content: space-evenly;
    align-items: center;
    margin-top: 2rem;
  }
  .seal_img {
    max-width: 400px;
  }
  .seal p {
    width: 100%;
  }
  .seal {
    width: 30%;
  }
  .image_3 {
    max-width: 400px;
    margin: 0;
  }
  .salt {
    display: flex;
  }
  .salt_text {
    flex: 1.5;
  }
  .ol1 {
    flex: 1;
    margin: auto 0;
  }
  .salt_img {
    width: 200%;
  }
  .potassium_img {
    display: grid;
    grid-template-columns: 46% 15% 35%;
    grid-template-rows: 1fr;
    column-gap: 2%;
    align-items: center;
  }
  .potassium .arrow {
    display: none;
  }
  .ol2 {
    grid-column: 1 / 2;
  }
  .arrow_right {
    width: 100%;
    display: block;
    grid-column: 2 / 3;
    text-align: center;
  }
  .arrow_right img {
    width: 60%;
    opacity: 0;
    transform: translateX(-50%);
    animation-fill-mode: forwards;
  }
  .arrow_right.is-active img {
    animation: slideInTT 2s ease-in-out forwards;
  }
  @keyframes slideInTT {
    from { 
      transform: translateX(-50%);
      opacity: 0;
    }
    to { 
      transform: translateX(0%);
      opacity: 1; 
    }
  }
  .image_7 img {
    max-width: 80%;
    margin: auto 0;
    grid-column: 3 / 4;
  }
  .image_8 img {
    max-width: 600px;
  }
  .potassium .overlap_img {
    width: 100%;
  }
  .image_front, .image_behind {
    max-width: 500px;
  }
}

/* PC用　画面幅が960px以上の場合に適用 */
@media (min-width: 960px) {
  .section_contents {
    width: 80%;
    padding-top: 2%;
  }
  .contents_box img{
    max-width: 600px;
  }
  .article {
    margin: 3em 5em;
  }
  .image_8 img {
    max-width: 600px;
  }
}

/* PC用　画面幅が1200px以上の場合に適用 */
@media (min-width: 1200px) {
  .article_link p {
    margin: 0 0 10px 1em;
  }
  .article_link a {
    margin-left: 1em;
  }
}

/* PC用　画面幅が1700px以上の場合に適用 */
@media (min-width: 1700px) {
  .section_contents {
    width: 65%;
  }
  .column_1 {
    grid-template-columns: 63% 32%;
    column-gap: 5%;
  }
}

/* スマホ・タブレット用　画面幅が520px以下の場合に適用 */
@media (max-width: 520px) {
  .overlap2_img {
    image-rendering: -webkit-optimize-contrast;
  }
}

/* スマホ・タブレット用　画面幅が450px以下の場合に適用 */
@media (max-width: 450px) {
  .box1::before {
    border: 1.5px solid var(--color-gray);
  }
  .article_link img {
    width: 100%;
  }
  .image_3 {
    width: 100%;
  }
  .overlap2_img .sp {
    display: block;
  }
  .overlap2_img .pc {
    display: none;
  }
  .contents_box {
    padding: 0;
  }
}