/* ベーススタイル */
body {
    margin: 100px 0 0 0;
    font-family: Arial, sans-serif;
    background-color: #f2f2f2;
}

.header {
    background-color: #f2ecd0; /* 背景色を指定 */
    color: white;
    position: fixed; /* 上部に固定 */
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000; /* 他の要素より前面に表示 */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* ヘッダー下に影を追加 */
}

/* PCヘッダー */
.pc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px; /* コンテンツ幅を1200pxに制限 */
    margin: 0 auto; /* 中央揃え */
    height: 100px; /* 高さを固定 */
    padding: 0 20px; /* 横方向の余白調整 */
    box-sizing: border-box; /* パディングを含む計算 */
}

/* スマホ用ヘッダー */
.mobile-header {
    display: none;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background-color: #f2ecd0;
    z-index: 1001; /* z-index を PCヘッダーより高く設定 */
}

/* モバイルメニューの初期状態 */
.mobile-menu {
    display: none;
    position: absolute;
    top: 60px; /* ヘッダーの下に表示 */
    right: 0;
    background-color: #1a1a1a;
    width: 100%;
    text-align: center;
    z-index: 999;
}

/* スマホメニューが開いた状態 */
.mobile-menu.open {
    display: block;
}

/* メディアクエリ */
@media (max-width: 768px) {
    .pc-header {
        display: none; /* スマホではPCヘッダーを非表示 */
    }

    .mobile-header {
        display: flex; /* スマホで表示 */
    }

    body {
        margin-top: 60px; /* モバイル用ヘッダーの高さ分 */
    }
}

.pc-header .logo img {
    height: 65px; /* ロゴの高さ調整（必要に応じて変更） */
}

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

.pc-header .pc-nav ul li {
    margin: 0 20px;
}

.pc-header .pc-nav ul li a {
    color: black;
    text-decoration: none;
    font-size: 18px;
}

.pc-header .header-buttons a {
    margin-left: 10px;
    padding: 10px 20px;
    text-decoration: none;
    font-size: 16px;
    border-radius: 4px;
}

.contact-button {
    background-color: #6d8c32;
    color: white;
    border: 1px solid #6d8c32;
    padding: 5px;
}

.mypage-button {
    background-color: #6d8c32;
    color: white;
    border: 1px solid #6d8c32;
}

@media (max-width: 768px) {
    .contact-button {
        font-size: 12px; /* さらに小さい文字サイズ */
    }
}

.contact-button:hover, .mypage-button:hover {
    opacity: 0.9;
}

.mobile-logo img {
    height: 55px;
}

.menu-box {
    display: flex; /* ハンバーガーメニュー内の要素を正しく表示 */
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    width: 100%;
    z-index: 1;
    position: relative;
}

.hamburger-menu {
    background-color: #595959;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 40px; /* サイズを調整 */
    width: 40px; /* サイズを調整 */
    border-radius: 4px; /* 角を少し丸める */
    padding: 5px; /* 内側に余白を追加 */
    box-sizing: border-box; /* パディングと枠線を含めたサイズ計算 */
}

.hamburger-menu .line {
    background-color: white;
    height: 2px;
    width: 100%;
    border-radius: 2px;
}

.mobile-menu ul {
    list-style: none;
    margin: 0;
    padding: 20px 0;
}

.mobile-menu ul li {
    margin: 20px 0;
}

.mobile-menu ul li a {
    color: white;
    text-decoration: none;
    font-size: 18px; /* 文字サイズを少し大きく */
    letter-spacing: 1.5px; /* 文字の間隔を広げる */
    line-height: 2; /* 高さを確保して、より余裕のあるレイアウトに */
}

/* ヒーローセクションのスタイル */
.hero {
    position: relative;
    background-image: url('../img/bg_pc.png'); /* パソコン用背景画像 */
    background-size: cover;
    background-position: center;
    height: 400px; /* セクションの高さ */
}

