/* ライブラリ専用 独立CSS */
@media screen and (min-width: 768px) {
    .single_header_section {
        background: url(/wp-content/themes/jstork19_custom/assets/images/titlebg_illust_about.png) center bottom/1280px auto no-repeat, url(/wp-content/themes/jstork19_custom/assets/images/titlebg.png) center bottom/1600px auto no-repeat;
    }
}
@media screen and (max-width: 767px) {
    .single_header_section {
        background: url(/wp-content/themes/jstork19_custom/assets/images/titlebg_illust_about_sp.png) right bottom/375px auto no-repeat, url(/wp-content/themes/jstork19_custom/assets/images/titlebg_sp.png) center bottom/1024px auto no-repeat;
        padding-bottom: 115px;
    }
}
.second_section p.title_text {
    margin-bottom: 3.2em;
}
@media screen and (min-width: 768px) {
    section.content_section .btn_contact,section.content_section .btn_mailmag {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 288px;
        height: 64px;
        background: #ce283b;
        color: #fff;
        border-radius: 32px;
        font-weight: 500;
        -webkit-font-smoothing: auto;
        -moz-osx-font-smoothing: auto;
        font-size: 20px;
        font-feature-settings: "palt";
        text-decoration: none;
    }
    section.content_section .btn_contact:before {
        content: "";
        display: block;
        width: 22px;
        height: 22px;
        margin-right: 16px;
        background: url(/wp-content/themes/jstork19_custom/assets/images/icon_contact.svg) center / 20px 20px no-repeat;
    }
    section.content_section .btn_mailmag:before {
        content: "";
        display: block;
        width: 22px;
        height: 22px;
        margin-right: 16px;
        background: url(/wp-content/themes/jstork19_custom/assets/images/icon_mail_wh.svg) center / 20px 20px no-repeat;
    }
    .btn_wrapper {
        display: flex;
        justify-content: center;
        gap: 3em;
    }
}
@media screen and (max-width: 767px) {
    section.content_section .btn_contact, section.content_section .btn_mailmag {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 275px;
        margin: 0 auto 0;
        height: 60px;
        background: #ce283b;
        color: #fff;
        border-radius: 30px;
        font-weight: 500;
        -webkit-font-smoothing: auto;
        -moz-osx-font-smoothing: auto;
        font-size: 18px;
        font-feature-settings: "palt";
        text-decoration: none;
    }
    section.content_section .btn_contact:before, section.content_section .btn_mailmag:before {
        content: "";
        display: block;
        width: 22px;
        height: 22px;
        margin-right: 15px;
        background: url(/wp-content/themes/jstork19_custom/assets/images/icon_contact.svg) center / 20px 20px no-repeat;
    }
    .btn_wrapper {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        row-gap: 2em;
    }
}
.library-header-box {
    background: #f4f8fd; /* 薄いブルーの背景 */
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 40px;
    margin-bottom: 40px;
    border-radius: 8px;
}
.library-header-text {
    width: 60%;
    line-height: 1.8;
    color: #333;
}
.library-header-img {
    width: 35%;
    text-align: center;
}
.library-header-img img {
    max-width: 100%;
    height: auto;
}

/* 絞り込みタブ（ピルボタン） */
.library-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
}
.library-filter-btn {
    display: inline-block;
    padding: 8px 24px;
    border: 1px solid #666;
    border-radius: 30px;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
}
.library-filter-btn:hover,
.library-filter-btn.active {
    background-color: #3a4047;
    color: #fff;
    border-color: #3a4047;
}

