* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: Helvetica, sans-serif;
}

:root {
  --primary-color: #1e40af; /* モダンなダークブルー */
  --secondary-color: #3b82f6; /* ライトブルー */
  --accent-color: #10b981; /* エメラルドグリーン */
  --text-color: #1f2937; /* ダークグレー */
  --bg-color: #f8fafc; /* 非常にライトグレー */
  --card-bg: #fff;
}

body {
  background: var(--bg-color);
  color: var(--text-color);
  font-family:
    "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans",
    Meiryo, sans-serif; /* 日本語フォントをモダンに */
}

html {
  scroll-behavior: smooth; /* スムーズスクロール */
}

header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  box-shadow: 0 2px 4px rgb(0 0 0 / 10%);
}

header h1 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  color: #fff;
}

h2 {
  display: inline-block;
  font-weight: normal;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: #fff;
  background-color: var(--primary-color);
  border-radius: 15px;
  padding: 5px 15px;
}

strong {
  font-weight: bold;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 1rem;
}

nav a {
  color: #fff;
  text-decoration: none;
}

main {
  display: flex;
  width: 100%;
  margin: 2rem auto;
  padding: 1rem;
  gap: 2rem;
}

.research ul {
  margin-left: 1rem;
  list-style-type: disc;
}

.news main {
  max-width: 1200px;
}

.news .news-list {
  width: 80%;
  max-height: 500px;
  overflow-y: auto;
}

.news .news-item {
  display: flex;
  padding: 15px;
  border-bottom: 1px solid #000;
}

.news .news-date {
  flex-grow: 0;
  flex-shrink: 0;
}

.news .news-label {
  display: inline-block;
  width: 80px;
  height: 25px;
  margin-left: 30px;
  margin-right: 30px;
  margin-bottom: 10px;
  padding-top: 2px;
  color: #fff;
  font-size: 0.875rem;
  text-align: center;
  justify-content: center;
  flex-grow: 0;
  flex-shrink: 0;
  border-radius: 10px;
}

.news .news-label.new {
  background-color: #2980b9;
}

.news .news-label.event {
  background-color: #f39c12;
}

.news .news-label.update {
  background-color: #27ae60;
}

.contents {
  flex: 3;
  width: 80%;
}

.sidebar {
  flex: 1;
  background: #fff;
  width: 20%;
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 0 5px rgb(0 0 0 / 20%);
}

footer {
  position: static;
  background: #036;
  color: #fff;
  text-align: center;
  width: 100%;
  height: 40px;
  bottom: 0;
  left: 0;
}

@media (width <= 768px) {
  main {
    flex-direction: column; /* 縦並びに変更 */
  }

  .contents,
  .sidebar {
    width: 100%;
  }

  .news li {
    flex-direction: column; /* ニュースの日付とテキストを縦に */
    align-items: flex-start;
  }

  .news .label {
    margin: 5px 0; /* 余白の調整 */
  }
}

/* =========================================
   追加: ページ共通レイアウトとモダンデザイン
   ========================================= */

/* ナビゲーションの現在地ハイライト */
nav a.active {
  font-weight: bold;
  border-bottom: 2px solid var(--accent-color, #f39c12);
  padding-bottom: 2px;
}

/* メインコンテンツを中央寄せ＆幅広に */
.page-main {
  justify-content: center;
}

.full-width {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  background: #fff;
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgb(0 0 0 / 5%);
}

.page-title {
  margin-bottom: 40px;
  text-align: center;
}

.page-title p {
  color: #666;
  margin-top: 10px;
}

.section-heading {
  font-size: 1.4rem;
  color: #036;
  border-bottom: 2px solid #eee;
  padding-bottom: 10px;
  margin-bottom: 20px;
  margin-top: 40px;
}

/* =========================================
   追加: メンバーページのカードレイアウト
   ========================================= */

/* 教員のグリッドレイアウト */
.member-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
}

/* 教員カードの装飾 */
.member-card {
  display: flex;
  align-items: center;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  padding: 20px;
  border-radius: 12px;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.member-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 15px rgb(0 0 0 / 8%);
}

/* アイコンのプレースホルダー（画像がない場合） */
.member-avatar {
  width: 60px;
  height: 60px;
  background-color: #036;
  border-radius: 50%;
  margin-right: 20px;
  flex-shrink: 0;
  object-fit: cover; /* 画像の比率を維持しつつ、円形内にフィットさせる */
}

.member-info h4 {
  font-size: 1.2rem;
  margin-bottom: 5px;
  color: #333;
}

.member-info .role {
  font-size: 0.9rem;
  color: #666;
}

/* 学生のグリッドレイアウト */
.student-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
}

.grade-group h4 {
  background-color: #e9ecef;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 1.1rem;
  margin-bottom: 15px;
  color: #036;
}

.student-list {
  list-style-type: none;
  padding-left: 0;
}

.student-list li {
  padding: 8px 12px;
  border-bottom: 1px dashed #ccc;
  color: #444;
}

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

/* カードスタイル for researchs.html */
.card {
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: 0 4px 6px rgb(0 0 0 / 10%);
  padding: 20px;
  margin-bottom: 20px;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 12px rgb(0 0 0 / 15%);
}

.card h2 {
  margin-bottom: 10px;
}
