.header-section {
  /* max-width: 1024px;
  margin: 0 auto; */
  margin-left: 13%;
  margin-right: 13%;
}

.header-text {
  font-size: 20px;
  font-weight: 500;
  margin-bottom: 50px;
  letter-spacing: 1px;
}

.repair-wrapper {
  /* max-width: 1024px;
  margin: 0 auto 50px; */
  margin-left: 13%;
  margin-right: 13%;
  margin-bottom: 100px;
  display: flex;
}

.repair-side {
  flex: 0 0 250px;
  background: #fdf9f9;
  padding: 24px 20px;
  position: sticky;
  top: 2rem; /* ヘッダー高さに合わせて調整 */
  align-self: start;
  max-height: calc(100vh - 4rem);
  overflow-y: auto;
}

.repair-side__head {
  font-size: 20px;
  font-weight: 700;
  margin: 30px 0 12px;
  position: relative;
  color: #5c1816;
  letter-spacing: 3px;
}

.repair-side__head::after {
  content: "";
  display: block;
  width: 100%;
  height: 1px;
  border-bottom: 1px dashed #b32223;
  border-image: repeating-linear-gradient(
      to right,
      #b32223 0,
      #b32223 8px,
      transparent 8px,
      transparent 16px
    )
    100% 1;
  margin-top: 12px;
}

/* 検索フォーム */
.search-form .search-field {
  position: relative;
  margin-bottom: 32px;
  width: 182px;
}

.search-form input[type="search"] {
  padding: 8px 12px;
  border: 1px solid #5c1816;
  border-radius: 4px;
  font-size: 14px;
  background: #fff;
  height: 50px;
  width: 100%;
  font-family: "Zen Kaku Gothic New";
}

.search-form button {
  position: absolute;
  padding: 0;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  margin-left: 10px;
}

/* カテゴリー */
.side-cats,
.side-archives {
  padding-left: 0; /* 左インデントをリセット */
}

.side-cats li,
.side-archives li {
  list-style: none; /* ポチ・数字を非表示 */
  margin: 0.4rem 0;
}

.side-cats li a,
.side-archives li a {
  text-decoration: none;
  color: #b32223;
  font-weight: 700;
  line-height: 30px;
  letter-spacing: 2px;
}

.side-cats li a {
  font-size: 16px;
}

.side-archives li a {
  font-size: 20px;
}

/* カテゴリーピル */
.side-category {
  font-size: 11px;
  line-height: 15px;
  font-weight: 500;
  text-align: center;
}

.repair-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px 20px;
  width: 100%;
}

.repair-images .before,
.repair-images .after {
  flex: 1;
  position: relative;
}

.repair-images img {
  width: 100%;
  height: 238px;
  display: block;
}

.label {
  position: absolute;
  top: 8px;
  left: 8px;
  background: #b32223;
  padding: 2px 8px;
}

.before-label {
  background: #ffd700;
  color: #5c1816 !important;
  width: 100%;
  /* 黄色系 */
}

.after-label {
  background: #b32223;
  /* 緑系 */
}

.repair-title {
  font-size: 20px;
  font-weight: 700;
  margin: 10px;
  color: #b32223;
}

.repair-meta {
  justify-content: space-between;
  padding: 0 10px 10px;
  font-size: 14px;
  color: #666;
}
.repair-archive.l-inner {
  width: 100%;
  margin: 0 20px;
}
.repair-card {
  background: #fff;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
}

.repair-card h2.repair-title a {
  text-decoration: none;
  color: inherit;
}

.repair-card a {
  text-decoration: none; /* アンダーラインを消す */
  color: inherit; /* 親要素の文字色を引き継ぐ */
}

.repair-images .before,
.repair-images .after {
  flex: 1;
  position: relative;
}

.label {
  position: static !important;
  top: 0;
  left: 0;
  width: auto !important; /* ←ラベルをフル幅に */
  text-align: center;
  display: block;
  letter-spacing: 1px;
}

