/* --- スライドショー本体 --- */
.slideshow {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 7;
  max-height: 500px;
  background: #f8fafc;
}

/* 各スライド（重なり合うように absolute に設定） */
.slide-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.slide-img.active {
  opacity: 1;
  z-index: 2;
}

.slide-img img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* テキストのオーバーレイ */
.slide-text-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(0, 0, 0, 0.6);
  color: #fff;
  padding: 24px 32px;
  border-radius: 8px;
  max-width: 60%;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  text-align: center;
}

.slide-text-overlay h3 {
  margin: 0 0 12px 0;
  font-size: 24px;
}

.slide-text-overlay p {
  margin: 0;
  font-size: 15px;
  opacity: 0.9;
}

/* 矢印ボタン */
.arrow-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  color: #888;
  border: none;
  font-size: 32px;
  cursor: pointer;
  z-index: 10;
  transition: color 0.2s;
}

.arrow-btn:hover {
  color: #333;
}

.arrow-btn.left {
  left: 20px;
}

.arrow-btn.right {
  right: 20px;
}

/* コントロール（ドット） */
.slide-controls {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(136, 136, 136, 0.4);
  cursor: pointer;
  transition: all 0.3s;
}

.dot.active {
  background: #888;
  transform: scale(1.3);
}

/* プログレスバー */
.progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: rgba(136, 136, 136, 0.6);
  z-index: 11;
  width: 0;
}

/* ==========================================
   スライドショー上のテキストオーバーレイ
========================================== */
.slide-text-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(0, 0, 0, 0.6);
  color: #fff;
  padding: 24px 32px;
  border-radius: 8px;
  max-width: 60%;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  z-index: 5;
  /* 矢印の下、写真の上に配置 */
}

.slide-text-overlay h3 {
  margin: 0 0 12px 0;
  font-size: 24px;
  font-weight: bold;
  letter-spacing: 0.05em;
}

.slide-text-overlay p {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
}

/* --- メインコンテンツ（横並びレイアウト） --- */
.main-wrapper {
  display: flex;
  gap: 48px;
  align-items: flex-start;
  padding: clamp(36px, 5vw, 60px) clamp(24px, 5vw, 48px);
}

.research-overview-col {
  flex: 6;
}

.news-excerpt-col {
  flex: 4;
  background: var(--color-background-secondary);
  padding: 24px;
  border-radius: var(--border-radius-lg);
  border: 0.5px solid var(--color-border-tertiary);
}

/* --- 研究概要エリア --- */
.research-overview-col h1 {
  color: var(--color-text-primary);
  margin-bottom: 24px;
}

.hero-tag {
  display: inline-block;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.07em;
  padding: 5px 12px;
  border-radius: 4px;
  background: #E6F1FB;
  color: #0C447C;
  margin-bottom: 20px;
}

.hero-text-long {
  font-size: clamp(15px, 2.2vw, 17px);
  color: var(--color-text-secondary);
  line-height: 1.8;
  margin-bottom: 24px;
}

.hero-quote {
  margin-top: 32px;
  border-left: 2px solid var(--color-border-tertiary);
  padding-left: 14px;
  margin-bottom: 32px;
}

.hero-research-img {
  width: 100%;
  /* ★これを追加！画面が狭い時は枠に合わせて縮むようになります */
  max-width: 480px;
  /* PCなど画面が広い時は、これまで通り480px以上には拡大しません */
  height: auto;
  display: block;
  margin: 3rem auto;
  border-radius: var(--border-radius-lg);
  border: 0.5px solid var(--color-border-tertiary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  transition: opacity 0.3s;
}

.hero-research-img:hover {
  opacity: 0.8;
}

/* --- ニュース抜粋エリア・X埋め込み --- */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 24px;
}

.section-title {
  font-size: 24px;
  font-weight: bold;
  color: var(--color-text-primary);
  letter-spacing: 0.05em;
}

.section-link {
  font-size: 14px;
  color: #185FA5;
  text-decoration: none;
}

.x-timeline-area {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px dashed var(--color-border-secondary);
}

/* --- レスポンシブ対応（スマホ・タブレット表示） --- */
@media (max-width: 900px) {
  .main-wrapper {
    flex-direction: column;
    gap: 32px;
    padding: 32px 20px;
  }

  .research-overview-col,
  .news-excerpt-col {
    flex: none;
    width: 100%;
  }

  /* ★タブレットでの比率設定 */
  .slideshow {
    height: auto;
    aspect-ratio: 16 / 8;
  }
}

@media (max-width: 768px) {
  .slide-text-overlay {
    width: calc(100% - 40px);
    max-width: none;
    padding: 16px 20px;
  }

  .slide-text-overlay h3 {
    font-size: 18px;
    margin-bottom: 8px;
  }

  .slide-text-overlay p {
    font-size: 13px;
  }
}

@media (max-width: 600px) {

  /* ★スマホでの比率設定 */
  .slideshow {
    height: auto;
    aspect-ratio: 4 / 3;
  }

  .arrow-btn {
    width: 32px;
    height: 32px;
    font-size: 20px;
  }
}