@charset "UTF-8";

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

/* Before / After 比較スライダー */
.ba {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(28px, 5vw, 60px);
  align-items: center;
}
.ba__compare {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4 / 3;
  user-select: none;
  touch-action: none;
}
.ba__img { position: absolute; inset: 0; width: 100%; height: 100%; }
.ba__img img { width: 100%; height: 100%; object-fit: cover; }
.ba__img--after { z-index: 1; }
/* Before レイヤー：画像は枠いっぱいに敷き、バー位置でクリップして表示 */
.ba__img--before {
  z-index: 2;
  width: 100%;
  clip-path: inset(0 calc(100% - var(--ba-pos, 50%)) 0 0);
}
.ba__img--before .ba__before-inner {
  width: 100%; height: 100%;
  background: var(--sky-100);
  display: grid; place-items: center;
  color: var(--blue-600);
  text-align: center;
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1.9;
}
.ba__tag {
  position: absolute; top: 14px;
  font-family: var(--font-en); font-weight: 700; font-size: 0.74rem; letter-spacing: 0.14em;
  padding: 6px 14px; border-radius: 999px; color: #fff; z-index: 3;
}
.ba__tag--before { left: 14px; background: rgba(21,49,75,0.78); }
.ba__tag--after { right: 14px; background: var(--blue-600); }
.ba__handle {
  position: absolute; top: 0; bottom: 0; left: 50%;
  width: 44px; transform: translateX(-50%);
  z-index: 4; cursor: ew-resize;
  display: grid; place-items: center;
}
.ba__handle::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 50%;
  width: 3px; transform: translateX(-50%); background: #fff;
}
.ba__handle-grip {
  width: 44px; height: 44px; border-radius: 50%;
  background: #fff; box-shadow: var(--shadow-md);
  display: grid; place-items: center; color: var(--blue-600);
  position: relative; z-index: 1;
}
.ba__handle-grip svg { width: 22px; height: 22px; }
.ba__caption { }
.ba__caption .en-label { margin-bottom: 14px; }
.ba__caption h2 { font-family: var(--font-head); font-weight: 700; font-size: clamp(1.5rem, 3.4vw, 2.2rem); margin-bottom: 14px; }
.ba__caption p { color: var(--ink-soft); margin-bottom: 18px; }
.ba__note {
  font-size: 0.84rem; color: var(--ink-soft);
  background: var(--sky-50); border: 1px dashed var(--blue-400);
  border-radius: 12px; padding: 12px 16px;
}

/* フィルター */
.filter { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-bottom: 44px; }
.filter__btn {
  padding: 11px 26px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--ink-soft);
  box-shadow: var(--shadow-sm);
  transition: color 0.25s var(--ease), background 0.25s var(--ease), transform 0.25s var(--ease);
}
.filter__btn:hover { transform: translateY(-2px); color: var(--blue-600); }
.filter__btn.is-active { background: var(--grad-blue); color: #fff; border-color: transparent; }

/* ギャラリー */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.gallery__item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), opacity 0.4s var(--ease);
}
.gallery__item:hover { transform: translateY(-8px); box-shadow: var(--shadow-md); }
.gallery__item.is-hidden { display: none; }
.gallery__media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; }
.gallery__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s var(--ease); }
.gallery__item:hover .gallery__media img { transform: scale(1.07); }
.gallery__cat {
  position: absolute; top: 12px; left: 12px;
  background: rgba(255,255,255,0.92); color: var(--blue-700);
  font-size: 0.72rem; font-weight: 700; padding: 5px 12px; border-radius: 999px;
}
.gallery__body { padding: 22px 24px 26px; }
.gallery__title { font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; margin-bottom: 8px; }
.gallery__text { font-size: 0.88rem; color: var(--ink-soft); }
.gallery__tags { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.gallery__tags span { font-size: 0.74rem; background: var(--sky-100); color: var(--blue-700); padding: 4px 12px; border-radius: 999px; }

@media (max-width: 900px) {
  .ba { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .gallery { grid-template-columns: 1fr; }
}
