@charset "UTF-8";
/* ==========================================================
 * コース一覧ページ  /course/
 * コース比較表（.ygh-course-compare）
 * ========================================================== */

.ygh-course-compare {
    width: 100%;
    margin: 24px 0 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid #dbe4ef;
    border-radius: 8px;
    background: #fff;
}

.ygh-course-compare table {
    width: 100%;
    min-width: 900px;
    border-collapse: collapse;
    border-spacing: 0;
    table-layout: fixed;
    margin: 0;
    font-size: 15px;
    line-height: 1.65;
    color: #333;
}

/* 列幅の配分 */
.ygh-course-compare col:nth-child(1) { width: 15%; }
.ygh-course-compare col:nth-child(2) { width: 17%; }
.ygh-course-compare col:nth-child(3) { width: 16%; }
.ygh-course-compare col:nth-child(4) { width: 18%; }
.ygh-course-compare col:nth-child(5) { width: 18%; }
.ygh-course-compare col:nth-child(6) { width: 16%; }

.ygh-course-compare th,
.ygh-course-compare td {
    padding: 14px 16px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid #e6edf5;
    border-right: 1px solid #eef3f9;
    word-break: normal;
    overflow-wrap: anywhere;
}
.ygh-course-compare th:last-child,
.ygh-course-compare td:last-child { border-right: 0; }

/* ヘッダー行 */
.ygh-course-compare thead th {
    background: #003c8c;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: .04em;
    white-space: nowrap;
    border-bottom: 0;
    border-right: 1px solid rgba(255,255,255,.22);
    text-align: center;
}

/* 行見出し（コース名） */
.ygh-course-compare tbody th {
    background: #f3f7fc;
    color: #003c8c;
    font-weight: 700;
    font-size: 15px;
    white-space: nowrap;
    vertical-align: middle;
    border-right: 1px solid #e2eaf4;
}

.ygh-course-compare tbody tr:nth-child(even) td { background: #fafcfe; }
.ygh-course-compare tbody tr:last-child th,
.ygh-course-compare tbody tr:last-child td { border-bottom: 0; }
.ygh-course-compare tbody tr:hover td { background: #f2f8ff; }

/* レスポンシブ：スマホはカード形式に切り替え（横スクロール不要） */
@media screen and (max-width: 767px) {
    .ygh-course-compare {
        overflow: visible;
        border: 0;
        background: none;
    }
    .ygh-course-compare table,
    .ygh-course-compare thead,
    .ygh-course-compare tbody,
    .ygh-course-compare tr,
    .ygh-course-compare th,
    .ygh-course-compare td {
        display: block;
        width: 100%;
        min-width: 0;
    }
    .ygh-course-compare table { min-width: 0; font-size: 14px; table-layout: auto; }
    .ygh-course-compare thead { display: none; }
    .ygh-course-compare tbody tr {
        margin-bottom: 16px;
        border: 1px solid #dbe4ef;
        border-radius: 8px;
        overflow: hidden;
        background: #fff;
    }
    .ygh-course-compare tbody th {
        background: #003c8c;
        color: #fff;
        border-right: 0;
        border-bottom: 0;
        padding: 11px 14px;
        font-size: 15px;
        white-space: normal;
    }
    .ygh-course-compare tbody td {
        display: flex;
        gap: 10px;
        padding: 10px 14px;
        border-right: 0;
        border-bottom: 1px solid #eef3f9;
        background: #fff !important;
    }
    .ygh-course-compare tbody td:last-child { border-bottom: 0; }
    /* 項目名をセル先頭に注入 */
    .ygh-course-compare tbody td::before {
        content: attr(data-label);
        flex: 0 0 6.2em;
        color: #5a6b80;
        font-weight: 700;
        font-size: 13px;
        line-height: 1.7;
    }
    .ygh-course-compare tbody tr:hover td { background: #fff; }
}
