/* ========================================
   ページ固有のスタイル
   各ページのデザインを設定します
   ======================================== */

/* ========================================
   ヒーローセクション（トップの大きな画像エリア）
   ======================================== */
.hero {
  /* 位置・サイズ */
  position: relative;
  width: 100%;
  height: 100vh;
  max-height: 1100px;

  /* レイアウト */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  /* 余白 */
  padding: 20px 0;

  /* オーバーフロー */
  overflow: hidden;
}

/* カルーセルコンテナ */
.hero-carousel {
  /* 位置・サイズ */
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

/* カルーセルスライド */
.carousel-slide {
  /* 位置・サイズ */
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;

  /* 透明度 */
  opacity: 0;

  /* トランジション（フェードイン・フェードアウト効果） */
  transition: opacity 2s ease-in-out;
}

/* アクティブなスライド */
.carousel-slide.active {
  opacity: 1;
}

/* スライド内の画像 */
.carousel-slide img {
  /* サイズ */
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 50%;
}

/* ヒーロー画像の上のオーバーレイ（暗くする効果） */
.hero-overlay {
  /* 位置・サイズ */
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;

  /* グラデーション背景 */
  background: linear-gradient(180deg,
      rgba(41, 51, 84, 0.76) 25%,
      rgba(41, 51, 84, 0.95) 100%);

  /* ブレンドモード */
  mix-blend-mode: multiply;

  /* ポインターイベントを無効化 */
  pointer-events: none;
}

/* ヒーローコンテンツ */
.hero-content {
  /* 位置 */
  position: relative;
  z-index: 2;

  /* レイアウト */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;

  /* 余白 */
  padding: 0 20px;
  width: 100%;
  max-width: 1042px;
}

/* ヒーロータイトル */
.hero-title {
  /* レイアウト */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;

  /* フォント */
  font-family: var(--font-ja-serif);
  font-size: var(--font-size-hero);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 2px;
  text-align: center;

  /* 色 */
  color: var(--color-text-light);

  /* サイズ */
  width: 100%;
}

.hero-title span {
  /* レイアウト */
  display: block;
  white-space: nowrap;
}

/* 研究室名セクション */
.lab-name-section {
  /* 位置 */
  position: absolute;
  z-index: 2;
  bottom: 24px;

  /* レイアウト */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;

  /* サイズ */
  width: 100%;
  /* max-width: 1437px; */
  padding: 0 20px;

  /* 余白 */
  margin-bottom: 0;
}

/* 研究室名（英語） */
.lab-name-en-hero {
  /* フォント */
  font-family: var(--font-en-serif);
  font-size: var(--font-size-h4);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.72px;
  text-align: center;

  /* 色 */
  color: var(--color-text-secondary);

  /* テキストシャドウ */
  text-shadow:
    1px 2px 5px rgba(10, 22, 67, 0.7),
    5px 8px 9px rgba(10, 22, 67, 0.61),
    12px 17px 13px rgba(10, 22, 67, 0.36),
    21px 31px 15px rgba(10, 22, 67, 0.11),
    32px 48px 16px rgba(10, 22, 67, 0.01);

  /* サイズ */
  width: 100%;
}

/* ディバイダーグループ */
.divider-group {
  /* レイアウト */
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  /* サイズ */
  width: 100%;
  height: 18px;
}

/* 左側のディバイダー */
.divider-left {
  /* サイズ */
  flex: 1;
  height: 1px;
  max-height: 1px;

  /* 反転 */
  transform: rotate(180deg);
}

/* 右側のディバイダー */
.divider-right {
  /* サイズ */
  flex: 1;
  height: 1px;
  max-height: 1px;

  /* 反転 */
  transform: rotate(180deg);
}

/* 研究室名（ディバイダー中央） */
.lab-name-divider {
  /* フォント */
  font-family: var(--font-en-serif);
  font-size: var(--font-size-h4);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 2.34px;
  white-space: nowrap;

  /* 色 */
  color: var(--color-text-secondary);

  /* テキストシャドウ */
  text-shadow:
    1px 2px 5px rgba(10, 22, 67, 0.7),
    5px 8px 9px rgba(10, 22, 67, 0.61),
    12px 17px 13px rgba(10, 22, 67, 0.36),
    21px 31px 15px rgba(10, 22, 67, 0.11),
    32px 48px 16px rgba(10, 22, 67, 0.01);

  /* サイズ */
  flex-shrink: 0;
}

/* ========================================
   メインコンテンツ
   ======================================== */
.main-content {
  /* 余白 */
  padding: var(--spacing-4xl) 0;
}

.content-wrapper {
  /* レイアウト */
  display: flex;
  flex-direction: column;
  gap: var(--spacing-4xl);

  /* サイズ */
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ========================================
   セクション共通
   ======================================== */
.section {
  /* レイアウト */
  display: flex;
  gap: var(--spacing-lg);
}

.section-header {
  /* サイズ */
  width: 20%;
  flex-shrink: 0;
  max-width: 200px;

  /* PC用: スクロール追従 */
  position: sticky;
  top: 100px;
  align-self: flex-start;
}

.section-title {
  /* フォント */
  font-family: var(--font-ja-serif);
  font-size: var(--font-size-h2);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 1.68px;

  /* 色 */
  color: var(--color-text-primary);

  /* 余白 */
  margin-bottom: 4px;
}

.section-title-en {
  /* フォント */
  font-family: var(--font-en-serif);
  font-size: var(--font-size-h4);
  font-weight: 500;
  letter-spacing: 0.72px;

  /* 色 */
  color: var(--color-primary);
}

.section-content {
  /* サイズ */
  flex: 1;
}

/* ========================================
   お知らせセクション
   ======================================== */
.news-list {
  /* レイアウト */
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.news-item {
  /* レイアウト */
  display: flex;
  gap: 32px;

  /* 余白 */
  padding: 10px 0;
}

.news-date {
  /* サイズ */
  width: 100px;
  flex-shrink: 0;

  /* フォント */
  font-family: var(--font-ja-mincho);
  font-size: var(--font-size-small);
  font-weight: 500;
  line-height: 1.6;

  /* 色 */
  color: var(--color-text-muted);
}

.news-title {
  /* フォント */
  font-family: var(--font-ja-mincho);
  font-size: var(--font-size-small);
  font-weight: 500;
  line-height: 1.6;

  /* サイズ */
  flex: 1;
}

.news-divider {
  /* サイズ */
  width: 100%;
  height: 1px;

  /* 背景 */
  background-color: rgba(0, 0, 0, 0.1);

  /* 余白 */
  margin: 0;
}

.news-link {
  /* レイアウト */
  display: block;
  flex: 1;

  /* 色 */
  color: var(--color-text-primary);
  text-decoration: none;

  /* トランジション */
  transition: color 0.2s ease;
}

.news-link:hover {
  color: var(--color-primary);
}

.news-more {
  /* レイアウト */
  display: flex;
  justify-content: center;

  /* 余白 */
  margin-top: var(--spacing-xl);
}

/* ========================================
   研究室についてセクション
   ======================================== */
.about-video {
  /* サイズ */
  width: 100%;
  aspect-ratio: 924 / 450;

  /* 角丸 */
  border-radius: 3px;


  /* 余白 */
  margin-bottom: 49px;
}

.about-video video,
.about-video img {
  /* サイズ */
  width: 100%;
  height: 100%;
  object-fit: cover;


  /* シャドウ */
  box-shadow:
    1px 3px 7px 0px rgba(0, 0, 0, 0.1),
    3px 11px 12px 0px rgba(0, 0, 0, 0.09),
    7px 26px 16px 0px rgba(0, 0, 0, 0.05),
    12px 46px 19px 0px rgba(0, 0, 0, 0.01),
    19px 72px 21px 0px rgba(0, 0, 0, 0);

  /* 角丸 */
  border-radius: 3px;
}

.about-description {
  /* レイアウト */
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.about-headline {
  /* フォント */
  font-family: var(--font-ja-serif);
  font-size: var(--font-size-h1);
  font-weight: 600;
  line-height: 1;

  /* 色 */
  color: #000;
}

.about-text {
  /* フォント */
  font-family: var(--font-ja-mincho);
  font-size: var(--font-size-body);
  font-weight: 500;
  line-height: 1.8;
}

.about-text p {
  /* 余白 */
  margin-bottom: 12px;
}

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

/* ========================================
   ボタン
   ======================================== */
.btn {
  /* レイアウト */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;

  /* サイズ */
  padding: 12px 48px 13px 32px;

  /* フォント */
  font-family: var(--font-ja-serif);
  font-size: var(--font-size-body);
  font-weight: 700;
  text-align: center;

  /* 角丸 */
  border-radius: 3px;

  /* トランジション */
  transition: opacity 0.3s, transform 0.2s;

  /* カーソル */
  cursor: pointer;
}

.btn:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.btn-primary {
  /* 背景・色 */
  background-color: var(--color-accent);
  color: var(--color-text-light);

  /* サイズ */
  max-width: 480px;
}

.btn-secondary {
  /* サイズ */
  padding: 8px 32px 9px;
  max-width: 320px;

  /* フォント */
  font-size: var(--font-size-small);
  font-weight: 600;

  /* 背景・色 */
  background-color: var(--color-accent);
  color: var(--color-text-light);
}

.btn::after {
  /* 矢印アイコン */
  content: '';
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  background-image: url('../images/icons/arrow-icon.svg');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

/* ========================================
   研究内容セクション
   ======================================== */
.research-card-grid {
  /* レイアウト */
  display: flex;
  flex-direction: column;
  gap: var(--spacing-3xl);
}

.research-card {
  /* レイアウト */
  display: flex;
  gap: var(--spacing-lg);
  align-items: stretch;
}

.research-card-thumbnail {
  /* サイズ */
  width: 300px;
  flex-shrink: 0;

  /* 背景 */
  background-color: #ffffff;

  /* シャドウ */
  box-shadow:
    1px 3px 7px 0px rgba(0, 0, 0, 0.04),
    4px 12px 13px 0px rgba(0, 0, 0, 0.03),
    9px 28px 18px 0px rgba(0, 0, 0, 0.02),
    16px 50px 21px 0px rgba(0, 0, 0, 0.01),
    25px 77px 23px 0px rgba(0, 0, 0, 0);

  /* オーバーフロー */
  overflow: hidden;
}

.research-card-thumbnail img {
  /* サイズ */
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.research-card-content {
  /* サイズ */
  flex: 1;

  /* レイアウト */
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
}

.research-card-title {
  /* フォント */
  font-family: var(--font-ja-serif);
  font-size: var(--font-size-h3);
  font-weight: 600;
  line-height: 1;

  /* 色 */
  color: #000;
}

.research-card-subsection {
  /* レイアウト */
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.research-card-subtitle {
  /* レイアウト */
  display: flex;
  align-items: center;
  gap: 14px;
}

.title-accent {
  /* サイズ */
  width: 40px;
  height: 4px;

  /* 背景 */
  background-color: var(--color-primary);
}

.research-card-subtitle h4 {
  /* フォント */
  font-family: var(--font-ja-serif);
  font-size: var(--font-size-h4);
  font-weight: 600;
  line-height: 1;

  /* 色 */
  color: #000;
}

.research-card-text {
  /* フォント */
  font-family: var(--font-ja-mincho);
  font-size: var(--font-size-body);
  font-weight: 500;
  line-height: 1.8;
}

/* ========================================
   トップに戻るボタン
   ======================================== */
.back-to-top-container {
  /* レイアウト */
  display: flex;
  justify-content: center;
  align-items: center;

  /* 余白 */
  margin-top: var(--spacing-2xl);
}

/* ========================================
   レスポンシブデザイン
   ======================================== */

/* タブレット（768px以下） */
@media (max-width: 768px) {
  .hero {
    height: 830px;
    justify-content: flex-start;
    padding: 0;
  }

  .hero-content {
    margin-top: 284px;
    max-width: 341px;
    padding: 0 27px;
  }

  .hero-title {
    font-size: 33px;
    gap: 24px;
    letter-spacing: 1.65px;
    line-height: 1.35;
  }

  .hero-title span {
    white-space: normal;
  }

  .lab-name-section {
    max-width: 367px;
    padding: 0 27px;
    margin-bottom: 0;
  }

  .lab-name-en-hero {
    font-size: 14px;
    letter-spacing: 0.56px;
  }

  .lab-name-divider {
    font-size: 18px;
    letter-spacing: 2.34px;
  }

  .section {
    flex-direction: column;
    gap: var(--spacing-2xl);
  }

  .section-header {
    width: 100%;
    max-width: none;
    position: static;
  }

  .section-title {
    line-height: 1.2;
  }

  .main-content {
    padding: 72px 0;
  }

  .content-wrapper {
    gap: 72px;
    padding: 0 16px;
  }

  .news-item {
    flex-direction: column;
    gap: 4px;
    padding: 0;
  }

  .news-date {
    width: 100px;
  }

  .news-title {
    width: 100%;
  }

  .about-video {
    height: 273px;
    margin-bottom: 49px;
  }

  .about-headline {
    font-size: 20px;
    line-height: 1.4;
  }

  .about-text {
    font-size: 15px;
  }

  .research-card {
    flex-direction: column;
    gap: var(--spacing-lg);
  }

  .research-card-thumbnail {
    width: 100%;
    aspect-ratio: 300 / 280;
  }

  .research-card-title {
    font-size: 22px;
    line-height: 1.4;
  }

  .research-card-subtitle h4 {
    font-size: 18px;
    line-height: 1.4;
  }

  .title-accent {
    width: 80px;
    height: 2px;
  }

  .research-card-grid {
    gap: var(--spacing-4xl);
  }
}

/* スマートフォン（480px以下） */
@media (max-width: 480px) {

  /* Hero section - 上下中央配置 */
  .hero {
    height: auto;
    min-height: 100svh;
    min-height: 100vh; /* svh非対応ブラウザ用フォールバック */
    justify-content: center; /* 上下中央 */
    padding: 0 0 100px 0; /* 下部の研究室名用の余白 */
  }

  @supports (min-height: 100svh) {
    .hero {
      min-height: 100svh;
    }
  }

  .hero-content {
    margin-top: 60px; /* ヘッダー分 */
    max-width: 100%;
    padding: 0 24px;
  }

  .hero-title {
    font-size: 22px;
    gap: 16px;
    letter-spacing: 1.1px;
    line-height: 1.6;
  }

  .hero-title span {
    white-space: normal;
    display: block;
  }

  .lab-name-section {
    position: absolute; /* 下部に固定 */
    bottom: 20px;
    max-width: 100%;
    padding: 0 20px;
    gap: 8px;
  }

  .lab-name-en-hero {
    font-size: 14px;
    letter-spacing: 0.56px;
  }

  .divider-group {
    gap: 8px;
  }

  .lab-name-divider {
    font-size: 18px;
    letter-spacing: 2.34px;
  }

  /* Main content */
  .main-content {
    padding: 72px 0;
  }

  .content-wrapper {
    gap: 72px;
    padding: 0 16px;
  }

  /* Section共通 */
  .section {
    gap: var(--spacing-2xl);
  }

  .section-header {
    gap: 4px;
  }

  .section-title {
    line-height: 1.2;
  }

  /* News section */
  .news-item {
    flex-direction: column;
    gap: 4px;
    padding: 0;
  }

  .news-date {
    width: 100px;
  }

  .news-title {
    width: 100%;
  }

  /* About section */
  .about-video {
    height: 273px;
    margin-bottom: 49px;
  }

  .about-headline {
    font-size: 20px;
    line-height: 1.4;
  }

  .about-text {
    font-size: 15px;
  }

  /* Research cards */
  .research-card-grid {
    gap: var(--spacing-4xl);
  }

  .research-card {
    flex-direction: column;
    gap: var(--spacing-lg);
  }

  .research-card-thumbnail {
    width: 100%;
    aspect-ratio: 300 / 280;
  }

  .research-card-title {
    font-size: 22px;
    line-height: 1.4;
  }

  .research-card-subtitle {
    gap: 14px;
  }

  .research-card-subtitle h4 {
    font-size: 18px;
    line-height: 1.4;
  }

  .title-accent {
    width: 80px;
    height: 2px;
  }

  .research-card-subsection {
    gap: 14px;
  }
}