/* ==========================================
   吉本新喜劇 座員の出身大学一覧 - 全体CSS (university.css)
   ========================================== */

/* 1. リセット・共通基本設定 */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth; /* ページ内リンクでスムーズにスクロール */
}

body {
  font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  line-height: 1.7;
  color: #333333;
  background-color: #f7f9fa;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 16px;
}

/* 2. ヘッダー */
.header {
  background-color: #e68e00; /* オレンジカラー */
  color: #ffffff;
  padding: 40px 16px 32px;
  text-align: center;
  position: relative;
}

.header h1 {
  font-size: 1.6rem;
  margin-bottom: 8px;
}

/* 3. 右上固定ボタン (サイトのトップへ) - 右上に配置・横長カプセル型 */
.totopbutton {
  position: fixed;
  top: 16px;
  right: 16px;          /* 右上に配置 */
  z-index: 99;
  
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;            /* 横幅を広げて文字が詰まらないように調整 */
  height: 38px;           /* 高さをスリムに */
  
  background-color: #ffffff;
  color: #ff6600;
  border: 2px solid #ffffff;
  font-weight: bold;
  font-size: 0.75rem;     /* フォントサイズを微調整 */
  letter-spacing: 0.5px;  /* 文字間を少し開ける */
  text-decoration: none;
  
  border-radius: 20px;    /* 綺麗なカプセル型（角丸） */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transition: all 0.3s ease;
}

.totopbutton:hover {
  background-color: #ff6600;
  color: #ffffff;
  border-color: #ffffff;
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

.totopbutton:active {
  transform: scale(0.95);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* 4. 共通サイト内ナビゲーション */
.site-nav {
  background-color: #333333;
  padding: 8px 0;
}

.site-nav ul {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  list-style: none;
  gap: 12px;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 16px;
}

.site-nav a {
  color: #ffffff;
  text-decoration: none;
  font-size: 0.85rem;
  padding: 4px 8px;
  transition: color 0.2s;
}

.site-nav a:hover {
  color: #ffb84d;
  text-decoration: underline;
}

/* 5. リード文・オリジナル考察枠 (intro-box) */
.intro-box {
  background-color: #ffffff;
  padding: 20px 24px;
  margin: 24px 0 0 0;
  border-radius: 8px;
  border-left: 5px solid #ffaa33;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  font-size: 0.95rem;
  line-height: 1.8;
  color: #333333;
  text-align: left;
}

.intro-box p {
  margin-bottom: 12px;
}

.intro-box p:last-child {
  margin-bottom: 0;
}

/* 6. 大学名の一覧（目次インデックス）の横並び設定 */
.univ-index-nav {
  background-color: #ffffff;
  padding: 20px;
  margin: 24px 0;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.univ-index-nav h2 {
  font-size: 1.1rem;
  color: #e68e00;
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 2px solid #f0f0f0;
}

.univ-index-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
}

.univ-index-list li {
  flex: 0 1 auto;
}

.univ-index-list a {
  display: block;
  padding: 6px 12px;
  background-color: #f5f5f5;
  color: #333333;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: bold;
  border-radius: 4px;
  border: 1px solid #e0e0e0;
  transition: all 0.2s ease;
}

.univ-index-list a:hover {
  background-color: #e68e00;
  color: #ffffff;
  border-color: #e68e00;
}

/* 7. 各大学グループ & 座員カード */
.kana-group {
  margin-bottom: 32px;
  scroll-margin-top: 20px; /* ページ内ジャンプ時のズレ防止 */
}

.kana-header {
  font-size: 1.3rem;
  color: #e68e00;
  border-bottom: 2px solid #e68e00;
  padding-bottom: 4px;
  margin-bottom: 16px;
}

.term-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.term-card {
  background-color: #ffffff;
  padding: 16px 20px;
  border-radius: 8px;
  border-left: 4px solid #e68e00;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.term-title {
  display: flex;
  flex-direction: column;
  margin-bottom: 8px;
}

.term-title .ruby {
  font-size: 0.75rem;
  color: #888888;
}

.term-title .title-text {
  font-size: 1.15rem;
  font-weight: bold;
  color: #111111;
}

.term-desc {
  font-size: 0.95rem;
  color: #444444;
  white-space: pre-line;
}

/* 8. 右下固定ボタン (ページのトップへ戻る) */
.pagetop-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99;
  
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  
  background-color: #ffffff;
  color: #e68e00;
  border: 2px solid #e68e00;
  font-weight: bold;
  font-size: 0.8rem;
  text-decoration: none;
  
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.pagetop-btn:hover {
  background-color: #e68e00;
  color: #ffffff;
  transform: scale(1.08);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.pagetop-btn:active {
  transform: scale(0.95);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* 9. アフィリエイト表示エリア（押しやすいボタン風に改善） */
.affiliate-box {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  margin: 32px 0;
  font-size: 1.1rem;
}

.affiliate-box a {
  display: inline-block;
  padding: 12px 24px;     /* 上下にしっかり余白を持たせてクリックしやすくする */
  background-color: #ffffff; /* 白背景のボタン風 */
  color: #e68e00;         /* オレンジ色の文字 */
  border: 2px solid #e68e00; /* オレンジの枠線 */
  border-radius: 8px;     /* 角丸 */
  text-decoration: none;  /* 下線なし */
  font-weight: bold;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
}

.affiliate-box a:hover {
  background-color: #e68e00; /* ホバー時にオレンジ反転 */
  color: #ffffff;            /* 白文字 */
  text-decoration: none;
}

/* 10. フッター */
.site-footer {
  text-align: center;
  padding: 32px 16px;
  margin-top: 48px;
  color: #777777;
  font-size: 0.85rem;
  border-top: 1px solid #e5e5e5;
  background-color: #ffffff;
}

.site-footer p {
  margin-bottom: 8px;
}

/* 11. スマホ対応（レスポンシブ調整） */
@media (max-width: 600px) {
  .header h1 {
    font-size: 1.3rem;
  }

  .totopbutton {
    top: 12px;
    right: 12px;       /* スマホでも右上に配置 */
    width: 64px;
    height: 34px;
    font-size: 0.7rem;
    border-radius: 16px;
  }

  .pagetop-btn {
    bottom: 16px;
    right: 16px;
    width: 42px;
    height: 42px;
    font-size: 0.75rem;
  }

  .intro-box {
    padding: 16px;
    margin: 16px 0 0 0;
  }

  .univ-index-list a {
    padding: 5px 10px;
    font-size: 0.8rem;
  }

  .site-nav ul {
    gap: 8px;
  }

  .site-nav a {
    font-size: 0.8rem;
    padding: 2px 6px;
  }
}