/* リセットとベース */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic Pro', 'Meiryo', sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f8f9fa;
}

/* コンテナ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* セクションタイトル */
.section-title {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 50px;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 80px;
  height: 3px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  margin: 20px auto 0;
  border-radius: 2px;
}

/* データグリッド */
.data-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 1fr;
  gap: 30px;
  margin-top: 40px;
}

/* データアイテム */
.data-item {
  display: flex;
  flex-direction: column;
}

.data-card {
  background: white;
  border-radius: 16px;
  padding: 30px 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* データタイトル */
.data-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 20px;
  line-height: 1.4;
  text-align: center;
}

/* データコンテンツ */
.data-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
}

/* データ値 */
.data-value {
  font-size: 3rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 12px;
  line-height: 1;
}

.data-value .unit {
  font-size: 1.2rem;
  color: #7f8c8d;
  font-weight: 500;
  margin-left: 4px;
}

/* データ注記 */
.data-note {
  font-size: 0.85rem;
  color: #7f8c8d;
  font-weight: 500;
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.9);
  padding: 4px 8px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 年代別グラフ用スタイル（Chart.js） */
.age-chart-container {
  width: 100%;
  height: 200px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

#ageChart {
  max-width: 100%;
  max-height: 100%;
}

/* 総従業員数セクション専用スタイル */
.employee-number-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
}

.digit-container {
  position: relative;
  overflow: hidden;
  height: 3.5rem;
  display: flex;
  align-items: center;
}

.digit {
  font-size: 3rem;
  font-weight: 700;
  color: #2c3e50;
  line-height: 1;
  transform: translateY(100%);
  opacity: 0;
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.digit.animate {
  transform: translateY(0);
  opacity: 1;
}

.employee-number-container .unit {
  font-size: 1.2rem;
  color: #7f8c8d;
  font-weight: 500;
  margin-left: 4px;
  transform: translateY(100%);
  opacity: 0;
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.employee-number-container .unit.animate {
  transform: translateY(0);
  opacity: 1;
}

.person-icons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.person-icon {
  width: 45px;
  height: 45px;
  fill: oklch(62.39% 0.181 258.33);
  transform: translateY(100%);
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.person-icon.animate {
  transform: translateY(0);
  opacity: 1;
}

/* 有給休暇セクション専用スタイル */
#vacation-days .data-content {
  position: relative;
  gap: 0;
}

.vacation-number-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  z-index: 2;
  margin-bottom: 20px;
}

.vacation-count {
  font-size: 3rem;
  font-weight: 700;
  color: #2c3e50;
  line-height: 1;
  transition: all 0.3s ease;
  text-shadow: 0 2px 4px rgba(255, 255, 255, 0.8);
}

.vacation-number-container .unit {
  font-size: 1.2rem;
  color: #7f8c8d;
  font-weight: 500;
  margin-left: 4px;
  text-shadow: 0 2px 4px rgba(255, 255, 255, 0.8);
}

.hearts-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  gap: 12px;
  z-index: 1;
  padding: 20px;
}

.heart-icon {
  width: 40px;
  height: 40px;
  fill: oklch(62.73% 0.209 12.37);
  opacity: 0;
  transform: translateY(20px) scale(0.5);
  transition: all 0.4s ease;
}

.heart-icon.animate {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* 自己啓発支援制度 利用件数セクション専用スタイル */
#self-development-count .data-content {
  height: 200px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.development-number-container {
  position: relative;
  z-index: 2;
  text-align: center;
  background: rgba(255, 255, 255, 0.9);
  padding: 16px 24px;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.development-count {
  font-size: 3rem;
  font-weight: 700;
  color: #2c3e50;
  line-height: 1;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.development-number-container .unit {
  font-size: 1.2rem;
  font-weight: 500;
  margin-left: 4px;
  text-shadow: 0 2px 4px rgba(255, 255, 255, 0.8);
}

.medals-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  gap: 12px;
  z-index: 1;
  padding: 20px;
}

.medal-icon {
  width: 40px;
  height: 40px;
  opacity: 0;
  transform: translateY(20px) scale(0.5);
  transition: all 0.4s ease;
}

.medal-icon.animate {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* 社内表彰制度 対象者数セクション専用スタイル */
#award-recipients .data-content {
  height: 200px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.award-number-container {
  position: relative;
  z-index: 2;
  text-align: center;
  background: rgba(255, 255, 255, 0.9);
  padding: 16px 24px;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.award-count {
  font-size: 3rem;
  font-weight: 700;
  color: #2c3e50;
  line-height: 1;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.award-number-container .unit {
  font-size: 1.2rem;
  font-weight: 500;
  margin-left: 4px;
  text-shadow: 0 2px 4px rgba(255, 255, 255, 0.8);
}

.certificates-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  gap: 12px;
  z-index: 1;
  padding: 20px;
}

.certificate-icon {
  width: 40px;
  height: 40px;
  opacity: 0;
  transform: translateY(20px) scale(0.5);
  transition: all 0.4s ease;
}

.certificate-icon.animate {
  opacity: 1;
  transform: translateY(0) scale(1);
}



/* 近畿2府4県の勤務比率セクション専用スタイル */
#kinki-ratio .data-content {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kinki-chart-container {
  position: relative;
  width: 100%;
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
}

.japan-map-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: hidden;
}

.japan-svg-object {
  width: 800px;
  height: 800px;
  position: absolute;
  top: -473px;
  left: -140px;
  pointer-events: none;
  object-fit: cover;
}

#kinkiChart {
  position: relative;
  z-index: 2;
  width: 160px;
  height: 160px;
  margin: 0 auto;
}

.chart-center-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 1;
}