.hero-container {
    max-width: 1200px; /* コンテンツ幅を1200pxに制限 */
    margin: 0 auto; /* 中央揃え */
    height: 100%; /* 親要素に合わせる */
    display: flex;
    align-items: center;
}

.hero-text {
    background-color: rgba(0, 0, 0, 0.28); /* 黒い半透明の背景 */
    padding: 20px;
    border-radius: 8px; /* 角丸 */
    color: white;
    width: 345px; /* テキストエリアの最大幅 */
    height: 300px;
    text-align: center; /* テキストとボタンを中央揃え */
    display: flex; /* フレックスボックスを使用 */
    flex-direction: column; /* 縦方向に配置 */
    gap: 10px; /* 子要素間の間隔を設定 */
    margin: 25px 0 0 0;
    position: relative; /* 相対配置 */
}

@media (max-width: 768px) {
    .hero-text {
        width: 295px;
        height: 300px;
        margin: 0 auto; /* 左右のマージンをautoにして中央揃え */
        position: absolute; /* 絶対配置 */
        top: 50%; /* 上から50%の位置 */
        left: 50%; /* 左から50%の位置 */
        transform: translate(-50%, -50%); /* 中央に配置するための調整 */
    }
}

.hero-text h1 {
    font-size: 30px;
    margin: 0;
}

.hero-text h2 {
    font-size: 30px;
    margin: -15px 0 5px;
}

.hero-text p {
    font-size: 14px; /* フォントサイズが小さい場合 */
    line-height: 2.5; /* 行間を狭める */
}

/* 具体的にセレクタを指定 */
.hero-text .hero-date {
    margin: 5px;
    font-size: 14px;
    line-height: 1.2; /* 行間を狭める */
}

.hero-text .hero-place {
    margin: 5px;
    font-size: 14px;
    line-height: 1.2; /* 行間を狭める */
}

.hero-text .hero-room {
    margin: 5px;
    font-size: 14px;
    line-height: 1.2; /* 行間を狭める */
}

.hero-button {
    background-color: #6d8c32;
    color: white;
    padding: 10px 48px;
    text-decoration: none;
    font-size: 16px;
    border-radius: 4px;
    display: inline-block;
    text-align: center;
    position: absolute; /* 絶対配置 */
    bottom: 15px; /* 親要素の下から20px */
    left: 50%; /* 親要素の中央 */
    transform: translateX(-50%); /* 中央揃え */
}

.hero-button:hover {
    background-color: #005a24;
}

/* スマホ対応 */
@media (max-width: 768px) {
    .hero {
        background-image: url('../img/bg_sp.png'); /* スマホ用背景画像 */
    }

    .hero-text h1 {
        font-size: 25px;
    }

    .hero-text h2 {
        font-size: 25px;
        margin: px 0 5px;
    }

    .hero-text p {
        font-size: 12px; /* スマホではさらに小さくする */
        line-height: 1.1; /* スマホ用にさらに狭く設定 */
    }

    .hero-date, .hero-place, .hero-room {
        font-size: 12px;
        line-height: 1.1;
    }

    .hero-button {
        font-size: 14px;
        padding: 8px 16px;
        margin-top: 10px; /* ボタンとテキストの間に余白を追加 */
    }
}

/* 全体エリア */
.content-section {
    background-color: #f2f2f2; /* コンテンツエリアは白背景 */
}

@media (mix-width: 769px) {
    .content-section {
        padding: 20px;
    }
}


/* 2カラムレイアウト */
.content-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr; /* 左2:右1の2カラム */
    gap: 20px;
    max-width: 1200px;
    margin: 20px auto;
}

@media (max-width: 768px) {
    .content-wrapper {
        margin: 0 auto;
    }
}

/* 左カラム: 新着情報とバナー */
.left-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

@media (max-width: 768px) {
    .left-column {
        padding: 10px;
    }
}

.news {
    background-color: #fff;
}

.news-title {
    background-color: #f2ecd0; /* 肌色帯 */
    color: black;
    padding: 10px;
    font-size: 18px;
    margin: 0;
}