/* 3カラム グリッドレイアウト */
.library-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 30px 24px; /* 上下の隙間を少し広めに */
    margin-bottom: 60px;
}
.library-card {
    width: calc(33.3333% - 16px);
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s, transform 0.2s;
}
.library-card:hover {
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    transform: translateY(-3px); /* ホバー時に少し浮かせる */
}
.library-card-thumb {
    width: 100%;
    aspect-ratio: 16 / 10;
    background-color: #f0f0f0;
    overflow: hidden;
}
.library-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.library-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.library-card-tags {
    margin-bottom: 12px;
}
.library-card-tag {
    display: inline-block;
    padding: 4px 12px;
    border: 1px solid #555;
    border-radius: 20px;
    font-size: 11px;
    color: #555;
}
.library-card-title {
    font-size: 16px;
    font-weight: bold;
    color: #32649a; /* XDデザインに近いブルー */
    margin-bottom: 10px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.library-card-desc {
    font-size: 13px;
    color: #555;
    line-height: 1.6;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 4; /* 説明文を少し長めに表示 */
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.library-card-btn {
    margin-top: auto;
    display: block;
    width: 100%;
    text-align: center;
    background-color: #7296be; /* XDデザインのボタン色 */
    color: #fff;
    padding: 14px 0;
    border-radius: 4px;
    font-weight: bold;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.2s;
}
.library-card:hover .library-card-btn {
    background-color: #5d7fa5; /* ホバーで少し濃く */
}

/* レスポンシブ対応（タブレット・スマホ） */
@media screen and (max-width: 980px) {
    .library-card { width: calc(50% - 12px); }
}
@media screen and (max-width: 767px) {
    .library-header-box { flex-direction: column; padding: 20px; }
    .library-header-text, .library-header-img { width: 100%; }
    .library-header-img { margin-top: 20px; }
    .library-card { width: 100%; }
}


/* ライブラリ詳細専用：メルマガスタイルのリセットとXD再現 */

/* 1. 全体レイアウトの比率調整（左を大きく） */
@media (min-width: 768px) {
    .main-blue section.entry_section .inner_wrap._type2 div._left {
        width: 60% !important; /* コンテンツ側を広く */
        background: #f7f7f7 !important; /* 背景を白に */
        padding: 40px !important;
        align-items: flex-start !important;
        flex-wrap: wrap;
        flex-direction: column;
    }
    .main-blue section.entry_section .inner_wrap._type2 div._right {
        width: 40% !important; /* フォーム側を狭く */
        background: #ffffff !important; /* フォーム背景を薄グレーに */
        padding: 40px 30px !important;
    }
    .main-blue section.entry_section .inner_wrap._type2 {
        background: #fff !important;
        align-items: stretch !important;
    }
}

/* 2. フォームパーツのリセット（四角く、シンプルな枠線に） */
#library-form .sp-form-control {
    border-radius: 4px !important; /* 丸→四角 */
    border: 1px solid #f4f4f4 !important; /* ピンク枠→グレー枠 */
    box-shadow: none !important;
    background: #f8f8f8 !important;
    height: 38px !important;
    padding: 5px 12px !important;
}

/* 3. ラベルの調整（XDに合わせて細身に） */
#library-form .sp-form-label {
    font-size: 14px !important;
    color: #333 !important;
    margin-bottom: 5px !important;
    padding: 0 !important;
    width: 100%;
}

/* 4. 必須バッジの調整（赤色・四角っぽい形） */
#library-form .sp-form-required {
    background: none;
    color: #e60012 !important;
    margin-left: 5px !important;
    padding: 0;
}

/* 5. フォーム内の文言（"フォームに必要事項をご記入ください"など） */
.form-intro {
    font-size: 13px;
    color: #666;
    margin-bottom: 20px;
}

/* 6. ボタンをXDの青色へ */
#library-form .sp-form-next-button {
    background-color: #d9523e !important;
    border-radius: 4px !important;
    font-size: 16px !important;
    padding: 15px 0 !important;
    transition: opacity 0.2s;
    width: 100%;
    margin: 0;
}
#library-form .sp-form-next-button:hover {
    opacity: 0.8;
}

/* 7. フォームアイテムを縦並びに統一 */
#library-form .sp-form-item {
    display: block !important;
    margin-bottom: 9px;
}
#library-form .sp-form-data {
    display: block !important;
    width: 100% !important;
    padding: 0;
}
#library-form .sp-form-data-name {
    display: flex !important;
    flex-direction: row !important;
    gap: 10px;
    width: 100% !important;
}
#library-form .sp-form-data-name .sp-form-control {
    width: calc(50% - 5px) !important;
    flex: 1 !important;
}
#library-form .sp-form-control {
    width: 100% !important;
    box-sizing: border-box !important;
}

/* 8. 左カラムタイトル色をデザインに合わせる */
.main-blue section.entry_section ._left h1 {
    color: #4479b3 !important;
    font-size: 22px !important;
    font-weight: bold !important;
    line-height: 1.4 !important;
    margin-bottom: 20px !important;
}

/* 10. 左カラムの表示設定 */
.main-blue section.entry_section ._left {
    display: block;
}

/* 11. サムネイル画像 */
.detail-thumbnail {
    width: 100%;
    margin-bottom: 20px;
    border: 1px solid #ddd;
}

/* 12. 資料説明文 */
.detail-description {
    font-size: 16px;
    line-height: 1.8;
    color: #555;
}
.common-description {
    border-top: 1px solid #e0e0e0;
    font-size: 12px;
    line-height: 1.8;
    color: #aaaaaa;
    padding-top: 14px;
    margin-top: 3em;
}

/* 13. バッジエリア */
.detail-badge {
    margin-bottom: 20px;
    width: 100%;
}

