/* ===================================================
 * ホワイトペーパー DLページ 専用CSS
 * ---------------------------------------------------
 * 既存の whitepaper-pillar.css を共通基盤として読み込み、
 * DLページ固有のコンポーネントのみ定義する。
 * =================================================== */

/* --- CSS Variables（デザイントークン） --- */
:root {
    --wp-dl-primary: #205EA4;
    --wp-dl-primary-dark: #19467A;
    --wp-dl-primary-light: #eef4fa;
    --wp-dl-accent: #3498db;
    --wp-dl-text: #333;
    --wp-dl-text-light: #666;
    --wp-dl-bg: #f8f9fb;
    --wp-dl-card-bg: #fff;
    --wp-dl-border: #e8edf2;
    --wp-dl-radius: 12px;
    --wp-dl-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    --wp-dl-shadow-hover: 0 8px 32px rgba(0, 0, 0, 0.12);
    --wp-dl-transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --wp-dl-font: "Noto Sans JP", "Yu Gothic Medium", "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
    --wp-dl-font-heading: "Poppins", "Noto Sans JP", sans-serif;
    --wp-dl-success: #27ae60;
    --wp-dl-danger: #e74c3c;
}

/* ===================================================
 * 一覧ページ
 * =================================================== */

/* ページヒーロー */
.wpdl-hero {
    background: linear-gradient(135deg, #0f2d52 0%, #205EA4 100%);
    color: #fff;
    padding: 60px 2em 50px;
    text-align: center;
}

.wpdl-hero h1 {
    font-family: var(--wp-dl-font-heading);
    font-size: 2.2em;
    font-weight: 700;
    margin: 0 0 0.4em;
    line-height: 1.3;
    border: none;
    color: #fff;
    padding: 0;
}

.wpdl-hero p {
    font-size: 1.1em;
    opacity: 0.85;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.7;
}

/* カードグリッド */
.wpdl-grid-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 50px 2em 60px;
}

.wpdl-grid-heading {
    font-family: var(--wp-dl-font-heading);
    font-size: 1.4em;
    color: var(--wp-dl-text);
    margin: 0 0 30px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--wp-dl-border);
    display: flex;
    align-items: center;
    gap: 10px;
}

.wpdl-grid-heading i {
    color: var(--wp-dl-accent);
}

.wpdl-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

/* --- 一覧カード（案C: CSSハイブリッド） --- */
.wpdl-card {
    background: var(--wp-dl-card-bg);
    border: 1px solid var(--wp-dl-border);
    border-radius: var(--wp-dl-radius);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: var(--wp-dl-transition);
    box-shadow: var(--wp-dl-shadow);
}

.wpdl-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--wp-dl-shadow-hover);
    border-color: var(--wp-dl-accent);
}

/* カード: サムネイル部分 */
.wpdl-card-thumb {
    background: var(--wp-dl-bg);
    padding: 28px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    position: relative;
    overflow: hidden;
}

/* 表紙画像の立体感（案C: CSSハイブリッド） */
.wpdl-card-cover {
    width: 85%;
    max-width: 280px;
    border-radius: 4px;
    box-shadow:
        6px 6px 20px rgba(0, 0, 0, 0.15),
        0 2px 6px rgba(0, 0, 0, 0.08);
    transform: perspective(800px) rotateY(-3deg);
    transition: var(--wp-dl-transition);
}

.wpdl-card:hover .wpdl-card-cover {
    transform: perspective(800px) rotateY(0deg) scale(1.03);
    box-shadow:
        8px 8px 28px rgba(0, 0, 0, 0.18),
        0 3px 8px rgba(0, 0, 0, 0.1);
}

/* カード: テキスト部分 */
.wpdl-card-body {
    padding: 20px 22px 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.wpdl-card-category {
    font-size: 0.72em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--wp-dl-accent);
    margin-bottom: 6px;
}

.wpdl-card-title {
    font-family: var(--wp-dl-font-heading);
    font-size: 1.05em;
    font-weight: 700;
    line-height: 1.45;
    color: var(--wp-dl-text);
    margin: 0 0 10px;
}