.news-content .news-date {
    font-size: 14px;
    margin: 10px 30px;
    text-align: right;
}

/* .news-item 全体のスタイル */
.news-item {
    display: flex;
    flex-direction: column; /* 縦方向に配置 */
    padding: 10px 15px; /* 内側の余白を調整 */
    text-decoration: none; /* リンクの下線を削除 */
    color: inherit; /* リンクの色を継承 */
    transition: transform 0.2s, box-shadow 0.2s;
    margin: 0; /* 外側の余白をリセット */
}

.news-item:hover {
    transform: translateY(-5px); /* ホバー時のアニメーション */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* ホバー時の影 */
}

/* 上部のカテゴリと日付の行 */
.news-header {
    display: flex;
    justify-content: space-between; /* 左右に配置 */
    align-items: center; /* 縦方向の中央揃え */
    margin: 0; /* 上部の余白を削除 */
    padding: 0; /* パディングを削除 */
}

/* カテゴリ部分 */
.news-category {
    font-size: 14px;
    color: #333;
    font-weight: bold; /* 強調表示 */
    margin: 0; /* カテゴリと日付の余白を削除 */
    padding: 0; /* パディングを削除 */
}

/* 日付部分 */
.news-date {
    font-size: 14px;
    color: #666; /* 少し薄い色 */
    text-align: right;
    margin: 0; /* カテゴリと日付の余白を削除 */
    padding: 0; /* パディングを削除 */
}

/* 本文部分 */
.news-content {
    font-size: 16px;
    color: #000; /* 本文の色を濃く設定 */
    margin: 5px 0 0 0; /* 本文上部のみ少し余白を追加 */
}

.news-content p {
    margin: 0; /* pタグ内の余白を削除 */
}

.news-button {
    background-color: #6d8c32;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 4px;
    display: inline-block;
    text-align: center;
    margin: 20px auto 10px; /* 上下の余白を調整し、センター配置 */
    display: block; /* ボタンをブロック要素に変更 */
    width: fit-content; /* ボタンの幅を内容に合わせる */
}

.desktop-banners {
    display: grid;
    grid-template-columns: 1fr; /* スマホ用：1列 */
}
.mobile-banners {
    display: none;
}
@media (max-width: 768px) {
    .desktop-banners {
        display: none;
    }
    .mobile-banners {
        display: block;
    }
}

