@charset "UTF-8";
/* ============================================================
   日本遺産ポスター クイズ Q&A 専用スタイル
   - #question        … 問題一覧（archive-poster.php）
   - #poster-single   … 回答・解説（single-poster.php）

   デザインは「巡る（/touring/ ＝ #Touring）」を参考にしている。
   page bg : #f2efe6 (bg-color-01)
   main    : #01a29a / accent : #006275 / sub bg : #f5f5f5
   breakpoints : m=767px, l=999px
   ※ .headline-A / .common-title-01 / .common-button01,02 は
     style.css 側の共通パーツをそのまま利用している。
   ============================================================ */

/* ------------------------------------------------------------
   問題一覧（archive-poster.php）
------------------------------------------------------------ */
#question {
  padding-top: 80px;
  background-color: #f2efe6;
}

/* アイキャッチ右下の番号バッジ（touring と同じ位置に合わせる） */
#question .parallel-quadrangle-A {
  bottom: 135px;
}

/* touring の .main-contents 相当のコンテナ */
#question .main-contents {
  max-width: 1200px;
  width: 95%;
  margin: 0 auto;
  padding: 80px 0;
}

/* ポスター画像を横一列に配置（リード文の上） */
#question .question-posters {
  list-style: none;
  margin: 0 0 40px;
  padding: 0;
  display: flex;
  gap: 12px;
}

#question .question-posters li {
  flex: 1;
  min-width: 0;
}

#question .question-posters img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
}

#question .question-lead {
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  line-height: 2;
  margin-bottom: 50px;
}

@media only screen and (max-width: 767px) {
  #question .question-posters {
    gap: 6px;
    margin-bottom: 24px;
  }
}

#question .question-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

#question .question-item a {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 28px 64px 28px 28px;
  background-color: #fff;
  border-bottom: 3px solid #01a29a;
  border-right: 3px solid #01a29a;
  border-radius: 6px;
  text-decoration: none;
  color: #221714;
  position: relative;
  transition: 0.3s all;
}

#question .question-item a::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 28px;
  width: 11px;
  height: 11px;
  border-top: 2px solid #01a29a;
  border-right: 2px solid #01a29a;
  transform: translateY(-50%) rotate(45deg);
  transition: 0.3s all;
}

#question .question-item a:hover {
  background-color: #01a29a;
  color: #fff;
}

#question .question-item a:hover::after {
  border-color: #fff;
  right: 22px;
}

#question .question-no {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background-color: #01a29a;
  color: #fff;
  font-family: 'Roboto', sans-serif;
  font-weight: 700;
  font-size: 16px;
  border-radius: 90px;
  border: 2px solid #01a29a;
  transition: 0.3s all;
}

#question .question-item a:hover .question-no {
  background-color: #fff;
  color: #01a29a;
}

#question .question-text {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.7;
}

#question .question-empty {
  text-align: center;
  padding: 40px 0;
}

@media only screen and (max-width: 767px) {
  #question .main-contents {
    padding: 40px 0;
  }

  #question .question-lead {
    font-size: 14px;
    margin-bottom: 30px;
  }

  #question .question-item a {
    gap: 16px;
    padding: 20px 44px 20px 18px;
  }

  #question .question-item a::after {
    right: 18px;
  }

  #question .question-no {
    width: 44px;
    height: 44px;
    font-size: 14px;
  }

  #question .question-text {
    font-size: 15px;
  }
}

/* ------------------------------------------------------------
   回答・解説（single-poster.php）
------------------------------------------------------------ */
#poster-single {
  padding-top: 80px;
  background-color: #f2efe6;
}

/* アイキャッチ右下の番号バッジ（一覧と同じ位置に合わせる） */
#poster-single .parallel-quadrangle-A {
  bottom: 135px;
}

#poster-single .main-contents {
  max-width: 1000px;
  width: 95%;
  margin: 0 auto;
  padding: 80px 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* アイキャッチ（Qの上）。未設定なら出力されない */
#poster-single .poster-eyecatch {
  margin-bottom: 40px;
  text-align: center;
}

#poster-single .poster-eyecatch img {
  display: inline-block;
  max-width: 100%;
  max-height: 480px;
  height: auto;
  border-radius: 8px;
}

/* 問題（teal ボックス）／回答とくっつけ、下側の角は角ありにする */
#poster-single .poster-question {
  background-color: #01a29a;
  color: #fff;
  padding: 36px 32px;
  border-radius: 8px 8px 0 0;
}

/* 回答ブロックは問題とくっつき（上角は角あり）、解説との間はあける
   ※ .block { border-radius:8px } に勝つため .block.poster-answer で指定 */
#poster-single .block.poster-answer {
  border-radius: 0 0 8px 8px;
  margin-bottom: 60px;
}

#poster-single .poster-question .question-no {
  display: inline-block;
  margin-bottom: 14px;
  padding: 5px 20px;
  background-color: #fff;
  color: #01a29a;
  font-family: 'Roboto', sans-serif;
  font-weight: 700;
  font-size: 15px;
  border-radius: 90px;
}

#poster-single .poster-question .question-text {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.8;
}

/* ブロック共通見出し */
#poster-single .block {
  background-color: #fff;
  border-radius: 8px;
  padding: 36px 40px;
  border-bottom: 3px solid #01a29a;
  border-right: 3px solid #01a29a;
}

#poster-single .block-title {
  position: relative;
  font-size: 21px;
  font-weight: 700;
  color: #01a29a;
  padding-left: 18px;
  margin-bottom: 20px;
}

#poster-single .block-title::before {
  content: "";
  position: absolute;
  top: 0.1em;
  left: 0;
  width: 5px;
  height: 1.2em;
  background-color: #01a29a;
  border-radius: 3px;
}