.wpdl-card-desc {
    font-size: 0.88em;
    color: var(--wp-dl-text-light);
    line-height: 1.6;
    margin: 0 0 16px;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wpdl-card-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px 16px;
    background: linear-gradient(135deg, #205EA4, #3498db);
    color: #fff;
    font-size: 0.9em;
    font-weight: 700;
    border-radius: 6px;
    transition: var(--wp-dl-transition);
    box-sizing: border-box;
    margin-top: auto;
}

.wpdl-card:hover .wpdl-card-cta {
    background: linear-gradient(135deg, #19467A, #2980b9);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(32, 94, 164, 0.3);
    color: #fff;
}

/* 1本しかない場合のレイアウト */
.wpdl-grid--single {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

/* ===================================================
 * 詳細（DL）ページ — 2カラムレイアウト
 * =================================================== */
.wpdl-detail-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: flex-start;
    gap: 40px;
    padding: 40px 2em 60px;
}

/* 左カラム: 資料情報 */
.wpdl-detail-main {
    flex: 1;
    min-width: 0;
}

.wpdl-detail-main h1 {
    font-family: var(--wp-dl-font-heading);
    font-size: 2em;
    font-weight: 700;
    line-height: 1.35;
    color: #1a3b5d;
    margin: 0 0 20px;
    border: none;
    padding: 0;
}

.wpdl-detail-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.wpdl-detail-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8em;
    font-weight: 600;
    color: var(--wp-dl-primary);
    background: var(--wp-dl-primary-light);
    padding: 4px 12px;
    border-radius: 20px;
}

.wpdl-detail-desc {
    font-size: 1.05em;
    line-height: 1.9;
    color: #444;
    margin-bottom: 36px;
}

/* 「この資料でわかること」リスト */
.wpdl-learn-section {
    margin-bottom: 40px;
}

.wpdl-learn-section h2 {
    font-family: var(--wp-dl-font-heading);
    font-size: 1.3em;
    font-weight: 700;
    color: #1a3b5d;
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--wp-dl-accent);
    display: flex;
    align-items: center;
    gap: 8px;
}

.wpdl-learn-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.wpdl-learn-list li {
    position: relative;
    padding: 10px 0 10px 28px;
    font-size: 1em;
    line-height: 1.6;
    color: var(--wp-dl-text);
    border-bottom: 1px solid #f0f0f0;
}

.wpdl-learn-list li:last-child {
    border-bottom: none;
}

.wpdl-learn-list li::before {
    content: '\f00c';
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: var(--wp-dl-success);
    position: absolute;
    left: 0;
    top: 12px;
    font-size: 0.9em;
}

/* プレビュー画像 */
.wpdl-preview-section {
    margin-bottom: 40px;
}

.wpdl-preview-section h2 {
    font-family: var(--wp-dl-font-heading);
    font-size: 1.3em;
    font-weight: 700;
    color: #1a3b5d;
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--wp-dl-accent);
    display: flex;
    align-items: center;
    gap: 8px;
}

.wpdl-preview-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.wpdl-preview-img {
    width: 100%;
    border-radius: 8px;
    border: 1px solid var(--wp-dl-border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: var(--wp-dl-transition);
    cursor: pointer;
}

.wpdl-preview-img:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* 表紙画像（詳細ページ上部） */
.wpdl-detail-cover-wrap {
    background: var(--wp-dl-bg);
    border-radius: var(--wp-dl-radius);
    padding: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 32px;
}

.wpdl-detail-cover {
    max-width: 360px;
    width: 100%;
    border-radius: 4px;
    box-shadow:
        8px 8px 24px rgba(0, 0, 0, 0.15),
        0 2px 6px rgba(0, 0, 0, 0.08);
    transform: perspective(800px) rotateY(-2deg);
}

/* ===================================================
 * 右カラム: フォーム（Sticky）
 * =================================================== */
.wpdl-form-sidebar {
    width: 380px;
    flex-shrink: 0;
    position: sticky;
    top: 24px;
}

.wpdl-form-card {
    background: var(--wp-dl-card-bg);
    border: 1px solid var(--wp-dl-border);
    border-radius: var(--wp-dl-radius);
    box-shadow: var(--wp-dl-shadow);
    overflow: hidden;
}

.wpdl-form-header {
    background: linear-gradient(135deg, #0f2d52, #205EA4);
    color: #fff;
    padding: 20px 24px;
    text-align: center;
}

.wpdl-form-header h2 {
    font-family: var(--wp-dl-font-heading);
    font-size: 1.15em;
    font-weight: 700;
    margin: 0;
    border: none;
    padding: 0;
    color: #fff;
}

.wpdl-form-header p {
    font-size: 0.82em;
    opacity: 0.8;
    margin: 6px 0 0;
}

.wpdl-form-body {
    padding: 24px;
}

/* フォーム共通スタイル */
.wpdl-form-group {
    margin-bottom: 16px;
}

.wpdl-form-group label {
    display: block;
    font-size: 0.88em;
    font-weight: 600;
    color: var(--wp-dl-text);
    margin-bottom: 5px;
}

.wpdl-form-group .required {
    color: var(--wp-dl-danger);
    font-size: 0.75em;
    margin-left: 4px;
}

.wpdl-form-group input[type="text"],
.wpdl-form-group input[type="email"],
.wpdl-form-group input[type="tel"],
.wpdl-form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.95em;
    font-family: var(--wp-dl-font);
    color: var(--wp-dl-text);
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.wpdl-form-group input:focus,
.wpdl-form-group select:focus {
    outline: none;
    border-color: var(--wp-dl-primary);
    box-shadow: 0 0 0 3px rgba(32, 94, 164, 0.12);
}

/* 名前フィールド（横並び） */
.wpdl-name-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* チェックボックス（同意） */
.wpdl-form-checkbox {
    margin: 20px 0 16px;
}

.wpdl-form-checkbox label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.82em;
    font-weight: 400;
    color: var(--wp-dl-text-light);
    cursor: pointer;
    line-height: 1.5;
}

.wpdl-form-checkbox input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
}

