/* TOPセクション */
.top-section {
  position: relative;
  text-align: center;
  background-color: #f4f4f4;
  margin-top: 60px; /* ナビゲーションバーに被らないように上にマージンを追加 */
  overflow: hidden; /* 画像がセクションからはみ出さないようにする */
}
.top-image {
  width: 100%;
  height: 200px; /* PCで縦幅25% */
  overflow: hidden;
  position: relative;
}
.top-image img {
  width: 100%;
  height: auto;
  object-fit: cover; /* 画像の縦横比を維持しつつ、上下中央を基準にトリミング */
}
.top-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}
.top-icon {
  width: 30%; /* PC表示で横幅30% */
  height: auto;
  margin-bottom: 10px;
}
.top-title {
  font-size: 36px;
  font-weight: bold;
  color: #ffffff;
  white-space: nowrap; /* 改行を防ぐ */
}
@media (max-width: 768px) {
  .top-image {
    height: 200px; /* モバイルで縦幅40% */
  }
  .top-icon {
    width: 50%; /* モバイル表示で横幅50% */
  }
}

.category-box {
  height: 0;
  padding-bottom: 100%;
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background-color: #123597;
}
.category-box h2 {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    text-align: center;
    width: 100%;
    padding: 10px;
    font-size: 1.2rem;
    font-weight: bold;
}
.portfolio-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  border-radius: 10px;
}
.portfolio-item img {
  transition: transform 0.3s ease-in-out;
}
.portfolio-item:hover img {
  transform: scale(1.1);
}
.portfolio-item-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}
.portfolio-item:hover .portfolio-item-overlay {
  opacity: 1;
}
.portfolio-item-content {
  color: #ffffff;
  font-size: 1.2rem;
  text-align: center;
}
@media (max-width: 767px) {
  .category-box h2 {
    font-size: 1rem;
  }
  .portfolio-item-content {
    font-size: 1rem;
  }
}