/* ================================
   クエリーループのスタイル
   ================================ */
.wp-block-post-template {
  margin-bottom: 2rem;
}

.wp-block-post-template .wp-block-post-title {
  font-size: 1rem;
  font-weight: normal;
}

/* newsタイプのクエリーループ */
.wp-block-post-template:has(.type-news) {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--wp--preset--color--border-color);
  margin-bottom: 30px;
}

.wp-block-post-template:has(.type-news)>li {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 25px;
  align-items: center;
  border-bottom: 1px solid var(--wp--preset--color--border-color);
  padding: 20px 0;
}

.wp-block-post-template:has(.type-news) .wp-block-post-date {
  margin: 0;

  grid-column: 1;
}

.wp-block-post-template:has(.type-news) time {
  display: inline-block;
  font-size: 14px;
}

.wp-block-post-template:has(.type-news) .wp-block-post-title {
  display: inline-block;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
  margin: 0;
  grid-column: 2;
  margin-block-start: 0;
}

.wp-block-post-template:has(.type-news) .wp-block-post-title a {
  text-decoration: none;
}

.wp-block-post-template:has(.type-news) .wp-block-post-title a:hover {
  text-decoration: underline;
}

/* 通常投稿のクエリーループ */
.wp-block-post-template:has(.type-post, .type-gallery) {
  display: grid;
  /* 4列で表示 */
  grid-template-columns: repeat(auto-fill, minmax(calc((100% - 4.5rem) / 4), 1fr));
  gap: 1.5rem;
  margin-top: 0;
}

/* 通常投稿のアイキャッチ画像 */
.wp-block-post-template:has(.type-post, .type-gallery) .wp-block-post-featured-image {
  border: 1px solid var(--wp--preset--color--border);
  margin-bottom: 20px;
  overflow: hidden;
  height: 165px;
}

.wp-block-post-template:has(.type-post, .type-gallery) .wp-block-post-featured-image img {
  object-fit: cover;
  width: 100%;
  height: 100%;
  transition: transform 0.5s;
}

.wp-block-post-template:has(.type-post, .type-gallery) .wp-block-post-featured-image:hover img {
  transform: scale(1.05);
}


/* post-template内のブロック間のマージンをリセット */
.wp-block-post-template>*+*,
.wp-block-post-template [class*="wp-block-"]+[class*="wp-block-"] {
  margin-block-start: 0;
}

.wp-block-post-template time {
  margin-block-start: 0;
  color: #aaa;
  letter-spacing: .1em;
  font-weight: 500;
}

.wp-block-post-template:has(.type-post) time {
  font-size: 12px;
}

.wp-block-post-template .wp-block-post-terms {
  display: inline-block;
  background-color: var(--wp--preset--color--secondary);
  color: var(--wp--preset--color--primary-text);
  font-size: 12px;
  border-radius: 3px;
  padding: 0 5px;
  margin-right: 5px;
}


.case-layout {
  background-color: var(--wp--preset--color--primary-light-bg);
  padding: 6%;
}

.case-layout time {
  color: #aaa;
  font-weight: 500;
  font-size: 12px;
  margin-right: 15px;
}

.case-layout .category {
  display: inline-block;
  background-color: var(--wp--preset--color--secondary);
  color: var(--wp--preset--color--primary-text);
  font-size: 12px;
  padding: 0 5px;
  border-radius: 3px;
  margin-right: 10px;
}


.wp-block-flexible-table-block-table.wp-block-flexible-table-block-table.custom-table>table {
  border: 1px solid var(--wp--preset--color--border-color);
}

.wp-block-flexible-table-block-table.wp-block-flexible-table-block-table.custom-table>table tr th,
.wp-block-flexible-table-block-table.wp-block-flexible-table-block-table.custom-table>table tr td {
  border: 1px solid var(--wp--preset--color--border-color);
  line-height: 1.5;
  font-size: 15px;
  padding: 15px;
}

.wp-block-flexible-table-block-table.wp-block-flexible-table-block-table.custom-table>table tr th {
  background-color: var(--wp--preset--color--primary);
  color: var(--wp--preset--color--primary-text);
  vertical-align: top;
  text-align: left;
  width: 25%;
}

.case-layout .wp-block-button {
  margin-top: 30px;
}

@media (max-width:800px) {

  .wp-block-flexible-table-block-table.wp-block-flexible-table-block-table.custom-table>table tr th,
  .wp-block-flexible-table-block-table.wp-block-flexible-table-block-table.custom-table>table tr td {
    width: 100%;
    display: block;
    padding: 10px;
    font-size: 14px;
  }
}