/* 回答案 */
#poster-single .answer-summary {
  font-weight: 700;
  line-height: 1.9;
}

/* グローバルの * { font-size:13px } に勝つため p を直接指定 */
#poster-single .answer-summary p {
  font-size: 18px;
  line-height: 1.9;
  margin-bottom: 1.2em;
}

#poster-single .answer-summary p:last-child {
  margin-bottom: 0;
}

/* 解説詳細 */
#poster-single .detail-content {
  line-height: 2;
}

/* font-size はグローバルの * { font-size:13px } のまま（指定しない） */
/* 本文はテキストエリア（new_lines=br）のため <p> は付かない。
   段落の塊（.detail-text）と、WYSIWYG等の <p> 両方に余白を当てる */
#poster-single .detail-text,
#poster-single .detail-content p {
  line-height: 2;
  margin-bottom: 1.5em;
}

#poster-single .detail-text:last-child,
#poster-single .detail-content p:last-child {
  margin-bottom: 0;
}

/* 解説の合間に入る画像
   ・1枚でも「2枚並び」と同じ大きさ（固定幅）にする
   ・固定の枠サイズに対して contain で全体表示（見切れさせない） */
#poster-single .detail-images {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 32px 0;
}

/* 2枚並び基準の固定幅（gap 16px の半分ずつを差し引く） */
#poster-single .detail-image {
  width: calc(50% - 8px);
  margin: 0;
}

/* 画像の下に表示するキャプション（画像に対して中央揃え） */
#poster-single .detail-image figcaption {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.6;
  color: #666;
  text-align: center;
}

/* WYSIWYG 等に直接挿入されたインライン画像（フォールバック） */
#poster-single .detail-content img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: 5px;
}

/* 一定サイズの枠内に全体を収める（トリミングしない）。枠の灰背景は画像のみに付与 */
#poster-single .detail-images img {
  display: block;
  width: 100%;
  height: 260px;
  object-fit: contain;
  background: #f5f5f5;
  border-radius: 5px;
}

@media only screen and (max-width: 767px) {
  #poster-single .detail-images {
    gap: 10px;
    margin: 24px 0;
  }

  #poster-single .detail-image {
    width: calc(50% - 5px);
  }

  #poster-single .detail-images img {
    height: 160px;
  }
}

#poster-single .detail-content a {
  color: #006275;
  text-decoration: underline;
  word-break: break-all;
}

#poster-single .detail-content h2,
#poster-single .detail-content h3,
#poster-single .detail-content h4 {
  font-weight: 700;
  margin: 1.5em 0 0.6em;
  line-height: 1.6;
}

/* ------------------------------------------------------------
   関連ページエリア（任意追加）
   ※ スタイルは #Touring .Tour_best（sass/page/_ing.scss）から流用。
     クラス名をリネームし #poster-single 配下に閉じているため、
     引用元（touring）のスタイルには影響しない。
------------------------------------------------------------ */
#poster-single .poster-related {
  margin-top: 80px;
  padding-top: 100px;
  padding-bottom: 50px;
  background-color: #fff;
  /* main-contents（最大1000px）の内側から画面幅いっぱいに広げる */
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

#poster-single .poster-related-title {
  max-width: 1000px;
  width: 95%;
  margin: 0 auto;
  position: relative;
  top: -40px;
  color: #fff;
  background-color: #01a29a;
  transform: skewX(150deg);
  text-align: center;
  padding: 30px 0;
}

#poster-single .poster-related-title span {
  display: block;
  font-weight: bold;
  transform: skewX(-150deg);
  font-size: 24px;
}

#poster-single .poster-related-title::after {
  content: "";
  position: absolute;
  height: 0;
  width: 0;
  pointer-events: none;
  border: solid transparent;
  border-top-width: 15px;
  border-bottom-width: 15px;
  border-left-width: 19px;
  border-right-width: 1px;
  border-top-color: #01a29a;
  margin: auto;
  right: 0;
  left: 0;
  top: 97%;
}

#poster-single .poster-related-list {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  list-style: none;
  max-width: 1000px;
  width: 95%;
  margin: 0 auto;
  padding-top: 30px;
}

#poster-single .poster-related-list li {
  width: calc(100% / 3 - 14px);
}

#poster-single .poster-related-list a {
  display: block;
  transition: 0.2s all;
}

#poster-single .poster-related-list a:hover {
  opacity: 0.8;
}

#poster-single .poster-related-list img {
  width: 100%;
  height: 223px;
  object-fit: cover;
  border-radius: 5px;
  object-position: top;
}

#poster-single .poster-related-list h3 {
  font-weight: bold;
  padding-top: 5px;
}

@media only screen and (max-width: 999px) {
  #poster-single .poster-related-list li {
    width: calc(100% / 2 - 14px);
  }
}

@media only screen and (max-width: 767px) {
  #poster-single .poster-related-list li {
    width: 100%;
  }
}

/* 一覧へ戻る */
#poster-single .poster-back {
  margin-top: 60px;
}

@media only screen and (max-width: 767px) {
  #poster-single .main-contents {
    padding: 40px 0;
    gap: 0;
  }

  #poster-single .poster-answer {
    margin-bottom: 40px;
  }

  #poster-single .poster-back {
    margin-top: 40px;
  }

  #poster-single .poster-question {
    padding: 24px 22px;
  }

  #poster-single .poster-question .question-text {
    font-size: 18px;
  }

  #poster-single .block {
    padding: 24px 22px;
  }

  #poster-single .block-title {
    font-size: 18px;
  }

  #poster-single .answer-summary p {
    font-size: 18px;
  }
}
