@charset "UTF-8";

/* =========================================================
   竜輝工業 - 施工実績 (works.css)
   ※ Before/After の共通スタイル (.ba) は index.css と重複を避け、
     当ページでも完結するよう定義します。
   ========================================================= */

/* ---------- Filter ---------- */
.works-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 48px;
}
.works-filter__btn {
  padding: 11px 26px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--font-jp);
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text);
  background: #fff;
  transition: all 0.35s var(--ease);
}
.works-filter__btn:hover { border-color: var(--blue); color: var(--blue); }
.works-filter__btn.is-active {
  background: linear-gradient(120deg, var(--blue), var(--blue-500));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 20px rgba(0,0,205,0.22);
}

/* ---------- Grid ---------- */
.works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.work-card { overflow: hidden; }
.work-card.is-hidden { display: none; }

/* before/after */
.ba { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; position: relative; }
.ba::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 38px; height: 38px;
  transform: translate(-50%, -50%);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M9 6l6 6-6 6' stroke='%230000cd' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 22px no-repeat;
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
  z-index: 3;
}
.ba__item { position: relative; }
.ba__item span {
  position: absolute;
  top: 10px; left: 10px;
  z-index: 2;
  font-family: var(--font-en);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  padding: 4px 10px;
  border-radius: 2px;
  color: #fff;
}
.ba--before span { background: rgba(17,24,43,0.78); }
.ba--after span { background: var(--blue); }
.ba__ph { aspect-ratio: 3 / 3.2; background-size: cover; background-position: center; }
.ba__ph--old {
  background: repeating-linear-gradient(135deg, #b9bdc7 0 8px, #a7abb6 8px 16px), #adb1bb;
  position: relative;
}
.ba__ph--old::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(80,70,60,0.22), rgba(40,40,50,0.42));
}
.ba__ph--roof { background: linear-gradient(135deg, #0e2058, #0000cd 70%, #3b54e6); }
.ba__ph--roof2 { background: linear-gradient(160deg, #102a66, #1b32d8 80%); }
.ba__ph--wall { background: linear-gradient(135deg, #1b2a52, #2a4bd7); }
.ba__ph--wall2 { background: linear-gradient(150deg, #14224a, #3b54e6 90%); }
.ba__ph--gutter { background: linear-gradient(135deg, #102a66, #1b32d8); }

.work-card__body { padding: 24px 24px 28px; }
.tag {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
  color: #fff;
}
.tag--roof { background: var(--blue); }
.tag--wall { background: var(--blue-400); }
.tag--gutter { background: var(--navy-700); }
.work-card__body h3 { font-size: 1.18rem; margin-bottom: 8px; }
.work-card__meta { font-size: 0.82rem; color: var(--muted); margin-bottom: 12px; }
.work-card__desc { font-size: 0.9rem; color: var(--text); }

.works-note { margin-top: 40px; text-align: center; font-size: 0.84rem; color: var(--muted); }
.works-note a { color: var(--blue); }
.works-note a:hover { text-decoration: underline; }

@media (max-width: 880px) { .works-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .works-grid { grid-template-columns: 1fr; max-width: 440px; margin-inline: auto; } }
