/* ページヘッダー */
.page-header {
    position: relative;
    text-align: center;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .page-header {
        margin-bottom: 0px;
    }
}

.header-image {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
}

@media (max-width: 768px) {
    .header-image {
        height: 200px;
    }
}

.header-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.header-image h1 {
    position: absolute;
    top: 10%;
    left: 28%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 2.4rem;
    font-weight: bold;
    text-shadow: 0px 2px 4px rgba(0, 0, 0, 0.5);
    border-top: 3px solid #92bb44;
    width: 400px; /* 線の横幅を指定 */
    text-align: left; /* テキストを中央揃え */
    padding: 0 50px 0;
}

.header-image p {
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 2rem;
    text-align: left;
}

/* メインコンテンツ */
.lesson-content {
    padding: 20px 10px;
}

@media screen and (max-width: 768px) {
    .lesson-content {
        padding: 10px 0px 20px;
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* 目次専用のスタイル */
section.toc {
    background: #f8f8f8;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 5px;
    max-width: 1200px;
    margin: 0 auto;
}

section.toc h3 {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 25px;
    color: #333;
    text-align: left;
    padding-left: 15px;
}

section.toc ul {
    list-style: none;
    margin: 0;
    padding-left: 100px;
}

section.toc ul ul {
    padding-left: 55px; /* 左の余白を小さくして左寄せ */
}

@media screen and (max-width: 768px)    {
    section.toc ul {
        padding-left: 50px;;
    }

    section.toc ul ul {
        padding-left: 40px; /* スマホ用の左余白 */
    }
}

section.toc ul li {
    margin-bottom: 5px;
}

section.toc ul li a {
    text-decoration: none;
    color: black; /* 緑色のリンク */
    font-size: 18px;
}

section.toc ul li a:hover {
    text-decoration: underline;
}

.lesson-guidance {
    background-color: white;
    padding: 10px;
    margin-top: 20px;
}

/* レッスンの指針とご支援内容 */
.lesson-guidance h3 {
    font-size: 24px;
    color: black;
    margin-bottom: 15px;
    border-bottom: 2px solid #92bb44;
    padding-bottom: 5px;
}

@media (max-width: 768px) {
    .lesson-guidance h3 {
        margin-bottom: -5px;
    }
}

.lesson-guidance .guidance-content h4 {
    font-size: 20px;
    color: #92bb44;
    margin-bottom: 10px;
}

.lesson-guidance .guidance-content p {
    line-height: 1.8;
    margin-bottom: 15px;
    padding-left: 10px;
}

.lesson-guidance .guidance-content span {
    font-size: 14px;
    color: #555;
}

.lesson-guidance .guidance-course {
    margin-top: 20px;
    margin-left: 50px;
}

@media (max-width: 768px) {
    .lesson-guidance .guidance-course {
        margin-left: 0;
    }
}

.lesson-guidance .guidance-course h5 {
    font-size: 18px;
    color: #76b3e0;
    margin-bottom: 10px;
    display: inline-block;
    border-bottom: 2px solid #76b3e0;
}

.lesson-guidance .guidance-course p{
    line-height: 1.8;
    margin-bottom: 10px;
    margin-left: 50px;
    font-size: 16px;
}

.lesson-guidance .guidance-course p span {
    line-height: 1.8;
    margin-bottom: 10px;
    font-size: 16px;
}

/* 左右ブロックの分割 */
.split-layout {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 100px; /* 左右の余白 */
    margin-top: 20px;
}

.left-block, .right-block {
    flex: 1; /* 両ブロックを均等に配置 */
}

.left-block p, .right-block p {
    margin: 0;
    font-size: 16px;
    line-height: 1.8;
}
/* 横幅100%の画像スタイル */
.guidance-images {
    display: flex;
    flex-direction: column;
    gap: 0px; /* 画像間の余白 */
    margin: 20px 0; /* 上下の余白 */
}

.guidance-image {
    width: 100%; /* 横幅100% */
    height: auto; /* 縦横比を維持 */
    border-radius: 8px; /* 角を丸くする */
}

@media screen and (max-width: 768px) {
    .lesson-guidance .guidance-course p {
        margin-left: 35px;
    }

    .guidance-images {
        gap: 0px; /* スマホで画像間の余白を調整 */
    }

    .split-layout {
        flex-direction: column; /* 縦並びに変更 */
        gap: 10px; /* 縦並び時の余白を調整 */
    }

    .left-block, .right-block {
        flex: unset; /* 均等配置を解除 */
    }

    .left-block p, .right-block p {
        font-size: 16px;
    }
}

/* 全体スタイル */
.lesson-approach {
    background-color: white;
    padding: 10px;
    margin: 20px 0 30px 0;
}

.lesson-approach h3 {
    font-size: 24px;
    color: black;
    margin-bottom: 20px;
    border-bottom: 2px solid #92bb44;
    padding-bottom: 5px;
}

/* リストアイテム */
.lesson-approach ul {
    list-style: none;
    padding: 30px 0px;
}

.lesson-approach ul li {
    margin-bottom: 20px;
}

.lesson-approach ul li strong {
    display: block;
    font-size: 18px;
    color: #92bb44;
    margin-bottom: 10px;
}

.lesson-approach ul li p {
    margin: 10px 0 0 50px;
    font-size: 16px;
    line-height: 1.6;
}

/* ボタンスタイル */
.detail-button {
    display: inline-block;
    background-color: #92bb44;
    color: white;
    text-decoration: none;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 5px;
    font-weight: bold;
    text-align: center;
    transition: background-color 0.3s;
    margin: 15px 0;
}

.detail-button:hover {
    background-color: #005e24;
}

/* スマホ対応 */
@media (max-width: 768px) {
    .lesson-approach h3 {
        font-size: 20px;
    }

    .lesson-approach ul li strong {
        font-size: 16px;
    }

    .detail-button {
        font-size: 12px;
        padding: 6px 12px;
    }
}

.lesson-detail-content {
    background-color: white;
    padding: 0 20px 10px;
}

@media screen and (max-width: 768px) {
    .lesson-detail-content {
        padding: 0 0 10px;
    }
}

.lesson-progress {
    background-color: white;
    padding: 10px;
    margin: 20px 0 30px 0;
}

.lesson-progress h3 {
    font-size: 24px;
    color: black;
    margin-bottom: 20px;
    border-bottom: 2px solid #92bb44;
    padding-bottom: 5px;
}

.lesson-progress .progress-content h4 {
    font-size: 20px;
    color: #92bb44;
    margin-bottom: 10px;
}

.lesson-progress .progress-content p {
    line-height: 1.8;
    margin-bottom: 15px;
}              

/* 矢印と画像を含むレイアウト */
.schedule-images {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin: 20px 0 5px 0;
}

.schedule-image {
    width: 47%; /* 画像の幅を2枚分調整 */
    height: auto;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}


/* デスクトップ用矢印 */
.arrow img.desktop-arrow {
    display: block;
    height: 417px;
}

.arrow img.mobile-arrow {
    display: none;
}

/* テキストと画像の横並び用レイアウト */
.text-image-layout {
    display: flex;
    justify-content: space-between;
    gap: 20px; /* テキストと画像の間隔 */
    margin: 20px 0;
}

.text-image-layout p {
    flex: 1; /* テキスト部分の幅を調整 */
    font-size: 16px;
    line-height: 1.8;
    margin: 0;
}

.additional-image {
    flex: 1; /* 画像部分の幅を調整 */
    text-align: center;
}

.final-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #ddd;
}

/* スマホ対応 */
@media (max-width: 768px) {
    .header-image h1 {
        font-size: 24px;
        width: 150px;
        left: 30%;
        top: 20%;
        padding-left: 10px;
    }


    .header-image p {
        font-size: 18px;
        width: 300px;
        left: 50%;
        top: 59%;
    }

    .container {
        padding: 0 10px;
    }

    section.toc {
        padding: 10px;
    }

    section.toc h3 {
        font-size: 16px;
    }

    .lesson-guidance h3,
    .lesson-approach h3,
    .lesson-progress h3 {
        font-size: 20px;
    }

    .lesson-guidance .guidance-content {
        padding: 15px 5px;
    }

    .lesson-guidance .guidance-content h4 {
        font-size: 18px;
    }

    .lesson-guidance .guidance-course h5 {
        font-size: 16px;
    }

    .schedule-images {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0; /* 要素間の余白を完全に削除 */
        margin: 0; /* 外側の余白をリセット */
        padding: 0; /* 内側の余白もリセット */
    }

    .schedule-image {
        width: 100%; /* 画像を親要素の幅に合わせる */
        margin: 0; /* 上下の余白を削除 */
    }

/* スマホ用矢印 */
    .arrow img.desktop-arrow {
        display: none;
    }

    .arrow img.mobile-arrow {
        display: block;
        width: 100%;
        height: auto;
        margin: 15px 0;
        color: #92bb44;
    }


    .lesson-progress .progress-content h4 {
        margin-top: 20px; /* h4と直前の要素に十分な余白を確保 */
        margin-bottom: 20px; /* 次の要素と少し余白を取る */
    }

    .progress-content p {
        margin-top: 10px; /* 上部に少し余白を追加 */
    }

    .text-image-layout {
        flex-direction: column; /* スマホでは縦並び */
    }

    .text-image-layout p {
        margin-bottom: 15px; /* テキスト下の余白 */
    }

    .final-image {
        max-width: 100%;
    }

    .text-image-layout {
        gap: 0;
    }
}

.lesson-approach h2 {
    font-size: 24px;
    color: black; /* 緑文字 */
    margin-bottom: 15px;
    border-bottom: 2px solid #92bb44;
    padding-bottom: 5px;
}

.lesson-approach-a h2 {
    font-size: 24px;
    color: #92bb44; /* 緑文字 */
    padding: 30px 0 0 0;
    margin-top: 20px;
}

.lesson-approach p {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
    margin-bottom: 20px;
}

/* アプローチ画像とリスト */
.approach-container {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    max-width: 1200px; /* 全体の幅を制限 */
    margin: 0 auto;
}

.image-section {
    max-width: 620px;
    flex: 1;
}

.approach-image {
    flex: 1 1 45%; /* 画像の占有幅を調整 */
    max-width: 620px; /* 最大幅を指定 */
    height: auto;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.approach-text {
    flex: 1 1 50%; /* テキスト部分の占有幅を調整 */
    max-width: 550px; /* テキスト部分の最大幅を指定 */
    padding-left: 20px; /* 画像との間隔を調整 */
}

.download-button {
    display: inline-block;
    margin-top: 10px;
    background-color: #92bb44;
    color: white;
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 5px;
    font-size: 14px;
    text-align: center;
}

.download-button:hover {
    background-color: #76b3e0;
}

.text-section {
    flex: 2;
}

.text-section ul {
    list-style: none;
    padding: 0;
}

.text-section li {
    margin-bottom: 20px;
}

.text-section h4 {
    font-size: 22px;
    color: #76b3e0;
    margin-bottom: 5px;
}

.text-section p {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
}

/* スマホ対応 */
@media (max-width: 768px) {
    .approach-container {
        flex-direction: column; /* 画像とテキストを縦並びに */
        gap: 15px; /* 画像とテキストの間隔を調整 */
    }

    .approach-image {
        max-width: 100%; /* 画像を画面幅にフィット */
        height: auto; /* 高さは自動調整 */
        margin: 0 auto; /* 画像を中央揃え */
    }

    .approach-text {
        max-width: 100%; /* テキスト幅を画面幅に調整 */
        padding: 0 15px; /* 横の余白を追加 */
    }

    .download-button {
        max-width: 90%; /* ボタン幅を調整 */
        margin: 0 auto; /* ボタンを中央揃え */
    }

    .text-section h4 {
        font-size: 18px;
    }
}


.related-knowledge {
    border: 4px solid #ccc; /* グレーの枠線 */
    border-radius: 8px; /* 角を丸める */
    padding: 15px; /* 内側の余白 */
    margin-top: 20px; /* 上の要素との余白 */
}

.related-knowledge p {
    margin: 0 0 10px 0; /* 下部に少し余白を追加 */
    font-weight: bold; /* 見出しを強調 */
}

.related-knowledge a {
    color: black; /* リンクの色 */
    text-decoration: none; /* 下線を削除 */
    display: block; /* 各リンクをブロック表示にする */
    margin-bottom: 5px; /* リンク同士の間隔 */
}

.related-knowledge a:hover {
    text-decoration: underline; /* ホバー時に下線を表示 */
    color: #007d32;
}

/* デスクトップ用 */
@media (min-width: 769px) {
    [id] {
        scroll-margin-top: 100px; /* ヘッダーの高さに合わせる */
    }
}

/* モバイル用 */
@media (max-width: 768px) {
    [id] {
        scroll-margin-top: 80px; /* モバイルのヘッダー高さ */
    }
}