/* ===============================
   Base
=============================== */
body {
  margin: 0;
  font-family: 'Noto Sans JP', sans-serif;
  line-height: 1.7;
  background: #f7f8fb;
  color: #0a0a0c;
}

.container {
  width: min(100% - 48px, 1120px);
  margin: 0 auto;
  padding: 40px 0;
}

h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 32px;
  margin-bottom: 20px;
}

/* ===============================
   Filter
=============================== */
.filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.filter button {
  padding: 8px 16px;
  border: none;
  border-radius: 20px;
  background: #eee;
  cursor: pointer;
  transition: 0.3s;
  font-size: 0.95rem;
  white-space: nowrap;
}

.filter button.active,
.filter button:hover {
  background: #0e0e10;
  color: #fff;
}

/* ===============================
   Works Grid
=============================== */
.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #ddd;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: 0.3s;
}

.card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.card .content {
  padding: 16px;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.card p {
  margin: 0;
  font-size: 0.9rem;
  color: #555;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* ===============================
   Pagination
=============================== */
.pagination {
  text-align: center;
  margin: 30px 0;
}

.pagination button {
  margin: 0 4px;
  padding: 6px 12px;
  border: none;
  background: #eee;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.3s;
}

.pagination button.active {
  background: #0e0e10;
  color: #fff;
}

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

  /* コンテナ余白を少し狭く */
  .container {
    width: min(100% - 32px, 100%);
    padding: 24px 0;
  }

  /* フィルタボタンエリアをスクロール対応に */
  .filter {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 8px;
    padding-bottom: 8px;
    margin-bottom: 20px;
  }

  /* スクロールバーを非表示（iOS/Android両対応） */
  .filter::-webkit-scrollbar {
    display: none;
  }

  /* ボタンをタップしやすく大きめに */
  .filter button {
    flex-shrink: 0;
    padding: 10px 18px;
    font-size: 1rem;
    border-radius: 24px;
    background: #f0f0f0;
    min-width: 110px;
    text-align: center;
    transition: 0.3s;
  }

  .filter button.active {
    background: #0e0e10;
    color: #fff;
  }

  /* Worksカードを1列に */
  .works-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .card img {
    height: 200px;
  }
}
