#course-detail-component {
    font-family: inherit; 
    /* background-color: #f9fafb; */
    /* padding: 2rem 1rem; */
}

#course-detail-component *, 
#course-detail-component *:before, 
#course-detail-component *:after {
    box-sizing: border-box;
}

/* 全体を囲むコンテナ */
#course-detail-component .container {
    width: 100%;
    /* max-width: 56rem;  */
    background-color: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    margin: 0 auto;
}

/* タイトルセクション (1カラム) */
#course-detail-component .title-section {
    padding: 1.5rem;
    padding-bottom: 0;
}

/* コンテンツセクション (説明文と画像) */
#course-detail-component .content-section {
    padding: 1.5rem;
}
/* floatを解除するためのclearfix */
#course-detail-component .content-section::after {
    content: "";
    display: table;
    clear: both;
}

/* 画像セクション */
#course-detail-component .image-section {
    background-color: #e5e7eb;
    border-radius: 0.5rem;
    overflow: hidden;
    margin-bottom: 1rem; /* スマホ表示時の画像下の余白 */
}
#course-detail-component .card-image {
    width: 100%;
    display: block;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

/* 概要テキストセクション */
#course-detail-component .intro-section {
    /* floatされる要素の隣にあるため特別なスタイルは不要 */
}

/* 下部セクション（テーブルとプロフィール） */
#course-detail-component .bottom-section {
    padding: 1.5rem;
    padding-top: 0;
}

/* テキストスタイル */
#course-detail-component .title {
    font-size: 1.5rem;
    line-height: 2rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 1rem 0;
}
#course-detail-component .description {
    color: inherit;
    margin: 0;
    line-height: 1.6;
}

/* 「もっと見る」機能  */
#course-detail-component .description-wrapper {
    position: relative;
    max-height: 25.6em; /* 表示行数（line-height 1.6 * 4行） */
    overflow: clip;
    transition: max-height 0.2s ease-out; /* 速度を調整 */
}
#course-detail-component .description-wrapper.is-open {
    overflow: clip;
}
/* 概要のpタグにスタイルを適用 */
#course-detail-component .description-wrapper p {
    margin: 0 0 1em 0;
    line-height: 1.6;
}
#course-detail-component .description-wrapper p:last-child {
    margin-bottom: 0;
}

/* テキストが長い場合に下部にグラデーションを追加 */
#course-detail-component .description-wrapper.has-overflow::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3em;
    background: linear-gradient(to top, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
    pointer-events: none;
    transition: opacity 0.2s;
}
/* 開いた状態ではグラデーションを非表示に */
#course-detail-component .description-wrapper.is-open::after {
    opacity: 0;
}

/* ボタンを中央寄せにするためのコンテナ */
#course-detail-component .read-more-container {
    text-align: center;
    margin-top: 0.75rem;
}

/* もっと見るボタン (IDセレクタに変更) */
#course-detail-component #read-more-btn {
    display: none; /* JSでテキストが長い場合のみ表示 */
    align-items: center;
    gap: 0.5rem; /* アイコンとの間隔を調整 */
    background: none;
    border: none;
    color: #0c83aa;
    font-weight: 600;
    cursor: pointer;
    padding: 0.25rem 0;
    font-size: 0.875rem;
}
#course-detail-component #read-more-btn:hover {
    text-decoration: underline;
}
/* CSSで描画する矢印アイコンのスタイル（疑似要素に変更）(IDセレクタに変更) */
#course-detail-component #read-more-btn::after {
    content: '';
    display: inline-block;
    border: solid #0c83aa;
    border-width: 0 2px 2px 0;
    padding: 3px;
    transform: rotate(45deg)translateY(-2px);
    transition: transform 0.2s ease-in-out; /* 速度を調整 */
}
/* 開いた状態の矢印アイコン（上向きに回転）(IDセレクタに変更) */
#course-detail-component #read-more-btn.is-open::after {
    transform: rotate(-135deg)translateY(-4px);
}
#course-detail-component #read-more-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.4);
}
/* 「もっと見る」機能のスタイルここまで */

