/* Site Wrapper */
.site-wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: 280px; /* サイドバーの幅 */
    padding: 24px 24px; /* 上下の余白を圧縮して全体を上に */
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    height: 100%;
    background-color: var(--background-light);
    z-index: 100;
    box-shadow: 0 0 20px rgba(0,0,0,0.04);
    overflow-y: auto; /* はみ出す場合はサイドバー内でスクロール */
}

.left-sidebar {
    left: 0;
    align-items: flex-start;
    border-right: 1px solid var(--border-color);
}

.right-sidebar {
    right: 0;
    align-items: center;
    border-left: 1px solid var(--border-color);
}

/* Main Content */
.main-content {
    flex-grow: 1;
    margin: 20px 280px; /* サイドバーとの間に上下の余白を追加 */
    overflow-y: auto; /* ここでスクロールを有効に */
    overflow-x: hidden; /* 横スクロール抑止 */
    height: 100vh;
    -webkit-overflow-scrolling: touch;
    position: relative;
    z-index: 1;
    background: var(--white); /* 中央カラムを白でカード化 */
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.07);
    padding-bottom: 60px; /* 最下部に余白 */
}

/* 中央カラム内の横幅をスマホ相当に制限 */
.main-content .container {
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

/* 念のため、セクション直下のcontainerにも適用 */
.main-content .section > .container {
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

/* セクションの左右余白を統一 */
.main-content .section {
    padding-left: 20px;
    padding-right: 20px;
}

/* 個別コンポーネントも同幅に寄せる */
.main-content .price-table,
.main-content .voice-container,
.main-content .trainer-profile,
.main-content .access-content,
.main-content .contact-content {
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

/* 画像・バナーのはみ出し防止 */
.main-content .trainer-banner img,
.main-content .feature-image img,
.main-content img,
.main-content iframe {
    width: 100%;
    height: auto;
    display: block;
}

/* メインビジュアルは中央カラムの角丸に沿う */
.main-content .main-visual {
    border-top-left-radius: 18px;
    border-top-right-radius: 18px;
    overflow: hidden; /* 角丸から画像がはみ出さないように */
}

/* Left Sidebar Content */
.sidebar-logo img {
    max-width: 150px;
    margin-bottom: 30px; /* ロゴ下の余白を縮める */
}

.sidebar-tagline {
    margin-top: -36px; /* さらに上に詰める */
    margin-bottom: 24px; /* 下余白も短縮 */
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-light);
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li {
    margin-bottom: 18px; /* 各項目間を少し詰める */
}

.sidebar-nav a {
    text-decoration: none;
    color: var(--text-light);
    font-family: 'Noto Sans JP', sans-serif;
    font-weight: 700;
    font-size: 1.0rem; /* 文字サイズもわずかに縮小 */
    display: flex;
    flex-direction: column;
    transition: color 0.3s ease;
}

.sidebar-nav a:hover {
    color: var(--primary-color);
}

.sidebar-nav a span:last-child {
    font-size: 0.75rem;
    font-weight: 400;
    margin-top: 2px;
}

.sidebar-footer {
    margin-top: auto;
    font-size: 0.8rem;
    color: var(--text-light);
}

/* Right Sidebar Content */
.access-info {
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}

.access-info p {
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.qr-code img {
    width: 120px;
    margin-bottom: 20px;
}

.access-info address {
    font-style: normal;
    font-size: 0.85rem;
    line-height: 1.7;
    color: var(--text-light);
    margin-bottom: 30px;
}

.social-links a {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin: 0 10px;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--accent-color-red);
}

/* Hide sidebars on mobile */
@media (max-width: 1024px) {
    .sidebar {
        display: none;
    }
    .main-content {
        margin: 0;
        width: 100%;
        height: auto;
        overflow: visible;
        border-radius: 0;
        box-shadow: none;
    }
    /* Show original header on mobile */
    .header {
        display: flex !important; /* !importantで表示を強制 */
    }
}

/* Show sidebars on desktop */
@media (min-width: 1025px) {
    .header {
        display: none !important; /* !importantで非表示を強制 */
    }
}
