/* ==========================================
   基本リセット & 共通設定
========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    background-color: #f7f9f6;
    color: #333333;
    line-height: 1.6;
}

.campaign-container {
    max-width: 100%;
    margin: 0 auto;
    background-color: #ffffff;
    box-shadow: 0 0 20px rgba(0,0,0,0.05);
}

/* ==========================================
   前半エリア（ヘッダー・2枠ボックス）
========================================== */

.campaign-header {
    /* 左から右へのグラデーション */
    background: linear-gradient(to right, #7cb342 0%, #689f38 40%, #4c6e2a 100%);
    color: #ffffff;
    text-align: center;
    padding: 40px 20px;
}

.campaign-header h1 {
    font-size: 1.6rem;
    font-weight: bold;
    line-height: 1.5;
}

.campaign-header .header-sub {
    font-size: 1.1rem;
    display: block;
    margin-top: 12px;
    font-weight: normal;
}

.campaign-content {
    padding: 50px 40px 20px 40px;
    background-color: #ffffff;
    /* 左右の背景葉っぱ（仮のフリー素材） */
    background-image: 
        url('https://unsplash.com'), 
        url('https://unsplash.com');
    background-position: left top, right top;
    background-size: 200px auto, 200px auto;
    background-repeat: no-repeat;
}

.info-box {
    background-color: rgba(255, 255, 255, 0.96);
    border: 3px solid #8d6e63; /* 茶色い細枠 */
    border-radius: 4px;
    padding: 25px;
    margin-bottom: 35px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    position: relative;
    z-index: 1;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.box-text {
    flex: 1;
}

.box-text h2 {
    color: #61884d;
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 4px;
    letter-spacing: 0.05em;
}

.box-text .box-note {
    color: #61884d;
    font-size: 0.9rem;
    margin-top: 10px;
}

.box-icon {
    flex-shrink: 0;
    width: 90px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ==========================================
   後半エリア（仕組み・商品概要テーブル）
========================================== */

.campaign-details {
    padding: 20px 40px 60px 40px;
    background-color: #ffffff;
}

.scheme-section {
    text-align: center;
    margin-bottom: 50px;
}

.scheme-section h2 {
    color: #61884d;
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 20px;
}

.scheme-box {
    background-color: #fafdf8;
    border-radius: 12px;
    padding: 30px 20px;
    border: 1px solid #e1eedb;
}

.scheme-box h3 {
    color: #61884d;
    font-size: 1.4rem;
    margin-bottom: 12px;
}

.scheme-lead {
    font-size: 0.95rem;
    color: #555555;
    max-width: 600px;
    margin: 0 auto 25px auto;
}

.scheme-diagram-placeholder {
    background-color: #ffffff;
    border: 2px dashed #cbdcb9;
    padding: 40px 20px;
    border-radius: 8px;
    color: #777;
}

.scheme-diagram-placeholder .sample-text {
    font-size: 0.85rem;
    margin-top: 15px;
    color: #999;
}

.info-section {
    margin-bottom: 50px;
}

.info-section h3 {
    color: #61884d;
    font-size: 1.5rem;
    border-bottom: 2px solid #61884d;
    padding-bottom: 6px;
    margin-bottom: 20px;
}

.info-flex {
    display: flex;
    align-items: center;
    gap: 30px;
}

.info-illustration {
    flex: 1;
}

/* イラスト枠の設定（画像用に最適化） */
.illustration-placeholder {
    background-color: #f9f9f9;
    border: 1px solid #e8e8e8;
    height: auto;             /* 文字用だった固定高（140px）を解除 */
    min-height: 140px;        /* 最低限の高さは維持 */
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
    overflow: hidden;         /* 画像が枠からはみ出るのを防ぐ */
    padding: 10px;            /* 画像の周りに少し余白を作る */
}

/* 差し込んだイラスト画像のサイズ調整 */
.illustration-placeholder img {
    max-width: 100%;          /* 枠の横幅いっぱいに合わせる */
    max-height: 160px;        /* 縦が大きくなりすぎないように制限 */
    height: auto;
    object-fit: contain;      /* 縦横比を崩さずに綺麗に収める */
    display: block;
}


.info-text {
    flex: 1.6;
    font-size: 0.95rem;
    line-height: 1.7;
    color: #444444;
}

/* ==========================================
   商品概要テーブル（枠線競合バグ対策版）
========================================== */
.summary-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 50px;
    font-size: 0.9rem;
    border-top: 2px solid #ffffff; /* 最上部のみに白線を付与 */
}

.summary-table th, 
.summary-table td {
    padding: 14px 16px;
    vertical-align: top;
    /* 衝突を避けるため、基本はすべての「下線」のみで格子を組む */
    border-bottom: 2px solid #ffffff; 
}

.summary-table th {
    background-color: #9cb86c; /* 通常の薄いオリーブ緑 */
    color: #ffffff;
    text-align: left;
    width: 170px;
    font-weight: bold;
    border-right: 2px solid #ffffff; /* 縦の区切り線 */
}

.summary-table td {
    background-color: #f2f6ee;
    color: #333333;
}

.note {
    display: block;
    font-size: 0.8rem;
    color: #666666;
    margin-top: 4px;
}

/* --- お利息部分の精密点線レイアウト --- */
.interest-row th {
    position: relative;
    padding: 10px 15px;
    vertical-align: middle;
}

/* 指定された行の左側（th）の下辺のみを確実に点線（dashed）にする */
.interest-row.row-dashed th {
    border-bottom: 2px dashed #ffffff !important;
}

.interest-label {
    position: absolute;
    top: 10px;
    left: 15px;
    font-size: 0.8rem;
    color: #ffffff;
    font-weight: normal;
    line-height: 1;
}

.interest-sub {
    text-align: right;
    font-size: 0.9rem;
    font-weight: normal;
    width: 100%;
    padding-top: 12px;
}

.interest-row:nth-child(6) .interest-sub,
.interest-row:nth-child(7) .interest-sub {
    padding-top: 0;
}

/* --- J-クレジット付与（文字を鮮やかな緑にする） --- */
.summary-table tr.highlight-row th {
    background-color: #9cb86c; /* 通常背景を維持 */
}
.summary-table tr.highlight-row td {
    background-color: #f2f6ee; /* 通常背景を維持 */
    color: #2e7d32;           /* 鮮やかで視認性の高い緑色 */
    font-weight: bold;         /* 太字化 */
}
.summary-table tr.highlight-row td .note {
    color: #666666;           /* 注記（※）はグレーのままキープ */
    font-weight: normal;
}

/* ==========================================
   留意事項・同意文
========================================== */
.campaign-footer-notes {
    border-top: 1px solid #dddddd;
    padding-top: 30px;
    font-size: 0.75rem;
    color: #666666;
    line-height: 1.6;
}

.notes-section {
    margin-bottom: 25px;
}

.notes-section h4 {
    font-weight: bold;
    margin-bottom: 6px;
    color: #333333;
}

.notes-section ul {
    list-style: none;
    padding-left: 0;
}

/* 差し込んだ画像アイコンのサイズ調整 */
.box-icon img {
    width: 80px;      /* 画像の横幅（元のSVGと同じサイズに固定） */
    height: auto;     /* 縦横比を維持 */
    display: block;
    object-fit: contain;
}


/* ==========================================
   レスポンシブ（スマホ表示用）
========================================== */
@media (max-width: 768px) {
    .campaign-content {
        padding: 30px 20px 10px 20px;
        background-size: 100px auto, 100px auto;
    }
    .campaign-details {
        padding: 10px 20px 40px 20px;
    }
    .info-box {
        flex-direction: column-reverse;
        align-items: flex-start;
        padding: 20px;
    }
    .box-icon {
        margin-bottom: 10px;
    }
    .info-flex {
        flex-direction: column;
        gap: 20px;
    }
    .info-illustration {
        width: 100%;
    }
    .summary-table th, 
    .summary-table td {
        display: block;
        width: 100% !important;
        border-right: none;
    }
    .summary-table th {
        border-bottom: none;
    }
    .interest-row.row-dashed th {
        border-bottom: none !important;
    }
    .interest-row th {
        padding: 15px !important;
    }
    .interest-label {
        position: static;
        margin-bottom: 5px;
    }
    .interest-sub {
        text-align: left;
        padding-top: 0;
    }
}
/* スマホ表示用（@media (max-width: 768px) の中に追加してください） */
@media (max-width: 768px) {

    /* --- ここから下を追加 --- */
    
    /* 点線枠の左右の余白を削って、画像を広げられるスペースを作る */
    .scheme-diagram-placeholder {
        padding: 15px 5px !important; 
    }

    /* SVG画像を枠線いっぱいに、最大サイズで拡大表示させる */
    .scheme-diagram-placeholder img {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        display: block;
    }
    
    /* --- ここまでを追加 --- */

}