.wpdl-form-checkbox a {
    color: var(--wp-dl-primary);
    text-decoration: underline;
}

/* メール通知に関する説明文 */
.wpdl-form-notice {
    font-size: 0.78em;
    line-height: 1.6;
    color: #999;
    margin: 0 0 16px;
}

/* 送信ボタン */
.wpdl-submit-btn {
    display: block;
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #205EA4, #3498db);
    color: #fff;
    font-family: var(--wp-dl-font-heading);
    font-size: 1.05em;
    font-weight: 700;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--wp-dl-transition);
    box-shadow: 0 4px 12px rgba(32, 94, 164, 0.25);
    letter-spacing: 0.03em;
}

.wpdl-submit-btn:hover {
    background: linear-gradient(135deg, #19467A, #2980b9);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(32, 94, 164, 0.35);
}

.wpdl-submit-btn i {
    margin-right: 6px;
}

/* フォームバリデーションエラー */
.wpcf7-not-valid-tip {
    color: var(--wp-dl-danger);
    font-size: 0.8em;
    margin-top: 4px;
}

.wpdl-form-group .wpcf7-not-valid {
    border-color: var(--wp-dl-danger);
}

/* ===================================================
 * サンクスページ
 * =================================================== */
.wpdl-thanks-container {
    max-width: 680px;
    margin: 0 auto;
    padding: 60px 2em 80px;
    text-align: center;
}

.wpdl-thanks-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 2em;
    color: #fff;
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.25);
    animation: wpdl-checkmark 0.6s ease-out;
}

@keyframes wpdl-checkmark {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); opacity: 1; }
}

.wpdl-thanks-container h1 {
    font-family: var(--wp-dl-font-heading);
    font-size: 1.8em;
    font-weight: 700;
    color: #1a3b5d;
    margin: 0 0 16px;
    border: none;
    padding: 0;
}

.wpdl-thanks-message {
    font-size: 1.05em;
    line-height: 1.8;
    color: #444;
    margin-bottom: 32px;
}

.wpdl-thanks-box {
    background: var(--wp-dl-primary-light);
    border: 1px solid #b8d4f0;
    border-radius: var(--wp-dl-radius);
    padding: 24px 28px;
    margin-bottom: 32px;
    text-align: left;
}

