/*
Theme Name: Hamilton Child
Template: hamilton
*/

/* グリッド */
.wp-block-post-template {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

/* 投稿1件 */
.wp-block-post-template li {
  float: none;
  width: 100%;
  margin: 0;
  padding: 0;
}

/* 画像 */
.wp-block-post-featured-image img {
  width: 100%;
  display: block;
}

.section-inner.thin {
  max-width: 100% !important;
  padding: 0 16px; /* 端の余白 */
  box-sizing: border-box;
}

.page-header {
  display: none !important;
}

header.section-inner.site-header {
  display: flex;
  align-items: center;          /* ← 高さ揃う */
  justify-content: space-between; /* ← 左右に分かれる */
}

.header-contact {
  margin-left: auto;
}

.home .site-title {
  display: none;
}

.site-title a,
.contact-btn {
  line-height: 1.2;
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #06C755; /* LINEグリーン */
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: bold;
}

.line-icon svg path {
  fill: #fff;
}

.line-icon svg text {
  fill: #06C755;
}

.post-meta,
.post-date,
.entry-date,
.posted-on {
  display: none;
}

/* =========================
   スマホ用（768px以下）
========================= */
@media screen and (max-width: 768px) {
  .contact-btn {
    padding: 8px 12px;
    font-size: 14px;
    gap: 6px;
  }

  .contact-btn svg {
    width: 20px;
    height: 10px;
    transform: scale(3.5);
  }

  /* ■ カバーのテキスト位置調整 */
  .wp-block-cover {
    min-height: 100px !important;
    height: auto;
  }

  /* 中のテキスト位置も整える */
  .wp-block-cover__inner-container {
    padding: 20px;
  }

  .fixed-design-btn {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999;

    width: 90%;
    text-align: center;

    background-color: #000;
    color: #fff;
    border-radius: 30px;
  }

  .wp-block-image img {
    aspect-ratio: auto !important;
  }

  .top-row {
    margin-bottom: 10px;
  }

  .top-row,
  .bottom-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
  }

  .top-row .wp-block-image,
  .bottom-row .wp-block-image {
    margin: 0;
  }

  .top-row .wp-block-group,
  .bottom-row .wp-block-group {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 8px;
    margin: 0;
  }

  .wp-block-columns.top-row > .wp-block-column:first-child,
  .wp-block-columns.bottom-row > .wp-block-column:last-child {
    flex: 2 !important;
    padding: 0 !important;
  }

  .wp-block-columns.top-row > .wp-block-column:last-child,
  .wp-block-columns.bottom-row > .wp-block-column:first-child {
    flex: 1 !important;
    padding: 0 !important;
  }

  .wp-block-columns.top-row,
  .wp-block-columns.bottom-row {
    flex-wrap: nowrap !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-top: 0 !important;
  }

  /* 大画像 */
  .top-row .wp-block-column:first-child img,
  .bottom-row .wp-block-column:last-child img {
    height: 220px;
    object-fit: cover;
  }

  /* 小画像 */
  .top-row .wp-block-column:last-child img,
  .bottom-row .wp-block-column:first-child img {
    height: 105px;
    object-fit: cover;
  }

  .wp-block-query .wp-block-post-template {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px; /* 好きな余白 */
  }

}

@media (max-width: 600px) {
  .wp-block-query .wp-block-post-template {
    grid-template-columns: repeat(3, 1fr) !important;
    margin-left: 0;
    padding-left: 0;
  }
}
