/* ========================================
   数字でみるさくら会 カスタムスタイル（高速版）
   PC版とスマホ版で別々にカスタマイズ可能
   アニメーション最適化 + 軽量box-shadow
   ======================================== */

/* ========================================
   PC版スタイル（デフォルト）
   ======================================== */

/* 基本カードラッパー（横並びレイアウト） */
.number_card_wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 30px 20px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); /* 軽量版 */
  /* アニメーション最適化 */
  will-change: opacity, transform;
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* スクロールアニメーション最適化 */
.anime_pic {
  will-change: opacity, transform;
  transform: translateZ(0);
}

/* ========================================
   カードのスクロールアニメーション無効化
   セクションタイトルのアニメーションは残す
   ======================================== */
.ui_list_image01 .scrollEffect {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

.ui_list_image01 .anime_pic {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

/* タイトル（PC版） */
.number_title {
  font-size: 16px;
  font-weight: bold;
  color: #333;
  margin: 0 0 20px;
  line-height: 1.5;
  width: 100%;
}

/* アイコンと数値の横並びコンテナ（PC版） */
.number_main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 15px;
  width: 100%;
}

/* アイコン画像（PC版） */
.number_icon {
  flex-shrink: 0;
  width: 100px;
  height: 100px;
  object-fit: contain;
}

/* 数値ラッパー（PC版） */
.number_value_wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 数値（PC版） */
.number_value {
  font-size: 75px;
  font-weight: bold;
  color: #ff717b;
  margin: 0;
  line-height: 1.2;
  white-space: nowrap;
}

.number_unit {
  font-size: 24px;
  font-weight: normal;
  margin-left: 5px;
}

/* 注釈（PC版） */
.number_note {
  font-size: 13px;
  color: #666;
  margin: 0;
  line-height: 1.4;
  width: 100%;
}

/* ========================================
   縦並びレイアウト（vertical-layout）- PC版
   h4 → アイコン → 数値 → note
   ======================================== */
.number_card_wrapper.vertical-layout {
  min-height: 320px;
}

.number_card_wrapper.vertical-layout .number_title {
  margin-bottom: 20px;
}

.number_card_wrapper.vertical-layout .number_icon {
  margin: 0 auto 20px;
  display: block;
}

.number_card_wrapper.vertical-layout .number_value {
  margin: 0 0 15px;
  font-size: 75px;
}

.number_card_wrapper.vertical-layout .number_unit {
  font-size: 24px;
}

.number_card_wrapper.vertical-layout .number_note {
  margin: 0;
}

/* ========================================
   グリッドレイアウト設定（PC版）
   ======================================== */

/* 2列レイアウト（売上） */
.ui_list_image01.layout-2col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}

/* 3列+2列レイアウト（働く環境） */
.ui_list_image01.layout-3-2 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.ui_list_image01.layout-3-2 li:nth-child(4),
.ui_list_image01.layout-3-2 li:nth-child(5) {
  grid-column: span 1;
}

/* 4列レイアウト（さくら会の社風） */
.ui_list_image01.layout-4col {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 25px;
}

/* 2列+2列+1列レイアウト（患者数） */
.ui_list_image01.layout-2-2-1 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}

.ui_list_image01.layout-2-2-1 li.single {
  grid-column: 1 / -1;
  max-width: 50%;
  margin: 0 auto;
}

/* 2列+2列レイアウト（症例数） */
.ui_list_image01.layout-2-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}

/* ========================================
   レスポンシブ対応（タブレット）
   ======================================== */
