/* ==========================================================================
   ABOUT (研究室紹介) HOME用スタイルシート (about.css)
   ========================================================================== */

#home-about-section {
  width: 90%;
  max-width: 1200px;
  margin: 60px auto 60px auto;
}

/* 各ブロックの基本 */
.about-block {
  margin-bottom: 60px;
}

.about-block:last-child {
  margin-bottom: 0;
}

/* 見出しのスタイル */
.about-block h2 {
  font-size: 32px;
  color: #1a202c;
  margin-top: 0;
  margin-bottom: 25px;
  position: relative;
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* 英語の補助ラベル「About FEDL」 */
.about-block h2::before {
  content: "About FEDL";
  display: block;
  font-size: 13px;
  color: var(--fedl-blue); /* FEDL Blue */
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 8px;
  letter-spacing: 2px;
}

.about-block h3 {
  font-size: 22px;
  color: #1a202c;
  margin: 0 0 25px 0;
  font-weight: 800;
  border-left: 4px solid var(--fedl-blue);
  padding-left: 15px;
  line-height: 1.3;
}

/* 導入 (Intro) セクションの2カラムグリッド */
.intro-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 50px;
  align-items: center;
}

/* 流体風のスライドショーグラフィック */
.about-fluid-art {
  background: #f7fafc;
  border-radius: 20px;
  padding: 0; /* 画像が端までぴったり収まるように余白をゼロにする */
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 30px rgba(0,0,0,0.03);
  overflow: hidden;
  position: relative;
  aspect-ratio: 4 / 3;
}

/* スライド画像をカードサイズにフィットさせるための上書き */
.about-fluid-art img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important; /* カード枠いっぱいにカバー表示 */
  border-radius: 19px;
  left: 0 !important;
  transform: none !important;
}

/* リード文 */
.about-lead-text {
  font-size: 17px;
  color: #4a5568;
  line-height: 1.85;
  text-align: justify;
  margin: 0;
}

/* 研究テーマのグリッド配置 (左右に2カラム) */
.research-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 45px;
}

/* カード風を撤廃し、シンプルなエディトリアルレイアウトに */
.research-item {
  position: relative;
  background: transparent;
  border: none;
  padding: 0;
  box-shadow: none;
  transition: none;
}

/* 番号デザイン */
.research-num {
  font-size: 28px;
  color: var(--fedl-blue);
  font-weight: 800;
  font-family: "Outfit", "Inter", sans-serif;
  display: inline-block;
  margin-bottom: 10px;
  border-bottom: 2px solid var(--fedl-blue);
  line-height: 1.2;
  padding-bottom: 2px;
}

.research-item h4 {
  font-size: 18px;
  color: #1a202c;
  margin: 0 0 12px 0;
  font-weight: 700;
  line-height: 1.5;
}

.research-text {
  font-size: 14.5px;
  color: #4a5568;
  line-height: 1.85;
  text-align: justify;
  margin: 0;
}

/* 産学官連携の枠を完全撤廃 */
.collab-text {
  font-size: 16px;
  color: #4a5568;
  line-height: 1.85;
  text-align: justify;
  margin: 0;
}

.about-more-btn-container {
  margin-top: 25px;
}

.about-more-btn {
  display: inline-flex;
  align-items: center;
  padding: 10px 24px;
  border: 1px solid #cbd5e0;
  border-radius: 30px;
  color: #4a5568;
  font-size: 14px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
}

.about-more-btn::after {
  content: "→";
  margin-left: 8px;
  transition: transform 0.2s ease;
}

.about-more-btn:hover {
  background-color: #edf2f7;
  color: #2d3748;
  border-color: #a0aec0;
}

.about-more-btn:hover::after {
  transform: translateX(4px);
}

.loading-text {
  font-size: 14px;
  color: #a0aec0;
}

/* ==========================================================================
   モバイル向けレスポンシブ
   ========================================================================== */
@media (max-width: 900px) {
  .intro-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .about-fluid-art {
    max-width: 400px;
    margin: 0 auto;
    width: 100%;
  }
}

