/**
 * Help Pages Common Styles
 *
 * 4つのHelpページ（会社概要、利用規約、プライバシーポリシー、特定商取引法）の
 * 統一デザイン用CSS
 *
 * Note: Google FontsとCSS変数は common.css で定義済み
 */

/* ===================================================
   1. Help Page CSS Variables (ページ固有の拡張)
   =================================================== */
:root {
  /* 背景色 */
  --help-bg: #ffffff;
  --help-bg-light: #f8f9fa;

  /* テキスト色 */
  --help-text: #4a5568;
  --help-text-dark: #2d3748;
  --help-text-light: #718096;

  /* ボーダー色 */
  --help-border: #e2e8f0;
  --help-border-light: #edf2f7;

  /* アクセント色 */
  --help-accent: #2d3748;
  --help-accent-light: #4a5568;

  /* シャドウ */
  --help-shadow: rgba(0, 0, 0, 0.1);
  --help-shadow-lg: rgba(0, 0, 0, 0.15);
}

/* ===================================================
   2. Base Typography
   =================================================== */

/* ページ全体のフォント設定 */
.help-page {
  color: var(--color-text);
  line-height: 1.7;
  background-color: var(--color-bg);
}

.help-page h1,
.help-page h2,
.help-page h3 {
  color: var(--color-text);
  line-height: 1.3;
}

.help-page p {
  margin: 0 0 1rem;
}

.help-page p:last-child {
  margin-bottom: 0;
}

/* ===================================================
   4. Layout - Container
   =================================================== */
.help-container {
  max-width: 56rem;
  margin: 0 auto;
  padding: 2rem 1rem;
  min-height: 50vh;
}

.help-container--wide {
  max-width: 80rem;
}

/* ===================================================
   5. Page Title
   =================================================== */
.help-title {
  font-size: 1.75rem;
  font-weight: 700;
  text-align: center;
  color: var(--help-text-dark);
  margin-bottom: 2rem;
}

/* ===================================================
   6. Introduction Text
   =================================================== */
.help-intro {
  font-size: 0.9375rem;
  color: var(--help-text);
  margin-bottom: 2rem;
  line-height: 1.8;
}

/* ===================================================
   7. Section
   =================================================== */
.help-section {
  margin-bottom: 2.5rem;
  scroll-margin-top: 5rem;
}

.help-section:last-child {
  margin-bottom: 0;
}

.help-section-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--help-text-dark);
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--help-accent);
  margin-bottom: 1.25rem;
}

.help-section-content {
  font-size: 0.9375rem;
  color: var(--help-text);
}

.help-section-content ul {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.help-section-content li {
  margin-bottom: 0.5rem;
  position: relative;
}

.help-section-content li::marker {
  color: var(--color-primary);
}

/* ===================================================
   8. Definition List
   =================================================== */
.help-dl {
  margin: 0;
}

.help-dl-item {
  border-bottom: 1px solid var(--help-border);
  padding: 1rem 0;
}

.help-dl-item:last-child {
  border-bottom: none;
}

.help-dt {
  font-weight: 700;
  color: var(--help-text-dark);
  margin-bottom: 0.5rem;
  font-size: 0.9375rem;
}

.help-dd {
  color: var(--help-text);
  padding-left: 1rem;
  margin: 0;
  font-size: 0.9375rem;
}

.help-dd-note {
  font-size: 0.875rem;
  color: var(--help-text-light);
  margin-top: 0.25rem;
}

/* ===================================================
   9. Card Section (tradelaw用)
   =================================================== */
.help-card {
  background: var(--help-bg-light);
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.help-card .help-section-title {
  margin-bottom: 1.5rem;
}

.help-card .help-dl-item:first-child {
  padding-top: 0;
}

/* ===================================================
   10. Table
   =================================================== */
.help-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.875rem;
  background: var(--help-bg);
  border: 1px solid var(--help-border);
  border-radius: 0.5rem;
  overflow: hidden;
}

.help-table th,
.help-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--help-border);
}

.help-table th {
  background: var(--help-bg-light);
  font-weight: 700;
  color: var(--help-text-dark);
}

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

/* ===================================================
   11. Info Box
   =================================================== */
.help-info-box {
  background: var(--help-bg-light);
  border-radius: 0.5rem;
  padding: 1rem 1.25rem;
  margin-top: 1.5rem;
}

.help-info-box-title {
  font-weight: 700;
  color: var(--help-text-dark);
  margin-bottom: 0.5rem;
  font-size: 0.9375rem;
}

/* ===================================================
   12. Table of Contents (Desktop)
   =================================================== */
.help-toc {
  width: 16rem;
  flex-shrink: 0;
}

.help-toc-inner {
  position: sticky;
  top: 2rem;
}

.help-toc-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--help-text-dark);
  margin-bottom: 1rem;
  font-family: var(--font-serif);
}

.help-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.help-toc-list li {
  margin-bottom: 0.25rem;
}

.help-toc-link {
  display: block;
  padding: 0.5rem 0;
  color: var(--help-text-light);
  text-decoration: none;
  font-size: 0.9375rem;
  transition: color 0.3s ease;
}

.help-toc-link:hover {
  color: var(--help-text-dark);
}

.help-toc-link.active {
  color: var(--help-text-dark);
  font-weight: 500;
}

/* ===================================================
   13. Mobile TOC
   =================================================== */
