/* ===========================
   NotebookLM リッチ版マニュアル
   style.css
   =========================== */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@300;400;500;700&display=swap');

:root {
  --primary: #4285f4;
  --primary-light: #e8f0fe;
  --primary-dark: #1a73e8;
  --accent: #ff9800;
  --accent-light: #fff3e0;
  --bg: #f8f9fa;
  --card-bg: #ffffff;
  --text: #202124;
  --text-light: #5f6368;
  --border: #dadce0;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 2px 8px rgba(0, 0, 0, 0.12), 0 8px 24px rgba(0, 0, 0, 0.08);
  --radius: 12px;
  --sidebar-width: 260px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Noto Sans JP', 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.9;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* --- ヘッダー --- */
.hero {
  position: relative;
  background: linear-gradient(135deg, rgba(66, 133, 244, 0.75) 0%, rgba(108, 92, 231, 0.75) 100%), url('./image/hero_bg_glassmorphism.png') center/cover no-repeat;
  color: #fff;
  text-align: center;
  padding: 80px 24px 60px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: 0.02em;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.hero .subtitle {
  font-size: 1rem;
  font-weight: 400;
  opacity: 0.95;
}

/* --- ハンバーガーボタン --- */
.menu-toggle {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1100;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 0.2s;
}

.menu-toggle:hover {
  transform: scale(1.05);
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  position: relative;
  transition: background 0.2s;
}

.menu-toggle span::before,
.menu-toggle span::after {
  content: '';
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  position: absolute;
  transition: transform 0.3s;
}

.menu-toggle span::before {
  top: -6px;
}

.menu-toggle span::after {
  top: 6px;
}

body.nav-open .menu-toggle span {
  background: transparent;
}

body.nav-open .menu-toggle span::before {
  transform: rotate(45deg);
  top: 0;
}

body.nav-open .menu-toggle span::after {
  transform: rotate(-45deg);
  top: 0;
}

/* --- サイドバー --- */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--card-bg);
  border-right: 1px solid var(--border);
  z-index: 1000;
  overflow-y: auto;
  padding: 72px 0 24px;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}

body.nav-open .sidebar {
  transform: translateX(0);
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

body.nav-open .overlay {
  opacity: 1;
  visibility: visible;
}

/* サイドバーナビ（コンパクト） */
.sidebar-nav {
  list-style: none;
}

.sidebar-nav li a {
  display: block;
  padding: 6px 20px;
  color: var(--text-light);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 400;
  border-left: 3px solid transparent;
  transition: all 0.2s;
  line-height: 1.5;
}

.sidebar-nav li a:hover {
  background: var(--primary-light);
  color: var(--primary-dark);
}

.sidebar-nav li a.active {
  background: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 500;
  border-left-color: var(--primary);
}

.sidebar-nav li.nav-heading {
  padding: 16px 20px 4px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* サブ項目（工夫ポイント等）はインデント */
.sidebar-nav li a.sub-item {
  padding-left: 32px;
  font-size: 0.8rem;
  color: #888;
}

.sidebar-nav li a.sub-item:hover,
.sidebar-nav li a.sub-item.active {
  color: var(--primary-dark);
}

/* --- メインコンテンツ --- */
.main-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 32px 20px 80px;
}

/* --- 章バナー（セクション区切り） --- */
.chapter-banner {
  background: linear-gradient(135deg, var(--primary) 0%, #6c5ce7 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 20px 28px;
  margin-bottom: 24px;
  margin-top: 8px;
  box-shadow: var(--shadow);
}

.chapter-banner .chapter-label {
  font-size: 0.75rem;
  font-weight: 500;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}

.chapter-banner .chapter-title {
  font-size: 1.3rem;
  font-weight: 700;
}

/* --- セクション（カード） --- */
.section-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px 28px;
  margin-bottom: 24px;
  position: relative;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease, box-shadow 0.3s;
}

.section-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.section-card:hover {
  box-shadow: var(--shadow-hover);
}

/* ステップ番号バッジ */
.step-badge {
  position: absolute;
  top: -12px;
  left: 24px;
  background: var(--primary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(66, 133, 244, 0.3);
}

/* --- 見出し --- */
.section-card h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary-light);
}

.section-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 24px;
  margin-bottom: 12px;
}

/* --- テキスト --- */
.section-card p {
  margin-bottom: 14px;
  color: var(--text);
  font-size: 0.93rem;
}

.section-card strong {
  color: var(--primary-dark);
  font-weight: 600;
}

.section-card .highlight {
  color: #d93025;
  font-weight: 600;
}