.before-label {
  background: #ffd700; /* 黄色 */
  color: #5c1816; /* 濃い茶 */
  height: 36px !important;
  font-size: 20px !important;
  font-weight: 700;
  font-family: "Zen Old Mincho", serif;
}

.after-label {
  background: #b32223; /* 赤 */
  color: #fff;
  height: 36px !important;
  font-size: 20px !important;
  font-weight: 700;
  font-family: "Zen Old Mincho", serif;
}

.repair-meta {
  justify-content: center;
  flex-wrap: wrap;
  gap: 2px;
  margin: 0 8px 10px;
  font-size: 14px;
  color: #666;
  border-bottom: 1px dashed #b32223;
  border-image: repeating-linear-gradient(
      to right,
      #b32223 0,
      #b32223 8px,
      transparent 8px,
      transparent 16px
    )
    100% 1;
  align-items: center;
}

.repair-date {
  background: #f5f5f5;
  border: 1px solid #b32223;
  color: #b32223;
  border-radius: 15px;
  padding: 2px 10px;
  font-size: 12px;
}

.repair-category {
  background: #f5f5f5;
  border: 1px solid #b32223;
  color: #b32223;
  border-radius: 15px;
  padding: 2px 10px;
  font-size: 12px;
}

.repair-cat-tag {
  display: inline-block;
  padding: 4px 16px;
  margin: 0 4px 4px 0;
  border: 1px solid #b32223;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1.4;
  text-decoration: none;
  background-color: #f5f5f5;
}

.repair-cat-tag--repair {
  background: #f5f5f5;
  border: 1px solid #b32223;
  color: #b32223;
  font-size: 16px;
}

.repair-cat-tag--work {
  color: #b32223;
  font-size: 20px;
  align-items: center;
  text-align: center;
}

.repair-category-group {
  display: flex;
  flex-wrap: wrap; /* タグは折り返しOK */
  box-sizing: border-box;
}
.repair-category-group--repair {
  margin-top: 2px;
}

.side-cats li a {
  text-decoration: none;
  color: #b32223;
  font-weight: 700;
  line-height: 30px;
  letter-spacing: 2px;
  font-size: 16px !important;
}
.side-category {
  font-size: 11px !important;
  line-height: 15px !important;
  font-weight: 500 !important;
  text-align: center !important;
}
.blog-cat-tag {
  display: inline-block;
  padding: 0.25rem 1rem;
  background: #f5f5f5;
  border: 1px solid #b32223;
  border-radius: 9999px;
  color: #b32223;
  font-size: 16px;
  line-height: 1.1;
  text-decoration: none;
  transition: 0.2s;
}
a,
.repair-title,
.repair-cat-tag,
.label {
  text-decoration: none !important; /* 下線を消す */
}

.blog-side {
  .side-cats li {
    margin: 0.3rem 0;
    display: contents;
  }
}
.blog-side {
  .side-cats li,
  .side-archives li {
    margin: 0.3rem 0;
  }
}
.side-archives li,
.side-cats li {
  list-style: none;
  margin: 0.4rem 0;
}
.scroll-to-top-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 136px;
  height: 136px;
  background-color: rgba(255, 255, 255, 0.8); /* ボタン全体の背景 */
  border-radius: 50%;
  box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.3);
  text-align: center;
  font-weight: 700 !important;
  font-family: "Zen Kaku Gothic New";
  font-size: 32px !important;
  line-height: 1;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  letter-spacing: 3px;
  transition: background-color 0.3s, color 0.3s;
}

.repair-meta {
  display: flex;
  flex-direction: column; /* 縦積み */
  align-items: center; /* 横方向中央揃え */
  justify-content: center;
  text-align: center; /* テキストも中央 */
}

.repair-category-group {
  display: flex; /* 修理・作業カテゴリー内もFlex化 */
  flex-wrap: wrap; /* 複数タグが折り返せる */
  justify-content: center; /* タグ全体を中央揃え */
  gap: 4px; /* タグ間の隙間 */
  margin: 5px 0;
  width: 100%;
}

