/* =========================================================
   safety.css
   - 医療安全ページ専用スタイル
========================================================= */

/* 背景色 */
.bg-gray {
  background-color: var(--color-gray-light);
  padding: 5rem 0;
}

/* ---------------------------------------------------------
   Safety Grid (2 Columns)
--------------------------------------------------------- */
.safety-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  margin-top: 40px;
}

.safety-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid var(--color-gray-border);
  transition: transform 0.3s;
}
.safety-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* 最後のカード（5番目）は横幅いっぱいにする */
.safety-card-wide {
  grid-column: 1 / -1;
  flex-direction: row; /* PCでは横並び */
}
.safety-card-wide .safety-thumb {
  width: 45%;
  height: auto;
  min-height: 300px;
}
.safety-card-wide .safety-body {
  width: 55%;
}

/* サムネイル */
.safety-thumb {
  position: relative;
  width: 100%;
  height: 280px;
  overflow: hidden;
}
.safety-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.safety-card:hover .safety-thumb img {
  transform: scale(1.05);
}

/* 数字バッジ */
.safety-num {
  position: absolute;
  top: 0;
  left: 0;
  background: var(--color-primary); /* 安全＝青（または緑） */
  color: #fff;
  width: 50px;
  height: 50px;
  line-height: 50px;
  text-align: center;
  font-weight: 700;
  font-family: sans-serif;
  font-size: 1.2rem;
  border-bottom-right-radius: 8px;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
}

/* 本文エリア */
.safety-body {
  padding: 30px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.safety-body h3 {
  font-size: 1.4rem;
  color: var(--color-primary-dark);
  margin-bottom: 20px;
  border-bottom: 2px solid var(--color-gray-border);
  padding-bottom: 10px;
}

.safety-desc {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text-main);
  margin-bottom: 24px;
}
.safety-desc ul {
  margin-top: 10px;
  padding-left: 0; /* common.cssでリセット済み */
  list-style: none;
}
.safety-desc li {
  position: relative;
  padding-left: 1.2em;
  margin-bottom: 8px;
}
.safety-desc li::before {
  content: '✔';
  position: absolute;
  left: 0;
  color: var(--color-primary);
  font-weight: bold;
}
.safety-desc strong {
  color: var(--color-primary-dark);
}

/* ★患者さんへのメッセージBOX */
.patient-message {
  margin-top: auto; /* 下に寄せる */
  background-color: #f0f9ff; /* 薄い青 */
  border-left: 5px solid var(--color-primary);
  padding: 20px;
  border-radius: 4px;
}
.patient-message h4 {
  font-size: 0.9rem;
  color: var(--color-primary-dark);
  margin-bottom: 8px;
  font-weight: 700;
  display: flex;
  align-items: center;
}
.patient-message h4::before {
  content: 'MESSAGE'; /* アイコン代わりの文字 */
  font-size: 0.6rem;
  background: var(--color-primary);
  color: #fff;
  padding: 2px 6px;
  border-radius: 2px;
  margin-right: 8px;
  letter-spacing: 0.05em;
}
.patient-message p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: #444;
  margin: 0;
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .safety-card-wide {
    flex-direction: column; /* タブレット以下は縦並びに戻す */
  }
  .safety-card-wide .safety-thumb,
  .safety-card-wide .safety-body {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .safety-grid {
    grid-template-columns: 1fr; /* スマホは1列 */
    gap: 30px;
  }

  .safety-thumb {
    height: 200px;
  }

  .safety-body h3 {
    font-size: 1.3rem;
  }
}
