@charset "UTF-8";

/* =========================================================
   稲垣建装  施工実績ページ専用スタイル
   ========================================================= */

/* Before / After */
.ba-case {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(24px, 4vw, 40px);
  box-shadow: var(--shadow);
  margin-bottom: 32px;
}
.ba-case:last-child { margin-bottom: 0; }
.ba-case__head {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.ba-case__title { font-size: clamp(1.25rem, 2.6vw, 1.6rem); }
.ba-case__tag {
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  color: var(--teal-deep);
  background: var(--teal-soft);
  padding: 5px 14px;
  border-radius: 999px;
}
.ba-case__pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  position: relative;
}
.ba-case__pair::after {
  content: "";
  position: absolute;
  left: 50%; top: 38%;
  transform: translate(-50%, -50%);
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--teal);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  box-shadow: var(--shadow-sm);
  z-index: 2;
}
.ba-case__item { margin: 0; position: relative; }
.ba-case__item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-sm);
}
.ba-case__badge {
  position: absolute;
  top: 12px; left: 12px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 5px 12px;
  border-radius: 4px;
  color: #fff;
}
.ba-case__badge--before { background: #6f7c79; }
.ba-case__badge--after { background: var(--teal); }
.ba-case__item figcaption { margin-top: 12px; font-size: 0.88rem; color: var(--text-muted); }

/* フィルター */
.gallery__filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 40px;
}
.filter-btn {
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  padding: 11px 24px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.3s var(--ease);
}
.filter-btn:hover { border-color: var(--teal); color: var(--teal); }
.filter-btn.is-active { background: var(--teal); border-color: var(--teal); color: #fff; }

/* ギャラリー */
.gallery__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.gallery__item {
  position: relative;
  margin: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  background: #fff;
}
.gallery__item.is-hidden { display: none; }
.gallery__item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.gallery__item:hover img { transform: scale(1.06); }
.gallery__item figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 26px 16px 14px;
  font-size: 0.86rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.03em;
  background: linear-gradient(transparent, rgba(8, 40, 40, 0.85));
}
.gallery__empty { text-align: center; color: var(--text-muted); margin-top: 30px; }

@media (max-width: 880px) {
  .gallery__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .ba-case__pair { grid-template-columns: 1fr; gap: 16px; }
  .ba-case__pair::after {
    left: 50%; top: 50%;
    transform: translate(-50%, -50%) rotate(90deg);
  }
  .gallery__grid { grid-template-columns: 1fr 1fr; gap: 12px; }
}
