/* 共通スタイル */
body {
  font-family: 'Noto Sans JP', sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f9f7f7;
  color: #333;
}

/* intro（イントロ部分） */
.intro-section {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  padding: 60px 40px;
  margin: 60px auto;
  gap: 40px;
  max-width: 1200px;
}

.intro-text {
  flex: 1 1 50%;
  padding: 40px;
  font-size: 24px;
  line-height: 1.8;
}

.intro-text h2 {
  font-size: 52px;
  margin-bottom: 20px;
}

.intro-text p {
  font-size: 20px;
  margin-bottom: 10px;
}

/* intro画像スライド */
.main-image {
  flex: 1 1 45%;
  max-width: 600px;
  aspect-ratio: 4 / 3;
  position: relative;
  overflow: hidden;
  border-radius: 12px;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  border-radius: 16px;
}

.slide.active {
  opacity: 1;
  z-index: 1;
}

@media (max-width: 768px) {
  .intro-section {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
  }

  .intro-text, .main-image {
    width: 100%;
    max-width: 90%;
    padding: 0;
  }

  .intro-text {
    order: 1;
  }

  .main-image {
    order: 2;
  }
}

h1, h2 {
  margin: 0;
}

header {
  padding: 20px;
  background-color: #dbe2ef;
  text-align: center;
}

hr {
  width: 200px;
  border: 2px solid #3f72af;
  margin: 20px auto;
}

/* ナビゲーションバー */
.header {
  display: flex;
  position: sticky;
  z-index: 2;
  top: 0;
  justify-content: space-between; /* 両端揃え */
  align-items: center; /* 中央揃え */
  padding: 20px 40px;
  background-color: #003567;
}

/* ホームページタイトル */
.header h1 {
  margin: 20px;
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 700; 
  font-size: 40px;
  color: #ffffff;
}

.header-title-link {
  text-decoration: none;
  color: white;
}

/* ナビゲーション */
.nav {
  list-style: none;
  padding: 0;
  margin: 40px;
  display: flex;
  gap: 20px;
}

.nav-item {
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 400;
  font-size: 20px;
}

.nav-item a {
  text-decoration: none;
  color: #ffffff;
  padding: 8px 16px;
  border-radius: 5px;
  transition: background-color 0.3s, color 0.3s;
}

.nav-item a:hover {
  background-color: #3f72af;
  color: #fff;
}

/* ドロップダウンメニュー */
.nav-item {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #ffffff;
  border: 1px solid #ccc;
  min-width: 160px;
  list-style: none;
  padding: 0;
  margin: 0;
  border-radius: 8px;
  overflow: hidden;

  /* アニメーション効果 */
  max-height: 0;
  opacity: 0;
  transform: translateY(-10px);
  transition: max-height 0.4s ease, opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
  z-index: 10;
}

.dropdown-menu li a {
  display: block;
  padding: 12px 20px;
  color: #333;
  text-decoration: none;
  font-size: 16px;
  transition: background-color 0.3s;
}

.dropdown-menu li a:hover {
  background-color: #f0f0f0;
}

/* ホバー時にドロップダウンが表示される */
.nav-item.dropdown:hover .dropdown-menu {
  max-height: 500px;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* セクションスタイル */
.section__header {
  text-align: left; /* テキスト左揃え */
  padding: 70px; /* intro-textと同じパディングを適用 */
  margin: 20px 0; /* 上下の余白を調整 */
}

.section__header hr {
  width: 400px; /* hrの長さ */
  border: 2px solid #3f72af; /* 線の色と太さ */
  margin: 10px  0; /* 上下の余白を設定 */
}

.section__header h1 {
  font-size: 60px;
  color: #000000;
}

.section__header p {
  font-size: 20px;
  color: #000000;
}

/* 年別フィルターボタンのスタイル */
.year-filter {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 40px auto;
  flex-wrap: wrap;
}

.year-btn {
  font-size: 20px;
  font-weight: 600;
  padding: 16px 32px;
  border: none;
  border-bottom: 4px solid transparent;
  background-color: #e0e0e0;
  color: #333;
  cursor: pointer;
  transition: all 0.3s ease-in-out;
  border-radius: 8px 8px 0 0;
}

.year-btn:hover {
  background-color: #d5e0f0;
}

.year-btn.active {
  background-color: #3f72af;
  color: white;
  border-bottom: 4px solid #3f72af;
}

/* カードスタイル */
.cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin: 20px auto;
}

.card {
  background-color: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  width: 300px;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
  margin: 20px 10px;
}

.card:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
}

.card h2 {
  font-size: 30px;
  margin-bottom: 10px;
  color: #333;
}

.card p {
  font-size: 18px;
  color: #333;
}

.card__icon {
  width: 120px;
  opacity: 0.8;
}

/* aboutカード */
.card-link,
.card-link:visited {
  text-decoration: none; /* 下線を削除 */
  color: inherit;         /* 元のテキスト色を維持 */
  display: block;         /* カード全体をクリック可能に */
}

.card-link:hover {
  opacity: 0.9; /* ホバー時の軽い反応効果 */
}

/* Newsセクションスタイル */
.news-section {
  max-width: 1200px;
  margin: 40px auto;
  padding: 20px;
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(161, 75, 75, 0.1);
}

.news-section header {
  text-align: center;
}

.news-section h1 {
  font-size: 24px;
  color: #222;
}

.news-section p {
  font-size: 14px;
  color: #666;
}

.news-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #f8f8f8;
  border-radius: 12px;
  padding: 16px;
  margin-top: 20px;
  transition: background-color 0.3s;
  cursor: pointer;
}

.news-box:hover {
  background-color: #eaeaea;
}

.news-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.news-date {
  font-size: 20px;
  color: #333;
  flex: 1;
}

.news-content {
  flex: 4;
  text-align: left;
  font-size: 18px;
  color: #333;
}

.news-icon {
  flex: 0.5;
  font-size: 20px;
  color: #333;
  text-align: center;
  transform: rotate(-45deg); /* 45度回転 */
  display: inline-block; /* 回転を適用するために必要 */
}

.button-wrapper {
  text-align: center;  
  width: 100%;
  margin-bottom: 60px; 
}

.more-button {
  display: inline-block;
  background-color: #d8d5d5;
  border: none;
  border-radius: 12px;
  padding: 10px 20px;
  font-size: 16px;
  cursor: pointer;
  text-decoration: none;
  color: #000;
  transition: background-color 0.3s;
}

.more-button:hover {
  background-color: #e0e0e0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

footer {
  padding: 2em;
  font-size: 18px;
  text-align: center;
  color: white;
  background-color: #3f72af;
}
