.p-search {
  display: grid;
  gap: 60px;
  background: #f2f2f2;
  padding: 80px 0;
}

.p-search__content {
  display: grid;
  gap: 80px;
}

.p-search__title {
  font-weight: Bold;
  font-size: 25px;
  text-align: center;
}

.p-search__tag {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 23px;
  max-width: 1070px;
  margin: 0 auto;
}

.p-search__btn {
  display: flex;
  align-items: center;
  border-radius: 10px;
  background: #ffffff;
  color: #1c1c1c;
  text-decoration: none;
  box-shadow: 0px 0px 10px 0px #3b3b3b1a;
}

.p-search__btn:hover {
  opacity: 0.8;
}

.p-search__btn-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 72px;
  height: 58px;
  border-right: 1px solid #f2f2f2;
}

.p-search__btn-icon img {
  display: block;
  width: 40px;
  height: 40px;
}

.p-search__btn-content {
  flex: 1;
  padding: 8px 12px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 58px;
  overflow: hidden;
}

.p-search__btn-label {
  font-weight: Bold;
  font-size: 15px;
  white-space: pre-wrap;
  line-height: 1.4;
}

/* 13個目以降のタグリンクを非表示にする */
.p-search__btn.is-hidden {
  display: none;
}

/* もっと見るボタンのコンテナ */
.p-search__more {
  text-align: center;
}

/* ボタン本体（リセット含む） */
.c-view-more-btn {
  appearance: none;
  background: transparent;
  border: none;
  cursor: pointer;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-decoration: none;
}

/* アクティブ時（閉じる時）の矢印回転 */
.c-view-more-btn.is-active .c-view-more-btn__icon {
  transform: rotate(180deg);
}

.c-view-more-btn__text {
  color: #000000;
  font-weight: bold;
  font-size: 15px;
  text-align: center;
}

/* レスポンシブ対応 */
/* モバイル（～768px） */
@media (max-width: 768px) {
  .p-search {
    padding: 40px 0;
    gap: 40px;
  }

  .p-search__content {
    gap: 40px;
    padding: 0 16px;
  }

  .p-search__title {
    font-size: 18px;
  }

  .p-search__tag {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .p-search__btn {
    flex-direction: column;
    height: 110px;
  }

  .p-search__btn-icon {
    width: 100%;
    height: 50px;
    border-right: none;
    border-bottom: 1px solid #f2f2f2;
    flex-shrink: 0;
  }

  .p-search__btn-content {
    padding: 10px 8px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
  }

  .p-search__btn-label {
    font-size: 12px;
    line-height: 1.3;
  }
}

/* タブレット（769px～1024px） */
@media (min-width: 769px) and (max-width: 1024px) {
  .p-search {
    padding: 60px 0;
    gap: 50px;
  }

  .p-search__content {
    gap: 60px;
    padding: 0 24px;
  }

  .p-search__title {
    font-size: 22px;
  }

  .p-search__tag {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    max-width: 100%;
  }

  .p-search__btn-label {
    font-size: 14px;
    line-height: 1.4;
  }
}

/* デスクトップ（1025px～1199px）- 2列 */
@media (min-width: 1025px) and (max-width: 1199px) {
  .p-search__content {
    padding: 0 40px;
  }

  .p-search__tag {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* デスクトップ（1200px～1439px）- 3列 */
@media (min-width: 1200px) and (max-width: 1439px) {
  .p-search__content {
    padding: 0 40px;
  }

  .p-search__tag {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* デスクトップ（1440px～）- 4列 */
@media (min-width: 1440px) {
  .p-search__content {
    padding: 0 40px;
  }

  .p-search__tag {
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
  }

  .p-search__btn-icon {
    width: 60px;
    height: 58px;
  }

  .p-search__btn-label {
    font-size: 14px;
  }
}
