@charset "utf-8";

/* --- 安全対策：全体で border-box --- */
*, *::before, *::after {
  box-sizing: border-box;
}

/* ブランドカラー設定 */
:root {
  --main-bg: #D7DFED;
  --sub-color: #1F286F;
  --text-light: #fff;
  --text-dark: #1F286F;
}

/* 共通レイアウト（段を追加可能） */
.philosophy-section {
  display: flex;
  align-items: stretch;        /* 左右を同じ高さにする */
  width: 100%;
  min-height: 600px;
  background-color: var(--main-bg);
  overflow: hidden;
}

/* 反転レイアウト */
.philosophy-section.reverse {
  flex-direction: row-reverse;
}

/* 左側画像（background-image方式） */
.philosophy-left {
  width: 50%;
  flex: 0 0 50%;
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;

  /* スマホで高さが無くならないよう最小高さを明示（任意調整可） */
  min-height: 360px;
  position: relative; /* <img> を入れる場合の基準にも */
  overflow: hidden;
}

/* 左側に <img> を置くケースにも対応 */
.philosophy-left img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;   /* 画像を切り抜いて表示 */
}

/* 画像パターン（背景画像方式） */
.img-01 { background-image: url('../img2/h03.png'); }
.img-02 { background-image: url('../img2/img16.png'); }
.img-03 { background-image: url('../img2/image6.jpg'); }
.img-04 { background-image: url('../img2/img21.png'); }
/* 必要に応じて増やす */

/* 右側テキスト */
.philosophy-right {
  width: 50%;
  flex: 0 0 50%;

  padding: 60px;
  background-color: var(--sub-color);
  color: var(--text-light);

  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* 白背景バージョン（右側） */
.philosophy-right.light {
  background-color: #fff;
  color: var(--text-dark);
}

/* タイトル */
.philosophy-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 30px;
  letter-spacing: 0.05em;
}
.philosophy-title .en {
  display: block;
  font-size: 14px;
  letter-spacing: 0.2em;
}

/* 小見出し */
.philosophy-content h3 {
	font-size: 18px;
	font-weight: 700;
	margin-top: 20px;
	margin-bottom: 10px;
	background-color: #1F286F;
	padding: 6px 10px;
	color: #fff;
}

/* 本文 */
.philosophy-content p {
	font-size: 1em;
	line-height: 1.8;
	margin: 0;
	padding-left: 10px;
	padding-right: 10px;
}

/* -----------------------------------
   レスポンシブ：スマホ（〜768px）
----------------------------------- */
@media screen and (max-width: 768px) {

  .philosophy-section {
    flex-direction: column !important; /* 縦並びに切替 */
    min-height: auto;
  }

  /* ← ここを必ず上書き：PCの50%指定をリセット */
  .philosophy-left,
  .philosophy-right {
    width: 100%;
    flex: 0 0 100%;
  }

  /* モバイルで画像が消えないための高さ確保（背景 or img 両方対応） */
  .philosophy-left {
    height: 260px;        /* 必要に応じて調整 */
    min-height: 180px;
  }

  .philosophy-right {
    padding: 30px 20px;
  }

  .philosophy-title {
    font-size: 22px;
    margin-bottom: 20px;
  }

  .philosophy-content h3 {
    font-size: 16px;
  }

  .philosophy-content p {
    font-size: 0.95em;
  }
}
