/* ---------------------------------------------------- */
/* 1. 基本的なリセットとフォント設定 */
/* ---------------------------------------------------- */
body {
    font-family: 'Arial', sans-serif;
    background-color: #f4f7f6; /* 薄い背景色 */
    margin: 0;
    color: #333; /* 基本のテキストカラー */
    overflow-x: hidden;
}

/* 🔥 修正: ヘッダーの高さ(50px) + 上部の余白(20px) = 70px をパディングとして設定 */
.page-container {
    display: flex;
    justify-content: center;
    align-items: flex-start; /* 上部に寄せる */
    min-height: 100vh;
    padding: 70px 20px 20px; 
    box-sizing: border-box;
    width: 100%; /* Flexコンテナとして幅を確保 */
}
/* index.htmlはbody全体をflexコンテナとして使っていたため、bodyタグに直接適用 */
body.index-page {
    display: flex;
    justify-content: center;
    padding: 70px 20px 20px;
}


/* ---------------------------------------------------- */
/* 2. サービスカラーと共通コンポーネント (省略) */
/* ---------------------------------------------------- */

:root {
    --main-color: #5cb85c;
    --main-color-hover: #4cae4c;
    --text-color: #333;
    --sub-text-color: #555;
}
/* (中略: input, button, a の共通スタイル) */
.main-button {
    width: 100%;
    padding: 12px;
    background-color: var(--main-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: bold;
    margin-top: 10px;
    transition: background-color 0.3s;
}
.main-button:hover {
    background-color: var(--main-color-hover);
}

/* ---------------------------------------------------- */
/* 3. ヘッダーとメニューのスタイル (index.htmlから流用) */
/* ---------------------------------------------------- */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background-color: #333;
    color: white;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    /* 🔥 修正点 1: box-sizingを適用して、paddingを含めた幅を100%に */
    box-sizing: border-box; 
    z-index: 1000;
    height: 50px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); 
    
    /* 🔥 修正点 2: 画面幅をわずかに超えるのを防ぐ最終手段 */
    max-width: 100vw; 
}
.header-title {
    font-size: 1.4em; /* サイズアップ */
    font-weight: bold;
    text-decoration: none;
    color: white;
}
.menu-button {
    background: none;
    border: none;
    color: white;
    font-size: 1.8em;
    cursor: pointer;
    padding: 0 5px;
    line-height: 1;
}
#main-menu {
    position: fixed;
    top: 50px;
    right: 0;
    width: 280px; /* 少し広く */
    height: calc(100% - 50px);
    background-color: white;
    box-shadow: -4px 0 10px rgba(0, 0, 0, 0.2);
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    z-index: 999;
}
#main-menu.open {
    transform: translateX(0);
}
#main-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
#main-menu ul li a {
    display: block;
    padding: 18px 25px; /* パディング増加 */
    text-decoration: none;
    color: var(--text-color);
    border-bottom: 1px solid #eee;
    font-size: 1.1em;
}
#main-menu ul li a:hover {
    background-color: #f7f7f7;
    color: var(--main-color);
}