:root {
    --side-padding: 24px;
    --brand-color: #E60012;
}

/* 基本的なスタイル */
body {
    font-family: sans-serif;
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ヘッダー */
header {
    background-color: #333;
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    margin: 0;
}

header nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
}

header nav li {
    margin-left: 1rem;
}

header nav a {
    color: white;
    text-decoration: none;
}

/* ヒーローセクション */
.hero {
    background-image: url('https://picsum.photos/1200/400'); /* 仮の背景画像 */
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    padding: 4rem var(--side-padding);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5); /* テキストを読みやすくするためのオーバーレイ */
}

.hero-content {
    position: relative; /* オーバーレイの上にコンテンツを配置 */
    max-width: 600px;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-button {
    background-color: var(--brand-color);
    color: white;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s;
}

.cta-button:hover {
    background-color: #b0010f;
}

/* メインコンテンツ */
main {
    flex: 1;
    padding-top: 2rem;
    padding-bottom: 2rem;
    /* max-width: 960px; */
    margin: 0;
    width: 100%;
    box-sizing: border-box;
    overflow-x: clip; /* はみ出した背景によるスクロールバーを防止 */
}

main h2 {
    position: relative; /* 疑似要素の基準点とする */
    color: white;
    font-size: 32px;
    font-weight: bold;
    padding: 0.5rem 4rem 0.5rem 0; /* テキストのための右余白を確保 */
    margin-left: calc(50% - 50vw);
    padding-left: calc(50vw - 50% + var(--side-padding));
    z-index: 1; /* テキストが背景より上に来るように */
    margin-bottom: 82px;
}

main h2::before {
    content: '';
    position: absolute;
    background: var(--brand-color);
    z-index: -1; /* テキストの背後に配置 */
    top: 0;
    bottom: 0;
    left: 0;
    right: 3rem; /* 右側に2remの余白を作る */
}

main p {
    padding: 0 var(--side-padding); /* h2以外の要素にも左右の余白を適用 */
}

/* 特徴グリッド */
.sub-heading {
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    margin: 2rem 0;
    line-height: 1.6;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* スマホでは2カラム */
    gap: 1.5rem;
    padding: 0 var(--side-padding);
    margin-bottom: 2rem;
}

.feature-item {
    text-align: center;
}
.feature-item p{
    padding: 0;
    font-size: 20px;
    font-weight: bold;
}

.feature-icon {
    color: var(--brand-color);
    width: 70px;
    height: 70px;
    margin: 0 auto 0.5rem auto; /* アイコンボックスを中央揃え */
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%; /* Just in case, to keep a circular feel if a background is added */
}
.feature-icon span{
    font-size: 60px; /* アイコン自体のサイズ */
}

/* フッター */
footer {
    background-color: #f2f2f2;
    text-align: center;
    padding: 1rem;
    margin-top: auto;
}

/* 講師セクション */
.lecturers-section {
    padding: 4rem var(--side-padding);
}

.cta-button.cta-outline {
    background-color: transparent;
    border: 2px solid var(--brand-color);
    color: var(--brand-color);
    margin-top: 1.5rem;
    transition: background-color 0.3s, color 0.3s;
}

.cta-button.cta-outline:hover {
    background-color: var(--brand-color);
    color: white;
}

/* 強みセクション */
.strengths {
    padding: 4rem var(--side-padding);
    background-color: #f9f9f9;
}

.strengths-grid {
    display: grid;
    grid-template-columns: 1fr; /* スマホでは1カラム */
    gap: 2rem;
    max-width: 960px;
    margin: 0 auto;
}

.strength-item {
    text-align: center;
}

.strength-item .strength-icon {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 1.5rem auto;
    background-color: var(--brand-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.strength-item .strength-icon .material-symbols-outlined {
    font-size: 60px;
}

.strength-item h4 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.strength-item h4 .highlight {
    color: var(--brand-color);
}

.strength-item p {
    text-align: left;
    color: #555;
}

/* メソッドセクション */
.method-section {
    padding: 4rem var(--side-padding);
}

.method-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.method-container .section-title {
    line-height: 1.4;
}

.method-section .boxed-text {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 1.5rem;
    text-align: left;
    margin: 2rem 0;
}

.method-section .method-image {
    display: block; /* pictureタグをブロック要素に */
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 2rem 0;
}

.method-section .method-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

.method-section p {
    text-align: left;
    line-height: 1.8;
    color: #333;
}

.cta-button.var(--brand-color)-cta {
    background-color: var(--brand-color);
    margin-top: 2rem;
}

.cta-button.var(--brand-color)-cta:hover {
    background-color: #c00; /* ホバー時に少し暗い赤に */
}

/* お客様の声セクション */
.testimonials {
    padding: 4rem var(--side-padding);
}

.section-title {
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 2rem;
}

.testimonials-grid {
    display: flex;
    flex-direction: column; /* スマホでは縦並び */
    gap: 2rem;
    max-width: 960px;
    margin: 0 auto;
}

.testimonial-card {
    background-color: #f0f0f0; /* 薄いグレーの背景 */
    padding: 2rem 0.5rem;
    border-radius: 8px;
    text-align: center;
}

.testimonial-card .avatar {
    width: 135px;
    height: 124px;
    border-radius: 50%; /* 画像を丸くする */
    object-fit: cover;
    margin-bottom: 1rem;
}

.testimonial-card h4 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.testimonial-card .customer-info {
    color: #555;
    margin-bottom: 1.5rem;
}

.testimonial-box {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 1rem;
    text-align: left;
    margin-top: 1rem;
}

.testimonial-box h5 {
    font-size: 1rem;
    font-weight: bold;
    margin: 0 0 0.5rem 0;
    color: #333;
    background-color: #aeabab;
    display: inline-block;
    padding: 2px 12px;
}

.testimonial-box.after h5{
    background-color: var(--brand-color);
    color: #f2f2f2;
} 

/* サポート特徴セクション */
.support-feature {
    padding: 4rem var(--side-padding);
    background-color: #f9f9f9; /* 背景色を薄いグレーに */
}

.feature-container {
    display: flex;
    flex-direction: column; /* スマホでは画像を上に */
    gap: 2rem;
    max-width: 960px;
    margin: 0 auto;
}

.feature-image picture,
.feature-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block; /* pictureタグをブロック要素に */
}

.feature-text h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.feature-list {
    list-style: none;
    padding-left: 0;
    counter-reset: feature-counter; /* 番号付けのためにカウンターを初期化 */
}

.feature-list li {
    position: relative;
    padding-left: 45px; /* 番号アイコンのスペースを確保 */
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--brand-color); /* 赤い区切り線 */
}

.feature-list li::before {
    counter-increment: feature-counter; /* カウンターを1増やす */
    content: counter(feature-counter); /* カウンターの値を表示 */
    position: absolute;
    left: 0;
    top: 0;
    width: 30px;
    height: 30px;
    background-color: var(--brand-color);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 1rem;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    header {
        flex-direction: column;
    }

    header h1 {
        margin-bottom: 1rem;
    }

    header nav ul {
        flex-direction: column;
        align-items: center;
    }

    header nav li {
        margin: 0.5rem 0;
    }

   
}

/* PC用のグリッド調整 */
@media (min-width: 769px) {
     main h2::before {
        right: 4rem; /* 右側に2remの余白を作る */
    }
    .features-grid {
        grid-template-columns: repeat(4, 1fr); /* PCでは4カラム */
    }

    .feature-container {
        flex-direction: row; /* PCでは横並び */
        align-items: center;
    }

    .feature-image,
    .feature-text {
        flex: 1;
    }

    .testimonials-grid {
        flex-direction: row; /* PCでは横並び */
    }

    .strengths-grid {
        grid-template-columns: repeat(3, 1fr); /* PCでは3カラム */
    }

    .feature-container.reverse-layout {
        flex-direction: row-reverse; /* PCで画像とテキストの順序を反転 */
    }
}