/* --- 画像（通常：70%） --- */
.section-card img {
  max-width: 70%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin: 16px auto;
  display: block;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.section-card img:hover {
  transform: scale(1.01);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* 2カラムレイアウト */
.two-col {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  margin: 20px 0;
}

.two-col .col-text {
  flex: 1;
  min-width: 250px;
}

.two-col .col-image {
  flex: 0 0 35%;
  min-width: 200px;
}

/* 2カラム内の画像は100%（縮小しない） */
.two-col .col-image img {
  max-width: 100%;
  width: 100%;
  margin: 0;
}

/* --- リスト --- */
.section-card ul,
.section-card ol {
  margin: 12px 0 20px;
  padding-left: 24px;
}

.section-card ul li,
.section-card ol li {
  margin-bottom: 10px;
  font-size: 0.93rem;
  line-height: 1.7;
}

/* --- ヒントボックス --- */
.hint-box {
  background: var(--primary-light);
  border-left: 4px solid var(--primary);
  border-radius: 0 8px 8px 0;
  padding: 18px 22px;
  margin: 20px 0;
}

.hint-box .hint-title {
  font-weight: 600;
  color: var(--primary-dark);
  font-size: 0.95rem;
  margin-bottom: 6px;
}

.hint-box p {
  margin-bottom: 6px;
}

/* おすすめボックス */
.recommend-box {
  background: var(--accent-light);
  border-left: 4px solid var(--accent);
  border-radius: 0 8px 8px 0;
  padding: 18px 22px;
  margin: 20px 0;
}

.recommend-box .recommend-title {
  font-weight: 600;
  color: #e65100;
  font-size: 0.95rem;
  margin-bottom: 6px;
}

.recommend-box p,
.recommend-box ul {
  margin-bottom: 6px;
}

/* --- アコーディオン --- */
details {
  margin: 12px 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

details summary {
  padding: 12px 18px;
  font-weight: 500;
  cursor: pointer;
  background: #fafafa;
  transition: background 0.2s;
  font-size: 0.93rem;
  list-style: none;
}

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

details summary::before {
  content: '＋ ';
  font-weight: 700;
  color: var(--primary);
}

details[open] summary::before {
  content: '－ ';
}

details summary:hover {
  background: var(--primary-light);
}

details .accordion-content {
  padding: 14px 18px;
  border-top: 1px solid var(--border);
}

/* --- ライトボックス --- */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  cursor: pointer;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox img {
  max-width: 90%;
  max-height: 90vh;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  cursor: default;
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 24px;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.lightbox-close:hover {
  opacity: 1;
}

/* --- トップへ戻るボタン --- */
.scroll-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(66, 133, 244, 0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
  z-index: 900;
}

.scroll-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top:hover {
  background: var(--primary-dark);
}

/* --- PC表示（1024px以上） --- */
@media (min-width: 1024px) {
  .menu-toggle {
    display: none;
  }

  .overlay {
    display: none;
  }

  .sidebar {
    transform: translateX(0);
    padding-top: 24px;
  }

  .hero {
    margin-left: var(--sidebar-width);
  }

  .main-content {
    margin-left: var(--sidebar-width);
    margin-right: auto;
    max-width: none;
    width: calc(100% - var(--sidebar-width));
    padding: 40px 48px 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .main-content>* {
    width: 100%;
    max-width: 800px;
  }
}

/* --- スマホ（600px以下） --- */
@media (max-width: 600px) {
  .hero {
    padding: 48px 16px 36px;
  }

  .hero h1 {
    font-size: 1.5rem;
  }

  .section-card {
    padding: 24px 18px;
    margin-bottom: 20px;
  }

  .section-card h2 {
    font-size: 1.15rem;
  }

  .section-card img {
    max-width: 85%;
  }

  .two-col {
    flex-direction: column;
  }

  .two-col .col-image {
    flex: 1 1 100%;
  }

  .chapter-banner {
    padding: 16px 20px;
  }

  .chapter-banner .chapter-title {
    font-size: 1.1rem;
  }
}

/* ===========================
   追加スタイル（ver.2 複数ページ対応）
   =========================== */

/* --- トップページ：サイドバー非表示 --- */
body.top-page .sidebar,
body.top-page .menu-toggle,
body.top-page .overlay,
body.top-page .scroll-top {
  display: none;
}

body.top-page .hero {
  margin-left: 0;
}

body.top-page .main-content {
  margin-left: 0;
  max-width: none;
  width: 100%;
}

/* --- トップページ：ヒーロー拡張 --- */
.hero-top {
  padding: 100px 24px 60px;
}

.hero-top h1 {
  font-size: 2.4rem;
  margin-bottom: 12px;
}

.hero-top .subtitle {
  font-size: 1.15rem;
  opacity: 0.95;
}

/* --- トップページ：カードコンテナ --- */
.top-content {
  padding: 60px 24px 80px;
  display: flex;
  justify-content: center;
}

.top-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  max-width: 1000px;
  width: 100%;
}

/* --- トップページ：カード --- */
.top-card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 40px 28px 32px;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--text);
  text-align: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  overflow: hidden;
}

.top-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), #6c5ce7);
  opacity: 0;
  transition: opacity 0.3s;
}

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

