/* --- font-page.css --- */
.font-content {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 20px;
}

.font-hero img {
    width: 100%;
    height: auto;
    margin-bottom: 20px;
}

.font-title-image {
    max-width: 300px;
    /* ロゴの大きさを指定 */
    margin-bottom: 20px;
}

.font-sample-image {
    max-width: 800px;
    /* ロゴの大きさを指定 */
    margin-bottom: 0;
}

.term-accordion summary::after {
    content: '+';
    position: absolute;
    right: 30px;
    top: 50%;
    /* ←「上から50%の位置」を基準にする */
    transform: translateY(-50%);
    /* ←「そこから自身の高さの半分上に移動」で完全な中央揃えに */
    font-size: 2rem;
    color: #888;
    transition: transform 0.4s ease;
}

/* 開いている状態の時のマーク */
.term-accordion[open] summary::after {
    content: '−';
    transform: translateY(-50%) rotate(180deg);
}

/* アコーディオンの中身の基本スタイル（外側のラッパー） */
.term-accordion-content {
    background-color: #f9f9f9;
    text-align: left;
    position: relative;
    /* ★変更点①：アニメーション関連のプロパティを削除し、paddingとoverflowを追加 */
    overflow: hidden;
    padding: 0 100px;
    /* 左右のpaddingは常に維持 */
}

.font-intro {
    text-align: center;
    margin-bottom: 10px;
}

.font-intro h1 {
    font-size: 3rem;
    margin-bottom: 10px;
}

.font-intro .font-concept {
    font-size: 1.1rem;
    line-height: 1.8;
}

.font-download {
    background-color: #f9f9f9;
    padding: 0 40px 40px;
    border-radius: 8px;
    margin-bottom: 60px;
    text-align: center;
}

.font-download h2,
.font-gallery h2 {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 30px;
}

.download-container {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
}

.download-box {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 30px;
    width: 45%;
}

.download-box h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.download-box p {
    font-size: 0.9rem;
    margin-bottom: 25px;
    line-height: 1.7;
}

.download-btn {
    display: inline-block;
    background-color: #FF6A6A;
    /* 目立つ色 */
    color: #fff;
    padding: 15px 40px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s;
}

.download-btn:hover {
    background-color: #E05A5A;
}

.download-note {
    font-size: 0.9em;
}

.download-note a {
    color: #555;
    /* 濃いめのグレー */
    text-decoration: none;
    /* 下線を消す */
    transition: color 0.3s;
}

.download-note a:hover {
    color: #000;
    /* ホバーで黒に */
}

.font-gallery {
    margin-bottom: 60px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.gallery-grid img {
    width: 100%;
    border-radius: 8px;
}

/* スマホ対応 */
@media (max-width: 1000px) {
    .download-container {
        flex-direction: column;
    }

    .download-box {
        width: 100%;
    }
}

/* --- terms.css --- */
.terms-content {
    padding: 20px 20px;
    max-width: 800px;
    margin: 0 auto;
}

.terms-section h1 {
    text-align: center;
    margin-top: -40px;
    margin-bottom: 30px;
    font-size: 2.5rem;
}

.term-article {
    font-size: 0.9rem;
    /* 全体の文字を少し小さく */
    margin-bottom: -40px;
    padding-bottom: 30px;
    border-bottom: 1px solid #ddd;
}

.term-article h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    padding-left: 10px;
}

.term-article h3 {
    font-size: 1.5rem;
    margin-top: 30px;
    margin-bottom: 15px;
}

.term-article p {
    line-height: 1.8;
}

.term-article ul {
    list-style: none;
    padding-left: 20px;
}

.term-article li {
    margin-bottom: 15px;
}

.term-article .term-detail {
    margin-top: 8px;
    padding-left: 1.5em;
    /* インデント */
    font-size: 0.9em;
    color: #555;
}

.term-accordion summary {
    padding: 20px 20px 15px;
    /* 上の余白を少し調整 */
    background-color: #f9f9f9;
    border-radius: 5px;
    cursor: pointer;
    list-style: none;
    position: relative;
    transition: 0.3s;
}

.term-accordion summary h2 {
    font-size: 1.8rem;
    font-weight: bold;
    margin: 0 0 5px;
    /* 余白を調整 */
    padding: 0;
    /* 元のh2のpaddingをリセット */
    transition: color 0.3s;
    /* h2の色変化を滑らかに */
}

.term-accordion summary p {
    font-size: 0.8rem;
    font-weight: normal;
    /* 太字を解除 */
    margin: 15px auto 5px;
    color: #333;
    /* pの色を固定 */
}

.term-accordion summary:hover h2 {
    color: #7c7c7c;
}

