/* summary-accordion-theme.css
   H2 を付箋風から下線デザインへ戻したバージョン
   上書き用に既存のファイルの後に読み込んでください。
*/

/* 全体背景（summary-bg）を緑基調に変更 */
.summary-bg {
    background: linear-gradient(135deg, #e9f9ef 0%, #d2f0db 50%, #bfe9c8 100%);
  }

  .summary-bg-w {
    background: white;

  }

  .add-summary {
    width: 100%; 
    font-size: clamp(1.2rem, 3.3vw, 1.8rem); 
    margin-top: 10px;
    display: inline-block; 
    color: var(--text-dark)
  }
   
  /* カラーバリアブル */
  :root {
    --main-green: #0c8a57;
    --accent-green: #0a6c44;
    --muted-green: #e7f7ee;
    --text-on-green: #083a25;
  }
  
  /* summary-box の微調整 */
  .summary-box {
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(241,255,245,0.98));
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(11,85,47,0.06);
    padding: 24px 10px;
  }
  
  /* H1 サマリータイトル */
  .summary-title {
    color: var(--main-green);
    font-style: normal;
    text-shadow: 0 2px 6px rgba(10,60,30,0.06);
  }
  
  /* ======= H2 (強化ポイント) 下線デザインに戻す ======= */
  /* 付箋風や左線は無効化して、中央寄せの下線で仕切るスタイル */
  .point-title {
    background: none;
    padding: 6px 12px 18px; /* 下線用の余白を確保 */
    border-radius: 0;
    box-shadow: none;
    font-size: clamp(2.0rem, 4.5vw, 4rem);
    color: var(--accent-green);
    font-style: italic;
    font-weight: 800;
    letter-spacing: 0.02em;
    margin-bottom: 20px;
    font-family: "Shippori Mincho B1", "Vollkorn", serif;
    text-align: center; /* 中央寄せで下線を中央に表示 */
    position: relative;
  }
  
  /* H2 下の装飾線（中央寄せ） — 元の summary-title::after と同様の表現 */
  /* .point-title::after {
    content: "";
    display: block;
    width: min(540px, 80%);
    height: 3px;
    margin: 8px auto 0;
    background: linear-gradient(90deg, var(--main-green), var(--accent-green));
    border-radius: 2px;
    opacity: 0.95;
  } */
  
  /* 小見出し（h3）を目立たせる（斜体＋左インデント） */
  .point-wrap h3 {
    font-size: clamp(1.3rem, 2.6vw, 2.2rem);
    color: var(--accent-green);
    margin: 0 0 10px 0;
    font-weight: 800;
    font-style: italic;
    letter-spacing: 0.01em;
    position: relative;
  }
  
  /* 左のデコ線は控えめに（目立ちすぎないよう短めに） */
  /* .point-wrap h3::before {
    content: "";
    width: 4px;
    height: 60%;
    background: linear-gradient(180deg, var(--main-green), var(--accent-green));
    display: inline-block;
    position: absolute;
    left: 0;
    top: 20%;
    border-radius: 2px;
  } */
  
  /* point-wrap のカード風調整 */
  .point-wrap {
    background: linear-gradient(180deg, rgba(255,255,255,0.9), rgba(247,255,250,0.9));
    padding: 18px 18px 70px;
    border-radius: 12px;
    margin-bottom: 18px;
    transition: box-shadow 180ms ease, transform 120ms ease;
  }
  
  /* open 状態の強調 */
  .point-wrap.is-open {
    background: #ffffff;
    box-shadow: 0 14px 36px rgba(7,63,33,0.06);
    transform: translateY(-4px);
  }
  
  /* Accordion content 基本 */
  .accordion-content {
    overflow: hidden;
    transition: max-height 380ms cubic-bezier(.2,.9,.2,1), opacity 260ms ease;
    will-change: max-height, opacity;
  }
  
  /* 折り畳み時はテキストを clamp 表示（3行） */
  .accordion-content.collapsed .summary-text {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  /* 折りたたみ時は画像は隠す */
  .accordion-content.collapsed figure {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
    overflow: hidden;
    transition: max-height 320ms ease, opacity 320ms ease;
  }
  
  /* 「もっと見る」ボタンを中央に目立つように配置（既存のボタンに上書き） */
  .accordion-toggle {
    display: flex;                 /* ボタン内部はフレックス（アイコン＋テキスト） */
    align-items: center;
    justify-content: center;
    width: max-content;            /* ボタン幅を内容に合わせる（中央寄せを容易にする） */
    margin: 18px auto 0;           /* 左右自動マージンで中央に配置 */
    padding: 12px 40px;
    gap: 12px;
    background: linear-gradient(90deg, var(--main-green), var(--accent-green));
    color: #ffffff;
    font-weight: 800;
    font-size: 1.6rem;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(10,108,68,0.12);
    transition: transform 160ms ease, box-shadow 160ms ease;
    position: relative;
    z-index: 3;
  }
  
  /* モバイルで幅がはみ出る場合の安全策 */
  @media (max-width: 420px) {
    .accordion-toggle {
      width: 100%;                 /* 小さい画面では横幅いっぱいにしてタップしやすくする */
      max-width: 360px;
      box-sizing: border-box;
      margin-left: auto;
      margin-right: auto;
    }
    .accordion-toggle .accordion-label {
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
  }
  
  /* 下のうっすらグラデは不要なので削除 */
  .accordion-toggle::after { display: none !important; }
  
  /* アイコン（+ / -） */
  .accordion-icon {
    display: inline-block;
    width: 22px;
    height: 22px;
    line-height: 22px;
    text-align: center;
    font-weight: 900;
    font-size: 18px;
    color: #fff;
    transition: transform 260ms cubic-bezier(.2,.9,.2,1);
    transform-origin: center;
  }
  
  /* 回転（開くと回転）＋ JS で中身を「-」に変更する */
  .point-wrap.is-open .accordion-icon {
    transform: rotate(180deg);
  }
  
  /* toggle のフォーカススタイル */
  .accordion-toggle:focus {
    outline: 3px solid rgba(10,108,68,0.18);
    outline-offset: 4px;
    box-shadow: 0 10px 24px rgba(10,108,68,0.12);
  }
  
  /* モバイル調整 */
  @media (max-width: 767px) {
    .add-summary {
      padding: 0 10px 10px;
    }
    .point-title {
      font-size: clamp(1.8rem, 6.5vw, 4rem);
      padding: 14px 16px 12px;
    }
    .point-wrap { padding: 18px 12px 70px; }
    .point-wrap h3 { font-size: 1.8rem; }
    .accordion-toggle { padding: 10px 20px; font-size: 1.6rem; }
    .point-wrap h3::before { left: -7px; }
  }
  
  /* 画像レスポンシブ補助 */
  .tokuten_section_item_img,
  .point-img img {
    max-width: 100%;
    height: auto;
    display: block;
    margin-left: auto;
    margin-right: auto;
  }

  /* Replace the element border-bottom with a controllable pseudo-element underline.
   Usage:
     - To center the underline: add class "center-underline" to the .point-title element.
     - To left-align the underline starting at the visual text area: add class "left-underline".
   You can control length with --underline-width (px / % / calc), thickness with --underline-height,
   and color with --underline-color.
*/

/* ensure original border-bottom is not used */
.point-title {
    border-bottom: none !important;
    position: relative;
  }
  
  /* default vars (can be overridden on a per-element basis) */
  .point-title {
    --underline-width: min(540px, 80%);
    --underline-height: 3px;
    --underline-color: linear-gradient(90deg, var(--main-green, #0c8a57), var(--accent-green, #0a6c44));
    --underline-offset: 8px; /* distance from bottom of the .point-title to the underline */
  }
  
  /* common ::after used for underline */
  .point-title::after {
    content: "";
    position: absolute;
    bottom: var(--underline-offset);
    height: var(--underline-height);
    width: var(--underline-width);
    background: var(--underline-color);
    border-radius: 2px;
    display: block;
  }
  
  /* Centered underline (use: <h2 class="point-title center-underline">...) */
/* Replace the element border-bottom with a controllable pseudo-element underline.
   Usage:
     - To center the underline: add class "center-underline" to the .point-title element.
     - To left-align the underline starting at the visual text area: add class "left-underline".
   You can control length with --underline-width (px / % / calc), thickness with --underline-height,
   and color with --underline-color.
*/

/* ensure original border-bottom is not used */
.point-title {
    border-bottom: none !important;
    position: relative;
  }
  
  /* default vars (can be overridden on a per-element basis) */
  .point-title {
    --underline-width: min(700px, 100%);
    --underline-height: 3px;
    --underline-color: linear-gradient(90deg, var(--main-green, #0c8a57), var(--accent-green, #0a6c44));
    --underline-offset: 8px; /* distance from bottom of the .point-title to the underline */
  }
  
  /* common ::after used for underline */
  .point-title::after {
    content: "";
    position: absolute;
    bottom: var(--underline-offset);
    height: var(--underline-height);
    width: var(--underline-width);
    background: var(--underline-color);
    border-radius: 2px;
    display: block;
  }
  
  /* Centered underline (use: <h2 class="point-title center-underline">...) */
  .point-title.center-underline::after {
    left: 50%;
    transform: translateX(-50%);
  }
  
  /* Left-aligned underline that starts after the left padding (use: <h2 class="point-title left-underline">...) */
  /* Adjust --left-gap if your .point-title has different left padding */
  .point-title.left-underline::after {
    left: var(--left-gap, 160px);
    transform: none;
  }
  
  /* Example: smaller underline (override inline or in CSS)
     .point-title { --underline-width: 300px; --underline-height: 2px; --underline-offset: 6px; }
  */
  
  /* Responsive tweak: ensure underline width adapts on small screens */
  @media (max-width: 420px) {
    .point-title { --underline-width: 80%; --underline-offset: 6px; }
    .point-title.left-underline::after { left: var(--left-gap, 64px); } /* reduce left gap if needed */
  }
  
  /* Left-aligned underline that starts after the left padding (use: <h2 class="point-title left-underline">...) */
  /* Adjust --left-gap if your .point-title has different left padding */
  .point-title.left-underline::after {
    left: var(--left-gap, 160px);
    transform: none;
  }
  
  /* Example: smaller underline (override inline or in CSS)
     .point-title { --underline-width: 300px; --underline-height: 2px; --underline-offset: 6px; }
  */
  
  /* Responsive tweak: ensure underline width adapts on small screens */
  @media (max-width: 420px) {
    .point-title { --underline-width: 80%; --underline-offset: 6px; }
    .point-title.left-underline::after { left: var(--left-gap, 64px); } /* reduce left gap if needed */
  }

  .two-col {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    justify-content: space-between;
    margin-top: 18px;
}

.two-col__img {
  flex: 0 0 40%;
  max-width: 360px;
  align-self: center;
  margin: 0 auto;
}

  .two-col__text p {
    font-size: 1.8rem;
    padding: 0 8px;
  }

  .summary-accordion-target {
    margin-top: 30px;
    padding: 8px 4px 0 4px;
}

  .summary-accordion-target h3 {
    color: var(--main-green, #0c8a57);
    font-size: 2.4rem;
    font-weight: 800;
    font-style: italic;
    margin-bottom: 8px;
}

.accordion-content {
  overflow: hidden;
  transition: max-height 380ms cubic-bezier(.2,.9,.2,1), opacity 260ms ease;
  will-change: max-height, opacity;
}

.add_title_style {
  padding-top: 30px;
  padding-bottom: 0;

}

/* .add_toggle_style .accordion-toggle {
 bottom: 30px;
} */

@media (max-width: 767px) {
  .two-col {
    display: block;
  }
  /* .add_toggle_style .accordion-toggle {
    bottom: 60px;
   } */
}

/* 防御用：ラベルが切れて「っと見」になる現象を防止 */
.accordion-toggle {
  overflow: visible !important; /* 親で hidden されていると文字が切れるので解除 */
  box-sizing: border-box;
  min-width: 140px; /* 内容が極端に狭くならない最低幅（必要に応じ調整） */
}

/* ラベルは改行しない、かつ表示領域を確保 */
.accordion-toggle .accordion-label {
  display: inline-block !important;
  white-space: nowrap !important;
  overflow: visible !important; 
  text-overflow: clip !important;
  vertical-align: middle;
  padding-right: 6px; /* アイコンとの隙間確保 */
}

/* アイコンは折れずに固定幅、ラベルを押し出さない */
.accordion-toggle .accordion-icon {
  flex: 0 0 auto;
  margin-left: 6px;
  width: 22px;
  text-align: center;
}

/* モバイルでの保険：極端に小さいときは横幅を広げる */
@media (max-width: 420px) {
  .accordion-toggle {
    min-width: 0;
    width: 100%;
    justify-content: center;
  }
  .accordion-toggle .accordion-label { padding-left: 6px; padding-right: 6px; }
}

/* 親要素を相対配置に（親クラスが .add_toggle_style の場合） */
.add_toggle_style {
  position: relative;
  overflow: visible; /* 親で隠されないようにする */
}

/* ボタンを絶対配置して中央に */
.add_toggle_style .accordion-toggle {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 10px;        /* 指定したい距離 */
  z-index: 999;        /* 他要素より前面に */
  white-space: nowrap; /* ラベルが折れないように */
}



@media (max-width: 767px) {
  .add_container {
    padding-left: 10px;
    padding-right: 10px;
  }
}