/*
Theme Name: Cocoon Child
Description: For Program Page Custom Styles
*/

/* WordPressによって付与されるボディクラスと組み合わせ、詳細度を上げる */
/* !!! 注意: body.page-id-328 の 328 は実際のページIDです。他のページに適用する場合はIDを変更してください !!! */

/* --- 基本要素の上書き --- */
body.page-id-328 .page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
    box-sizing: border-box;
    overflow-x: hidden; /* 横方向のはみ出しのみ隠す */
}

body.page-id-328 .intro-content-block {
    margin: 0 auto 30px auto;
    border-radius: 8px;
    text-align: left;
    box-sizing: border-box;
	width:60%;
}

body.page-id-328 .intro-content-block h2 {
    font-size: 26px;
    color: #333;
    margin-top: 0;
    margin-bottom: 15px;
    line-height: 1.3;
    font-family: 'Hiragino Kaku Gothic ProN', 'Meiryo', sans-serif;
}

body.page-id-328 .intro-content-block p {
    font-size: 14px;
    color: #555;
    line-height: 1.7;
    margin-bottom: 10px;
    font-family: 'Hiragino Kaku Gothic ProN', 'Meiryo', sans-serif;
}

/* --- Program Combined Block --- */
body.page-id-328 #ppt-program-combined-block {
    margin-top: 40px;
    padding: 25px 0px 5px 0px; 
    border-radius: 8px;
    text-align: left;
    box-sizing: border-box;
    position: relative;
}

body.page-id-328 #ppt-program-combined-block h2 {
    font-size: 26px;
    color: #333;
    margin-top: 0; 
    margin-bottom: 30px; 
    line-height: 1.3;
    font-family: 'Hiragino Kaku Gothic ProN', 'Meiryo', sans-serif;
    position: relative;
    z-index: 2; /* SVGより前面に */
}

/* --- PC-specific Combined SVG Background --- */
body.page-id-328 .combined-background-svg-pc {
    position: absolute;
    z-index: 0; /* 背景に配置 */
    display: none; /* JSでPC時のみ表示制御 */
}

/* --- Mobile-specific SVG Background --- */
body.page-id-328 .combined-background-svg-mobile {
    position: absolute;
    z-index: 0; /* 背景に配置 */
    display: none; /* JSでモバイル時のみ表示制御 */
    /* top, left, width, height はJSで動的に計算・設定 */
}

/* --- Program Cards Container --- */
body.page-id-328 .ppt-program-cards-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 20px;
    box-sizing: border-box;
    position: relative;
    z-index: 1; /* SVGとH2の間に配置 */
}

/* --- Individual Program Cards --- */
body.page-id-328 .ppt-program-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px 20px 0 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    background-color: transparent; /* 背景透明 */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-sizing: border-box;
    position: relative; /* カード内のコンテンツのz-index基準 */
}

body.page-id-328 .ppt-program-card > div:first-child { /* グレーのタイトル帯の親div */
    width: 100%;
    padding: 5px 15px; /* 縦幅調整 */
    background-color: #555;
    border-radius: 25px;
    margin-bottom: 15px;
    box-sizing: border-box;
    display: flex;
    align-items: center; /* 垂直中央寄せ */
    justify-content: center; /* 水平中央寄せ */
    position: relative;
    z-index: 1; /* コンテンツより前面 */
}

body.page-id-328 .ppt-program-card > div:first-child p { /* グレーのタイトル帯のテキスト */
    font-size: 18px;
    color: #fff;
    text-align: center;
    margin: 0;
    line-height: 1.2;
    font-family: 'Hiragino Kaku Gothic ProN', 'Meiryo', sans-serif;
}

body.page-id-328 .ppt-program-card .bold-text { /* 太字のテキスト */
    font-size: 18px;
    font-weight: bold;
    color: #333;
    /* margin-bottom: 10px; ★削除 */
    line-height: 1.4;
    text-align: left;
    width: 100%;
    position: relative;
    z-index: 1;
}

body.page-id-328 .ppt-program-card .purpose-text { /* 【目的】のテキスト */
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    margin-bottom: 20px; /* 20pxに */
    text-align: left;
    width: 100%;
    position: relative;
    z-index: 1;
}

