@charset "UTF-8";

/* ================================
   FAQ（faq.css）
================================ */

/* ---- ベース ---- */
.faq-section{
  padding: 0; /* 親テーマ側の余白がある前提。必要ならここで調整 */

  /* 色：FAQ内だけで有効（スコープ） */
  --faq-purple: #695aae;
  --faq-purple2:#9d90cd;
  --faq-gold:   #ca9b38;
  --faq-gold2:  #dec183;
  --faq-beige:  #f5efe9;
  --faq-text:   #282828;
  --faq-muted:  #555;
}

.faq-wrap{
  max-width: 920px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ---- アコーディオン全体 ---- */
.faq-accordion{
  margin-top: 18px;
}

/* detailsデフォの三角を消す */
.faq-item > summary{
  list-style: none;
}
.faq-item > summary::-webkit-details-marker{
  display: none;
}

/* 1件 */
.faq-item{
  background: #fff;
  border: 1px solid var(--faq-gold2);

  /* 角丸：控えめに */
  border-radius: 12px;

  overflow: hidden;

  /* 影：ボカシ範囲を狭める（タイトに） */
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.faq-item + .faq-item{
  margin-top: 18px;
}

/* ---- 質問行 ---- */
.faq-q{
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;

  padding: 18px 18px;
  cursor: pointer;
  user-select: none;

  background: #fff;

  /* 角丸を揃える（open時の見た目安定） */
  border-radius: 12px;
}

/* Q hover：指定色 */
.faq-q:hover{
  background: var(--faq-beige); 
}

.faq-item[open] > .faq-q{
  background: #fff;
}

.faq-q:focus-visible{
  outline: 3px solid rgba(105, 90, 174, 0.25);
  outline-offset: 2px;
}

/* Qバッジ */
.faq-q__badge{
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 34px;
  height: 34px;
  border-radius: 9999px;

  background: var(--faq-purple);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  line-height: 1;
}

/* 質問文 */
.faq-q__text{
  flex: 1 1 auto;
  min-width: 0;
  color: var(--faq-text);
  font-weight: 700;
  line-height: 1.55;
  font-size: 16px;
}

/* 開閉アイコン（＋→−） */
.faq-q__icon{
  flex: 0 0 auto;
  position: relative;
  width: 22px;
  height: 22px;
  margin-left: 6px;
  transform: scale(0.85);
  transform-origin: center;
}

/* 横線 */
.faq-q__icon::before{
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 22px;
  height: 2px;
  background: var(--faq-purple);
  transform: translateY(-50%);
  border-radius: 2px;
}

/* 縦線（開いたら消す） */
.faq-q__icon::after{
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 2px;
  height: 22px;
  background: var(--faq-purple);
  transform: translateX(-50%);
  border-radius: 2px;
  transition: opacity 220ms ease;
}

.faq-item.is-open .faq-q__icon::after{
  opacity: 0;
}

/* ---- 回答 ---- */
.faq-a{
  /* JSでheightを制御してアニメさせる */
  height: auto;          /* 初期はJSが上書き */
  overflow: hidden;      /* アニメのため */
  background: var(--faq-beige);
  border-top: 1px solid rgba(222, 193, 131, 0.7);

  /* 下側の角を残す（open時の見た目安定） */
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}

.faq-a__inner{
  display: flex;
  gap: 12px;

  /* Aの下に変な余白が出ないよう、下paddingも控えめに */
  padding: 16px 18px 16px;
}

/* Aバッジ */
.faq-a__badge{
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 34px;
  height: 34px;
  border-radius: 9999px;

  background: var(--faq-gold);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  line-height: 1;
}

.faq-a__text{
  flex: 1 1 auto;
  min-width: 0;
  color: var(--faq-text);
  line-height: 1.9;
  font-size: 15px;
}

/* 段落の余白 */
.faq-a__text p{
  margin: 0 0 10px;
}

/* FAQ内：エディタ由来の *+* マージンを無効化して、自前で余白管理 */
.faq-a__text > *{
  margin: 0 !important;
}

.faq-a__text > * + *{
  margin-top: 10px !important; /* ←段落間の間隔（好みで調整） */
}

/* WPが吐く空のp対策 */
.faq-a__text p:empty{
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.faq-a__text ul{
  margin: 8px 0 10px;
  padding-left: 1.2em;
}

.faq-a__text li{
  margin: 6px 0;
  font-weight: 600;
}

.faq-a__text a{
  color: var(--faq-purple);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

/* WPが吐く空のp対策（改行/空白/&nbsp;も含めて潰す） */
.faq-a__text p:empty{
  display: none !important;
}

/* 空白だけのp（改行/スペース/nbsp）も潰す */
.faq-a__text p{
  margin: 0 !important; /* まず一旦0に固定 */
}

.faq-a__text p + p{
  margin-top: 10px !important; /* 段落間はこれで管理 */
}

/* ここが肝：空白だけのpを見た目上ゼロ化 */
.faq-a__text p:not(:has(*)){
  min-height: 0 !important;
  padding: 0 !important;
}

/* Safari対策：:has が効かない環境でも最低限消す */
.faq-a__text p[style*="margin"]{
  margin: 0 !important;
}

/* ================================
   PC（1025px以上）
================================ */
@media screen and (min-width: 1025px){
  /* フロントのページタイトル（H1）を大きくする */
  body.page :is(.entry-title, .page-title, .post-title, .headline, .page_headline, .headline1, h1){
    font-size: 34px !important;
    line-height: 1.25 !important;
  }			

  .faq-wrap{
    padding: 0 0;
  }

  .faq-q{
    padding: 20px 22px;
  }

  .faq-q__text{
    font-size: 17px;
  }

  .faq-a__inner{
    padding: 18px 22px 18px;
  }

  .faq-a__text{
    font-size: 15.5px;
  }
}

/* ================================
   タブレット（768〜1024px）
================================ */
@media screen and (min-width: 768px) and (max-width: 1024px){
  /* フロントのページタイトル（H1）を大きくする */
  body.page :is(.entry-title, .page-title, .post-title, .headline, .page_headline, .headline1, h1){
    font-size: 26px !important;
    line-height: 1.25 !important;
  }		
	

  .faq-q{
    padding: 18px 18px;
  }

  .faq-q__text{
    font-size: 16px;
  }

  .faq-a__inner{
    padding: 16px 18px 16px;
  }
}

/* ================================
   スマホ（〜767px）
================================ */
@media screen and (max-width: 767px){

  /* フロントのページタイトル（H1）を大きくする */
  body.page :is(.entry-title, .page-title, .post-title, .headline, .page_headline, .headline1, h1){
    font-size: 24px !important;
    line-height: 1.25 !important;
  }		

  .faq-wrap{
    padding: 0 12px;
  }

  .faq-item{
    border-radius: 10px;
  }

  .faq-q{
    padding: 16px 14px;
    gap: 10px;
    border-radius: 10px;
  }

  .faq-a{
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
  }

  .faq-q__badge,
  .faq-a__badge{
    width: 30px;
    height: 30px;
    font-size: 13px;
  }

  .faq-q__text{
    font-size: 15px;
  }

  .faq-a__inner{
    padding: 14px 14px 0px;
    gap: 10px;
  }

  .faq-a__text{
    font-size: 14.5px;
  }
}