* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", sans-serif;
  line-height: 1.7;
  color: #222;
  background: #fdfafc;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ===============
   ヘッダー
   =============== */
header {
  /* 1段目の背景（紫のグラデーション） */
  background: linear-gradient(135deg, rgba(108,66,156,0.95), rgba(148,105,196,0.95));
  color: white;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 15px rgba(108, 66, 156, 0.4);
  transition: box-shadow 0.3s ease;
}

header.scrolled {
  box-shadow: 0 8px 25px rgba(108, 66, 156, 0.6);
}

/* 1段目：名前（左）と校章類（右） */
.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 15%; /* 本文の余白に合わせる */
  transition: padding 0.3s ease;
}

header.scrolled .header-top {
  padding: 10px 15%;
}

.logo-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.logo-line1 {
  font-size: 0.85rem;
  opacity: 0.9;
}

.logo-line2 {
  font-size: 1.4rem;
  font-weight: bold;
  letter-spacing: 0.05em;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
  margin: 2px 0;
}

.logo-line3 {
  font-size: 0.7rem;
  opacity: 0.8;
  font-family: Arial, sans-serif;
}

/* 1段目右側（言語切替と校章）のレイアウト */
.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.school-logo {
  height: 60px;
  width: auto;
}

/* 言語切り替えボタン */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: Arial, sans-serif;
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.15); /* ボタンの背景を少し明るく */
  padding: 4px 12px;
  border-radius: 20px; /* 丸みを帯びたデザイン */
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.lang-switch a {
  color: rgba(255, 255, 255, 0.6);
  font-weight: normal;
  transition: all 0.2s ease;
}

.lang-switch a:hover {
  color: #fff;
  text-shadow: 0 0 5px rgba(255,255,255,0.8);
}

.lang-switch a.active {
  color: #fff;
  font-weight: bold;
}

.lang-switch .divider {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.8rem;
}

/* 2段目：タブ領域（極限まで透明度を上げ、裏が透けるようにする） */
.header-bottom {
  /* 背景をほぼ透明に（0.05）し、すりガラス効果を弱める */
  background: rgba(255, 255, 255, 0.01); 
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.nav-links {
  display: flex;
  gap: 30px;
  justify-content: flex-start;
  align-items: center;
  align-content: flex-start;
  flex-wrap: wrap;
  font-size: 0.95rem;
  padding: 10px 15%;
}

/* 追加：内部向けリンクのボタンスタイル */
.internal-links {
  display: flex;
  gap: 15px;
  margin-left: auto; /* 左側に自動で余白を取り、このブロックを右端へ押しやる */
  padding-left: 30px; /* 左の通常タブとの間に区切り線を入れるための余白 */
  border-left: 1px solid rgba(255, 255, 255, 0.3); /* 区切り線 */
}

@media (max-width: 1180px) {
  .nav-links {
    justify-content: flex-start;
  }

  .internal-links {
    margin-left: 0;
    padding-left: 0;
    border-left: none;
    width: 100%;
    justify-content: flex-start;
  }
}

.internal-links a {
  background: rgba(255, 255, 255, 0.15); /* ボタン風の薄い背景 */
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
}

/* 内部向けリンクは下線（::after）のアニメーションを無効化 */
.internal-links a::after {
  display: none;
}

.internal-links a:hover {
  background: rgba(255, 255, 255, 0.3); /* ホバーで少し明るく */
  transform: translateY(-2px); /* 少し浮き上がる */
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.nav-links a {
  position: relative;
  padding-bottom: 5px;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

.nav-links a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 50%;
  background-color: #fff;
  transition: width 0.3s ease, left 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
  left: 0;
  box-shadow: 0 0 8px rgba(255,255,255,0.8);
}

.nav-links a.active {
  font-weight: bold;
  text-shadow: 0 0 8px rgba(255,255,255,0.8);
}

/* フェードインアニメーション */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

/* ===============
   ヒーローセクション（スライドショー背景）
   =============== */
.hero {
  position: relative;
  color: white;
  min-height: calc(100vh - 70px);
  display: flex;
  align-items: center;
  padding: 0 8%;
  overflow: hidden;
}

.hero-slideshow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
}

/* JavaScriptで制御するためopacityとtransitionに変更 */
.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  z-index: 1;
}