.top-card:hover::before {
  opacity: 1;
}

.top-card-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  line-height: 1;
}

.top-card h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
  border-bottom: none;
  padding-bottom: 0;
}

.top-card-desc {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: 20px;
}

.top-card-link {
  display: inline-block;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--primary-dark);
  transition: color 0.2s;
}

.top-card:hover .top-card-link {
  color: var(--primary);
}

/* --- フッター --- */
.top-footer {
  text-align: center;
  padding: 24px;
  font-size: 0.8rem;
  color: var(--text-light);
  border-top: 1px solid var(--border);
}

/* --- 「← トップへ戻る」リンク（バッジ風・右上配置） --- */
.back-to-top-link {
  position: absolute;
  top: 16px;
  right: 20px;
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(4px);
  transition: background 0.2s, transform 0.2s;
  z-index: 10;
}

.back-to-top-link:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: translateY(-1px);
}

/* --- 共通テーブル --- */
.content-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  margin-bottom: 20px;
}

.content-table thead {
  background: #f1f3f4;
  border-bottom: 2px solid var(--border);
}

.content-table th,
.content-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.93rem;
}

.content-table tbody tr:hover {
  background: rgba(66, 133, 244, 0.04);
}

/* --- ページ間ナビ --- */
.page-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 800px;
  margin: 48px auto 0;
  padding: 24px 0;
  border-top: 1px solid var(--border);
}

.page-nav a {
  text-decoration: none;
  color: var(--primary-dark);
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.2s;
}

.page-nav a:hover {
  color: var(--primary);
}

.page-nav .nav-home {
  font-size: 0.85rem;
  color: var(--text-light);
}

.page-nav .nav-home:hover {
  color: var(--primary-dark);
}

.page-nav .nav-spacer {
  width: 120px;
}

/* --- コード例ボックス --- */
.code-example {
  background: #f8f9fa;
  padding: 14px 18px;
  border-radius: 8px;
  margin: 8px 0 16px;
  font-size: 0.9rem;
  line-height: 1.7;
  border-left: 3px solid var(--border);
}

/* --- トップページ：スマホ対応 --- */
@media (max-width: 768px) {
  .top-cards {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .hero-top {
    padding: 60px 16px 40px;
  }

  .hero-top h1 {
    font-size: 1.6rem;
  }
}

/* --- PC表示でもトップページのカード中央寄せ --- */
@media (min-width: 1024px) {
  body.top-page .main-content {
    display: flex;
    justify-content: center;
    padding: 60px 48px 80px;
  }
}

/* ===========================
   CTA（無料相談）エリア
   =========================== */

/* トップページ用枠 */
.top-cta-area {
  background-color: #f1f3f4;
  padding: 60px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: center;
}

.top-cta-content {
  max-width: 800px;
  width: 100%;
  text-align: center;
}

.top-cta-content h2 {
  font-size: 1.6rem;
  color: var(--primary-dark);
  margin-bottom: 16px;
  font-weight: 700;
}

.top-cta-content p {
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 24px;
  line-height: 1.8;
}

/* 記事下用ボックス */
.article-cta-box {
  background: var(--card-bg);
  border: 2px solid var(--primary-light);
  border-radius: var(--radius);
  padding: 32px 28px;
  margin: 40px 0 20px;
  box-shadow: 0 4px 16px rgba(66, 133, 244, 0.08);
  text-align: center;
}

.article-cta-box h3 {
  font-size: 1.3rem;
  color: var(--primary-dark);
  margin-bottom: 12px;
  font-weight: 700;
}

.article-cta-box p {
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 20px;
  line-height: 1.7;
}

/* CTAボタン */
.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
  min-width: 200px;
}

.cta-btn.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(66, 133, 244, 0.3);
}

.cta-btn.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(66, 133, 244, 0.4);
}

.cta-btn.btn-outline {
  background-color: transparent;
  color: var(--primary-dark);
  border: 2px solid var(--primary);
}

.cta-btn.btn-outline:hover {
  background-color: var(--primary-light);
  transform: translateY(-2px);
}

@media (max-width: 600px) {
  .cta-buttons {
    flex-direction: column;
  }

  .cta-btn {
    width: 100%;
  }

  .top-cta-content h2 {
    font-size: 1.3rem;
  }
}