.works-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ヒーローセクション */
.works-hero {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.works-hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  filter: blur(7px) brightness(1.05);
  transform: scale(1.05); /* 端のボケ防止 */
}


.works-hero-title {
  position: absolute;
  top: 30%;
  left: 45%;
  transform: translate(-50%, -50%);
  font-size: 6rem;
  font-weight: 900;
  color: #444;
  letter-spacing: 0.1em;
  margin: 0;
}

/* フィルターセクション */
.filter-section {
  background-color: #fff;
  padding: 2rem 2rem;
  border-bottom: 1px solid #e0e0e0;
}

.filter-container {
  max-width: var(--container-width-standard);
  margin: 0 auto;
}

.filter-group {
  margin-bottom: 1.5rem;
  text-align: center;
}

.filter-group:last-child {
  margin-bottom: 0;
}

.filter-label {
  font-size: 1rem;
  font-weight: normal;
  color: #666;
  margin-bottom: 0.8rem;
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: center;
}

.filter-btn {
  padding: 0.6rem 1.5rem;
  border: 1px solid #ddd;
  background-color: #fff;
  color: #666;
  border-radius: 20px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s;
}

.filter-btn:hover {
  border-color: #999;
  background-color: #f9f9f9;
}

.filter-btn.active {
  background-color: #333;
  color: #fff;
  border-color: #333;
}

/* 実績一覧セクション */
.works-list-section {
  flex: 1;
  background-color: #f9f9f9;
  padding: 4rem 2rem;
}

.works-container {
  max-width: var(--container-width-standard);
  margin: 0 auto;
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-bottom: 3rem;
}

/* 実績カード */
.work-card {
  background-color: #fff;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;
  cursor: pointer;
}

.work-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.work-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background-color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
}

.work-image img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform 0.3s;
}

.work-card:hover .work-image img {
  transform: scale(1.05);
}

/* YouTube動画（コンテンツエリア内） */
.work-content .work-video {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 アスペクト比 */
  height: 0;
  overflow: hidden;
  background-color: #000;
  margin-top: 1.5rem;
  border-radius: 4px;
}

.work-content .work-video iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.work-content {
  padding: 1rem;
  text-align: center;
}

.work-title h3{
  font-size: 0.5rem;
  font-weight: bold;
  color: #333;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.work-description {
  font-size: 0.85rem;
  color: #555;
  line-height: 1.6;
  margin-bottom: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: pre-line;
  text-align: left;
}

.work-production {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 0.8rem;
  line-height: 1.6;
}

.work-url {
  font-size: 0.85rem;
  color: #666;
  line-height: 1.6;
}

.work-url a {
  color: #0066cc;
  text-decoration: none;
  transition: color 0.3s;
}

.work-url a:hover {
  color: #004499;
  text-decoration: underline;
}

/* ローディング・エラー表示 */
.loading,
.error-message {
  text-align: center;
  padding: 4rem 2rem;
  font-size: 1.2rem;
  color: #666;
}

.error-message {
  color: #d32f2f;
}

/* もっと見るボタン */
.load-more-section {
  text-align: center;
  margin-top: 3rem;
}

.load-more-btn {
  padding: 1rem 3rem;
  background-color: #333;
  color: #fff;
  border: none;
  border-radius: 30px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s;
}

.load-more-btn:hover {
  background-color: #555;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* 該当なしメッセージ */
.no-results {
  text-align: center;
  padding: 4rem 2rem;
  font-size: 1.2rem;
  color: #666;
  grid-column: 1 / -1;
}

/* work-title 直接スタイル */
.work-title {
  font-size: 1rem;
  font-weight: bold;
  color: #333;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

/* モーダル（ポップアップ） */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.7);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: 2rem;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background-color: #fff;
  border-radius: 12px;
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  border: none;
  background-color: rgba(0, 0, 0, 0.5);
  color: #fff;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s;
  z-index: 10;
}

.modal-close:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

.modal-image {
  width: 100%;
  max-height: 300px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f5f5f5;
  padding: 1rem;
}

.modal-image img {
  max-width: 100%;
  max-height: 280px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.modal-body {
  padding: 2rem;
}

.modal-title {
  font-size: 1.4rem;
  font-weight: bold;
  color: #333;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.modal-description {
  font-size: 1rem;
  color: #555;
  line-height: 1.9;
  margin-bottom: 1.5rem;
  white-space: pre-line;
}

.modal-production {
  font-size: 0.95rem;
  color: #666;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.modal-url {
  font-size: 0.95rem;
  color: #666;
  line-height: 1.6;
}

.modal-url a {
  color: #0066cc;
  text-decoration: none;
}

.modal-url a:hover {
  text-decoration: underline;
}

.modal-video {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  background-color: #000;
  margin-top: 1.5rem;
  border-radius: 4px;
}

.modal-video iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* レスポンシブ */
@media (max-width: 768px) {
  .works-hero {
    height: 180px;
  }

  .works-hero-title {
    font-size: 3rem;
      top: 30%;
      left: 42%;
      transform: translate(-50%, -50%);
      font-weight: 900;
      color: #444;
      letter-spacing: 0.1em;
      margin: 0;
  }

  .filter-section {
    padding: 2rem 1rem;
  }

  .works-list-section {
    padding: 2rem 1rem;
  }

  .works-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .work-image {
    height: 200px;
  }

  .work-content {
    padding: 1.5rem;
  }
}
