:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --background-color: #ffffff;
    --text-color: #34495e;
    --card-bg-color: #f4f6f9;
    --accent-color: #e74c3c;
}

body {
    font-family: 'Zen Kaku Gothic New', sans-serif;
    color: var(--text-color);
    background-color: var(--background-color);
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

.service-section {
    background-color: #f8f9fa;
    padding: 120px 20px 80px; /* 上部のパディングを120pxに増やしました */
    overflow: hidden;
  }
  
  .service-title-container {
    max-width: 1200px;
    margin: 80px auto 80px;
    padding: 0 20px;
    position: relative;
    overflow: hidden;
  }
  
  .service-title {
    position: relative;
    font-family: 'Futura Lt BT', sans-serif;
    line-height: 1;
    text-align: center;
  }
  
  .service-title .title-bg {
    font-size: clamp(60px, 10vw, 120px);
    color: #e9ecef;
    display: block;
    position: relative;
    z-index: 1;
  }
  
  .service-title .title-main {
    font-size: clamp(35px, 3vw, 24px);
    color: #034060;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    opacity: 0;
  }
  
  .service-title .title-bg span {
    display: inline-block;
    opacity: 0;
  }
  
  @keyframes fadeInGradient {
    0% {
      opacity: 0;
      color: #ffffff;
    }
    50% {
      opacity: 0.5;
      color: #a8c5d6;
    }
    100% {
      opacity: 1;
      color: #e9ecef;
    }
  }
  
  @keyframes fadeIn {
    from {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
  }

#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
}

.people-section {
    max-width: 100%;
    margin: 0 auto;
    padding: 80px 20px;
    position: relative;
    background-color: #f4f6f9;
}

.people-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    position: relative;
    z-index: 2;
}

.people-card {
    background-color: var(--background-color);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    width: 100%;
    max-width: 800px;
    display: flex;
    flex-direction: row;
    height: auto; /* 高さを自動調整に変更 */
    margin-bottom: 40px; /* カード間の間隔を追加 */
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.people-card.fade-in {
    opacity: 1;
    transform: translateY(0);
}

.card-image-container {
    flex: 0 0 300px; /* flex-basis を 300px に設定し、これを基本とする */
    height: 500px; /* 高さを固定 */
    overflow: hidden;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.card-image-container.fade-in {
    opacity: 1;
    transform: translateY(0);
}

.card-content > *, .card-chart-container, .card-message {
    flex: 1 1 auto; /* 自動でスペースに合わせて伸縮 */
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    overflow: hidden;
}

.card-content > *.fade-in,
.card-chart-container.fade-in,
.card-message.fade-in {
    opacity: 1;
    transform: translateY(0);
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.card-content {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 15px; /* 子要素間の間隔を設定 */
}


.card-content > * {
    margin: 0; /* 既存のマージンをリセット */
}

.card-chart-container {
    width: 100%;
    height: 180px; /* チャートの高さを固定 */
    margin-top: 15px;
}

.card-header {
    display: flex;
    flex-direction: column;
    gap: 5px; /* ヘッダー内の要素間の間隔 */
}

.card-title {
    font-size: 1.6em;
    color: var(--primary-color);
    margin: 0;
}

.card-name-en,
.card-group,
.card-department {
    font-size: 1.1em;
    color: var(--secondary-color);
    margin: 0;
}

.card-position {
    font-size: 1em;
    color: var(--secondary-color);
    margin: 0;
}

.card-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-tag {
    background-color: var(--secondary-color);
    color: white;
    padding: 0px 8px;
    border-radius: 5px;
    display: inline-flex; /* Flexboxを利用 */
    justify-content: center; /* 水平方向の中央揃え */
    align-items: center; /* 垂直方向の中央揃え */
    font-size: 0.8em;
}

.card-chart-container {
    width: 100%;
    height: 180px;
}

.card-message {
    font-size: 0.9em;
    color: var(--text-color);
    margin: 0;
}

@media (max-width: 768px) {
    .people-card {
        flex-direction: column;
        max-width: 90%; /* カードの最大幅を90%に制限 */
        margin: 0 auto 30px; /* 中央揃えと下部マージンの調整 */
    }

    .card-image-container {
        width: 100%;
        height: 250px; /* モバイルでの画像の高さを調整 */
        overflow: hidden; /* はみ出た部分を隠す */
    }

    .card-image-container img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: top center; /* 画像の上部を固定 */
    }

    .card-content {
        padding: 15px;
    }

    .card-title {
        font-size: 1.5em;
    }

    .card-name-en,
    .card-group,
    .card-department {
        font-size: 1em;
    }

    .card-position {
        font-size: 1em;
    }

    .card-chart-container {
        height: 180px; /* モバイルでのチャートの高さを調整 */
    }
}