/* 開閉マーク（＋/－）を追加 */
.term-accordion summary::after {
    content: '+';
    position: absolute;
    right: 30px;
    top: 50%;
    /* ←「上から50%の位置」を基準にする */
    transform: translateY(-50%);
    /* ←「そこから自身の高さの半分上に移動」で完全な中央揃えに */
    font-size: 2rem;
    color: #888;
    transition: transform 0.4s ease;
}

/* 開いている状態の時のマーク */
.term-accordion[open] summary::after {
    content: '−';
    transform: translateY(-50%) rotate(180deg);
}

/* アコーディオンの中身の基本スタイル（外側のラッパー） */
.term-accordion-content {
    background-color: #f9f9f9;
    text-align: left;
    position: relative;
    /* ★変更点①：アニメーション関連のプロパティを削除し、paddingとoverflowを追加 */
    overflow: hidden;
    padding: 0 100px;
    /* 左右のpaddingは常に維持 */
}

/* アコーディオンの中身（内側のラッパー） */
.term-accordion-inner {
    /* ★変更点②：アニメーションさせるプロパティをこちらに移動 */
    max-height: 0;
    height: 0;
    /* 追加：JSで高さを制御するための初期値 */
    opacity: 0;
    overflow: hidden;
    /* これも念のため追加 */
    transition:
        height 0.4s ease-in-out,
        max-height 0.4s ease-in-out,
        opacity 0.4s ease-in-out,
        padding 0.4s ease-in-out;
    /* paddingもアニメーション対象に */

    /* ★変更点③：閉じた状態の上下paddingは0 */
    padding-top: 0;
    padding-bottom: 0;
}

/* [open]属性がついた時（開いた状態）のスタイル */
.term-accordion[open]>.term-accordion-content>.term-accordion-inner {
    /* ★変更点④：セレクタを内側のラッパーに変更 */
    max-height: 2000px;
    /* 十分な高さを確保（フォールバック） */
    opacity: 1;
    /* ★変更点⑤：開いた時の上下paddingをここで指定 */
    padding-top: 50px;
    padding-bottom: 30px;
}

.term-accordion-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 100px;
    right: 100px;
    border-top: 1px dashed #ddd;
}

/* 箇条書きのマークを追加 (ここは変更なし) */
.term-accordion-content ul {
    list-style: none;
    padding-left: 0;
}

.term-accordion-content li {
    padding-left: 1.5em;
    position: relative;
}

.term-accordion-content li::before {
    content: '•';
    color: #00A38B;
    position: absolute;
    left: 0;
    top: 0;
    font-size: 1.2em;
    line-height: 1;
}

/* PCでは「開く/閉じる」ボタンを非表示にする */
.accordion-toggle-btn {
    display: none;
}

/* --- 画面幅が1000px以下の場合のスタイル --- */
@media (max-width: 768px) {

    /* 元の「+/-」アイコンを非表示にする */
    .term-accordion summary::after {
        display: none;
    }

    .term-accordion summary:hover h2 {
        color: #333;
    }

    /* 「開く/閉じる」ボタンを表示してデザインを適用 */
    .accordion-toggle-btn {
        display: block;
        /* ブロック要素として表示 */
        width: 120px;
        margin: 15px auto 0;
        /* 上に余白、左右中央寄せ */
        padding: 10px;
        background-color: #fff;
        border: 1px solid #ccc;
        border-radius: 20px;
        text-align: center;
        font-weight: bold;
        color: #333;
        font-size: 0.9rem;
        transition: background-color 0.3s;
    }

    .term-accordion summary:hover .accordion-toggle-btn {
        background-color: #f0f0f0;
    }

    /* 閉じた状態のボタンのテキストを「開く」に */
    .term-accordion:not([open]) summary .accordion-toggle-btn::before {
        content: '開く';
    }

    /* 開いた状態のボタンのテキストを「閉じる」に */
    .term-accordion[open] summary .accordion-toggle-btn::before {
        content: '閉じる';
    }

    /* summaryの内側の余白を調整 */
    .term-accordion summary {
        padding-bottom: 20px;
    }

    /* アコーディオン内部の左右の余白を調整 */
    .term-accordion-content {
        padding: 0 20px;
    }

    .term-accordion-content::before {
        left: 20px;
        right: 20px;
    }

    .font-intro {
        margin-top: -50px;
    }

    .font-download h2,
    .font-gallery h2 {
        font-size: 7vw;
    }

/* 1. サンプル画像を画面幅に収める */
    .font-sample-image {
        width: 100%;
    }

    /* 2. ダウンロードボックスのコンテナを縦積みにする */
    .download-container {
        flex-direction: column; /* 要素を縦に並べる */
        align-items: center;    /* ★これで中身が水平方向の中央に揃います */
    }

    /* 3. ダウンロードボックス自体のスタイル */
    .download-box {
        width: 90%; /* 横幅を画面の90%に */
        margin-bottom: 20px; /* ボックス間の余白 */
    }
}