/* ========================================
   Chronote テンプレート紹介ページ専用スタイル
   ======================================== */

/* --- セクション共通 --- */
.templates-section__inner {
    max-width: 960px;
    margin: 0 auto;
    padding: 80px 24px;
}

.templates-section__title {
    font-family: "Zen Maru Gothic", "Noto Sans JP", sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    text-align: center;
    margin-bottom: 12px;
    letter-spacing: 0.05em;
}

.templates-section__lead {
    font-size: 16px;
    color: #555;
    text-align: center;
    margin-bottom: 56px;
    line-height: 1.8;
}

/* --- ボタン共通 --- */
.templates-btn {
    display: inline-block;
    padding: 16px 40px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.templates-btn--primary {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.templates-btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
    color: #ffffff;
    text-decoration: none;
}

.templates-btn--primary:active {
    transform: translateY(0);
}

.templates-btn--outline {
    background: transparent;
    color: #764ba2;
    border: 2px solid #764ba2;
}

.templates-btn--outline:hover {
    background: #764ba2;
    color: #ffffff;
    text-decoration: none;
}

/* SP用改行 */
.templates-sp-br {
    display: none;
}

/* PC用改行（768px以下で非表示） */
.templates-pc-br {
    display: block;
}

/* --- ヒーローセクション --- */
.templates-hero .templates-section__inner {
    padding-top: 0;
}

.templates-hero__desc {
    font-size: 18px;
    line-height: 1.8;
    text-align: center;
    color: #333;
}

.templates-hero__em {
    color: #764ba2;
    font-size: 22px;
    font-weight: 700;
}

/* --- テンプレートグリッド --- */
.templates-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-top: 8px;
}

/* --- テンプレートカード --- */
.templates-card {
    background: #fafafa;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 32px 28px;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.templates-card:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.templates-card__badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    color: #764ba2;
    background: rgba(118, 75, 162, 0.08);
    border-radius: 4px;
    padding: 3px 10px;
    margin: 0 0 16px;
    letter-spacing: 0.05em;
    line-height: 1.5;
}

.templates-card__name {
    font-family: "Zen Maru Gothic", "Noto Sans JP", sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 10px;
    line-height: 1.4;
}

.templates-card__desc {
    font-size: 14px;
    color: #666;
    line-height: 1.7;
    margin-bottom: 20px;
}

/* --- 章リスト --- */
.templates-card__chapters {
    flex: 1;
    margin-bottom: 24px;
}

.templates-card__chapters-title {
    font-size: 13px;
    font-weight: 600;
    color: #888;
    letter-spacing: 0.06em;
    margin-bottom: 10px;
}

.templates-card__chapters-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.templates-card__chapters-list li {
    font-size: 13px;
    color: #444;
    padding: 5px 0;
    border-bottom: 1px solid #efefef;
    line-height: 1.5;
}

.templates-card__chapters-list li:last-child {
    border-bottom: none;
}

.templates-card__chapters-list li::before {
    content: "—";
    color: #c0a8e0;
    margin-right: 8px;
    font-size: 12px;
}

/* --- PDFボタン --- */
.templates-card__pdf-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #764ba2;
    text-decoration: none;
    padding: 10px 20px;
    border: 1.5px solid #764ba2;
    border-radius: 6px;
    transition: all 0.2s ease;
    align-self: center;
}

.templates-card__pdf-link:hover {
    background: #764ba2;
    color: #ffffff;
    text-decoration: none;
}

.templates-card__pdf-link svg {
    flex-shrink: 0;
}

/* --- CTAセクション（原稿用紙背景 — 料金ページと同じ） --- */
.templates-cta {
    background: #f9f6f2;
    color: #1a1a1a;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* 原稿用紙パターン */
.templates-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(
            to right,
            transparent 0px,
            transparent 37px,
            #f9f6f2 37px,
            #f9f6f2 46px
        ),
        repeating-linear-gradient(
            to right,
            #cdc4b7 0px,
            #cdc4b7 1px,
            transparent 1px,
            transparent 36px,
            #cdc4b7 36px,
            #cdc4b7 37px,
            transparent 37px,
            transparent 46px
        ),
        repeating-linear-gradient(
            to bottom,
            transparent 0px,
            transparent 31px,
            #d8d0c5 31px,
            #d8d0c5 32px
        );
    background-size: 46px 32px, 46px 32px, 46px 32px;
    pointer-events: none;
    z-index: 0;
}

/* 天地グラデーション */
.templates-cta::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to bottom, #f9f6f2 0%, transparent 12%),
        linear-gradient(to top, #f9f6f2 0%, transparent 12%);
    pointer-events: none;
    z-index: 0;
}

.templates-cta .templates-section__inner {
    padding: 100px 24px 80px;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.templates-cta__title {
    font-family: "Noto Serif JP", serif;
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 20px;
    line-height: 1.4;
    letter-spacing: 0.05em;
    text-align: center;
}

.templates-cta__desc {
    font-size: 17px;
    font-weight: 400;
    color: #555;
    line-height: 1.8;
    margin: 0 0 40px;
    text-align: center;
}

.templates-cta__buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* --- レスポンシブ --- */
@media (max-width: 768px) {
    .templates-sp-br {
        display: block;
    }

    .templates-pc-br {
        display: none;
    }

    .templates-hero__desc {
        font-size: 16px;
    }

    .templates-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .templates-section__inner {
        padding: 56px 20px;
    }

    .templates-cta .templates-section__inner {
        padding: 64px 24px;
    }

    .templates-cta__title {
        font-size: 1.7rem;
    }

    .templates-cta__desc {
        font-size: 15px;
    }

    .templates-cta__buttons {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .templates-hero__desc {
        font-size: 15px;
        text-align: justify;
    }

    .templates-hero__desc br.templates-sp-br {
        display: none;
    }

    .templates-hero__em {
        font-size: 19px;
    }

    .templates-cta__title {
        font-size: 1.4rem;
    }

    .templates-cta__desc {
        font-size: 14px;
    }
}