.banner {
    display: block;
    border: 1px solid #ccc;
    border-radius: 5px;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.banner img {
    display: block;
    width: 100%;
    height: auto;
}

.banner:hover {
    transform: scale(1.03); /* ホバー時の拡大 */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* ホバー時の影 */
}


.right-column {
    border-radius: 5px;
    background-color: white;
}

@media (max-width: 768px) {
    .right-column {
        background-color: #f2f2f2;
        padding: 10px;
    }
}

.popular-title {
    background-color: #f2ecd0;
    color: black;
    padding: 10px;
    font-size: 18px;
    margin: 0 0 20px 0;
}

.popular-item {
    display: flex;
    align-items: center;
    gap: 10px; /* バナーとテキストの間隔 */
    border-radius: 5px;
    padding: 10px;
    background-color: #fff;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative; /* 相対位置指定 */
}

@media (max-width: 768px) {
    .popular-item {
        padding: 15px;
    }
}

.popular-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* ナンバリングのスタイル */
.popular-item::before {
    content: counter(item-counter) "."; /* カウンターに"."を追加 */
    counter-increment: item-counter; /* カウンターを増加 */
    font-size: 16px;
    font-weight: bold;
    color: black; /* 好きな色に変更可能 */
    border-radius: 50%; /* 丸型 */
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px; /* テキストとの余白 */
    position: absolute; /* テキストの前に配置 */
    left: 5px; /* 左側に配置 */
}

.popular-list {
    display: flex;
    flex-direction: column;
    gap: 12px; /* アイテム間の間隔 */
    counter-reset: item-counter; /* カウンターをリセット */
}

@media (max-width: 768px) {
    .popular-list {
        gap: 0px;
    }
}

.popular-link {
    text-decoration: none;
    display: flex;
    align-items: center;
    width: 100%;
}

.popular-banner {
    width: 50px; /* バナー画像の幅 */
    height: 50px; /* バナー画像の高さ */
    background-color: #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #666;
    border-radius: 5px;
    flex-shrink: 0;
}

.popular-text {
    font-size: 16px;
    color: #333;
    line-height: 1.3;
    margin: 0 30px;
    overflow-wrap: break-word; /* テキストを折り返す */
    flex: 1; /* テキストエリアを柔軟に */
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
    -webkit-line-clamp: 3;
            line-clamp: 3;
}

/* PC（3行制限） */
@media (min-width: 769px) { /* PC表示 */
    .popular-text {
        max-height: 4.8em; /* フォントサイズ16pxで3行の場合の目安 (16px * 1.6行間 * 3行 = 4.8em) */
        line-height: 1.6; /* 行間調整 */
    }
}

/* スマホ（全行表示） */
@media (max-width: 768px) { /* スマホ表示 */
    .popular-text {
        display: block;
        max-height: none;
        overflow: visible;
    }
}


@media (max-width: 768px) {
    .content-wrapper {
        display: block; /* 1カラムレイアウト */
    }

    .banners {
        display: flex;
        flex-direction: column; /* バナーを縦並び */
        gap: 0px;
    }

    .banner {
        width: 100%; /* フルワイドに広げる */
        margin: 0; /* 外側の余白をリセット */
    }

    .banner img {
        width: 100%; /* 画面幅いっぱいに広げる */
        height: auto; /* アスペクト比を維持 */
    }

    .popular-content {
        width: 100%; /* フルワイドに調整 */
        padding: 20px;
        box-sizing: border-box; /* パディングを含めた幅計算 */
    }

    .popular-title {
        background-color: #f2ecd0;
        color: black;
        padding: 10px;
        margin-bottom: 10px;
        text-align: center;
    }

    .popular-list {
        margin: 0;
    }

    .popular-list li {
        font-size: 14px;
        line-height: 1.5;
    }
}

/* フッター全体 */
.footer {
    background-color: #f2f2f2; /* 背景色は白 */
    padding: 0px 0;
    border-top: 1px solid #ccc; /* 上部に薄い線 */
}

/* SNSアイコン */
.footer-sns-wrapper {
    display: flex;
    justify-content: center; /* ラッパー全体を中央揃え */
    background-color: #f2ecd0; /* 背景色 */
    padding: 5px 0; /* 上下の余白 */
}

.footer-sns {
    display: flex;
    justify-content: left; /* アイコンを左寄せ */
    gap: 20px; /* アイコン間の間隔 */
    max-width: 1200px; /* コンテンツ幅を固定 */
    width: 100%; /* コンテンツ幅をレスポンシブ対応 */
}


.footer-sns a img {
    width: 40px;
    height: 40px;
    transition: transform 0.3s ease; /* ホバー時のアニメーション */
}

.footer-sns a:hover img {
    transform: scale(1.1); /* ホバー時に拡大 */
}

/* フッターメニュー全体 */
.footer-menu {
    display: flex;
    flex-wrap: wrap; /* 横幅に収まらない場合に折り返し */
    gap: 70px; /* 各カラム間のスペース */
    padding: 20px; /* 上下左右の余白 */
    max-width: 1200px; /* コンテンツ幅を1200pxに制限 */
    margin: 0 auto; /* 中央揃え */
}

/* 各カラムのスタイル */
.footer-menu-column {
    flex: 0 0 auto; /* 必要なサイズ分だけの幅を取る */
    min-width: auto; /* 最低幅の指定を解除 */
    box-sizing: border-box; /* パディングを含めた幅計算 */
    margin: 0; /* カラム間の余白を調整 */
}

/* h4 の横並び設定 */
.lesson-column h4 {
    display: inline-block; /* 横並びにする */
    margin-right: 115px; /* h4 間のスペース */
    font-size: 16px;
    font-weight: bold;
}

.lesson-column h4:first-child {
    margin-right: 305px; /* レッスンと公式ナレッジ集の間のスペースを広げる */
}

.footer-menu-column h4 a {
    color: black; /* 文字を黒にする */
    text-decoration: none; /* 下線を消す */
}

/* リストスタイル */
.footer-menu-column ul {
    list-style: none;
    padding: 0;
    margin: 0 45px;
}

.footer-menu-column ul li {
    margin-bottom: 10px;
}

.footer-menu-column ul li a {
    text-decoration: none;
    color: black;
}

.footer-menu-column ul li a:hover {
    color: #007d32; /* ホバー時の色 */
}

/* フッターメニューの縦並び（スマホ用） */
@media (max-width: 768px) {
    .footer-menu {
        display: flex;
        flex-direction: column; /* カラムを縦並びに */
        gap: 20px;
        padding: 20px;
    }

    .footer-menu-column {
        display: flex;
        flex-direction: column; /* h4 とリストを縦並び */
        align-items: flex-start;
        width: 100%; /* フル幅で揃える */
    }

    .footer-menu-column h4 {
        margin: 0 0 10px 0; /* h4 の下に余白 */
        font-size: 16px;
        font-weight: bold;
    }

    .footer-menu-column ul {
        list-style: none;
        padding: 0 0 0 20px; /* リストをインデント */
        margin: 0;
    }

    .footer-menu-column ul li {
        margin: 5px 0;
    }

    .footer-menu-column ul li a {
        text-decoration: none;
        color: black;
    }

    .footer-menu-column ul li a:hover {
        color: #007d32; /* ホバー時の色 */
    }

    .sublist-column ul {
        padding-left: 40px; /* サブリストをさらに右に寄せる */
    }
}

/* フッターリンクのスタイル */
.footer-links ul {
    display: flex;
    justify-content: center; /* 中央揃え */
    list-style: none;
    padding: 0;
    margin: 10px 0;
    flex-wrap: nowrap; /* PCでは折り返さない */
}

.footer-links ul li {
    margin: 0 15px; /* 各リンクの間隔 */
    flex: 0 1 auto; /* PCでは自動幅 */
    text-align: center; /* テキスト中央揃え */
}

.footer-links ul li a {
    text-decoration: none; /* 下線を削除 */
    color: #333; /* テキスト色 */
    font-size: 14px; /* フォントサイズ */
    transition: color 0.3s ease;
    display: inline-block;
}

.footer-links ul li a:hover {
    color: #007d32; /* ホバー時の色 */
}

/* スマホ用レイアウト */
@media (max-width: 768px) {
    .footer-links ul {
        flex-wrap: wrap; /* 折り返して2列表示 */
    }

    .footer-links ul li {
        flex: 0 0 50%; /* 幅を50%に固定 */
        margin: 5px 0; /* 上下の間隔を設定 */
    }
}


/* コピーライト */
.footer-copyright {
    background-color: #1a1a1a; /* 黒い帯 */
    color: white; /* 白文字 */
    text-align: center; /* 中央揃え */
    padding: 10px 0; /* 上下の余白 */
    font-size: 12px;
    margin-top: 20px;
}


@media (max-width: 768px) {
    .footer-menu {
        flex-direction: column; /* 縦並びにする */
        align-items: center; /* メニュー全体を中央揃え */
    }

    .footer-menu-column {
        margin-bottom: -15px; /* カラム間の余白 */
    }
}

/* 通常のスタイル (PCやタブレットでは改行を有効にする) */
.no-break {
    display: inline;
}

/* スマホ用スタイル (画面幅が768px以下の場合) */
@media (max-width: 768px) {
    .no-break {
        display: none;
    }
}