/* 14. ラジオボタン（情報受け取り選択） */
#library-form .sp-form-data-radio {
    display: flex !important;
    flex-direction: column !important;
    gap: 5px;
    align-items: flex-start;
}
.library-radio-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
}
.library-radio-label input[type="radio"] {
    width: 16px !important;
    height: 16px !important;
    margin: 0 !important;
    flex-shrink: 0;
    accent-color: #7296be;
}

/* 15. チェックボックス（同意） */
#library-form .sp-form-data-checkbox {
}
.library-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: #333;
    line-height: 1.6;
    cursor: pointer;
}
.library-checkbox-label input[type="checkbox"] {
    width: 16px !important;
    height: 16px !important;
    margin: 3px 0 0 !important;
    flex-shrink: 0;
    accent-color: #7296be;
    border-radius: 3px !important;
}

/* 16. テキストエリア */
#library-form .library-textarea {
    width: 100% !important;
    box-sizing: border-box !important;
    min-height: 100px;
    padding: 8px 12px !important;
    border: 1px solid #f4f4f4 !important;
    background: #f8f8f8 !important;
    border-radius: 4px !important;
    box-shadow: none !important;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    resize: vertical;
    font-family: inherit;
}

/* 9. 右カラム見出し */
.main-blue section.entry_section ._right .entry_title {
    font-size: 14px;
    font-weight: normal;
    color: #666;
    margin-bottom: 20px;
    text-align: left;
    line-height: 1.6;
}

.form-alert {
    color: #d9523e !important;
    border: 1px solid #d9523e !important;
    padding: 1em;
    font-size: 12px !important;
    font-weight: bold !important;
    margin-bottom: 1em;
}
.form-alert p {
    margin-bottom: 0 !important;
}


/* ===================================
   ライブラリ完了画面専用スタイル
   =================================== */

/* サムネイルを小さく抑える */
.complete-thumbnail-wrap {
    width: 60%;
    margin: 0 auto 20px auto;
}
.complete-thumbnail-wrap .detail-thumbnail {
    margin-bottom: 0;
}

/* ダウンロードボタン（aタグをボタン風に） */
.complete-download-btn {
    display: block;
    width: 100%;
    padding: 15px 0;
    background-color: #d9523e !important;
    color: #fff !important;
    font-size: 16px;
    font-weight: bold;
    border-radius: 4px;
    text-align: center;
    text-decoration: none !important;
    box-sizing: border-box;
    transition: opacity 0.2s;
}
.complete-download-btn:hover {
    opacity: 0.8;
}

.complete-download-btn.back-to-top {
    border:1px solid #6295CC !important;
    color: #6295CC !important;
    background-color: #fff !important;
}
.complete-youtube-layout .complete-download-btn.back-to-top {
    display: inline-block;
    width: auto;
    padding-left: 2em;
    padding-right: 2em;
}

/* YouTube 16:9 レスポンシブ埋め込み */
.complete-youtube-wrap {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    margin-bottom: 16px;
}
.complete-youtube-wrap iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* 注意書きテキスト */
.complete-note {
    font-size: 12px;
    color: #888;
    margin-top: 10px;
    line-height: 1.6;
}

/* 一覧に戻るリンク */
.complete-back-link {
    margin-top: 32px;
    text-align: center;
}
.complete-back-link a {
    font-size: 13px;
    color: #7296be;
    text-decoration: underline;
}

/* レスポンシブ：スマホではサムネイルをフル幅に */
@media screen and (max-width: 767px) {
    .complete-thumbnail-wrap {
        width: 100%;
    }
    .complete-youtube-layout .complete-download-btn.back-to-top {
        display: block;
        width: 100%;
    }
}


/* YouTube完了画面：1カラム全幅レイアウト */
.complete-youtube-layout {
    display: block !important;
    max-width: 900px;
    margin: 0 auto;
    padding: 40px !important;
    background: #f7f7f7 !important;
}

/* 上段：資料情報エリア */
.complete-youtube-info {
    margin-bottom: 32px;
    padding-bottom: 32px;
}
.complete-youtube-info h1 {
    color: #4479b3;
    font-size: 22px;
    font-weight: bold;
    line-height: 1.4;
    margin-bottom: 12px;
}

/* 下段：動画エリア */
.complete-youtube-player {
    width: 100%;
}
.complete-youtube-player .entry_title {
    font-size: 14px !important;
    font-weight: normal;
    color: #666 !important;
    margin-bottom: 20px !important;
    text-align: left;
}

@media screen and (max-width: 767px) {
    .complete-youtube-layout {
        padding: 20px;
    }
}