.chart-center-text.show {
  opacity: 1;
}

.percentage-text {
  font-size: 2.5rem;
  font-weight: 700;
  color: #2c3e50;
  line-height: 1;
  margin-bottom: 4px;
}

.percentage-text .unit {
  font-size: 1rem;
  font-weight: 500;
}

.region-text {
  font-size: 0.8rem;
  font-weight: 500;
}

/* プレースホルダー用スタイル */
.pie-chart-placeholder,
.japan-map-placeholder,
.medals-placeholder,
.awards-placeholder,
.clock-visual {
  font-size: 3rem;
  opacity: 0.3;
  margin: 20px 0;
}

/* リプレイボタン */
.replay-btn {
  width: 100%;
  padding: 12px 16px;
  margin-top: 12px;
  color: white;
  background: #333;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* レスポンシブデザイン */
@media (max-width: 1024px) {
  .data-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 1fr;
    gap: 24px;
  }
  
  .data-card {
    padding: 24px 20px;
  }
  
  .data-value {
    font-size: 2.5rem;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 30px 16px;
  }
  
  .section-title {
    font-size: 2rem;
    margin-bottom: 40px;
  }
  
  .data-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
    gap: 20px;
  }
  
  .data-card {
    padding: 20px 16px;
    min-height: 220px;
  }
  
  .data-title {
    font-size: 1rem;
    margin-bottom: 16px;
  }
  
  .data-value {
    font-size: 2.2rem;
  }
  
  .data-value .unit {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .data-card {
    padding: 16px 12px;
    min-height: 200px;
  }
  
  .data-value {
    font-size: 1.8rem;
  }
  
  .age-bar {
    gap: 8px;
    font-size: 0.8rem;
  }
  
  .age-label {
    width: 35px;
  }
  
  .percentage {
    width: 30px;
  }
}

/* 平均残業時間の時計スタイル */
.overtime-clock-container {
  display: flex;
  align-items: center;
  justify-content: center;
}

.clock {
  width: 160px;
  height: 160px;
  border: 4px solid #2c3e50;
  border-radius: 50%;
  position: relative;
  background: #ffffff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.clock-face {
  width: 100%;
  height: 100%;
  position: relative;
}

.hand {
  position: absolute;
  left: 50%;
  transform-origin: bottom center;
  background: #2c3e50;
  border-radius: 2px;
  transition: transform 0.1s ease;
}

.hour-hand {
  width: 4px;
  height: 40px;
  top: 38px;
  margin-left: -2px;
  background: #2c3e50;
  z-index: 1;
}

.minute-hand {
  width: 2px;
  height: 60px;
  top: 18px;
  margin-left: -1px;
  background: #e74c3c;
  z-index: 1;
}

.clock-center {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  background: #2c3e50;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  z-index: 4;
}

.time-display {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 3.2rem;
  font-weight: 700;
  color: #2c3e50;
  text-align: center;
  z-index: 1;
  background: rgba(255, 255, 255, 0.5);
  padding: 48px 12px;
  border-radius: 8px;
  white-space: nowrap;
}

.time-display .unit {
  font-size: 0.8rem;
  font-weight: 500;
  color: #7f8c8d;
}

/* 平均残業時間セクションの初期化 */
#overtime-hours .data-note {
  opacity: 0;
  transition: opacity 0.5s ease;
}

/* 売上高セクション専用スタイル */
#sales .data-card {
  overflow: visible;
}

#sales .data-content {
  position: relative;
  overflow: visible;
  align-items: flex-end;
  padding: 40px 30px 0 0;
}

.sales-value-container {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  position: relative;
  z-index: 1;
}

.sales-number {
  font-size: 1px;
  font-weight: 700;
  color: #2c3e50;
  line-height: 1;
  opacity: 0;
  transform-origin: bottom right; /* 下を基準に拡大 */
}

.sales-number.animate {
  animation: salesAnimation 2s ease-in-out forwards;
}

