/* ==========================================================================
   メンバー紹介ページ専用スタイル (members.css)
   ========================================================================== */

#members-section {
  width: 90%;
  max-width: 1200px;
  margin: 40px auto 80px auto;
}

#members-section h2 {
  font-size: 28px;
  color: #333;
  margin-bottom: 25px;
  position: relative;
  padding-bottom: 10px;
  border-bottom: none; /* 下線のボーダーは不要 */
}

#members-section h2::before {
  content: "Members";
  display: block;
  font-size: 14px;
  color: var(--fedl-blue); /* FEDL Blue */
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 4px;
  letter-spacing: 1px;
}

/* ==========================================================================
   フィルターコントロール
   ========================================================================== */
.filter-container {
  display: flex;
  gap: 10px;
  margin-bottom: 25px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 500;
  color: #4a5568;
  background-color: #f7fafc;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.filter-btn:hover {
  background-color: #edf2f7;
  color: #2d3748;
  border-color: #cbd5e0;
}

.filter-btn.active {
  background-color: var(--fedl-blue); /* FEDL Blue */
  border-color: var(--fedl-blue);
  color: #fff;
  box-shadow: none; /* 不要なシャドウは削除してフラットに */
}

/* ==========================================================================
   カテゴリセクション
   ========================================================================== */
.members-category-section {
  margin-bottom: 60px;
}

.category-header {
  margin-bottom: 25px;
  border-left: 4px solid var(--fedl-blue); /* FEDL Blue */
  padding-left: 15px;
}

.category-header h3 {
  font-size: 22px;
  color: #2d3748;
  margin: 0;
  line-height: 1.2;
}

.category-header .subtitle {
  font-size: 13px;
  color: #718096;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

/* ==========================================================================
   グリッド・カードレイアウト
   ========================================================================== */
.members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
}

/* スタッフ（教職員）は少し大きめの幅でゆったり表示する設定も可能 */
.staff-section .members-grid {
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.member-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.member-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.1), 0 6px 10px -5px rgba(0, 0, 0, 0.04);
  border-color: #cbd5e0;
}

/* メンバー写真コンテナ */
.member-photo-container {
  width: 100%;
  aspect-ratio: 4 / 3; /* 4:3の横長比率にする */
  background-color: #f7fafc;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid #edf2f7;
}

.member-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.4s ease;
}

.member-card:hover .member-photo {
  transform: scale(1.03);
}

/* 写真がない場合のフォールバック（頭文字アバター） */
.member-photo-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f0f7ff 0%, #e0effe 100%);
}

.fallback-initial {
  font-size: 64px;
  font-weight: 700;
  color: var(--fedl-blue); /* FEDL Blue */
  opacity: 0.8;
  user-select: none;
}

/* ==========================================================================
   メンバー詳細テキスト
   ========================================================================== */
.member-info {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.member-header {
  margin-bottom: 16px;
}

.member-name {
  font-size: 20px;
  color: #2d3748;
  margin: 0 0 4px 0;
  font-weight: 700;
}

.member-name-en {
  font-size: 13px;
  color: #a0aec0;
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
}

.member-position {
  font-size: 14px;
  color: #4a5568;
  background-color: #f7fafc;
  padding: 4px 10px;
  border-radius: 6px;
  display: inline-block;
  margin: 4px 0 0 0;
  border: 1px solid #edf2f7;
  font-weight: 500;
}

/* メンバー説明（研究内容・職務内容） */
.member-description {
  margin-top: 8px;
  margin-bottom: 20px;
  flex-grow: 1;
}

.desc-title {
  font-size: 11px;
  color: #718096;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 4px;
  font-weight: 700;
}

.desc-text {
  font-size: 14px;
  color: #4a5568;
  line-height: 1.6;
  margin: 0;
}

/* メンバー趣味・特技 */
.member-hobby {
  margin-top: 8px;
  margin-bottom: 20px;
}

.hobby-title {
  font-size: 11px;
  color: #718096;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 4px;
  font-weight: 700;
}

.hobby-text {
  font-size: 14px;
  color: #4a5568;
  line-height: 1.6;
  margin: 0;
}

/* ==========================================================================
   連絡先 ＆ 外部リンク
   ========================================================================== */
.member-contact {
  margin-top: auto;
  padding-top: 15px;
  border-top: 1px dashed #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
}

.contact-label {
  font-size: 12px;
  color: #718096;
  font-weight: 600;
}

.contact-btn {
  font-size: 13px;
  color: var(--fedl-blue); /* FEDL Blue */
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s ease;
}

.contact-btn:hover {
  color: var(--fedl-dark-blue);
  text-decoration: underline;
}

/* 外部リンクコンテナ */
.member-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid #f0f4f8;
}