@media (max-width: 768px) {
  #home-about-section {
    width: 92%;
    margin: 30px auto 50px auto;
  }
  .about-block {
    margin-bottom: 50px;
  }
  .about-block h2 {
    font-size: 26px;
    margin-bottom: 20px;
  }
  .about-lead-text {
    font-size: 15.5px;
  }
  .research-grid {
    grid-template-columns: 1fr; /* スマホでは縦1列 */
    gap: 30px;
  }
}

/* ==========================================================================
   ABOUT (研究室紹介) 詳細ページ専用スタイル (about-detail.css)
   ========================================================================== */

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

#about-detail-section h2 {
  font-size: 28px;
  color: #333;
  margin-top: 0;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
  border-bottom: none;
}

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

.about-detail-block {
  margin-bottom: 50px;
  background-color: #fff;
}

.about-detail-block:last-child {
  margin-bottom: 0;
}

.about-detail-block h3 {
  font-size: 20px;
  color: #1a202c;
  margin: 0 0 25px 0;
  font-weight: 800;
  border-left: 4px solid var(--fedl-blue);
  padding-left: 15px;
  line-height: 1.3;
}

/* 教授メッセージ */
.message-container {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 40px;
  align-items: flex-start;
}

.professor-profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.professor-img {
  width: 100%;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 10px rgba(0,0,0,0.03);
  object-fit: cover;
  aspect-ratio: 3 / 4;
}

.professor-title {
  font-size: 13px;
  color: #718096;
  text-align: center;
  font-weight: 600;
  line-height: 1.5;
}

.message-text {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* テキスト言語の制御（言語切り替え） */
#about-detail-section.show-ja .lang-en,
#about-detail-section.show-ja .lang-divider {
  display: none !important;
}

#about-detail-section.show-en .lang-ja,
#about-detail-section.show-en .lang-divider {
  display: none !important;
}

/* 英語単独表示時のスタイル微調整 */
#about-detail-section.show-en p.lang-en,
#about-detail-section.show-en span.lang-en {
  color: #2d3748; /* 読みやすい暗さに調整 */
  font-style: normal; /* イタリックを解除して読みやすく */
  font-size: 15px;
}

p.lang-ja,
span.lang-ja {
  font-size: 15.5px;
  color: #2d3748;
  line-height: 1.85;
  text-align: justify;
  margin: 0;
}

p.lang-en,
span.lang-en {
  font-size: 14.5px;
  color: #718096; /* 英語は少し柔らかいグレーにしてメリハリをつける */
  line-height: 1.8;
  text-align: justify;
  margin: 0;
  font-style: italic; /* ユーザーが「両方」表示（初期状態など）を選んだ際の見栄え */
  transition: all 0.2s ease;
}

/* 情報コンテンツ */
.info-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.lang-divider {
  border: 0;
  height: 1px;
  background-color: #edf2f7;
  margin: 4px 0;
}

/* 言語切り替えトグルボタンのスタイル */
.about-header-wrap {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 30px;
}

.about-header-wrap h2 {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

.lang-switcher {
  display: inline-flex;
  background-color: rgba(241, 245, 249, 0.9);
  backdrop-filter: blur(4px);
  padding: 3px;
  border-radius: 30px;
  border: 1px solid #e2e8f0;
  transition: all 0.2s ease;
}

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

.lang-switch-btn {
  border: none;
  background: none;
  padding: 5px 15px;
  font-size: 12px;
  font-weight: 700;
  color: #94a3b8;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
  line-height: 1.2;
}

.lang-switch-btn:hover {
  color: var(--fedl-blue);
}

.lang-switch-btn.active {
  background-color: var(--fedl-blue);
  color: #ffffff;
  box-shadow: none;
}

/* モバイル向けレスポンシブ */
@media (max-width: 768px) {
  #about-detail-section {
    width: 92%;
    margin: 30px auto 60px auto;
  }
  .about-header-wrap {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  .lang-switcher {
    align-self: flex-end; /* 右側に寄せる */
  }
  .message-container {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .professor-profile {
    max-width: 200px;
    margin: 0 auto;
  }
  #about-detail-section h2 {
    font-size: 26px;
  }
  .about-detail-block h3 {
    font-size: 18px;
  }
}