.wpdl-thanks-box h3 {
    font-size: 1em;
    font-weight: 700;
    color: var(--wp-dl-primary);
    margin: 0 0 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wpdl-thanks-box p {
    font-size: 0.92em;
    line-height: 1.7;
    color: #555;
    margin: 0;
}

/* DL完了後の相互送客（診断＋関連資料） 2026-09-14 */
.wpdl-thanks-next { margin: 0 0 32px; text-align: left; display: grid; gap: 10px; }
.wpdl-thanks-next-title { margin: 0 0 4px; font-size: 0.9em; font-weight: 700; color: #5b7186; letter-spacing: .04em; }
.wpdl-next-card { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 14px; border: 1px solid #dfe7f2; background: #fff; color: #0E2540; text-decoration: none; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.wpdl-next-card:hover { transform: translateY(-2px); border-color: rgba(11, 95, 203, .4); box-shadow: 0 18px 36px -20px rgba(16, 42, 67, .35); }
.wpdl-next-card--roi { background: linear-gradient(135deg, #eef4fc 0%, #f7faff 100%); border-color: rgba(11, 95, 203, .25); }
.wpdl-next-icon { flex: 0 0 46px; width: 46px; height: 46px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; background: linear-gradient(135deg, #0B5FCB 0%, #3D8BF0 100%); color: #fff; font-size: 18px; }
.wpdl-next-icon--doc { background: #eef4fc; color: #0B5FCB; }
.wpdl-next-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; line-height: 1.5; }
.wpdl-next-kicker { font-size: 11.5px; font-weight: 700; letter-spacing: .04em; color: #0B5FCB; }
.wpdl-next-body strong { font-size: 15px; font-weight: 800; }
.wpdl-next-body span:not(.wpdl-next-kicker) { font-size: 12.5px; color: #5b7186; }
.wpdl-next-arrow { color: #0B5FCB; font-size: 14px; }

.wpdl-thanks-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.95em;
    color: var(--wp-dl-primary);
    text-decoration: none;
    font-weight: 600;
    transition: gap 0.3s ease;
}

.wpdl-thanks-back:hover {
    gap: 10px;
    color: var(--wp-dl-primary-dark);
}

/* ===================================================
 * レスポンシブ
 * =================================================== */

/* タブレット */
@media (max-width: 960px) {
    .wpdl-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .wpdl-detail-container {
        flex-direction: column;
    }

    .wpdl-form-sidebar {
        width: 100%;
        position: static;
    }

    .wpdl-detail-main h1 {
        font-size: 1.6em;
    }
}

/* スマホ */
@media (max-width: 768px) {
    .wpdl-hero {
        padding: 40px 1.5em 36px;
    }

    .wpdl-hero h1 {
        font-size: 1.6em;
    }

    .wpdl-hero p {
        font-size: 0.95em;
    }

    .wpdl-grid-container {
        padding: 32px 1.2em 40px;
    }

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

    .wpdl-grid--single {
        max-width: 100%;
    }

    .wpdl-detail-container {
        padding: 24px 1.2em 40px;
        gap: 28px;
    }

    .wpdl-detail-main h1 {
        font-size: 1.4em;
    }

    .wpdl-preview-grid {
        grid-template-columns: 1fr;
    }

    .wpdl-name-row {
        grid-template-columns: 1fr;
    }

    .wpdl-form-header {
        padding: 16px 20px;
    }

    .wpdl-form-body {
        padding: 20px;
    }

    .wpdl-thanks-container {
        padding: 40px 1.5em 60px;
    }

    .wpdl-thanks-container h1 {
        font-size: 1.4em;
    }
}

/* ─── プライバシー同意ボックス ─── */
.wpdl-form-privacy-box {
    border: 1px solid #ccc;
    padding: 15px;
    margin-bottom: 15px;
    height: 150px;
    overflow-y: scroll;
    font-size: 12px;
    line-height: 1.7;
    background: #f9f9f9;
    border-radius: 4px;
}

.wpdl-form-privacy-box p {
    margin: 0 0 10px;
}

.wpdl-form-privacy-box p:last-child {
    margin-bottom: 0;
}

.wpdl-form-privacy-box ul {
    padding-left: 20px;
    margin: 0 0 10px;
}

.wpdl-form-privacy-box h3 {
    font-size: 13px;
    font-weight: bold;
    margin: 0 0 5px;
    border: none;
    padding: 0;
}

.wpdl-form-privacy-box a {
    text-decoration: underline;
    color: var(--wp-dl-primary);
}

/* ─── チェックボックスグループ（複数回答） ─── */
.wpdl-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 6px;
}

.wpdl-checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9em;
    font-weight: normal;
    cursor: pointer;
    line-height: 1.5;
}

.wpdl-checkbox-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    accent-color: var(--wp-dl-primary);
}

/* ─── 任意ラベル ─── */
.wpdl-form-group .optional {
    font-size: 0.85em;
    font-weight: normal;
    color: #888;
    margin-left: 4px;
}

/* ─── 公開終了カード ─── */
.wpdl-card--closed {
    cursor: default;
}

.wpdl-card--closed:hover {
    transform: none;
    box-shadow: var(--wp-dl-shadow);
    border-color: var(--wp-dl-border);
}

.wpdl-card--closed .wpdl-card-cover {
    filter: grayscale(1);
    opacity: 0.55;
}

.wpdl-card--closed:hover .wpdl-card-cover {
    transform: perspective(800px) rotateY(-3deg);
    box-shadow:
        6px 6px 20px rgba(0, 0, 0, 0.15),
        0 2px 6px rgba(0, 0, 0, 0.08);
}

.wpdl-card-closed-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 1;
    background: rgba(80, 80, 80, 0.92);
    color: #fff;
    font-size: 0.75em;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 4px 12px;
    border-radius: 999px;
}

.wpdl-card--closed .wpdl-card-title {
    color: #9a9a9a;
}

.wpdl-card--closed .wpdl-card-desc {
    color: #b0b0b0;
}

.wpdl-card-cta--closed,
.wpdl-card--closed:hover .wpdl-card-cta--closed {
    background: #e4e4e4;
    color: #8a8a8a;
    transform: none;
    box-shadow: none;
}

/* ─── 資料0件時メッセージ ─── */
.wpdl-empty-message {
    text-align: center;
    color: var(--wp-dl-text-light);
    padding: 60px 20px;
}
