/* =========================================================================
   Service Detail Pages — Custom Blocks
   ========================================================================= */

/* QuickAnswer */
.quick-answer {
  background: var(--background);
  border-left: 4px solid var(--primary);
  padding: 1.5rem;
  margin-block: 2rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  box-shadow: var(--shadow-sm);
}
.quick-answer__label {
  display: block;
  font-weight: 700;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
  margin-bottom: 0.5rem;
}
.quick-answer p {
  margin: 0;
  font-style: italic;
  color: var(--foreground);
}

/* DataTable */
.data-table-wrapper {
  margin-block: 3rem;
  overflow-x: auto;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  background: var(--card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.data-table caption {
  font-weight: 600;
  margin-bottom: 1rem;
  text-align: left;
  font-size: 1.25rem;
  color: var(--foreground);
}
.data-table th,
.data-table td {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
}
.data-table th {
  background: var(--muted);
  font-weight: 600;
  color: var(--secondary);
}
.data-table tr:last-child td {
  border-bottom: none;
}

@media (max-width: 768px) {
  .data-table thead {
    display: none;
  }
  .data-table, .data-table tbody, .data-table tr, .data-table td {
    display: block;
    width: 100%;
  }
  .data-table tr {
    margin-bottom: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
  }
  .data-table td {
    text-align: right;
    padding-left: 50%;
    position: relative;
    border-bottom: 1px solid var(--border);
  }
  .data-table td:last-child {
    border-bottom: 0;
  }
  .data-table td::before {
    content: attr(data-label);
    position: absolute;
    left: 1.5rem;
    width: 45%;
    padding-right: 10px;
    white-space: nowrap;
    text-align: left;
    font-weight: 600;
    color: var(--secondary);
  }
}

/* BrandCards */
.brand-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-block: 2rem;
}
@media (min-width: 768px) {
  .brand-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}
.brand-card {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.brand-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.brand-card h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  color: var(--secondary);
}
.brand-card small {
  display: block;
  margin-top: 1rem;
  font-weight: 500;
  color: var(--primary);
}

/* Repair Cards Grid (8 items) */
.repair-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-block: 2rem;
}
@media (min-width: 640px) {
  .repair-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .repair-cards {
    grid-template-columns: repeat(4, 1fr);
  }
}
.repair-card {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
}
.repair-card svg {
  color: var(--primary);
  margin-bottom: 1rem;
}
.repair-card h3 {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

/* ProjectStrip */
.project-strip {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-block: 2.5rem;
}
@media (min-width: 640px) {
  .project-strip {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .project-strip {
    grid-template-columns: repeat(3, 1fr);
  }
}
.project-strip figure {
  margin: 0;
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  aspect-ratio: 4/3;
}
.project-strip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.project-strip figure:hover img {
  transform: scale(1.05);
}
.project-strip figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  color: #fff;
  padding: 1.5rem 1rem 1rem;
  font-size: 0.875rem;
  line-height: 1.4;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.project-strip figure:hover figcaption {
  opacity: 1;
}

/* CityChips */
.city-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-block: 1.5rem;
}
.city-chip {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--muted);
  color: var(--secondary);
  border-radius: 2rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}
.city-chip:hover {
  background: var(--primary);
  color: var(--primary-foreground);
}

/* SourceNote */
.source-note {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  margin-top: 3rem;
  text-align: center;
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
}
.source-note a {
  color: inherit;
  text-decoration: underline;
}
.source-note a:hover {
  color: var(--secondary);
}

/* Check list (Gold Check Icons) */
.check-list {
  list-style: none;
  padding: 0;
  margin-block: 2rem;
}
.check-list li {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 1rem;
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.25rem;
  width: 1.25rem;
  height: 1.25rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23D4AF35' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

/* Numbered Circle List */
.numbered-list {
  list-style: none;
  padding: 0;
  margin-block: 2rem;
  counter-reset: custom-counter;
}
.numbered-list li {
  position: relative;
  padding-left: 3rem;
  margin-bottom: 1.5rem;
  counter-increment: custom-counter;
}
.numbered-list li::before {
  content: counter(custom-counter);
  position: absolute;
  left: 0;
  top: 0;
  width: 2rem;
  height: 2rem;
  background: var(--primary);
  color: var(--primary-foreground);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
}

/* Safety Callout */
.safety-callout {
  background: var(--background);
  border: 2px solid var(--primary);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  margin-block: 2rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.safety-callout svg {
  color: var(--destructive);
  flex-shrink: 0;
  margin-top: 0.125rem;
}
.safety-callout p {
  margin: 0;
  font-weight: 600;
  color: var(--foreground);
}

/* SVG Diagram Container */
.svg-diagram-wrapper {
  margin-block: 3rem;
  background: var(--background);
  border-radius: var(--radius-lg);
  padding: 2rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  text-align: center;
}
.svg-diagram-wrapper svg {
  max-width: 100%;
  height: auto;
}