body.page-id-328 .ppt-program-card .image-wrapper {
    width: 100%;
    height: 200px; /* PCでの画像の高さ */
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 0; /* 画像下の余白を削減 */
    position: relative;
    z-index: 1;
}

body.page-id-328 .ppt-program-card .image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

body.page-id-328 .ppt-program-card ul {
    text-align: left;
    margin: 0 0 0 20px; /* リスト下の余白を削減 */
    padding: 0;
    color: #555;
    font-size: 14px;
    font-family: 'Hiragino Kaku Gothic ProN', 'Meiryo', sans-serif;
    width: 100%;
    position: relative;
    z-index: 1;
}

body.page-id-328 .ppt-program-card ul li {
    margin-bottom: 5px;
}

body.page-id-328 .ppt-program-card .general-text { /* その他のPタグ (「など」) */
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    margin-bottom: 0; /* 「など」下の余白を削減 */
    text-align: left;
    width: 100%;
    position: relative;
    z-index: 1;
}

/* --- Bottom Buttons --- */
body.page-id-328 .ppt-program-card .bottom-buttons {
    width: 100%;
    margin-top: auto; /* 下部に寄せる */
    padding-bottom: 0; /* カード下部の最終余白 */
    position: relative;
    z-index: 1;
}

body.page-id-328 .ppt-program-card .bottom-buttons > div {
    width: 250px; /* ボタンの標準的な幅、調整可能 */
    margin-left: auto; /* 右寄せ */
    margin-right: 0; /* 右寄せ（明示的に） */
    padding: 5px 15px; /* 縦幅調整 */
    border-radius: 5px;
    margin-bottom: 10px;
    box-sizing: border-box;
    display: flex;
    align-items: center; /* 垂直中央寄せ */
    justify-content: center; /* 水平中央寄せ */
}

body.page-id-328 .ppt-program-card .bottom-buttons > div p {
    font-size: 14px;
    color: #555;
    margin: 0;
    line-height: 1.2;
    font-family: 'Hiragino Kaku Gothic ProN', 'Meiryo', sans-serif;
}

body.page-id-328 .ppt-program-card .bottom-buttons .red-button {
    background-color: #fee;
}
body.page-id-328 .ppt-program-card .bottom-buttons .red-button p {
    color: #d00;
}

body.page-id-328 .ppt-program-card .bottom-buttons .gray-button {
    background-color: #f0f0f0; /* 薄いグレー */
}
body.page-id-328 .ppt-program-card .bottom-buttons .gray-button p {
    color: #555;
}

body.page-id-328 .ppt-program-card .bottom-buttons .blue-button {
    background-color: #007bff;
}
body.page-id-328 .ppt-program-card .bottom-buttons .blue-button p {
    color: #fff;
}

/* --- Footer Margin Adjustment --- */
body.page-id-328 .intro-content-block:last-of-type {
    margin-bottom: 30px; /* PCデフォルトマージン */
}