.help-mobile-toc-btn {
  position: fixed;
  bottom: 5rem; /* モバイル固定バーの上に配置 */
  right: 1rem;
  width: 3.5rem;
  height: 3.5rem;
  background: var(--help-accent);
  color: white;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px var(--help-shadow-lg);
  cursor: pointer;
  z-index: 40;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.help-mobile-toc-btn:hover {
  background: var(--help-accent-light);
  transform: scale(1.05);
}

.help-mobile-toc-btn svg {
  width: 1.5rem;
  height: 1.5rem;
}

.help-mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 50;
}

.help-mobile-overlay.active {
  opacity: 1;
  visibility: visible;
}

.help-mobile-menu {
  background: var(--help-bg);
  width: 100%;
  max-width: 24rem;
  margin: 0 auto;
  border-radius: 0 0 1rem 1rem;
  padding: 1.5rem;
  transform: translateY(-100%);
  transition: transform 0.3s ease;
  box-shadow: 0 4px 24px var(--help-shadow-lg);
}

.help-mobile-overlay.active .help-mobile-menu {
  transform: translateY(0);
}

.help-mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.help-mobile-menu-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--help-text-dark);
  font-family: var(--font-serif);
}

.help-mobile-close {
  background: none;
  border: none;
  color: var(--help-text-light);
  cursor: pointer;
  padding: 0.5rem;
  transition: color 0.3s ease;
}

.help-mobile-close:hover {
  color: var(--help-text-dark);
}

.help-mobile-close svg {
  width: 1.5rem;
  height: 1.5rem;
}

.help-mobile-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.help-mobile-toc-link {
  display: block;
  padding: 0.75rem 0;
  color: var(--help-text);
  text-decoration: none;
  font-size: 0.9375rem;
  transition: color 0.3s ease;
  border-bottom: 1px solid var(--help-border-light);
}

.help-mobile-toc-link:last-child {
  border-bottom: none;
}

.help-mobile-toc-link:hover {
  color: var(--help-text-dark);
}

/* ===================================================
   14. Two Column Layout
   =================================================== */
.help-two-column {
  display: block;
}

.help-main {
  flex: 1;
  min-width: 0;
}

/* ===================================================
   15. Links
   =================================================== */
.help-link {
  color: var(--help-text-dark);
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.help-link:hover {
  opacity: 0.7;
  text-decoration: underline;
}

/* ===================================================
   16. CTA Button
   =================================================== */
.help-btn {
  display: inline-block;
  background: var(--help-accent);
  color: white;
  padding: 0.875rem 2rem;
  border-radius: 0.5rem;
  font-weight: 500;
  font-size: 0.9375rem;
  text-decoration: none;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.help-btn:hover {
  background: var(--help-accent-light);
  transform: translateY(-1px);
}

/* ===================================================
   17. Footer Section
   =================================================== */
.help-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--help-border);
  text-align: center;
}

.help-update-date {
  font-size: 0.875rem;
  color: var(--help-text-light);
  text-align: right;
  margin-top: 3rem;
}

/* ===================================================
   18. Contact Section
   =================================================== */
.help-contact {
  display: block;
}

.help-contact-item {
  display: block;
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--help-border-light);
}

.help-contact-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.help-contact-label {
  display: block;
  font-weight: 700;
  color: var(--help-text-dark);
  margin-bottom: 0.25rem;
}

.help-contact-item > span:last-child {
  display: block;
  color: var(--help-text);
}

/* ===================================================
   19. Responsive Design
   =================================================== */

/* Small screens (640px+) */
@media (min-width: 640px) {
  .help-container {
    padding: 2rem 1.5rem;
  }

  .help-title {
    font-size: 2rem;
  }

  .help-section-title {
    font-size: 1.375rem;
  }

}

/* Large screens (1024px+) */
@media (min-width: 1024px) {
  .help-container {
    padding: 3rem 2rem;
  }

  .help-title {
    font-size: 2.25rem;
    margin-bottom: 3rem;
  }

  .help-intro {
    font-size: 1rem;
    margin-bottom: 3rem;
  }

  .help-section {
    margin-bottom: 3rem;
  }

  .help-section-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
  }

  .help-section-content {
    font-size: 1rem;
  }

  .help-two-column {
    display: flex;
    gap: 3rem;
  }

  .help-card {
    padding: 2rem;
  }

  .help-dl-item {
    padding: 1.25rem 0;
  }

  .help-dt,
  .help-dd {
    font-size: 1rem;
  }
}

/* Hide elements on specific breakpoints */
@media (max-width: 1023px) {
  .help-toc {
    display: none;
  }
}

@media (min-width: 1024px) {
  .help-mobile-toc-btn {
    display: none;
  }
}

/* ===================================================
   20. Header Font Override for Help Pages
   =================================================== */

/* ヘッダーのフォントを統一（Noto Serif JP） */
.help_page .ec-header-component,
.help_page header,
body.help_page .ec-header-component,
body.help_page header {
  font-family: var(--font-serif);
}

/* ナビゲーションリンクのフォント */
.help_page .lumirent-nav-item,
body.help_page .lumirent-nav-item {
  font-family: 'Noto Sans JP', sans-serif;
}

/* フッタースタイルは footer-common.css に移動 */

/* ===================================================
   21. Print Styles
   =================================================== */
@media print {
  .help-mobile-toc-btn,
  .help-mobile-overlay,
  .help-toc {
    display: none !important;
  }

  .help-page {
    font-size: 12pt;
  }

  .help-container {
    max-width: none;
    padding: 0;
  }

  .help-card {
    break-inside: avoid;
  }

  .help-section {
    break-inside: avoid;
  }
}
