/* ===================================================
   case.css - 施工事例ページ専用スタイル
   CENTURY21ココカラ
   =================================================== */

/* ===== Case List Grid (2 column) ===== */
.case-list-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 60px;
}

/* ===== Case List Card ===== */
.case-list-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transition: transform 0.3s, box-shadow 0.3s;
  border: 1px solid rgba(0,0,0,0.04);
}
.case-list-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.12);
  opacity: 1;
}

/* ===== Case Card Thumbnail ===== */
.case-list-thumb {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background-size: cover;
  background-position: center;
  background-color: #eee;
  overflow: hidden;
}
.case-list-thumb-inner {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.6s ease;
}
.case-list-thumb-inner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background 0.4s ease;
  z-index: 1;
}
.case-list-card:hover .case-list-thumb-inner {
  transform: scale(1.08);
}
.case-list-card:hover .case-list-thumb-inner::after {
  background: rgba(255,255,255,0.15);
}

/* ===== Case Type Badge ===== */
.case-list-type {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  border-radius: 4px;
  color: #fff;
  background: var(--accent);
  letter-spacing: 0.05em;
  z-index: 2;
}

/* ===== Case Card Body ===== */
.case-list-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.case-list-title {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--text-main);
  margin: 0;
}
.case-list-card:hover .case-list-title {
  color: var(--accent);
}

/* ===== Case Detail: Gallery ===== */
.case-gallery {
  margin-bottom: 40px;
}
.case-gallery-main {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 12px;
  background: #eee;
}
.case-gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.case-gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}
.case-gallery-thumb {
  aspect-ratio: 1;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.3s, opacity 0.3s;
  background: #eee;
}
.case-gallery-thumb:hover,
.case-gallery-thumb.is-active {
  border-color: var(--accent);
  opacity: 1;
}
.case-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ===== Case Detail: Spec Table ===== */
.case-spec-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 40px;
  font-size: 15px;
}
.case-spec-table th {
  text-align: left;
  padding: 14px 20px;
  background: #f5f4f0;
  border-bottom: 1px solid #e8e6e1;
  font-weight: 700;
  color: var(--text-main);
  width: 120px;
  vertical-align: top;
  line-height: 1.6;
}
.case-spec-table td {
  padding: 14px 20px;
  border-bottom: 1px solid #e8e6e1;
  color: var(--text-main);
  line-height: 1.6;
}

/* ===== Case Detail: Body Text ===== */
.case-detail-body {
  padding-top: 40px;
  border-top: 1px solid #e8e6e1;
}
.case-detail-body p {
  font-size: 15px;
  color: var(--text-main);
  line-height: 2;
  margin: 0 0 24px;
}
.case-detail-body p:last-child {
  margin-bottom: 0;
}

/* ===== Responsive: Tablet ===== */
@media (max-width: 1024px) {
  .case-list-grid {
    gap: 20px;
  }
  .case-gallery-thumbs {
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
  }
}

/* ===== Responsive: SP ===== */
@media (max-width: 768px) {
  .case-list-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 40px;
  }
  .case-list-body {
    padding: 16px;
  }
  .case-list-title {
    font-size: 15px;
  }
  .case-gallery-main {
    border-radius: 8px;
    margin-bottom: 8px;
  }
  .case-gallery-thumbs {
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
  }
  .case-spec-table {
    font-size: 14px;
  }
  .case-spec-table th {
    width: 90px;
    padding: 10px 14px;
  }
  .case-spec-table td {
    padding: 10px 14px;
  }
  .case-detail-body p {
    font-size: 14px;
  }
}
