/* =========================================================
   FAQ [acf_faq_archive] のスタイル（.ciao-faq-*）
   ※ 元々 Elementorテンプレ675 のウィジェット単位カスタムCSSにあったものを
      子テーマへ移設（Elementor無効化でも崩れないように）。
   ※ 色は site-chrome.css :root のブランドパレット（赤/緑）に統一。
      （料金表は mammaciao_render_prices() のコード版へ移行したため旧CSSは削除）
   ========================================================= */

/* FAQ セクション全体 */
.ciao-faq-accordion {
  max-width: 1200px;
  margin: 3rem auto;
  padding: 0 1rem;
}

/* カテゴリ(第1階層)アコーディオン */
.ciao-faq-category {
  background: #fff;
  border: 2px solid var(--mc-red, #E40110);
  border-radius: 12px;
  margin-bottom: 2rem;
  overflow: hidden;
}

/* カテゴリタイトル */
.ciao-faq-category-title {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem 2rem;
  cursor: pointer;
  user-select: none;
  list-style: none;
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--mc-red, #E40110);
  background: #fff;
  transition: background-color 0.3s ease;
}

.ciao-faq-category-title::-webkit-details-marker {
  display: none;
}

.ciao-faq-category-title:hover {
  background: var(--mc-red-soft, #FCEAEA);
}

/* カテゴリアイコン(Q&A吹き出し) */
.ciao-faq-category-icon {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 120 100"><g><circle cx="35" cy="35" r="28" fill="none" stroke="%23333" stroke-width="4"/><path d="M 20 55 Q 15 65, 10 70" fill="none" stroke="%23333" stroke-width="4" stroke-linecap="round"/><text x="35" y="45" font-size="28" font-weight="bold" fill="%23333" text-anchor="middle" font-family="Arial, sans-serif">Q</text></g><g><circle cx="80" cy="50" r="28" fill="none" stroke="%23333" stroke-width="4"/><path d="M 95 70 Q 100 80, 105 85" fill="none" stroke="%23333" stroke-width="4" stroke-linecap="round"/><text x="80" y="60" font-size="28" font-weight="bold" fill="%23333" text-anchor="middle" font-family="Arial, sans-serif">A</text></g></svg>');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  transition: transform 0.3s ease;
}

.ciao-faq-category-icon::before {
  content: '';
}

.ciao-faq-category[open] .ciao-faq-category-icon {
  transform: scale(1.05);
}

/* カテゴリテキスト */
.ciao-faq-category-text {
  flex: 1;
  line-height: 1.4;
}

/* カテゴリの矢印 */
.ciao-faq-category-title::after {
  content: '';
  width: 14px;
  height: 14px;
  border-right: 3px solid var(--mc-red, #E40110);
  border-bottom: 3px solid var(--mc-red, #E40110);
  transform: rotate(45deg);
  transition: transform 0.3s ease;
  flex-shrink: 0;
  margin-right: 0.5rem;
}

.ciao-faq-category[open] .ciao-faq-category-title::after {
  transform: rotate(-135deg);
  margin-bottom: -4px;
}

/* カテゴリコンテンツ */
.ciao-faq-category-content {
  padding: 1rem 2rem 2rem;
  background: #fafafa;
  animation: fadeIn 0.4s ease;
}

/* FAQ 各項目(第2階層) */
.ciao-faq-item {
  background: #f5f5f5;
  border: none;
  border-radius: 8px;
  margin-bottom: 1rem;
  overflow: hidden;
  transition: all 0.3s ease;
}

.ciao-faq-item:last-child {
  margin-bottom: 0;
}

.ciao-faq-item:hover {
  background: #ebebeb;
}

.ciao-faq-item[open] {
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* 質問部分(クリック可能) */
.ciao-faq-q {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  user-select: none;
  list-style: none;
  font-weight: 600;
  font-size: 1rem;
  color: #333;
  transition: all 0.3s ease;
}

.ciao-faq-q::-webkit-details-marker {
  display: none;
}

/* Qアイコン */
.ciao-faq-q-icon {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--mc-red, #E40110);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 1.3rem;
  font-family: 'Arial', sans-serif;
  transition: transform 0.3s ease;
}

.ciao-faq-q-icon::before {
  content: 'Q';
}

.ciao-faq-item[open] .ciao-faq-q-icon {
  transform: scale(1.05);
}

/* 質問テキスト */
.ciao-faq-q-text {
  flex: 1;
  line-height: 1.6;
}

/* 質問の矢印アイコン */
.ciao-faq-q::after {
  content: '';
  width: 10px;
  height: 10px;
  border-right: 2px solid #666;
  border-bottom: 2px solid #666;
  transform: rotate(45deg);
  transition: transform 0.3s ease;
  flex-shrink: 0;
  margin-right: 0.5rem;
}

.ciao-faq-item[open] .ciao-faq-q::after {
  transform: rotate(-135deg);
  margin-bottom: -3px;
}

/* 回答部分 */
.ciao-faq-a {
  display: flex;
  gap: 1rem;
  padding: 0 1.5rem 1.5rem 1.5rem;
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Aアイコン */
.ciao-faq-a::before {
  content: 'A';
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--mc-green, #6BB730);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 1.3rem;
  font-family: 'Arial', sans-serif;
}

/* 回答テキストコンテナ */
.ciao-faq-a > * {
  flex: 1;
  color: #555;
  line-height: 1.9;
  margin: 0;
}

/* 回答内のテキスト整形 */
.ciao-faq-a p {
  margin: 0 0 1rem 0;
}

.ciao-faq-a p:last-child {
  margin-bottom: 0;
}

.ciao-faq-a ul,
.ciao-faq-a ol {
  margin: 0.5rem 0 1rem 1.5rem;
  padding-left: 0;
}

.ciao-faq-a li {
  margin-bottom: 0.5rem;
}

/* YouTube iframe対応 */
.ciao-faq-a iframe {
  max-width: 100%;
  border-radius: 8px;
  margin: 1rem 0;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .ciao-faq-category-title {
    padding: 1.25rem 1.5rem;
    font-size: 1.1rem;
    gap: 0.75rem;
  }
  
  .ciao-faq-category-icon {
    width: 48px;
    height: 48px;
  }
  
  .ciao-faq-category-content {
    padding: 1rem 1.5rem 1.5rem;
  }
  
  .ciao-faq-q {
    padding: 1rem 1.25rem;
    font-size: 0.95rem;
    gap: 0.75rem;
  }
  
  .ciao-faq-q-icon {
    width: 36px;
    height: 36px;
    font-size: 1.15rem;
  }
  
  .ciao-faq-a {
    padding: 0 1.25rem 1.25rem 1.25rem;
    font-size: 0.9rem;
  }
  
  .ciao-faq-a::before {
    width: 36px;
    height: 36px;
    font-size: 1.15rem;
  }
}

@media (max-width: 480px) {
  .ciao-faq-accordion {
    padding: 0 0.5rem;
  }
  
  .ciao-faq-category {
    margin-bottom: 1.5rem;
  }
  
  .ciao-faq-category-title {
    padding: 1rem;
    font-size: 1rem;
    gap: 0.5rem;
  }
  
  .ciao-faq-category-icon {
    width: 42px;
    height: 42px;
  }
  
  .ciao-faq-category-content {
    padding: 0.75rem 1rem 1rem;
  }
  
  .ciao-faq-item {
    margin-bottom: 0.75rem;
  }
  
  .ciao-faq-q {
    padding: 0.875rem 1rem;
    font-size: 0.9rem;
    gap: 0.5rem;
  }
  
  .ciao-faq-q-icon {
    width: 32px;
    height: 32px;
    font-size: 1rem;
  }
  
  .ciao-faq-a {
    padding: 0 1rem 1rem 1rem;
    font-size: 0.85rem;
    gap: 0.5rem;
  }
  
  .ciao-faq-a::before {
    width: 32px;
    height: 32px;
    font-size: 1rem;
  }
  
  .ciao-faq-q::after,
  .ciao-faq-category-title::after {
    width: 9px;
    height: 9px;
  }
}