@keyframes salesAnimation {
  0% {
    font-size: 1px;
    opacity: 0;
  }
  50% {
    transform: scale(200);
    /* font-size: 100px; */
    opacity: 1;
  }
  100% {
    transform: scale(100);
    /* font-size: 50px; */
    opacity: 1;
  }
}

.sales-unit {
  font-size: 1.2rem;
  color: #7f8c8d;
  font-weight: 500;
  margin-left: 4px;
}

#sales .data-note {
  opacity: 0;
  transition: opacity 0.5s ease;
}

/* 事業別売上比率セクション専用スタイル */
.business-chart-container {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  position: relative;
}

#businessChart {
  width: 200px !important;
  height: 200px !important;
  flex-shrink: 0;
}



#business-ratio .data-content {
  overflow: hidden;
  max-width: 100%;
}

#business-ratio .data-note {
  opacity: 0;
  transition: opacity 0.5s ease;
}

@media (max-width: 768px) {
  #businessChart {
    width: 150px !important;
    height: 150px !important;
    max-width: 150px !important;
    max-height: 150px !important;
  }
}

/* 納入先都道府県数セクション専用スタイル */
.prefecture-count-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 200px;
  width: 100%;
}

.prefecture-count-container .japan-map-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.prefecture-count-container .japan-svg-object {
  width: 200px;
  height: 200px;
  opacity: 0.3;
  transition: opacity 0.5s ease;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
}

.prefecture-count-center {
  position: relative;
  z-index: 2;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.prefecture-count-number {
  font-size: 4rem;
  font-weight: 700;
  color: #2c3e50;
  line-height: 1;
  margin-bottom: 8px;
}

.prefecture-count-unit {
  font-size: 1rem;
  color: #7f8c8d;
  font-weight: 500;
}

/* 都道府県のハイライト用スタイル */
.prefecture.highlighted {
  fill: #3498db !important;
  transition: fill 0.3s ease;
}

@media (max-width: 768px) {
  .prefecture-count-container {
    height: 150px;
  }
  
  .prefecture-count-container .japan-svg-object {
    max-width: 130px;
    max-height: 130px;
  }
  
  .prefecture-count-number {
    font-size: 3rem;
  }
  
  .prefecture-count-unit {
    font-size: 0.9rem;
  }
}

/* 自己啓発支援制度 利用年齢層セクション専用スタイル */
.age-group-chart-container {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 220px;
  width: 220px;
  max-width: 220px;
  max-height: 220px;
  margin: 0 auto;
  overflow: hidden;
  position: relative;
}

#ageGroupChart {
  width: 200px !important;
  height: 200px !important;
  max-width: 200px !important;
  max-height: 200px !important;
  flex-shrink: 0;
  filter: blur(10px);
  opacity: 0.3;
  transition: filter 1.5s ease, opacity 1.5s ease;
  aspect-ratio: 1 / 1;
}

#ageGroupChart.focused {
  filter: blur(0px);
  opacity: 1;
}

#self-development-age .data-content {
  overflow: hidden;
  max-width: 100%;
}

#self-development-age .data-note {
  opacity: 0;
  transition: opacity 0.5s ease;
}

@media (max-width: 768px) {
  .age-group-chart-container {
    height: 170px;
    width: 170px;
    max-width: 170px;
    max-height: 170px;
  }
  
  #ageGroupChart {
    width: 150px !important;
    height: 150px !important;
    max-width: 150px !important;
    max-height: 150px !important;
    aspect-ratio: 1 / 1;
  }
}

/* 中途採用比率セクション専用スタイル */
.mid-career-chart-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
}

.mid-career-donut-chart {
  display: block;
  margin: 0 auto;
  background: transparent;
}

.chart-labels-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.chart-label {
  position: absolute;
  font-size: 18px;
  font-weight: bold;
  color: #ffffff;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.5s ease;
  transform: translate(-50%, -50%);
  text-align: center;
  line-height: 1.2;
  white-space: pre-line;
}

/* 棒グラフ専用ラベル（黒色） */
.bar-chart-label {
  position: absolute;
  font-size: 18px;
  font-weight: bold;
  color: #000000;
  text-shadow: 1px 1px 3px rgba(255, 255, 255, 0.5);
  opacity: 0;
  transition: opacity 0.5s ease;
  transform: translate(-50%, -50%);
  text-align: center;
  line-height: 1.2;
  white-space: pre-line;
}

.bar-chart-label.show {
  opacity: 1;
}

.chart-label.show {
  opacity: 1;
}

#mid-career-ratio .data-note {
  opacity: 0;
  transition: opacity 0.5s ease;
}

@media (max-width: 768px) {
  .chart-label {
    font-size: 16px;
  }
  
  .bar-chart-label {
    font-size: 16px;
  }
} 