/* =========================================================
   shared-content.css
   用途：改版頁共用內容元件（圖卡、表格、相片牆）
   適用：關於華城 / 華城技術 / 投資人專區…（逐步擴充）

   載入順序：shared-typography.css 之後、{unit}-tokens.css 之前

   標準 class：.content-figure-card / .content-table / .content-photo
   向後相容：.tech-figure-card、.sigma-image-card、.tech-table、.sigma-table
========================================================= */

:root {
  --content-primary: var(--title-primary, #0c596f);
  --content-accent: var(--title-accent, #19a7b8);
  --content-primary-deep: var(--title-primary-deep, #083d4d);
}

/* ---- 圖文卡片 ---- */
.content-figure-card,
.tech-page .tech-figure-card,
.sigma-summary-cards .sigma-image-card,
.sigma-image-card {
  margin: 0;
  height: 100%;
  background: #ffffff;
  border-radius: 1rem;
  padding: 0.75rem;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(226, 232, 240, 0.9);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.sigma-summary-cards .sigma-image-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.content-figure-card img,
.tech-page .tech-figure-card img,
.sigma-summary-cards .sigma-image-card img,
.sigma-image-card img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0.75rem;
}

.content-figure-card figcaption,
.content-figure-caption,
.tech-page .tech-figure-card figcaption,
.sigma-image-caption {
  margin-top: 0.5rem;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--content-primary);
}

.content-figure-card:hover,
.tech-page .tech-figure-card:hover,
.sigma-summary-cards .sigma-image-card:hover,
.sigma-image-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.12);
  border-color: rgba(25, 167, 184, 0.5);
}

.content-figure-card--solo,
.tech-page .tech-figure-card--solo {
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 20px;
}

.content-figure-card--hero,
.tech-page .tech-figure-card--hero {
  margin-bottom: var(--title-gap-section, 48px);
}

.content-figure-grid,
.tech-page .tech-figure-grid {
  margin-top: 20px;
  margin-bottom: 8px;
}

/* ---- 資料表格 ---- */
.content-table,
.tech-page .tech-table,
.sigma-table {
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 0.75rem;
}

.content-table .table,
.tech-page .tech-table .table,
.sigma-table .table {
  margin-bottom: 0;
  font-size: 0.9rem;
}

.content-table thead,
.tech-page .tech-table thead,
.sigma-table thead {
  background: linear-gradient(135deg, var(--content-primary), var(--content-accent));
  color: #ffffff;
}

.content-table thead th,
.tech-page .tech-table thead th {
  border-color: rgba(255, 255, 255, 0.15);
  font-weight: 600;
  white-space: nowrap;
}

.content-table table > tbody > tr:first-child > th,
.content-table table > tr:first-child > th,
.tech-page .tech-table table > tbody > tr:first-child > th,
.tech-page .tech-table table > tr:first-child > th {
  background: linear-gradient(135deg, var(--content-primary), var(--content-accent));
  color: #ffffff;
  text-align: center;
  font-weight: 600;
}

.content-table .table tbody tr:nth-of-type(odd),
.tech-page .tech-table .table tbody tr:nth-of-type(odd),
.sigma-table .table tbody tr:nth-of-type(odd) {
  background-color: #f9fafb;
}

.content-table .table td,
.content-table .table th,
.tech-page .tech-table .table td,
.tech-page .tech-table .table th {
  vertical-align: middle;
}

.content-table tfoot,
.sigma-table tfoot {
  background-color: #f3f4f6;
  color: #4b5563;
  font-size: 0.9rem;
}

/* 規格對照表（無 thead、label 在 th[scope=row]） */
.content-spec-table .table th[scope="row"],
.tech-page .tech-spec-table .table th[scope="row"] {
  width: 58%;
  font-weight: 600;
  color: var(--content-primary-deep);
  background: #f1f5f9;
  border-bottom-color: rgba(226, 232, 240, 0.95);
}

.content-spec-table .table td,
.tech-page .tech-spec-table .table td {
  font-weight: 600;
  color: #334155;
}

/* ---- 相片牆（簡化 hover 卡片） ---- */
.content-photo,
.sigma-gallery .sigma-photo {
  border-radius: 0.6rem;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
  background: #ffffff;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.content-photo img,
.sigma-gallery .sigma-photo img {
  width: 100%;
  display: block;
}

.content-photo:hover,
.sigma-gallery .sigma-photo:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.16);
}

@media (max-width: 767.98px) {
  .sigma-summary-cards .sigma-image-card,
  .sigma-image-card {
    margin-bottom: 0.5rem;
  }

  .content-table .table,
  .tech-page .tech-table .table {
    font-size: 0.8rem;
  }
}
