/* ====================================
   よくある質問ページ
   ==================================== */

   .page-faq .page-hero::before {
      --hero-bg-image: url('../images/faq-bg.webp');
   }

   /* ========================================
   よくある質問導入セクション
======================================== */
.faq-section {
   background: var(--color-contact-bg);
   padding: 4rem 1.25rem;
   border-radius: var(--border-radius-section);
   position: relative;
   z-index: 2;
}

/* FAQセクションの英語タイトル - カテゴリーごとに色変更 */
.faq-section .section-title-en {
   color: var(--color-tertiary);
   transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-section .section-title-en::before {
   background: var(--color-tertiary);
   transition: background 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* カテゴリー別の色 */
.faq-section .section-title-en.category-housecleaning {
   color: var(--color-primary);
}

.faq-section .section-title-en.category-housecleaning::before {
   background: var(--color-primary);
}

.faq-section .section-title-en.category-metalwork {
   color: var(--color-tertiary);
}

.faq-section .section-title-en.category-metalwork::before {
   background: var(--color-tertiary);
}

.faq-section .section-title-en.category-other {
   background: linear-gradient(135deg, var(--color-gradient-primary) 0%, var(--color-gradient-secondary) 100%);
   -webkit-background-clip: text;
   -webkit-text-fill-color: transparent;
   background-clip: text;
}

.faq-section .section-title-en.category-other::before {
   background: linear-gradient(135deg, var(--color-gradient-primary) 0%, var(--color-gradient-secondary) 100%);
}



/* 1024px以上でも縦並びを維持 */
.faq-intro-section .section-inner {
   display: block;
}

@media (min-width: 576px) {

   .faq-intro-section {
       padding: 4rem 2rem;
   }
}

@media (min-width: 768px) {

   .faq-intro-section {
       padding: 4.5rem 2rem;
   }
}

@media (min-width: 1024px) {
   .faq-intro-section .section-inner {
       display: block;
   }

   .faq-intro-section {
       padding: 6rem 2rem;
   }
}

.faq-intro-description {
   text-align: left;
   font-size: var(--body-font-size-sp);
   line-height: var(--body-line-height-sp);
   color: var(--color-text);
   margin-bottom: 2rem;
}

@media (min-width: 768px) {
   .faq-intro-description {
       text-align: center;
       font-size: var(--body-font-size-pc);
       line-height: var(--body-line-height-pc);
       margin-bottom: 3rem;
   }
}

/* よくある質問ページリンクのスタイリング */
.faq-intro-description a {
   color: var(--color-tertiary);
   font-weight: 500;
   text-decoration: underline;
   text-decoration-thickness: 2px;
   text-underline-offset: 3px;
   transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-intro-description a:hover {
   color: var(--color-secondary);
}

/* ========================================
   FAQコンテンツラッパー
======================================== */
.faq-section .faq-content-wrapper {
   display: flex;
   flex-direction: column;
   gap: 3rem;
}

@media (min-width: 768px) {
   .faq-section .faq-content-wrapper {
       gap: 4rem;
   }
}

/* ========================================
   FAQメインコンテナー
======================================== */
.faq-section .faq-main-container {
   display: flex;
   flex-direction: column;
   gap: 2rem;
}

@media (min-width: 768px) {
   .faq-section .faq-main-container {
       gap: 2.5rem;
   }
}

/* ========================================
   FAQサブコンテナー
======================================== */
.faq-section .faq-sub-container {
   display: flex;
   flex-direction: column;
   gap: 2rem;
}

@media (min-width: 768px) {
   .faq-section .faq-sub-container {
       gap: 2.5rem;
   }
}

/* ========================================
   FAQセクション見出し
======================================== */
.faq-section .faq-section-title-wrapper {
   text-align: left;
}

.faq-section .faq-section-title {
   font-size: 1.25rem;
   font-weight: 600;
   color: var(--color-title);
   letter-spacing: 0.05em;
   position: relative;
   padding-left: 1.25rem;
}

@media (min-width: 768px) {
   .faq-section .faq-section-title {
       font-size: 1.375rem;
       padding-left: 1.5rem;
   }
}

/* 左側の丸い装飾 - デフォルト（グラデーション） */
.faq-section .faq-section-title::before {
   content: '';
   position: absolute;
   left: 0;
   top: 50%;
   transform: translateY(-50%);
   width: 10px;
   height: 10px;
   background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
   border-radius: 50%;
   transition: background 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (min-width: 768px) {
   .faq-section .faq-section-title::before {
       width: 12px;
       height: 12px;
   }
}

/* ハウスクリーニングカテゴリーがアクティブな時 */
.faq-section .faq-section-title.category-housecleaning::before {
   background: var(--color-primary);
}

/* 建築板金カテゴリーがアクティブな時 */
.faq-section .faq-section-title.category-metalwork::before {
   background: var(--color-tertiary);
}

/* サービス全般カテゴリーがアクティブな時（グラデーション） */
.faq-section .faq-section-title.category-other::before {
   background: linear-gradient(135deg, var(--color-gradient-primary) 0%, var(--color-gradient-secondary) 100%);
}



/* ========================================
   カテゴリー選択エリア
======================================== */
.faq-section .faq-category-area {
   display: flex;
   flex-direction: column;
   gap: 0.875rem;
   margin: 0 auto 2.5rem;
   background: var(--color-white);
   padding: 1.25rem 1rem;
   border-radius: 1rem;
   max-width: max-content;
   transition: background 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (min-width: 768px) {
   .faq-section .faq-category-area {
       gap: 1rem;
       margin-bottom: 3rem;
       padding: 1.5rem 2rem;
   }
}

/* カテゴリー別背景色 */
.faq-section .faq-category-area.category-housecleaning {
   background: var(--color-light-blue-bg);
}

.faq-section .faq-category-area.category-metalwork {
   background: var(--color-light-green-bg);
}

.faq-section .faq-category-area.category-other {
   background: var(--color-light-gray);
}

/* カテゴリー選択見出し */
.faq-section .faq-category-title {
   font-size: 0.875rem;
   font-weight: 500;
   color: var(--color-gray);
   text-align: center;
   letter-spacing: 0.05em;
}

@media (min-width: 768px) {
   .faq-section .faq-category-title {
       font-size: 0.95rem;
   }
}

/* ========================================
   カテゴリータブ
======================================== */
.faq-section .faq-category-tabs {
   display: flex;
   gap: 0.5rem;
   flex-wrap: wrap;
   justify-content: center;
}

@media (min-width: 768px) {
   .faq-section .faq-category-tabs {
       gap: 1rem;
   }
}

.faq-section .faq-tab {
   padding: 0.625rem 1rem;
   border: 2px solid #ddd;
   background: var(--color-white);
   border-radius: 50px;
   font-size: 0.875rem;
   font-weight: 600;
   cursor: pointer;
   transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
   white-space: nowrap;
   flex: 1 1 auto;
   min-width: 0;
   color: #5A5A5A;
}

@media (min-width: 576px) {
   .faq-section .faq-tab {
       padding: 0.75rem 1.5rem;
       font-size: 0.95rem;
       flex: 0 1 auto;
       min-width: 140px;
   }
}

@media (min-width: 768px) {
   .faq-section .faq-tab {
       padding: 0.875rem 2rem;
       font-size: 1rem;
   }
}

.faq-section .faq-tab:hover {
   background: #f8f9fa;
}

/* ハウスクリーニングタブ */
.faq-section .faq-tab[data-category="housecleaning"]:hover {
   border-color: var(--color-primary);
}

.faq-section .faq-tab[data-category="housecleaning"].active {
   background: var(--color-primary);
   color: var(--color-white);
   border-color: var(--color-primary);
}

/* 建築板金タブ */
.faq-section .faq-tab[data-category="metalwork"]:hover {
   border-color: var(--color-tertiary);
}

.faq-section .faq-tab[data-category="metalwork"].active {
   background: var(--color-tertiary);
   color: var(--color-white);
   border-color: var(--color-tertiary);
}

/* --- [Otherタブ] 基本設定 --- */
.faq-section .faq-tab[data-category="other"] {
   position: relative;
   z-index: 1;
   border: 2px solid #ddd;
   background: var(--color-white);
   transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 枠線グラデーションの層（普段は隠す） */
.faq-section .faq-tab[data-category="other"]::after {
   content: "";
   position: absolute;
   top: -2px; left: -2px; right: -2px; bottom: -2px;
   border-radius: 50px;
   padding: 2px;
   background: linear-gradient(135deg, var(--color-gradient-primary), var(--color-gradient-secondary));
   
   /* 枠線部分だけを切り抜く最新の手法 */
   -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
   mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
   -webkit-mask-composite: xor;
   mask-composite: exclude;
   
   opacity: 0;
   transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
   pointer-events: none;
   z-index: -1;
}

/* --- [Otherタブ] ホバー時（activeではない時だけ発動） --- */
.faq-section .faq-tab[data-category="other"]:hover:not(.active) {
   background: #f8f9fa; /* 共通のhover背景色 */
   border-color: transparent; /* 下地のグレー線を消してグラデーションを際立たせる */
}

.faq-section .faq-tab[data-category="other"]:hover:not(.active)::after {
   opacity: 1; /* グラデーション枠線をふわっと表示 */
}

/* --- [Otherタブ] アクティブ時（グラデーション背景） --- */
.faq-section .faq-tab[data-category="other"].active {
   background: linear-gradient(135deg, var(--color-gradient-primary), var(--color-gradient-secondary));
   color: var(--color-white);
   border-color: transparent; /* 枠線を消して背景全体をグラデーションに */
}

/* アクティブ時は擬似要素を完全に隠す（念のため） */
.faq-section .faq-tab[data-category="other"].active::after {
   display: none;
}



.faq-section .faq-tab[data-category="other"].active {
   position: relative;
   background: linear-gradient(135deg, var(--color-gradient-primary) 0%, var(--color-gradient-secondary) 100%);
   color: var(--color-white);
   border: 2px solid transparent;
   background-origin: border-box;
   background-clip: padding-box;
}

/* ========================================
   質問カードグリッド
======================================== */
/* 質問カードグリッド */
.faq-section .faq-cards-grid {
   display: grid;
   grid-template-columns: 1fr;
   gap: 1.75rem;
   align-items: start;
}

.faq-section .faq-cards-grid > * {
   transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (min-width: 768px) {
   .faq-section .faq-cards-grid {
       grid-template-columns: repeat(2, 1fr);
       gap: 2rem;
   }
}

/* 質問カード */
.faq-section .faq-card {
   background: var(--color-white);
   text-align: center;
   border-radius: 0 0 1.5rem 0;
   box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
   overflow: hidden;
   display: flex;
   flex-direction: column;
   transition: box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-section .faq-card:hover {
   box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* カード上部（アイコンと質問）- 常に表示 */
.faq-section .faq-card-top {
   background: var(--color-white);
   padding: 2rem 1.5rem;
   display: flex;
   flex-direction: column;
   align-items: center;
   gap: 1rem;
}

@media (min-width: 768px) {
   .faq-section .faq-card-top {
       padding: 2rem 1.5rem;
   }
}

/* カードアイコン */
.faq-section .faq-card-icon {
   width: 60px;
   height: 60px;
   border-radius: 50%;
   display: flex;
   align-items: center;
   justify-content: center;
   flex-shrink: 0;
}

/* カテゴリー別アイコン色 */
.faq-section .faq-card[data-category="housecleaning"] .faq-card-icon {
   background: var(--color-primary);
}

.faq-section .faq-card[data-category="metalwork"] .faq-card-icon {
   background: var(--color-tertiary);
}

.faq-section .faq-card[data-category="other"] .faq-card-icon {
   background: linear-gradient(135deg, var(--color-gradient-primary) 0%, var(--color-gradient-secondary) 100%);
}

@media (min-width: 768px) {
   .faq-section .faq-card-icon {
       width: 70px;
       height: 70px;
   }
}

.faq-section .faq-card-icon i {
   font-size: 1.75rem;
   color: var(--color-white);
}

@media (min-width: 768px) {
   .faq-section .faq-card-icon i {
       font-size: 2rem;
   }
}

/* カード質問テキスト */
.faq-section .faq-card-question {
   font-size: 1.125rem;
   font-weight: 600;
   color: var(--color-text);
   line-height: 1.5;
}

@media (min-width: 768px) {
   .faq-section .faq-card-question {
       font-size: 1.25rem;
   }
}

/* カード下部 */
.faq-section .faq-card-bottom {
   padding: 1.5rem;
   border-radius: 0 0 1.5rem 0;
   display: flex;
   flex-direction: column;
   gap: 0;
   transition: gap 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* カテゴリー別カード下部色 */
.faq-section .faq-card[data-category="housecleaning"] .faq-card-bottom {
   background: var(--color-primary);
}

.faq-section .faq-card[data-category="metalwork"] .faq-card-bottom {
   background: var(--color-tertiary);
}

.faq-section .faq-card[data-category="other"] .faq-card-bottom {
   background: linear-gradient(135deg, var(--color-gradient-primary) 0%, var(--color-gradient-secondary) 100%);
}

@media (min-width: 768px) {
   .faq-section .faq-card-bottom {
       padding: 1.75rem 2rem;
   }
}

/* 開いているときはギャップを追加 */
.faq-section .faq-card.is-open .faq-card-bottom {
   gap: 1.5rem;
}

/* --- メインFAQ 回答エリア --- */
.faq-section .faq-card-answer {
   max-height: 0;
   overflow: hidden;
   opacity: 0;
   /* transitionを0.45sに統一するとより洗練された印象になります */
   transition: max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1), 
               opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 開いている状態（JSで制御するためmax-heightは指定しない） */
.faq-section .faq-card.is-open .faq-card-answer {
   opacity: 1;
}

.faq-section .faq-answer-text {
   display: block; /* 高さを正しく計算させるため */
   width: auto;
   font-size: 0.95rem;
   line-height: var(--body-line-height-sp);
   color: var(--color-text);
   text-align: left;
   background: var(--color-white);
   padding: 1.25rem;
   border-radius: 1rem;
   box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
   /* 狭い画面での見切れ防止 */
   word-break: break-all;
   overflow-wrap: break-word;
}

@media (min-width: 768px) {
   .faq-section .faq-answer-text {
       font-size: 0.975rem;
       line-height: var(--body-line-height-pc);
       padding: 1.5rem;
   }
}

/* 回答の「A.」ラベル */
.faq-section .answer-label {
   font-weight: 700;
}

/* カテゴリー別A.ラベル色 */
.faq-section .faq-card[data-category="housecleaning"] .answer-label {
   color: var(--color-primary);
}

.faq-section .faq-card[data-category="metalwork"] .answer-label {
   color: var(--color-tertiary);
}

.faq-section .faq-card[data-category="other"] .answer-label {
   background: linear-gradient(135deg, var(--color-gradient-primary) 0%, var(--color-gradient-secondary) 100%);
   -webkit-background-clip: text;
   -webkit-text-fill-color: transparent;
   background-clip: text;
}

/* 回答を見るボタン */
.faq-section .faq-card-toggle {
   width: 100%;
   background: var(--color-white);
   padding: 0.75rem 1.25rem;
   border: none;
   border-radius: 50px;
   font-size: 1rem;
   font-weight: 600;
   cursor: pointer;
   display: flex;
   align-items: center;
   justify-content: center;
   gap: 0.5rem;
   transition: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
               transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* カテゴリー別ボタンテキスト色 */
.faq-section .faq-card[data-category="housecleaning"] .faq-card-toggle {
   color: var(--color-primary);
}

.faq-section .faq-card[data-category="metalwork"] .faq-card-toggle {
   color: var(--color-tertiary);
}

/* 1. 通常時（other専用） */
.faq-section .faq-card[data-category="other"] .faq-card-toggle {
   position: relative;
   z-index: 1;
   overflow: hidden; /* 角丸からはみ出さないように */
   background: var(--color-white); /* ベースは白 */
   /* transitionは共通のものを継承するのでここには書かなくてOK（一貫性のため） */
}

/* 2. 重ねるグラデーション層を作る */
.faq-section .faq-card[data-category="other"] .faq-card-toggle::before {
   content: "";
   position: absolute;
   top: 0; left: 0; right: 0; bottom: 0;
   background: linear-gradient(135deg, #F0F7FF 0%, #F1F9F1 100%);
   z-index: -1; /* テキスト（z-index: 1より下）の背面に配置 */
   opacity: 0;  /* 最初は透明 */
   /* ここに指定の cubic-bezier を書くことで、他のタブと速度が完全に一致します */
   transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 「A.回答を見る」のテキストとアイコンにグラデーションを適用 */
.faq-section .faq-card[data-category="other"] .faq-toggle-text,
.faq-section .faq-card[data-category="other"] .faq-toggle-icon {
    /* グラデーションの設定 */
    background: linear-gradient(135deg, var(--color-gradient-primary) 0%, var(--color-gradient-secondary) 100%);
    
    /* 背景を文字の形に切り抜く */
    -webkit-background-clip: text;
    background-clip: text;
    
    /* 本来の文字色を透明にする */
    color: transparent;
    
    /* アイコンなどはinline-blockにしないとグラデーションがズレることがあります */
    display: inline-block;
}


@media (min-width: 768px) {
   .faq-section .faq-card-toggle {
       padding: 0.875rem 1.5rem;
       font-size: 1.05rem;
   }
}

/* カテゴリー別ボタンホバー色 */
.faq-section .faq-card[data-category="housecleaning"] .faq-card-toggle:hover {
   background: var(--color-light-blue-bg);
}

.faq-section .faq-card[data-category="metalwork"] .faq-card-toggle:hover {
   background: var(--color-light-green-bg);
}

/* 3. ホバー時 */
.faq-section .faq-card[data-category="other"] .faq-card-toggle:hover {
   /* 親の背景色は変えず、上の層を表示させるだけ */
   background: var(--color-white); 
}

.faq-section .faq-card[data-category="other"] .faq-card-toggle:hover::before {
   opacity: 1; /* 0.3秒かけてじわ〜っと表示される */
}

.faq-section .faq-card-toggle:active {
   transform: scale(0.98);
}

.faq-section .faq-toggle-icon {
   font-size: 0.875rem;
   transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 開いている状態 */
.faq-section .faq-card.is-open .faq-toggle-icon {
   transform: rotate(180deg);
}

/* ボタンエリア */
.faq-intro-button {
   text-align: center;
}

@media (min-width: 768px) {
   .faq-intro-button {
       margin-top: 0.5rem;
   }
}

/* ========================================
   サブFAQ（横並びアコーディオン）
======================================== */
.faq-section .faq-sub-list {
   display: flex;
   flex-direction: column;
   gap: 1rem;
}

@media (min-width: 768px) {
   .faq-section .faq-sub-list {
       gap: 1.25rem;
   }
}

.faq-section .faq-sub-item {
   background: var(--color-white);
   border-radius: 0 0 1.5rem 0;
   box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
   overflow: hidden;
   transition: box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-section .faq-sub-item:hover {
   box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* サブFAQヘッダー（横並び） */
.faq-section .faq-sub-header {
   display: flex;
   align-items: center;
   gap: 1rem;
   padding: 1.25rem 1.5rem;
   background: var(--color-white);
   transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (min-width: 768px) {
   .faq-section .faq-sub-header {
       gap: 1.5rem;
       padding: 1.5rem 2rem;
   }
}

/* サブFAQアイコン */
.faq-section .faq-sub-icon {
   width: 40px;
   height: 40px;
   border-radius: 50%;
   display: flex;
   align-items: center;
   justify-content: center;
   flex-shrink: 0;
}

@media (min-width: 768px) {
   .faq-section .faq-sub-icon {
       width: 50px;
       height: 50px;
   }
}

/* カテゴリー別アイコン背景色 */
.faq-section .faq-sub-item[data-category="housecleaning"] .faq-sub-icon {
   background: var(--color-primary);
}

.faq-section .faq-sub-item[data-category="metalwork"] .faq-sub-icon {
   background: var(--color-tertiary);
}

.faq-section .faq-sub-item[data-category="other"] .faq-sub-icon {
   background: linear-gradient(135deg, var(--color-gradient-primary) 0%, var(--color-gradient-secondary) 100%);
}

.faq-section .faq-sub-icon i {
   font-size: 1.25rem;
   color: var(--color-white);
}

@media (min-width: 768px) {
   .faq-section .faq-sub-icon i {
       font-size: 1.5rem;
   }
}

/* サブFAQ質問 */
.faq-section .faq-sub-question {
   flex: 1;
   font-size: 1rem;
   font-weight: 600;
   color: var(--color-text);
   line-height: 1.5;
   margin: 0;
}

@media (min-width: 768px) {
   .faq-section .faq-sub-question {
       font-size: 1.125rem;
   }
}

/* サブFAQトグルボタン */
.faq-section .faq-sub-toggle {
   background: var(--color-white);
   width: 32px;
   height: 32px;
   border: none;
   border-radius: 50%;
   cursor: pointer;
   display: flex;
   align-items: center;
   justify-content: center;
   flex-shrink: 0;
   transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (min-width: 768px) {
   .faq-section .faq-sub-toggle {
       width: 36px;
       height: 36px;
   }
}



/* カテゴリー別ボタン背景色 */
.faq-section .faq-sub-item[data-category="housecleaning"] .faq-sub-toggle {
   background: var(--color-primary);
}

.faq-section .faq-sub-item[data-category="metalwork"] .faq-sub-toggle {
   background: var(--color-tertiary);
}

.faq-section .faq-sub-item[data-category="other"] .faq-sub-toggle {
   background: linear-gradient(135deg, var(--color-gradient-primary) 0%, var(--color-gradient-secondary) 100%);
}

/* ホバー時に少し明るく */
.faq-section .faq-sub-item[data-category="housecleaning"] .faq-sub-toggle:hover {
   background: var(--color-button-lightblue);
}

.faq-section .faq-sub-item[data-category="metalwork"] .faq-sub-toggle:hover {
   background: var(--color-button-lightgreen);
}

.faq-section .faq-sub-item[data-category="other"] .faq-sub-toggle:hover {
   opacity: 0.9;
}

.faq-section .faq-sub-toggle:active {
   transform: scale(0.98);
}

.faq-section .faq-sub-toggle-icon {
   font-size: 0.875rem;
   color: var(--color-white);
   transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* テキストを非表示 */
.faq-section .faq-sub-toggle-text {
   display: none;
}

/* 開いている状態 */
.faq-section .faq-sub-item.is-open .faq-sub-toggle-icon {
   transform: rotate(180deg);
}

/* --- CSS修正案 --- */

.faq-section .faq-sub-answer {
   max-height: 0;
   overflow: hidden;
   /* 0.4s〜0.5s程度が人間の目に最も滑らかに見えます */
   transition: max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-section .faq-sub-answer-inner {
   /* 【重要】paddingをis-openからここへ移動 */
   padding: 1.25rem 1.5rem 1.5rem; 
   opacity: 0;
   transition: opacity 0.4s ease;
}

@media (min-width: 768px) {
   .faq-section .faq-sub-answer-inner {
       padding: 1.5rem 2rem 2rem;
   }
}

/* is-open時は不透明度だけを制御 */
.faq-section .faq-sub-item.is-open .faq-sub-answer-inner {
   opacity: 1;
}

/* カテゴリー別回答エリア背景色 */
.faq-section .faq-sub-item[data-category="housecleaning"] .faq-sub-answer-inner {
   background: var(--color-primary);
}

.faq-section .faq-sub-item[data-category="metalwork"] .faq-sub-answer-inner {
   background: var(--color-tertiary);
}

.faq-section .faq-sub-item[data-category="other"] .faq-sub-answer-inner {
   background: linear-gradient(135deg, var(--color-gradient-primary) 0%, var(--color-gradient-secondary) 100%);
}

/* サブFAQ回答テキスト本体 */
.faq-section .faq-sub-answer-text {
   display: block; /* インライン要素的な挙動を防ぐ */
   width: auto;    /* 固定幅にせず親に合わせる */
   height: auto;   /* 高さを固定しない */
   min-height: 0;  /* 念のためリセット */
   font-size: 0.95rem;
   line-height: 1.6;
   color: var(--color-text);
   text-align: left;
   background: var(--color-white);
   padding: 1.25rem;
   border-radius: 1rem;
   box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
   /* 【追加】改行を確実に行い、はみ出しを防ぐ */
   word-break: break-all;
   overflow-wrap: break-word;
}

@media (min-width: 768px) {
   .faq-section .faq-sub-answer-text {
       font-size: 0.975rem;
       line-height: var(--body-line-height-pc);
       padding: 1.5rem;
   }
}

/* サブFAQのA.ラベル色 */
.faq-section .faq-sub-answer-text .answer-label {
   font-weight: 700;
}

.faq-section .faq-sub-item[data-category="housecleaning"] .faq-sub-answer-text .answer-label {
   color: var(--color-primary);
}

.faq-section .faq-sub-item[data-category="metalwork"] .faq-sub-answer-text .answer-label {
   color: var(--color-tertiary);
}

.faq-section .faq-sub-item[data-category="other"] .faq-sub-answer-text .answer-label {
   background: linear-gradient(135deg, var(--color-gradient-primary) 0%, var(--color-gradient-secondary) 100%);
   -webkit-background-clip: text;
   -webkit-text-fill-color: transparent;
   background-clip: text;
}

/* ========================================
   FAQ注意書きエリア
======================================== */
.faq-notice {
   width: 100%;
   background: var(--color-light-blue-bg);
   padding: 0;
   border-radius: 1rem;
   display: flex;
   flex-direction: column;
   gap: 0;
   margin: 3rem auto 0;
   text-align: left;
   max-width: var(--section-content-width-sm);
}

/* カテゴリー別背景色 */
.faq-notice.category-housecleaning {
   background: var(--color-light-blue-bg);
}

.faq-notice.category-metalwork {
   background: var(--color-light-green-bg);
}

.faq-notice.category-other {
   background: var(--color-light-gray);
}

@media (min-width: 768px) {
   .faq-notice {
       max-width: var(--section-content-width-md);
   }
}

@media (min-width: 1024px) {
   .faq-notice {
       margin-top: 4rem;
       max-width: 100%;
   }
}

/* NOTICEヘッダー（左側配置） */
.faq-notice-header {
   padding: 1.5rem 1.5rem 0;
   display: flex;
   justify-content: flex-start;
   align-items: center;
}

.faq-notice-title {
   display: inline-block;
   /* デフォルトはグラデーション */
   background: linear-gradient(135deg, var(--color-gradient-primary) 0%, var(--color-gradient-secondary) 100%);
   
   color: var(--color-white);
   font-size: 0.75rem;
   font-family: var(--font-en);
   font-weight: 400;
   letter-spacing: 0.08em;
   padding: 0.5rem 1rem;
   border-radius: 0.25rem;
}

/* カテゴリー別NOTICEタイトル色 */
.faq-notice.category-housecleaning .faq-notice-title {
   background: var(--color-primary);
}

.faq-notice.category-metalwork .faq-notice-title {
   background: var(--color-tertiary);
}

.faq-notice.category-other .faq-notice-title {
   background: linear-gradient(135deg, var(--color-gradient-primary) 0%, var(--color-gradient-secondary) 100%);
}

@media (min-width: 768px) {
   .faq-notice-header {
       padding: 2rem 2rem 0;
   }
   
   .faq-notice-title {
       font-size: 0.875rem;
       padding: 0.5rem 1.25rem;
   }
}

/* テキスト部分 */
.faq-notice p {
   color: var(--color-text);
   font-size: var(--body-font-size-sp);
   line-height: var(--body-line-height-sp);
   letter-spacing: var(--body-letter-spacing);
   margin: 0;
   padding: 1.5rem;
   text-align: left;
   overflow: visible;
}


@media (min-width: 768px) {
   .faq-notice p {
       font-size: var(--body-font-size-pc);
       line-height: var(--body-line-height-pc);
       padding: 2rem;
       text-align: center;
   }
}

.faq-notice i {
   color: var(--color-primary);
   font-size: 1.1rem;
   margin-right: 0.5rem;
   overflow: visible;
}

@media (min-width: 768px) {
   .faq-notice i {
       font-size: 1.2rem;
   }
}

/* カテゴリー別アイコン色 */
.faq-notice.category-housecleaning i {
   color: var(--color-primary);
}

.faq-notice.category-metalwork i {
   color: var(--color-tertiary);
}

.faq-notice.category-other i {
   /* --- 既存のコード --- */
   background: linear-gradient(135deg, var(--color-gradient-primary) 0%, var(--color-gradient-secondary) 100%);
   -webkit-background-clip: text;
   background-clip: text;
   color: transparent;
   display: inline-block;

   /* --- 見切れ対策：ここを追加 --- */
   padding: 0.1em;      /* ほんの少し余白を作る */
   vertical-align: middle; /* 位置調整 */
}

/* ボタン部分（中央配置） */
.faq-notice-button {
   display: flex;
   justify-content: center;
   width: 100%;
   padding: 0 1.5rem 1.5rem;
}

@media (min-width: 768px) {
   .faq-notice-button {
       padding: 0 2rem 2rem;
   }
}

/* カテゴリー別ボタン色 */
/* ハウスクリーニングカテゴリ: 青系ボタン */
.faq-notice.category-housecleaning .btn-secondary {
   background: var(--color-button-blue);
}

.faq-notice.category-housecleaning .btn-secondary::before {
   background: var(--color-button-lightblue);
}

/* 建築板金カテゴリ: デフォルト（全ページ共通の緑系ボタン）のまま */
/* .faq-notice.category-metalwork には特に指定なし */

/* サービス全般カテゴリ: グラデーションボタン（きれいになるイメージ） */
.faq-notice.category-other .btn-secondary {
   background: linear-gradient(135deg, var(--color-gradient-primary) 0%, var(--color-gradient-secondary) 100%);
}

.faq-notice.category-other .btn-secondary::before {
   background: linear-gradient(135deg, var(--color-gradient-primary) 0%, var(--color-gradient-secondary) 100%);
   filter: brightness(1.15);
}