.link-icon {
  font-size: 11px;
  color: #718096;
  text-decoration: none;
  background-color: #f7fafc;
  border: 1px solid #e2e8f0;
  padding: 4px 10px;
  border-radius: 4px;
  transition: all 0.15s ease;
  font-weight: 600;
}

.link-icon:hover {
  background-color: #f0f7ff;
  border-color: #bee3f8;
  color: var(--fedl-blue); /* FEDL Blue */
}

/* モバイル向け調整 */
@media (max-width: 600px) {
  #members-section {
    width: 92%;
    margin: 20px auto 40px auto;
  }
  .members-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .staff-section .members-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   卒業生リストスタイル
   ========================================================================== */
.alumni-container {
  background-color: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.alumni-group {
  margin-bottom: 30px;
}

.alumni-group:last-child {
  margin-bottom: 0;
}

.alumni-group-title {
  font-size: 16px;
  color: #2d3748;
  margin: 0 0 12px 0;
  padding-bottom: 6px;
  border-bottom: 1px solid #edf2f7;
  font-weight: 700;
}

.alumni-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.alumni-item {
  font-size: 14px;
  color: #4a5568;
  line-height: 1.6;
}

.alumni-degree {
  font-weight: 600;
  color: #718096;
}

.alumni-names {
  color: #2d3748;
}

/* ==========================================================================
   メンバーカード言語切り替え（JA / EN）
   ========================================================================== */
.member-card {
  position: relative;
  transition: all 0.3s ease;
}

.member-card.has-translation {
  cursor: pointer;
}

.member-card.has-translation:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 20px rgba(14, 66, 109, 0.08);
  border-color: var(--fedl-blue);
}

/* 言語トグルバッジ */
.card-lang-toggle {
  position: absolute;
  top: 15px;
  right: 15px;
  z-index: 10;
  display: flex;
  background: rgba(241, 245, 249, 0.9);
  backdrop-filter: blur(4px);
  border: 1px solid #e2e8f0;
  border-radius: 15px;
  padding: 2px;
  gap: 2px;
  transition: all 0.2s ease;
}

.member-card:hover .card-lang-toggle {
  border-color: var(--fedl-blue);
  background: #ffffff;
}

.card-lang-btn {
  border: none;
  background: none;
  font-size: 10px;
  font-weight: 700;
  color: #94a3b8;
  padding: 3px 7px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
}

.card-lang-btn.active {
  background-color: var(--fedl-blue);
  color: #ffffff;
}

/* コンテンツ表示の制御（フェードアニメーション） */
.lang-en {
  display: none !important;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lang-ja {
  display: block;
  opacity: 1;
  transition: opacity 0.3s ease;
}

/* 要素の元々の表示形式(inline-block等)に合わせるための補正 */
p.member-position.lang-ja,
span.contact-label.lang-ja {
  display: inline-block;
}

/* 英語表示モード */
.member-card.show-en .lang-ja {
  display: none !important;
  opacity: 0;
}

.member-card.show-en .lang-en {
  display: block !important;
  opacity: 1;
}

/* 英語表示モード時のインライン要素（役職枠や連絡先ボタン）の復元 */
.member-card.show-en p.member-position.lang-en,
.member-card.show-en span.contact-label.lang-en,
.member-card.show-en a.contact-btn.lang-en {
  display: inline-block !important;
}

/* 英語表示時のイタリック解除など見やすさ微調整 */
.member-card.show-en .desc-text {
  font-size: 14px;
  line-height: 1.6;
  color: #4a5568;
}