.slide.active {
  opacity: 1;
  z-index: 2;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.slide-1 { background-image: url('images/slide6.png'); }
.slide-2 { background-image: url('images/slide7.png'); }
.slide-3 { background-image: url('images/slide8.png'); }

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(45, 30, 65, 0.6), rgba(108, 66, 156, 0.45));
  z-index: -1;
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 720px;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 18px;
  line-height: 1.3;
}

.hero p {
  font-size: 1.05rem;
  margin-bottom: 28px;
  opacity: 0.95;
}

.btn-group {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: bold;
  transition: all 0.3s ease;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-primary {
  background: #ffffff;
  color: #6c429c;
}

.btn-primary:hover {
  background: #f3ebfa;
}

.btn-secondary {
  border: 1px solid rgba(255,255,255,0.7);
  color: white;
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.15);
}

/* ===============
   スライドショー・インジケーター（ドット）
   =============== */
.slideshow-indicators {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 16px;
  z-index: 10;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all 0.3s ease;
}

/* JSで付与されるアクティブ状態 */
.dot.active {
  background: rgba(255, 255, 255, 1);
  transform: scale(1.4);
  box-shadow: 0 0 10px rgba(255,255,255,0.8);
}

.dot:hover {
  background: rgba(255, 255, 255, 0.8);
}

/* ===============
   スクロールプロンプト（左端）
   =============== */
.scroll-prompt {
  position: absolute;
  bottom: 0;
  left: 5%;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  writing-mode: vertical-rl;
}

.scroll-line {
  width: 1px;
  height: 80px;
  background: rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
}

.scroll-line::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 25px;
  background: #fff;
  animation: scrollDown 2s infinite cubic-bezier(0.65, 0, 0.35, 1);
}
@keyframes scrollDown {
  0% { transform: translateY(-30px); }
  100% { transform: translateY(80px); }
}

/* ===============
   お知らせセクション
   =============== */
.page-section {
  padding: 60px 15% 80px; /* 左右を 8% から 15% に変更 */
  min-height: calc(100vh - 150px);
}

.section-title {
  font-size: 2rem;
  margin-bottom: 14px;
  color: #4b3663;
  border-bottom: 2px solid #e7d8f5;
  padding-bottom: 10px;
  display: inline-block;
}

.section-subtitle {
  color: #716282;
  margin-bottom: 36px;
  margin-top: 10px;
}

.news-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  /* 4件分程度の高さに設定。超えたらスクロール */
  max-height: 350px; 
  overflow-y: auto;
  padding-right: 12px; /* スクロールバー用の余白 */
}

/* カスタムスクロールバー（藤色） */
.news-list::-webkit-scrollbar {
  width: 8px;
}
.news-list::-webkit-scrollbar-track {
  background: #f6f0fb;
  border-radius: 4px;
}
.news-list::-webkit-scrollbar-thumb {
  background: #a07ec8;
  border-radius: 4px;
}

.news-item {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  background: white;
  border-radius: 8px;
  border-left: 4px solid #a07ec8;
  box-shadow: 0 4px 10px rgba(108, 66, 156, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s;
}

.news-item:hover {
  transform: translateX(5px);
  box-shadow: 0 6px 15px rgba(108, 66, 156, 0.1);
  background: #fbf9fd;
}

.news-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 200px;
}

.news-date {
  color: #716282;
  font-weight: bold;
  font-size: 0.95rem;
}

.news-tag {
  font-size: 0.8rem;
  padding: 4px 12px;
  border-radius: 999px;
  color: white;
  font-weight: bold;
  text-align: center;
  min-width: 75px;
}

