/* ===============================
   ARCHIVES PAGE
   depends on common.css
================================ */

/* 全体余白 */
.archive-category {
  max-width: 1000px;
  margin: 0 auto 30px; /* 下の余白を少し調整 */
  padding: 0;          /* 内側の余白は個別に設定するため一度0に */
  border: 1px solid #eee; /* 薄い枠線 */
  border-radius: 8px;   /* 角丸 */
  background-color: #f9f9f9; /* serviceに近い背景色 */
  overflow: hidden;    /* 中身がはみ出さないように */
}

/* ===============================
   CATEGORY TOGGLE
================================ */
.archive-toggle {
  width: 100%;
  text-align: left;
  padding: 18px 20px;   /* 上下左右にしっかり余白 */
  font-size: 18px;
  font-weight: 600;
  background: #fff;     /* 閉じている時は白 */
  border: none;         /* 下線を消す */
  cursor: pointer;
  
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.3s;
}

/* 4. ＋記号の設定 */
.archive-toggle::after {
  content: '＋';
  font-size: 16px;
  color: #B04D48;
  font-weight: bold;
}

/* 5. 開いている（active）時の設定 */
.archive-category.active .archive-toggle {
  background-color: #fdfdfd; /* 開いている時のタイトル背景色 */
  border-bottom: 1px solid #eee; /* 開いた時はコンテンツとの区切り線を表示 */
}

.archive-category.active .archive-toggle::after {
  content: '－';
}

.archive-toggle:hover {
  background-color: #f0f0f0;
}

/* 6. コンテンツエリアの余白調整 */
.archive-content {
  display: none;
  padding: 20px; /* 枠の内側に余白を作る */
  background-color: #fff; /* コンテンツ部分は白背景に */
}

.archive-category.active .archive-content {
  display: block;
}

/* ===============================
   CONTENT AREA
================================ */
.archive-content {
  display: none;
  padding-top: 20px;
}

.archive-category.active .archive-content {
  display: block;
}

/* ===============================
   YEAR FILTER
================================ */
.year-filter {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.year-filter button {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid #aaa;
  background: #eee;
  cursor: pointer;
}

.year-filter button.active {
  background: #3a6cff;
  color: #fff;
  border-color: #3a6cff;
}

/* ===============================
   GRID
================================ */
.archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.year-group {
  display: none;
}

.year-group.active {
  display: grid;
}

/* ===============================
   CARD
================================ */
.archive-card {
  display: block;
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  transition: transform .15s ease, box-shadow .15s ease;
}

.archive-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}

.archive-card img {
  width: 100%;
  display: block;
}

/* ===============================
   CARD TEXT
================================ */
.archive-info {
  padding: 10px;
}

.archive-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 4px;
}

.archive-meta {
  font-size: 11px;
  color: #666;
}

.archive-toggle {
  appearance: none;
  -webkit-appearance: none;
  background: none;
  color: #000;          /* ← 青文字防止 */
  border-radius: 0;
  touch-action: manipulation;
}

/* ===============================
   MOBILE
================================ */
@media (max-width: 600px) {

  .archive-toggle {
    font-size: 16px;
  }

  .archive-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .archive-title {
    font-size: 13px;
  }
}

/* ===============================
   ARCHIVE INTRO
================================ */
.archive-intro {
  text-align: center;
  max-width: 700px;
  margin: 20px auto 40px;
  font-size: 14px;
  line-height: 1.6;
  color: #333;
}