.repair-cat-tag,
.repair-cat-tag--repair,
.repair-cat-tag--work {
  display: inline-block;
  margin: 2px; /* タグの余白 */
}

.repair-cat-tag {
  display: inline-block; /* インライン要素のままだと効かないので追加 */
  max-width: 80%; /* 親要素幅に収める */
  white-space: nowrap; /* 改行させない */
  overflow: hidden; /* はみ出した部分を非表示 */
  text-overflow: ellipsis; /* 省略記号「...」を付ける */
}

/* ページネーション */
.pagination-wrapper {
  margin: 40px 0 60px;
  text-align: center;
}

.pagination-wrapper .page-numbers {
  display: inline-flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 8px;
}

.pagination-wrapper .page-numbers li {
  list-style: none;
  display: flex;
  align-items: center;
}

.pagination-wrapper .page-numbers a,
.pagination-wrapper .page-numbers span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  text-decoration: none;
  font-size: 16px;
  line-height: 1;
  border-radius: 4px;
  font-weight: 500;
  border: 1px solid #d0d0d0;
}

.pagination-wrapper .page-numbers a:hover {
  background-color: #d0d0d0;
  text-decoration: none;
}

.pagination-wrapper .page-numbers .current,
.pagination-wrapper .page-numbers span.current,
.pagination-wrapper .page-numbers li .current,
.pagination-wrapper .page-numbers span[aria-current="page"] {
  background-color: #b32223 !important;
  color: #fff !important;
  font-weight: bold;
}

/* モバイル対応 */
@media screen and (max-width: 768px) {
  .repair-grid {
    grid-template-columns: 1fr; /* 1列表示 */
  }
}

/* モバイル対応 */
@media screen and (max-width: 768px) {
  .section-subtitle {
    font-size: 20px;
    font-weight: 500;
    letter-spacing: 4px;
    margin-bottom: 0;
  }
  .scroll-to-top-btn {
    display: none;
  }
  .sp-none {
    display: none;
  }
  .header-section {
    margin: 0;
    padding: 0 20px;
  }
  .section-title {
    font-size: 36px;
    font-weight: 700;
    letter-spacing: 6px;
    margin-bottom: 0;
  }
  .header-text {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 0;
  }
  .repair-wrapper {
    display: block;
    margin: 0;
    padding: 0 20px 60px;
  }
  .repair-side {
    padding-top: 0;
    position: relative;
    margin-bottom: 50px;
    padding-bottom: 20px;
  }
  .search-form .search-field {
    width: 85%;
  }
  .side-cats li {
    display: contents;
  }
  .repair-archive.l-inner {
    width: auto;
    margin: 0;
  }
  .repair-images img {
    display: block;
    width: 100%;
    max-width: 100%;
  }
  .repair-card {
    padding: 5px;
    margin-bottom: 10px;
  }
  .repair-meta {
    padding-top: 10px;
  }
  .repair-cat-tag--repair {
    font-size: 14px;
    margin-top: 6px;
  }
  .repair-title {
    font-size: 16px;
    font-weight: 700;
  }
  .repair-grid {
    gap: 0;
  }
  .repair-side__head {
    margin-top: 20px;
    margin-bottom: 20px;
  }
  .repair-side__head::after {
    margin-top: 20px;
  }
  .search-form input[type="search"] {
    border-radius: 6px;
  }
  .search-form .search-field {
    margin-bottom: 25px;
  }
  .side-archives {
    margin-bottom: 0;
  }
  .before-label,
  .after-label {
    height: 32px !important;
  }
  .repair-side,
  .blog-side {
    max-height: 300px;
    width: 80%;
    margin: auto;
    margin-bottom: 80px;
    box-shadow: 0 8px 8px 0 rgba(0, 0, 0, 0.25);
    border-radius: 12px;
  }
}
