/* ============================================
   占いの森 - エンゲージメント強化CSS
   滞在時間UP: プログレスバー / 固定CTA / マーカー /
   アコーディオンFAQ / プルクォート / 読了時間 etc.
   ============================================ */

/* --- 1. 読了プログレスバー (画面上部) --- */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, #d4af37, #7c3aed, #d4af37);
  background-size: 200% 100%;
  animation: progressShimmer 3s linear infinite;
  z-index: 10000;
  transition: width 0.1s linear;
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.5);
}
@keyframes progressShimmer {
  0% { background-position: 0% 0; }
  100% { background-position: 200% 0; }
}

/* --- 2. 読了時間バッジ --- */
.reading-time {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 14px;
  background: linear-gradient(135deg, #f5f3ff, #ede9fe);
  color: #6d28d9;
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.reading-time i { font-size: 0.85rem; }

/* --- 3. テキストマーカー (黄/赤/紫) --- */
.marker-yellow {
  background: linear-gradient(transparent 60%, #fef08a 60%);
  padding: 0 2px;
  font-weight: 600;
}
.marker-red {
  background: linear-gradient(transparent 60%, #fecaca 60%);
  padding: 0 2px;
  font-weight: 600;
}
.marker-purple {
  background: linear-gradient(transparent 60%, #e9d5ff 60%);
  padding: 0 2px;
  font-weight: 600;
}

/* --- 4. 固定フッターCTAバナー --- */
.sticky-footer-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9998;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  background: linear-gradient(135deg, #1e1b4b, #4c1d95);
  border-top: 2px solid #d4af37;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  box-shadow: 0 -4px 20px rgba(30, 27, 75, 0.3);
}
.sticky-footer-cta.visible {
  transform: translateY(0);
}
.sticky-footer-cta .sfc-text {
  color: rgba(255,255,255,0.92);
  font-size: 0.85rem;
  font-weight: 500;
}
.sticky-footer-cta .sfc-text i {
  color: #d4af37;
  margin-right: 4px;
}
.sticky-footer-cta .sfc-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 20px;
  background: linear-gradient(135deg, #d4af37, #f59e0b);
  color: #1e1b4b;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.82rem;
  transition: all 0.2s;
  box-shadow: 0 2px 10px rgba(212, 175, 55, 0.4);
}
.sticky-footer-cta .sfc-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(212, 175, 55, 0.6);
}
.sticky-footer-cta .sfc-close {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(255,255,255,0.5);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px 8px;
}
.sticky-footer-cta .sfc-close:hover { color: #fff; }

/* --- 5. FAQアコーディオン --- */
.faq-item.accordion .faq-question {
  cursor: pointer;
  user-select: none;
  position: relative;
  padding-right: 48px;
  transition: background 0.2s;
}
.faq-item.accordion .faq-question:hover {
  background: linear-gradient(90deg, #ede9fe, #f5f3ff);
}
.faq-item.accordion .faq-question::after {
  content: '+';
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  font-weight: 300;
  color: #7c3aed;
  transition: transform 0.3s;
}
.faq-item.accordion.open .faq-question::after {
  content: '−';
}
.faq-item.accordion .faq-answer {
  max-height: 0;
  overflow: hidden;
  padding-top: 0;
  padding-bottom: 0;
  transition: max-height 0.4s ease, padding 0.3s ease;
}
.faq-item.accordion.open .faq-answer {
  max-height: 600px;
  padding: 16px 20px 16px 56px;
}

/* --- 6. プルクォート（印象的な引用） --- */
.pull-quote {
  position: relative;
  margin: 40px -20px;
  padding: 32px 36px;
  background: linear-gradient(135deg, #1e1b4b, #4c1d95);
  color: #fff;
  border-radius: 16px;
  font-family: "Noto Serif JP", serif;
  font-size: 1.15rem;
  line-height: 1.9;
  text-align: center;
  box-shadow: 0 8px 28px rgba(76, 29, 149, 0.25);
}
.pull-quote::before {
  content: '\201C';
  position: absolute;
  top: -10px;
  left: 20px;
  font-size: 4rem;
  color: #d4af37;
  line-height: 1;
  font-family: serif;
}
.pull-quote .pq-source {
  display: block;
  margin-top: 12px;
  font-size: 0.78rem;
  color: #d4af37;
  font-style: normal;
  font-family: "Noto Sans JP", sans-serif;
}

/* --- 7. 「この記事を読んだ人へ」ソーシャルプルーフ --- */
.social-proof-box {
  margin: 36px 0;
  padding: 20px 24px;
  background: linear-gradient(135deg, #fef3c7, #fffbeb);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 3px 12px rgba(212, 175, 55, 0.12);
}
.social-proof-box .sp-icon {
  font-size: 2rem;
  flex-shrink: 0;
}
.social-proof-box .sp-text {
  font-size: 0.88rem;
  color: #92400e;
  line-height: 1.6;
}
.social-proof-box .sp-text strong {
  color: #78350f;
}

/* --- 8. 読了完了メッセージ --- */
.read-complete {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: 14px 28px;
  background: linear-gradient(135deg, #4c1d95, #7c3aed);
  color: #fff;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  z-index: 9997;
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 0 8px 24px rgba(76, 29, 149, 0.3);
  pointer-events: none;
}
.read-complete.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.read-complete i { color: #d4af37; margin-right: 6px; }

/* --- 9. セクション区切りデコレーション --- */
.section-divider {
  text-align: center;
  margin: 40px 0;
  position: relative;
}
.section-divider::before {
  content: '✦ ✦ ✦';
  display: block;
  color: #d4af37;
  font-size: 0.9rem;
  letter-spacing: 12px;
}

/* --- 10. アニメーション付きカウンター --- */
.stat-counter {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 24px;
  background: linear-gradient(135deg, #f5f3ff, #ede9fe);
  border-radius: 14px;
  border: 1px solid #ddd6fe;
}
.stat-counter .stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: #4c1d95;
  font-family: "Noto Sans JP", sans-serif;
}
.stat-counter .stat-label {
  font-size: 0.75rem;
  color: #6d28d9;
  margin-top: 4px;
}

/* --- 11. 目次のアクティブ状態 --- */
.toc a.toc-active {
  color: #7c3aed;
  font-weight: 700;
  position: relative;
}
.toc a.toc-active::before {
  content: '▸';
  position: absolute;
  left: -16px;
  color: #d4af37;
}

/* --- Mobile Adjustments --- */
@media (max-width: 768px) {
  .sticky-footer-cta {
    padding: 10px 12px;
    gap: 8px;
  }
  .sticky-footer-cta .sfc-text { font-size: 0.78rem; }
  .sticky-footer-cta .sfc-btn { font-size: 0.78rem; padding: 8px 16px; }
  .pull-quote { margin: 32px 0; padding: 24px 20px; font-size: 1rem; }
  .social-proof-box { flex-direction: column; text-align: center; }
}
