/* =========================
   基本設定
========================= */
body {
  margin: 0;
  font-family: "Hiragino Kaku Gothic Pro","Meiryo",sans-serif;
  background: #f9f9f9;
  color: #333;
  overflow-x: hidden; /* 横スクロール防止 */
}
/* =========================
   ヘッダー（背景画像）
========================= */
header {
  position: relative;
  background-image: url("https://www.cea.jp/image/z250715.jpg");
  background-size: cover;       /* 画面いっぱいに表示 */
  background-position: center;  /* 中央基準 */
  background-repeat: no-repeat;
  color: #fff;
  text-align: center;
  padding: 80px 20px;
}

/* 文字を読みやすくするためのオーバーレイ */
header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 74, 124, 0.55); /* 青系の半透明 */
  z-index: 0;
}

/* ヘッダー内の文字を前面に */
header * {
  position: relative;
  z-index: 1;
}

header h1 {
  margin: 0;
  font-size: 2.2em;
  letter-spacing: 0.05em;
}

header p {
  margin: 20px 0 30px;
  font-size: 1.1em;
}

/* =========================
   レイアウト（PC）
========================= */
.container {
  display: flex;
  align-items: flex-start;
  width: 100%;
  margin: 0;
  padding: 30px 0;
}

/* --- 左メニュー --- */
aside {
  width: 300px;        /* ← 左メニュー固定幅 */
  min-width: 300px;
  padding-left: 30px;
}

/* 固定表示 */
.side-box {
  background: #fff;
  border-radius: 8px;
  position: sticky;
  top: 20px;
  border: 1px solid #ddd;
}

.side-box h3 {
  background: #004a7c;
  color: #fff;
  padding: 12px 15px;
  margin: 0;
  font-size: 1.1em;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list li {
  border-bottom: 1px solid #eee;
}

.nav-list li:last-child {
  border-bottom: none;
}

.nav-list li a {
  display: block;
  padding: 12px 15px;
  text-decoration: none;
  color: #333;
  font-size: 0.9em;
}

.nav-list li a:hover {
  background: #f0f7ff;
  color: #004a7c;
}

/* --- メイン（フル幅） --- */
main {
  width: calc(100vw - 300px); /* 画面幅 ? 左メニュー */
  max-width: none;
  padding: 30px 40px;
  background: #fff;
  border-radius: 8px;
}

/* =========================
   コンテンツ
========================= */
section {
  margin-bottom: 40px;
}

section h2 {
  border-bottom: 3px solid #004a7c;
  padding-bottom: 8px;
  margin-bottom: 20px;
  color: #004a7c;
}

/* =========================
   ボタン・リスト
========================= */
.btn-primary {
  background: #e67300;
  color: #fff;
  padding: 12px 30px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  display: inline-block;
}

.news-list {
  list-style: none;
  padding: 0;
}

.news-list li {
  margin-bottom: 12px;
  border-bottom: 1px dashed #eee;
  padding-bottom: 8px;
}

.news-date {
  font-weight: bold;
  margin-right: 10px;
  color: #666;
}

/* =========================
   フッター
========================= */
footer {
  background: #222;
  color: #ccc;
  text-align: center;
  padding: 40px 20px;
  margin-top: 50px;
  font-size: 0.85em;
}

/* =========================
   スマホ対応
========================= */
@media (max-width: 768px) {

  .container {
    flex-direction: column;
    padding: 0 15px;
  }

  aside {
    width: 100%;
    min-width: auto;
    padding-left: 0;
    margin-bottom: 20px;
  }

  .side-box {
    position: relative; /* 固定解除 */
    top: auto;
  }

  main {
    width: 100%;
    padding: 25px;
  }
}
/* =========================
   研究会 グリッド表示
========================= */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 25px;
  margin-top: 30px;
}

.card {
  background: #fdfdfd;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  padding: 25px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.card h3 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 1.1em;
  color: #004a7c;
}

.card p {
  margin: 0;
  font-size: 0.95em;
  line-height: 1.6;
}
/* ==============================
   リンク集テーブル 共通設定
   ============================== */

/* 表全体 */
main table {
  width: 100%;
  max-width: 960px;        /* 全テーブル共通幅 */
  margin: 0 0 32px 0;
  border-collapse: collapse;
  table-layout: fixed;     /* 列幅固定（重要） */
  background: #e6ffff;
}

/* セル */
main table td {
  width: 25%;              /* 4列均等 */
  border: 1px solid #666;
  padding: 12px 10px;
  text-align: center;
  vertical-align: middle;
  font-size: 0.95rem;
  word-break: break-word;
}

/* リンク */
main table a {
  font-weight: bold;
  color: #003366;
  text-decoration: none;
  display: inline-block;
}

main table a:hover {
  text-decoration: underline;
}

/* 見出し調整 */
main h2,
main h3 {
  max-width: 960px;
  margin: 24px 0 12px 0;
  text-align: left;
}

/* ==============================
   スマホ対応（768px以下）
   ============================== */

@media (max-width: 768px) {

  /* テーブルをカード風にする */
  main table,
  main table tbody,
  main table tr,
  main table td {
    display: block;
    width: 100%;
  }

  main table {
    background: transparent;
  }

  main table tr {
    margin-bottom: 16px;
    border: 1px solid #ccc;
    background: #e6ffff;
  }

  main table td {
    border: none;
    border-bottom: 1px solid #ccc;
    text-align: left;
    padding: 10px 12px;
    font-size: 1rem;
  }

  main table td:last-child {
    border-bottom: none;
  }

  main table a {
    display: block;
    width: 100%;
  }
}