.tag-achievement { background: #6c429c; }
.tag-news { background: #a07ec8; }
.tag-paper { background: #4b3663; }

.news-title {
  color: #222;
  font-size: 1rem;
  transition: color 0.2s;
  flex-grow: 1;
}

.news-title:hover {
  color: #6c429c;
  text-decoration: underline;
}

@media (max-width: 768px) {
  .news-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

/* ===============
   カードやメンバーなど共通パーツ
   =============== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
}

.card {
  background: white;
  border-radius: 18px;
  padding: 26px;
  box-shadow: 0 8px 24px rgba(108, 66, 156, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(108, 66, 156, 0.18);
}

.card h3 {
  margin-bottom: 12px;
  color: #6c429c;
  font-size: 1.15rem;
}

.member-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.member {
  background: white;
  border-radius: 18px;
  padding: 22px;
  text-align: center;
  box-shadow: 0 8px 24px rgba(108, 66, 156, 0.08);
  transition: transform 0.3s ease;
}

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

.member img {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 14px;
  border: 3px solid #e7d8f5;
}

.member h3 {
  margin-bottom: 6px;
  color: #4b3663;
}

.member p {
  color: #716282;
  font-size: 0.95rem;
}

.list-group {
  list-style: none;
  display: grid;
  gap: 16px;
}

.list-item {
  background: white;
  border-left: 5px solid #a07ec8;
  padding: 18px 20px;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(108, 66, 156, 0.06);
  transition: background-color 0.3s;
}

.list-item:hover {
  background-color: #fbf9fd;
}

.list-item-title {
  color: #6c429c;
  font-weight: bold;
  margin-bottom: 4px;
}

.link-item a {
  color: #a07ec8;
  font-weight: bold;
  display: block;
}
.link-item a:hover {
  text-decoration: underline;
}

.access {
  background: #f6f0fb;
  border-radius: 24px;
  padding: 32px;
}

/* ===============
   フッター
   =============== */
footer {
  background: linear-gradient(135deg, #3d2559, #2b1842);
  color: white;
  padding: 40px 8%;
  text-align: center;
  margin-top: auto;
  border-top: 4px solid #a07ec8;
  box-shadow: 0 -4px 15px rgba(0,0,0,0.15);
}

.footer-contact {
  margin-bottom: 15px; /* コピーライトとの間隔 */
  font-size: 1.0rem;
  font-weight: bold;
  letter-spacing: 0.02em;
}

.footer-contact a {
  color: #e7d8f5; /* 少し明るい藤色にしてリンクと分かりやすくする */
  text-decoration: none;
  border-bottom: 1px solid rgba(231, 216, 245, 0.3);
  transition: all 0.3s ease;
}

.footer-contact a:hover {
  color: #fff;
  border-bottom-color: #fff;
  text-shadow: 0 0 8px rgba(255,255,255,0.5);
}

.footer-copyright {
  opacity: 0.7;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}
/* ===============
   研究実績ページ（アコーディオン）
   =============== */
.year-section {
  margin-bottom: 50px;
}

.year-title {
  font-size: 1.8rem;
  color: #4b3663;
  border-left: 6px solid #6c429c;
  padding-left: 12px;
  margin-bottom: 24px;
  background: linear-gradient(to right, #f6f0fb, transparent);
}

.category-title {
  font-size: 1.3rem;
  color: #716282;
  margin-bottom: 16px;
  margin-top: 30px;
  border-bottom: 1px dashed #e7d8f5;
  padding-bottom: 5px;
}

.achievement-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* detailsタグ（折りたたみ全体）のスタイル */
.achievement-item {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(108, 66, 156, 0.08);
  overflow: hidden;
  transition: box-shadow 0.3s ease;
}

.achievement-item:hover {
  box-shadow: 0 6px 20px rgba(108, 66, 156, 0.15);
}

/* summaryタグ（クリックする見出し部分）のスタイル */
.achievement-summary {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  cursor: pointer;
  list-style: none; /* デフォルトの矢印を消す */
  position: relative;
  background: #ffffff;
  transition: background-color 0.2s;
}

/* Safari向けのデフォルト矢印消去 */
.achievement-summary::-webkit-details-marker {
  display: none;
}

.achievement-summary:hover {
  background: #fbf9fd;
}

.achievement-header-text {
  flex-grow: 1;
  font-size: 0.95rem;
  line-height: 1.6;
}

.achievement-venue {
  display: block;
  color: #716282;
  font-style: italic;
  font-size: 0.85rem;
  margin-top: 4px;
}

/* カテゴリバッジ */
.achievement-badge {
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 4px;
  color: white;
  font-weight: bold;
  white-space: nowrap;
  margin-top: 2px;
}
.badge-intl { background-color: #d9486d; } /* 国際会議：赤系 */
.badge-dom { background-color: #488ad9; }  /* 国内会議：青系 */
.badge-paper { background-color: #48d98d; } /* 論文：緑系 */

/* ＋/− アイコン */
.accordion-icon {
  font-size: 1.5rem;
  color: #a07ec8;
  font-weight: bold;
  transition: transform 0.3s ease;
}

/* 開いたときのアイコン回転 */
details[open] .accordion-icon {
  transform: rotate(45deg); /* ＋が×になる */
}

/* 開いたときの詳細コンテンツ部分 */
.achievement-detail {
  padding: 0 20px 20px 20px;
  border-top: 1px solid #f6f0fb;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  background: #fbf9fd;
  animation: slideDown 0.4s ease-out;
}

.achievement-detail > div {
  width: 100%;
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px dashed #ccc;
}

.achievement-detail > div:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.achievement-content {
  flex: 1;
  min-width: 250px;
  font-size: 0.9rem;
  color: #444;
  padding-top: 15px;
}

.achievement-img {
  max-width: 300px;
  width: 100%;
  border-radius: 8px;
  object-fit: cover;
  margin-top: 15px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* アニメーション */
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 600px) {
  .achievement-summary {
    flex-direction: column;
    gap: 10px;
  }
  .achievement-img {
    max-width: 100%;
  }
}

/* ===============
   メンバーページ（アコーディオン形式）
   =============== */
.member-category {
  margin-bottom: 50px;
}

.member-category-title {
  font-size: 1.6rem;
  color: #4b3663;
  border-bottom: 3px solid #6c429c;
  padding-bottom: 8px;
  margin-bottom: 20px;
}

.grade-title {
  font-size: 1.2rem;
  color: #716282;
  margin-bottom: 12px;
  padding-left: 10px;
  border-left: 4px solid #a07ec8;
}

.member-accordion-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.member-item {
  background: white;
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(108, 66, 156, 0.05);
  overflow: hidden;
  border-left: 4px solid #e7d8f5; /* 左側に薄い藤色の線 */
  transition: all 0.2s ease;
}

.member-item:hover {
  box-shadow: 0 5px 15px rgba(108, 66, 156, 0.1);
  border-left-color: #a07ec8; /* ホバー時に線が濃くなる */
}

.member-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
  cursor: pointer;
  list-style: none;
  background: #ffffff;
  transition: background-color 0.2s;
}

.member-summary::-webkit-details-marker {
  display: none;
}

.member-summary:hover {
  background: #fbf9fd;
}

.member-header-text {
  font-size: 1.1rem;
}

.member-role {
  font-size: 0.85rem;
  color: #716282;
  margin-left: 10px;
}

/* 開いたときの詳細部分 */
.member-detail {
  padding: 0 20px 20px 20px;
  display: flex;
  gap: 24px;
  animation: slideDown 0.3s ease-out;
  border-top: 1px dashed #f6f0fb;
  margin-top: 5px;
  padding-top: 15px;
}

.member-profile-image {
  flex-shrink: 0;
}

.member-profile-image img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #e7d8f5;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.member-content {
  flex-grow: 1;
  font-size: 0.95rem;
  line-height: 1.6;
}

.member-content p {
  margin-bottom: 8px;
}

@media (max-width: 600px) {
  .member-detail {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .member-role {
    display: block;
    margin-left: 0;
    margin-top: 4px;
  }
}

/* ===============
   メンバーページ：実績リンク用のホバーエフェクト
   =============== */
.achievement-link {
  color: inherit; /* 周りの文字と同じ色にして馴染ませる */
  text-decoration: none; /* デフォルトの野暮ったい下線を消す */
  border-bottom: 1px dashed #a07ec8; /* 下にさりげない藤色の点線を引いて「押せる感」を出す */
  transition: all 0.3s ease; /* アニメーションを滑らかにする */
  padding: 2px 4px; /* ホバーした時に背景色がつくよう、少し余白を持たせる */
  border-radius: 4px; /* 背景色の角を少し丸くする */
}

/* カーソルを合わせた時（ホバー時）のエフェクト */
.achievement-link:hover {
  color: #6c429c; /* 文字色を濃い藤色に変化させる */
  background-color: #f6f0fb; /* ふわっと薄い藤色の背景色をつける */
  border-bottom-color: transparent; /* 点線を消してスッキリさせる */
}

/* ===============
   研究紹介ページ（ジグザグレイアウト ＋ ギャラリー）
   =============== */
.research-showcase {
  display: flex;
  flex-direction: column;
  gap: 60px;
  margin-top: 30px;
}

.research-block {
  display: flex;
  align-items: center;
  gap: 40px;
  background: white;
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 8px 24px rgba(108, 66, 156, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.research-block:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(108, 66, 156, 0.15);
}

.research-block:nth-child(even) {
  flex-direction: row-reverse;
}

/* ▼ 新しいスライドショー部分のスタイル ▼ */
.research-image-gallery {
  width: 50%; /* ▼追加：強制的に50%の幅を確保 */
  flex-shrink: 0; /* ▼追加：テキストに押しつぶされるのを防ぐ */
}

.research-text {
  flex: 1; /* 残り50%のスペースをテキストに割り当て */
}

.research-slider {
  position: relative;
  width: 100%;
  padding-top: 62.5%; /* ▼修正：ここで16:10の高さを強制的に確保する裏技！ */
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.slider-images {
  position: absolute; /* ▼修正：.research-slider の上にピッタリ重ねる */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.r-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.8s ease, transform 0.8s ease;
}

/* アクティブなスライドだけを表示 */
.r-slide.active {
  opacity: 1;
}

/* マウスホバーで画像を少し拡大 */
.slider-images:hover .r-slide.active {
  transform: scale(1.03);
}

.zoom-icon {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(108, 66, 156, 0.8);
  color: white;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 1.2rem;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  transform: translateY(-10px);
  z-index: 10;
}

.slider-images:hover .zoom-icon {
  opacity: 1;
  transform: translateY(0);
}

/* スライドショーの白いぽち（ドット） */
.slider-dots {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}

.r-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all 0.3s ease;
}

.r-dot.active {
  background: rgba(255, 255, 255, 1);
  transform: scale(1.3);
  box-shadow: 0 0 8px rgba(0,0,0,0.5);
}

.r-dot:hover {
  background: rgba(255, 255, 255, 0.8);
}

/* ▼ 拡大表示（ライトボックス）のスタイル ▼ */
.lightbox {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(5px);
  align-items: center;
  justify-content: center;
}

.lightbox.show {
  display: flex;
  animation: fadeIn 0.3s;
}

.lightbox-content {
  max-width: 90%;
  max-height: 90vh;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
}

.lightbox-close:hover {
  color: #e7d8f5;
}

/* ===============
   トップへ戻るボタン
   =============== */
.back-to-top {
  display: none; /* 最初は非表示 */
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 101; /* ヘッダー(100)より上に表示 */
  border: none;
  outline: none;
  background-color: #6c429c;
  color: white;
  cursor: pointer;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 20px;
  font-weight: bold;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  opacity: 0;
  visibility: hidden;
}

/* 表示状態のクラス（JSで切り替え） */
.back-to-top.show {
  display: block;
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background-color: #a07ec8; /* ホバー時は少し明るく */
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(108, 66, 156, 0.3);
}

/* スマホでは少し小さく、端に寄せる */
@media (max-width: 600px) {
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    font-size: 18px;
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 768px) {
  .research-block,
  .research-block:nth-child(even) {
    flex-direction: column;
    padding: 25px;
    gap: 20px;
  }
  .research-image-gallery {
    width: 100%; /* スマホでは画像の横幅を100%に戻す */
    max-width: 100%;
  }
}