/* content-components.css v1.0.0 */
/* ボタン・カード・テーブル・FAQ・情報ボックス・関連記事・TOC・デモコンテナ */

/* === Buttons === */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--color-accent);
  color: #FFFFFF;
  border-radius: 8px;
  font-weight: 600;
  font-size: var(--text-base);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
}

.btn-primary:hover {
  background: var(--color-accent-hover);
  transform: translateY(-1px);
  text-decoration: none;
  color: #FFFFFF;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: transparent;
  color: var(--color-text-primary);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-weight: 600;
  font-size: var(--text-base);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
}

.btn-secondary:hover {
  background: var(--color-surface-alt);
  border-color: var(--color-gold);
  text-decoration: none;
}

.btn-group {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* === Card === */
.card {
  background: var(--color-surface);
  border-radius: 12px;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card a {
  text-decoration: none;
  color: inherit;
}

/* === Card Grid === */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin: 24px 0;
}

@media (min-width: 768px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* === Info Boxes === */
.tip-box,
.warning-box,
.point-box {
  border-radius: 0 8px 8px 0;
  padding: 16px 20px;
  margin: 24px 0;
}

.tip-box {
  background: #F0FDF4;
  border-left: 3px solid var(--color-success);
}

.warning-box {
  background: #FFF7ED;
  border-left: 3px solid var(--color-warning);
}

.point-box {
  background: #FEFCE8;
  border-left: 3px solid var(--color-gold);
}

.tip-box p:last-child,
.warning-box p:last-child,
.point-box p:last-child {
  margin-bottom: 0;
}

/* === Comparison Table === */
.comparison-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  margin: 24px 0;
  font-size: var(--text-sm);
}

.comparison-table th {
  background: var(--color-surface-alt);
  color: var(--color-text-primary);
  font-weight: 600;
  padding: 14px 16px;
  text-align: left;
  border-bottom: 2px solid var(--color-border);
}

.comparison-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-secondary);
}

.comparison-table tr:last-child td {
  border-bottom: none;
}

.comparison-table td:last-child,
.comparison-table th:last-child {
  background: #FEFCE8;
}

.comparison-table .good {
  color: var(--color-success);
  font-weight: 600;
}

.comparison-table .bad {
  color: #EF4444;
  font-weight: 600;
}

@media (max-width: 767px) {
  .table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 24px -16px;
    padding: 0 16px;
  }

  .table-scroll .comparison-table {
    min-width: 500px;
    margin: 0;
  }
}

/* === FAQ (details/summary) === */
.faq-item {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  margin-bottom: 12px;
  overflow: hidden;
}

.faq-question {
  padding: 16px 20px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  background: var(--color-surface);
  list-style: none;
  gap: 12px;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::marker {
  content: none;
}

.faq-question::before {
  content: "Q";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  background: var(--color-gold);
  color: white;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}

.faq-question::after {
  content: "";
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--color-text-tertiary);
  border-bottom: 2px solid var(--color-text-tertiary);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  flex-shrink: 0;
  margin-left: auto;
}

details[open] .faq-question::after {
  transform: rotate(-135deg);
}

.faq-answer {
  padding: 0 20px 16px 60px;
  color: var(--color-text-secondary);
  line-height: var(--leading-normal);
}

.faq-answer p:last-child {
  margin-bottom: 0;
}

/* === Related Articles === */
.related-articles {
  padding: var(--space-section) 0 0;
}

.related-articles h2 {
  border-left: none;
  padding-left: 0;
  margin-bottom: 24px;
}

.related-card {
  display: block;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 24px;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.related-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  text-decoration: none;
}

.related-card-icon {
  width: 32px;
  height: 4px;
  background: var(--color-gold);
  border-radius: 2px;
  margin-bottom: 12px;
}

.related-card-title {
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 4px;
  font-size: var(--text-base);
}

.related-card-desc {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

/* === TOC (Table of Contents) === */
.toc {
  font-size: var(--text-sm);
  text-align: left;
}

.toc summary {
  font-weight: 600;
  cursor: pointer;
  padding: 10px 0;
  list-style: none;
  color: var(--color-text-primary);
  font-size: var(--text-sm);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.toc summary::-webkit-details-marker {
  display: none;
}

.toc summary::marker {
  content: none;
}

.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--color-border);
}

