/* メイン画像 */
.mainimg {
  position: relative;
  width: 100%;
}

.mainimg img {
  width: 100%;
  height: auto;
  display: block;
}

/* PC画面では画像サイズを縮小（高さが結果的に半分になる） */
@media (min-width: 769px) {
  .mainimg img {
    width: 50%;   /* 横幅を半分に → 高さも自動で半分になる */
    margin: 0 auto;
  }
}

/*見出し
-------------------------------------*/
.title {
    text-align: center;
}

.title h2 {
    position: relative;
    display: inline-block; /* テキスト幅に合わせる */
    margin: 2.8rem auto 0.6rem; /* 上に余白を多め、下は控えめ */
    padding-bottom: 1.6rem;
    font-size: clamp(1.8rem, 4vw, 2.8rem); /* PCで大きく、スマホで自動調整 */
    color: #160a57;
    font-weight: 700; 
}

@media (max-width: 600px) {
  .title h2 {
    font-size: 1.6rem;   /* ← PCより小さくする */
    padding-bottom: 1.2rem; 
    display: block;      /* ← inline-block のままだと改行しやすい */
  }
}

.title h2::after {
    content: "";
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(to right, #95ddec,#4d4498);
    margin: 1.4rem auto 0; 
    border-radius: 2px;
}

/* ---------------------------------------------------------
   サブタイトル
   --------------------------------------------------------- */

.s-sub {
    position: relative;
    margin-top: 2.8rem;
    margin-bottom: 0.8rem;

    font-size: 18px;
    line-height: 1.6;
    color: #333;
    font-weight: 600;
}

/* サブタイトル前の小さなライン */
.s-sub::before {
    content: "";
    display: inline-block;
    width: 20px;
    height: 2px;
    margin-right: 0.6rem;
    vertical-align: middle;
    background-color: #4d4498;
}


/*レイアウト
-------------------------------------*/
section {
    padding-bottom: 0.1rem; /* セクション間の余白を統一 */
}

.text-container {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 1rem;

    text-align: justify;   
    text-justify: inter-ideograph; 
    hyphens: auto;        
}

.row.flow {
  display: block !important;
}

.col.span-9 {
  margin: 0 auto;
  float: none;      /* float がある場合は解除 */
}


/* 見出し */
.flow.row {
    margin-bottom: 1.0rem;
}

.s-title2 {
  font-size: 1.2em; 
  color: #160a57;
  font-weight: bold;
}

@media (max-width: 600px) {
  .s-title2 {
    font-size: 1.1em; 
    line-height: 1.4; 
  }
}

.s-sub{
    font-size: 1.0em;
    font-weight: bold;
    margin-top: 2rem;
    margin-bottom: 0.5rem;
}

/* 画像 */
.photo-row {
  display: flex;
  justify-content: center;
  gap: 20px;        
  flex-wrap: wrap;  
  margin: 40px auto;
}

.photo-item {
  width: 265px;     
  height: auto;
  border-radius: 8px; 
}

@media (max-width: 600px) {
  .photo-item {
    width: 90%;
  }
}

.full-width-photo {
  width: 100%;
  margin: 40px auto;
  text-align: center;
}

.wide-photo {
  width: 100%;
  max-width: 1400px;  
  height: auto;
  border-radius: 8px;
}

/* ---------------------------------------------------------
   通常リンク
   --------------------------------------------------------- */

.s-link {
    position: relative;
    display: inline;
    color: #4d4498;
    text-decoration: none;
    line-height: 1.8;

    background-image: linear-gradient(
        to right,
        #4d4498,
        #4d4498
    );
    background-size: 0 1px;
    background-position: left bottom;
    background-repeat: no-repeat;

    transition: background-size 0.3s ease;
}

.s-link:hover {
    background-size: 100% 1px;
}



/* ==========================================
   フッターを中央（2番目のカラム位置）に配置＆テキスト中央揃え
   ========================================== */

/* フッター内のテキストをすべて中央揃えにする */
.footer-block {
    text-align: center !important;
}

/* PC表示時（768px以上）：グリッドの左から4カラム分空けて中央に配置 */
@media screen and (min-width: 768px) {
    .footer-flex {
        display: flex !important;
        flex-direction: row !important;
    }

    .footer-flex .footer-block {
        /* offset-4 と同等の計算（全12カラム中の左4カラム分の空域） */
        margin-left: 34.6666666667% !important;
        max-width: 30.6666666667% !important;
        flex: 0 0 30.6666666667% !important;
    }
}

/* スマホ表示時（767px以下）：全幅で表示 */
@media screen and (max-width: 767px) {
    .footer-flex .footer-block {
        margin-left: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
    }
}