@charset "utf-8";

body {
  color: #222222;
}


/* =========================================
　hero section
========================================= */
.hero-section{
    display: grid;
    place-items: center;    
    /* 古いブラウザ用のフォールバック */
    height: calc(65vh - 70px);
    /* モダンブラウザ用の動的ビューポート（アドレスバーの影響を受けない） */
    height: calc(65dvh - 70px);
    min-height: calc(65dvh - 70px);
}
.title-wrap{
    display: grid;
    width: 75vw;
    justify-items: left;
}
.hero-title{
    font-size: clamp(30px, 5vw, 48px);
    font-weight: bold;
    line-height: 1.5;
    text-align: start;
}

.content-wrapper {
  background-color: #fff; 
  /* 画像の上に食い込ませる（ネガティブマージン） */
  margin-top: -30px; 
  position: relative; /* 重なり順を安定させるため */
  z-index: 1;
}
.sub-title{
    font-size: 11px;
    font-weight: bold;
}
@media (min-width: 768px) {
    .title-wrap{
      display: grid;
      width: fit-content;
      justify-items: baseline;
      position: absolute;
  }
  .content-text {
    line-height: 2;
    position: absolute;
    top: 63%;
}

}

 @media (min-width: 1024px) {
    .hero-section{
        height: calc(50dvh - 70px);
        min-height: 400px;
        position: relative;
    }
}
.hero-wrapper {
  position: relative; /* 擬似要素の基準にする */
  line-height: 0;      /* 画像の下にできる謎の隙間を消す */
}

.hero-wrapper img {
  width: 100%;
  height: auto;
}

.hero-wrapper::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 36%; /* グラデーションの高さ */
/* 修正後（例：白100%の位置を100%から50%へ移動） */
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 1) 83%);
  pointer-events: none; /* 下の画像へのクリックを邪魔しない（念のため） */
}
/* =========================================
　各section
========================================= */

/* =========================================
know-how section
========================================= */

.know-wrap{
    display: grid;
    grid-template-columns: 1fr; /* 1カラム */
    gap: 16px;
    padding: 20px;
}
.structure{
    background: #d0fff0;

}
.structure-wrap{
    background: #fff;
    border-radius: 20px;
    margin-top: -25%;
}

/* SPでの並び順を調整 grid-area を指定 */
.title {
    grid-row: 1;
}
.image {
    grid-row: 2;
}
.text  {
    grid-row: 3;
    line-height: 2;
}
  /* know-howタイトル前の●CSS */
.title {
  display: flex;
  align-items: center;
  gap: 12px;        
  font-size: 20px;
  font-weight: 600; 

}

.title::before {
  content: "";        
  display: block;
  width: 25px;        
  height: 25px;       
  background-color: #ffd700; /* 黄色の指定（デザインの色コードに合わせてください） */
  border-radius: 50%;  /* 正方形を丸くする */
  flex-shrink: 0;      /* テキストが長くなってもドットが潰れないように固定 */
}

@media (min-width: 768px) {
  .know-wrap{
    display: grid;
    row-gap: 50px;
    width: 50vw;
    min-width: 630px;
    margin: 100px auto 50px;
    gap: 35px;
    padding: 20px;
    justify-items: center;
  }
  .title {
    grid-row: 1;
}
.text {
    grid-row: 2;
}

/* 
  .image {
    grid-area: img;
  }

  .title {
    line-height: 2;
    grid-area: title;
    align-self: end; 
  }
*/
  .text {
    width: 35vw;
    min-width: 500px;
    text-align: center;
    margin: auto;
  } 
}

  /* know-how画像レイアウト */

  /* ベースのリセット（figureのデフォルト余白を消す） */
.card-item {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center; /* キャプションを中央寄せにする場合 */
}

.card-img img {
  width: 70%;
  max-width: 350px;
  height: auto;
  display: block;
  margin: auto;
}

.card-caption {
  margin-top: 5px;
  font-size: 14px;
  text-align: center;
}

/* --- レイアウト制御 --- */

.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px; /* カード同士の隙間 */
}

/* SP版: 1カラム（100%） */
.card-item {
  width: 100%;
}

/* PC版: 2カラム */
@media (min-width: 768px) {
  .card-item {
    /* gap分を考慮して計算。2カラムなら (100% - gap) / 2 */
    width: calc((100% - 20px) / 2); 
  }
  
  .card-container {
    gap: 40px 20px; /* 行間を少し広めに取るなど調整可能 */
  }
}

/* =========================================
challenge section
========================================= */
/* .challenge {
  display: grid;
  place-items: center; 
  text-align: center;
  margin-top: -40px;
  width: 100%;
  min-height: 100vh; 
  background: url('../img/concept/sp/sp-challenge.png') no-repeat center / contain;
  padding: 10% 20px; 
} */

.challenge {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
  align-items: center; /* 上下中央 */
  justify-items: center; /* 左右中央 */
  width: 100%;
  overflow: hidden;
  margin-top: -50px;
}

.challenge-bg {
  grid-column: 1 / 2;
  grid-row: 1 / 2;
  width: 100%;
  height: auto;
  display: block; /* 下の謎の隙間を消す */
  z-index: 1;
}

.challenge-content {
  grid-column: 1 / 2;
  grid-row: 1 / 2;
  z-index: 2; /* 画像より上に */
  
  text-align: left;
  padding: 20px;
  /* 画像の顔に被らないように、marginやpaddingで位置を微調整 */
  margin-top: 20%; 
}

.challenge-title {
  /* background-color: #f9d41a;  */
  display: inline-block;
  padding: 4px 8px;
  margin-bottom: 20px;
  justify-self: self-end;
  text-align: left;
}
.challenge-text {
    color: #fff;
    background: rgba(0, 0, 0, 0.4);
    text-align: left;
    line-height: 2.2;
}
.challenge-title span {
  background-color: #f9d41a;
  color: #333;
  padding: 4px 8px; 
  line-height: 2.3;     
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
    font-weight: 500;
    font-size: clamp(22px, 3vw, 50px);
  
  /* インライン要素にする（背景を文字幅に合わせるため） */
  display: inline;
}

/* PC版: 2カラム */
@media (min-width: 768px) {
  .challenge-content {
    margin-top: 0;
    margin-left: 30%;
  }
  .challenge-title span {
    line-height: 2.1;
  }  
}