/* --- Mobile Styles (JavaScriptで適用されるスタイルをここでも定義) --- */
@media (max-width: 768px) {
    body.page-id-328 .page-container {
        padding: 15px;
    }

    body.page-id-328 .intro-content-block {
        margin: 0 auto 20px auto;
        padding: 15px;
		width: 90%
		min-width: 360px;
    }
    
    body.page-id-328 .intro-content-block h2 {
        font-size: 20px;
        margin-bottom: 15px;
    }

    body.page-id-328 #ppt-program-combined-block {
        margin-top: 20px; /* モバイルでのマージン調整 */
        padding: 15px;
    }
    body.page-id-328 #ppt-program-combined-block h2 {
        font-size: 20px;
        margin-bottom: 20px;
        white-space: normal;
        text-overflow: clip;
    }

    /* ★修正点: PC用SVGをモバイルで非表示に */
    body.page-id-328 .combined-background-svg-pc {
        display: none !important; 
    }

    /* ★修正点: モバイルSVGのデフォルト表示を非表示に。JSで制御 */
    body.page-id-328 .combined-background-svg-mobile {
        display: none; 
    }

    body.page-id-328 .ppt-program-cards-container {
        flex-direction: column;
        gap: 30px;
        padding: 0;
        margin: unset;
    }

    body.page-id-328 .ppt-program-card {
        max-width: 100%;
        min-width: unset;
        flex: none; /* flex:1 を解除 */
        width: 100%; /* 明示的に100%に設定 */
        margin: unset;
    }

    body.page-id-328 .ppt-program-card > div:first-child p {
        font-size: 14px;
    }
    body.page-id-328 .ppt-program-card .bold-text {
        font-size: 18px;
    }
    body.page-id-328 .ppt-program-card .purpose-text {
        font-size: 14px;
        margin-bottom: 15px; /* モバイルでも目的下の余白を調整 */
    }
    body.page-id-328 .ppt-program-card .image-wrapper {
        height: 180px;
        margin-bottom: 10px; /* モバイルでも画像下の余白を削減 */
    }
    body.page-id-328 .ppt-program-card ul,
    body.page-id-328 .ppt-program-card ul li,
    body.page-id-328 .ppt-program-card .general-text {
        font-size: 14px;
        margin-bottom: 5px; /* モバイルでもリスト下の余白を削減 */
    }
    body.page-id-328 .ppt-program-card .general-text {
        margin-bottom: 10px; /* モバイルでも「など」下の余白を削減 */
    }
    body.page-id-328 .ppt-program-card .bottom-buttons > div p {
        font-size: 14px;
    }

    body.page-id-328 .intro-content-block:last-of-type {
        margin-bottom: 20px; /* モバイルマージン */
    }

    body.page-id-328 .ppt-program-card .bottom-buttons > div {
        width: 100%; /* モバイルでは横幅いっぱいに */
        margin-left: 0; /* 中央寄せに戻すか、明示的に0に */
        margin-right: 0; /* 中央寄せに戻すか、明示的に0に */
    }
}

/* --- PC Styles --- */
@media (min-width: 769px) { /* 769px以上でPCスタイル適用 */
    body.page-id-328 .ppt-program-cards-container {
        justify-content: space-around; /* space-aroundを維持 */
        gap: 20px;
    }

    /* 事前学習 (30%) */
    body.page-id-328 .ppt-program-cards-container .ppt-program-card:nth-child(1) {
        flex: none;
        width: calc(30% - (20px * 2 / 3)); 
        max-width: calc(30% - (20px * 2 / 3));
        min-width: unset;
    }

    /* 現地体験プログラム (40%) */
    body.page-id-328 .ppt-program-cards-container .ppt-program-card:nth-child(2) {
        flex: none;
        width: calc(40% - (20px * 2 / 3));
        max-width: calc(40% - (20px * 2 / 3));
        min-width: unset;
    }

    /* 事後学習 (30%) */
    body.page-id-328 .ppt-program-cards-container .ppt-program-card:nth-child(3) {
        flex: none;
        width: calc(30% - (20px * 2 / 3));
        max-width: calc(30% - (20px * 2 / 3));
        min-width: unset;
    }
}

/* 「学習資料のご提供について」画像セクション専用スタイル */
body.page-id-328 .learning-materials-image-container {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 20px !important;
    margin-bottom: 20px !important;
    justify-content: center !important;
}

body.page-id-328 .learning-materials-image-container .learning-image-item {
    flex: 1 1 calc(33.33% - 20px) !important;
    max-width: calc(33.33% - 20px) !important;
    box-sizing: border-box !important;
}

body.page-id-328 .learning-materials-image-container .learning-image-item img {
    width: 100% !important;
    height: auto !important;
    display: block !important;
}

/* レスポンシブ調整 - モバイル時の「学習資料のご提供について」セクションのスタイル */
@media (max-width: 768px) {
    body.page-id-328 .learning-materials-image-container {
        flex-direction: column !important;
        align-items: center !important;
        gap: 20px !important;
        margin-bottom: 20px !important;
        justify-content: center !important;
    }

    body.page-id-328 .learning-materials-image-container .learning-image-item {
        flex: none !important;
        max-width: 100% !important;
        width: 100% !important;
    }
}