@media screen and (max-width: 1023px) {
  /* 4列 → 2列 */
  .ui_list_image01.layout-4col {
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* 3列+2列 → 2列 */
  .ui_list_image01.layout-3-2 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .ui_list_image01.layout-3-2 li:nth-child(5) {
    grid-column: 1 / -1;
    max-width: 50%;
    margin: 0 auto;
  }
  
  /* タブレット版フォントサイズ調整 */
  .number_icon {
    width: 90px;
    height: 90px;
  }
  
  .number_value {
    font-size: 60px;
  }
  
  .number_unit {
    font-size: 20px;
  }
}

/* ========================================
   スマートフォン版スタイル
   全てのカードを縦並びレイアウトに統一
   ======================================== */
@media screen and (max-width: 750px) {
  /* グリッドレイアウト: すべて1列に */
  .ui_list_image01.layout-2col,
  .ui_list_image01.layout-3-2,
  .ui_list_image01.layout-4col,
  .ui_list_image01.layout-2-2-1,
  .ui_list_image01.layout-2-2 {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .ui_list_image01.layout-3-2 li:nth-child(5),
  .ui_list_image01.layout-2-2-1 li.single {
    grid-column: 1;
    max-width: 100%;
  }
  
  /* カードラッパー（スマホ版） */
  .number_card_wrapper {
    padding: 25px 15px;
    min-height: 250px;
  }
  
  /* タイトル（スマホ版） */
  .number_title {
    font-size: 40px;
    margin: 20px 0 -50px;
  }
  
  /* 【重要】横並びコンテナを無効化してアイテムを縦並びに */
  .number_main {
    display: flex;
    flex-direction: column; /* 縦並びに変更 */
    align-items: center;
    gap: 15px;
    margin-bottom: 12px;
  }
  
  /* 数値を先に表示 */
  .number_value_wrapper {
    order: -1; /* 数値を最初に */
  }
  
  /* アイコン画像（スマホ版） */
  .number_icon {
    width: 200px;
    height: 200px;
    display: block;
    margin: -60px auto 0px;
  }
  
  /* 数値（スマホ版） */
  .number_value {
    font-size: 150px; /* スマホ版のフォントサイズ */
    margin: -60px 0px -40px;
  }
  
  .number_unit {
    font-size: 50px; /* スマホ版の単位フォントサイズ */
  }
  
  /* 注釈（スマホ版） */
  .number_note {
    font-size: 30px;
    text-align: center !important;
    margin-top: 20px !important;
  }
  
  /* 縦並びレイアウトのカード（スマホ版でも同じスタイル） */
  .number_card_wrapper.vertical-layout {
    min-height: 250px;
  }
  
  .number_card_wrapper.vertical-layout .number_title {
    font-size: 40px;
    margin-bottom: 15px;
  }
  
  .number_card_wrapper.vertical-layout .number_icon {
    width: 200px;
    height: 200px;
    margin: 0 auto 15px;
  }
  
  .number_card_wrapper.vertical-layout .number_value {
    font-size: 150px; /* スマホ版のフォントサイズ */
    margin: -60px 0 -60px;
  }
  
  .number_card_wrapper.vertical-layout .number_unit {
    font-size: 50px; /* スマホ版の単位フォントサイズ */
  }
  
  .number_card_wrapper.vertical-layout .number_note {
    font-size: 30px;
    text-align: center !important;
    margin-top: 20px !important;
  }
}

/* ========================================
   小さいスマートフォン対応（480px以下）
   さらに細かい調整が必要な場合はこちら
   ======================================== */
@media screen and (max-width: 480px) {
  /* カードラッパー */
  .number_card_wrapper {
    padding: 20px 10px;
  }
  
  /* タイトル */
  .number_title {
    font-size: 13px;
  }
  
  /* アイコン */
  .number_icon {
    width: 200px;
    height: 200px;
  }
  
  /* 数値 */
  .number_value {
    font-size: 150px;
    margin: -60px 0px -40px;
  }
  
  .number_unit {
    font-size: 50px;
  }
  
  /* 注釈 */
  .number_note {
    font-size: 30px;
    text-align: center !important;
    margin-top: 20px !important;
  }
  
  /* 縦並びレイアウト用 */
  .number_card_wrapper.vertical-layout .number_icon {
    width: 200px;
    height: 200px;
  }
  
  .number_card_wrapper.vertical-layout .number_value {
    font-size: 150px;
    margin: -60px 0px -40px;
  }
  
  .number_card_wrapper.vertical-layout .number_unit {
    font-size: 50px;
  }
}

/* ========================================
   印刷対応
   ======================================== */
@media print {
  .number_card_wrapper {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ddd;
  }
  
  .ui_list_image01.layout-4col {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ========================================
   カスタマイズ用コメント
   ======================================== */

/*
【アニメーション最適化】
このバージョンは以下の最適化を含みます：
- GPUアクセラレーション（will-change, transform: translateZ(0)）
- 軽量box-shadow（0 1px 3px rgba(0, 0, 0, 0.08)）
- バックフェイス非表示（backface-visibility: hidden）

【PC版フォントサイズ調整箇所】
- タイトル: .number_title → font-size: 16px;
- 数値: .number_value → font-size: 75px;
- 単位: .number_unit → font-size: 24px;
- 注釈: .number_note → font-size: 13px;
- アイコン: .number_icon → width/height: 100px;

【スマホ版フォントサイズ調整箇所（750px以下）】
- タイトル: .number_title → font-size: 40px;
- 数値: .number_value → font-size: 150px;
- 単位: .number_unit → font-size: 50px;
- 注釈: .number_note → font-size: 30px;
- アイコン: .number_icon → width/height: 200px;
*/