/* テーブルスタイル */
#course-detail-component .table-container {
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    overflow: hidden;
}
#course-detail-component .details-table {
    width: 100%;
    min-width: 600px;
    font-size: 0.875rem;
    line-height: 1.25rem;
    text-align: left;
    color: #374151;
    border-collapse: collapse;
}
#course-detail-component .details-table tr {
    border-bottom: 1px solid #e5e7eb;
}
#course-detail-component .details-table tr:last-child {
    border-bottom: none;
}
#course-detail-component .details-table th {
    padding: 0.75rem 1rem;
    font-weight: 500;
    color: #fff;
    background-color: #01588D;
    width: 25%;
    white-space: nowrap;
    vertical-align: top;
}
#course-detail-component .details-table td {
    padding: 0.75rem 1rem;
    vertical-align: top;
}

/* 学習目標リスト */
#course-detail-component .target-list {
    list-style-type: disc;
    list-style-position: inside;
    padding-left: 0;
    margin: 0;
}
#course-detail-component .target-list li + li {
    margin-top: 0.25rem;
}

/* 助成金バッジ */
#course-detail-component .badge-enabled {
    display: inline-block;
    background-color: #dcfce7;
    color: #166534;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.125rem 0.625rem;
    border-radius: 9999px;
}
#course-detail-component .badge-disabled {
    display: inline-block;
    background-color: #f3f4f6;
    color: #4b5563;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.125rem 0.625rem;
    border-radius: 9999px;
}

/* 難易度スター */
#course-detail-component .difficulty {
    display: flex;
    align-items: center;
}
#course-detail-component .difficulty-stars .star {
    color: #d1d5db;
    font-size: 1.25rem;
}
#course-detail-component .difficulty-stars .star.filled {
    color: #f59e0b;
}
#course-detail-component .difficulty-text {
    margin-left: 0.5rem;
    color: #4b5563;
}

/* 区切り線 */
#course-detail-component .separator {
    border: 0;
    height: 1px;
    background-color: #e5e7eb;
    margin: 2rem 0;
}

/* 講師プロフィール */
#course-detail-component .profile-section {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}
#course-detail-component .profile-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
#course-detail-component .profile-details {
    flex-grow: 1;
}
#course-detail-component .profile-company {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
}
#course-detail-component .profile-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0.25rem 0;
}
#course-detail-component .profile-title {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0 0 1rem 0;
}
#course-detail-component .profile-bio {
    font-size: 0.875rem;
    color: inherit;
    line-height: 1.6;
    margin: 0;
}

/* ▼▼▼ 受講者の声セクションのスタイル ▼▼▼ */
#course-detail-component .testimonials-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}
#course-detail-component .testimonial-card {
    background-color: #fff9f2;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1.5rem;
    position: relative;
}
#course-detail-component .testimonial-card::before {
    content: '“';
    position: absolute;
    top: 0.5rem;
    left: 1rem;
    font-size: 4rem;
    color: #f2dabb;
    line-height: 1;
}
#course-detail-component .testimonial-text {
    margin: 0 0 1rem 0;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}
#course-detail-component .testimonial-author {
    margin: 0;
    font-weight: 600;
    text-align: right;
}

/* レスポンシブ対応 (PC向け) */
@media (min-width: 769px) {
    body#page-study\:\:curricula-show .main-col-wrap .lessons-area{
        width: calc(100% - 310px - 30px);
    }
    body#page-study\:\:curricula-show .side-col-wrap{
        margin-top: 1rem;
    }
    #course-detail-component .title-section {
        padding: 2rem;
        padding-bottom: 0;
    }
    #course-detail-component .content-section {
        padding: 2rem;
        clear: both;
    }
    #course-detail-component .card-image {
        float: left;
        width: 55%;
        margin-right: 1.5rem;
        margin-bottom: 0;
    }
    #course-detail-component .bottom-section {
        padding: 2rem;
    }
    #course-detail-component .title {
        font-size: 1.875rem;
        line-height: 2.25rem;
    }
}

/* レスポンシブ対応 (SP向け) */
@media (max-width: 768px) {
    #course-detail-component .table-container {
        overflow-x: scroll;
    }
    #course-detail-component .profile-section {
        flex-wrap: wrap;
        justify-content: center;
    }
}