/**
 * 教室案内ページ用のスタイル
 */

/* ヒーローセクションのスタイリング */
.page-hero {
    position: relative;
    height: 40vh;
    min-height: 300px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.page-hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.8);
}

.page-hero-title {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 3rem;
    text-align: center;
    width: 100%;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    z-index: 2;
}

/* ページ全体のレイアウト */
.content-wrapper {
    max-width: 1200px;
    margin: 3rem auto 8rem;
    padding: 0 5%;
    display: flex;
    justify-content: space-between;
}

/* 左側のサイドバー */
.class-sidebar {
    flex: 0 0 20%;
    position: sticky;
    top: 100px;
    align-self: flex-start;
    margin-right: 5%;
    height: fit-content;
    background-color: #f8f8f8;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* サイドバーのナビゲーション */
.class-sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.class-sidebar-nav li {
    margin-bottom: 15px;
}

.class-sidebar-nav a {
    display: block;
    text-decoration: none;
    color: #333;
    border-radius: 5px;
    padding: 10px 15px;
    transition: all 0.3s ease;
    font-weight: 600;
    border-left: 3px solid transparent;
}

/* アクティブなリンクのスタイル */
.class-sidebar-nav a.active {
    background-color: #e8f0fe;
    color: #0056b3;
    border-left: 3px solid #0056b3;
}

.class-sidebar-nav a:hover {
    background-color: rgba(0, 86, 179, 0.1);
}

/* 右側のメインコンテンツ */
.class-content {
    flex: 0 0 70%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* 教室タイトル（h2）のスタイリング */
.class-content h2 {
    font-size: 2rem;
    margin-top: 4rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    padding-left: 20px;
    position: relative;
    border-bottom: 3px solid #0056b3;
    color: #0056b3;
}

.class-content h2:before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 30px;
    background-color: #0056b3;
}

/* カテゴリータイトル */
.category-title {
    font-size: 2rem;
    margin: 2rem 0 1.5rem;
    padding-bottom: 0.5rem;
    padding-left: 20px;
    position: relative;
    border-bottom: 2px solid #0056b3;
    color: #0056b3;
}

.category-title:before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 30px;
    background-color: #0056b3;
}

/* 教室カード */
.class-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.class-card:hover {
    transform: translateY(-5px);
}

/* 教室タイトル */
.class-title {
    background-color: #0056b3;
    color: white;
    padding: 15px 20px;
    margin: 0;
    font-size: 1.3rem;
}

/* 教室情報コンテナ */
.class-info {
    padding: 20px;
}

/* 教室詳細（時間、講師、対象など） */
.class-details {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #ddd;
}

.class-time {
    font-weight: 600;
    color: #0056b3;
    margin-bottom: 5px;
}

.class-target {
    color: #555;
    margin-bottom: 0;
}

/* 教室説明文 */
.class-description {
    margin-bottom: 20px;
    line-height: 1.6;
}

/* 教室スケジュール表 */
.class-schedule {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

/* テーブルを包むコンテナ - 横スクロール用 */
.table-container {
    width: 100%;
    margin-bottom: 20px;
}

.class-schedule th,
.class-schedule td {
    padding: 12px 15px;
    text-align: left;
    border: 1px solid #ddd;
}

.class-schedule th {
    background-color: #f5f5f5;
    font-weight: 600;
}

.class-schedule tr:hover {
    background-color: #f9f9f9;
}

/* 各教室の説明部分 */
.class-content p {
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

/* 教室情報のテーブルスタイル */
.class-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
}

.class-content table th,
.class-content table td {
    padding: 1rem;
    text-align: left;
    border: 1px solid #ddd;
}

.class-content table th {
    background-color: #f5f5f5;
    font-weight: 600;
}

/* 画像のスタイリング */
.class-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
}

/* 教室セクション間のスペーシング */
.class-content section {
    margin-bottom: 4rem;
    padding-bottom: 2rem;
    border-bottom: 1px dashed #ccc;
}

/* スマホ表示時のレスポンシブ対応 */
@media screen and (max-width: 768px) {
    .page-hero-title {
        font-size: 2rem;
    }

    .content-wrapper {
        flex-direction: column;
    }

    .class-sidebar {
        position: relative;
        top: 0;
        flex: 0 0 100%;
        margin-bottom: 30px;
        margin-right: 0;
    }

    .class-content {
        flex: 0 0 100%;
    }

    .category-title {
        font-size: 1.5rem;
    }

    .class-title {
        font-size: 1.2rem;
    }

    .class-sidebar-nav ul {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }

    .class-sidebar-nav li {
        margin-bottom: 10px;
        flex: 0 0 100%;
    }

    .class-schedule th,
    .class-schedule td {
        padding: 8px;
        font-size: 0.9rem;
    }

    .class-content table th, .class-content table td {}

    .class-card {
        max-width: 300px;
        margin: 0 auto 30px;
    }

    /* スマホでテーブルを横スクロールできるようにする */
    .table-container {
        overflow-x: auto;
        /* 横方向のスクロールを有効化 */
        -webkit-overflow-scrolling: touch;
        /* iOSでのスムーズスクロール */
        margin-bottom: 15px;
        border: 1px solid #eee;
        /* スクロール可能であることを視覚的に示す */
    }

    .class-schedule {
        min-width: 500px;
        /* テーブルの最小幅を設定し、小さな画面でも全体が見えるようにする */
        width: 100%;
        /* 親コンテナより大きくならないようにする */
    }

    /* テーブルセルの調整 */
    .class-schedule th,
    .class-schedule td {
        padding: 8px;
        font-size: 0.9rem;
        white-space: nowrap;
        /* テキストを折り返さない */
    }

    .class-content table th, .class-content table td {
        padding: 0.4rem;
    }
}