.toc li {
  margin: 0;
}

.toc a {
  display: block;
  padding: 6px 0 6px 12px;
  color: var(--color-text-tertiary);
  text-decoration: none;
  border-left: 2px solid transparent;
  margin-left: -1px;
  transition: color 0.15s, border-color 0.15s;
  line-height: 1.5;
}

.toc a:hover {
  color: var(--color-text-primary);
  text-decoration: none;
}

.toc a.active {
  color: var(--color-accent);
  border-left-color: var(--color-accent);
  font-weight: 500;
}

/* Mobile TOC: card-style collapsible box */
@media (max-width: 1023px) {
  .toc {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 4px 16px;
  }

  .toc summary {
    padding: 12px 0;
  }

  .toc summary::after {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    border-right: 1.5px solid var(--color-text-tertiary);
    border-bottom: 1.5px solid var(--color-text-tertiary);
    transform: rotate(45deg);
    margin-left: 8px;
    vertical-align: middle;
    transition: transform 0.2s;
  }

  details[open] > .toc summary::after,
  .toc details[open] > summary::after {
    transform: rotate(-135deg);
  }

  .toc ol {
    padding-bottom: 8px;
  }
}

/* === Hero Points (checkmarks) === */
.hero-points {
  display: flex;
  flex-direction: column;
  gap: 0;
  text-align: left;
  margin: 0 auto 32px;
  max-width: 480px;
}

.hero-point {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  padding: 10px 16px;
}

.hero-point .check {
  color: var(--color-success);
  font-weight: bold;
  font-size: 16px;
  flex-shrink: 0;
}

/* === Trust Points Grid === */
.trust-points {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.trust-point {
  background: var(--color-surface);
  padding: 24px;
  border-radius: 12px;
  text-align: center;
  border: 1px solid var(--color-border);
}

.trust-point .icon {
  width: 32px;
  height: 4px;
  background: var(--color-gold);
  border-radius: 2px;
  margin: 0 auto 12px;
}

.trust-point .title {
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 8px;
}

.trust-point .desc {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

/* === ROI Box === */
.roi-box {
  background: var(--color-surface);
  padding: 32px;
  border-radius: 12px;
  margin: 32px 0;
  border: 1px solid var(--color-border);
  position: relative;
  overflow: hidden;
}

.roi-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-gold), var(--color-gold-dark), var(--color-gold));
}

.roi-box h3 {
  text-align: center;
  margin-bottom: 20px;
}

.roi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.roi-item {
  background: var(--color-surface-alt);
  padding: 20px 16px;
  border-radius: 12px;
  text-align: center;
  border: 1px solid var(--color-border);
}

.roi-item .label {
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.roi-item .value {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-text-primary);
}

.roi-item .value.highlight {
  color: #DC2626;
  font-size: var(--text-2xl);
}

.roi-item.roi-result {
  background: #FEFCE8;
  border-color: var(--color-border-gold);
}

/* === Mode Grid === */
.mode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin: 24px 0;
}

.mode-item {
  background: var(--color-surface);
  padding: 20px 16px;
  border-radius: 12px;
  border: 1px solid var(--color-border);
  text-align: center;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.mode-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.mode-item .name {
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 4px;
}

.mode-item .desc {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
}

/* === Step Box === */
.step-box {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  padding: 20px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
}

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  background: var(--color-gold);
  color: white;
  border-radius: 50%;
  font-weight: 700;
  font-size: var(--text-sm);
  flex-shrink: 0;
}

.step-content h3 {
  margin-bottom: 8px;
}

.step-content p:last-child {
  margin-bottom: 0;
}

/* === Hero Image === */
.hero-image {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  object-position: center 40%;
  border-radius: 12px;
  margin-bottom: 24px;
}

@media (max-width: 767px) {
  .hero-image {
    max-height: 240px;
    border-radius: 8px;
  }
}

/* === Demo Container === */
.demo-container {
  margin: 24px 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--color-border);
}

/* === Responsive: Mobile === */
@media (max-width: 767px) {
  .btn-group {
    flex-direction: column;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
    justify-content: center;
  }

  .roi-grid {
    grid-template-columns: 1fr;
  }

  .faq-answer {
    padding-left: 20px;
  }
}
