/* モバイル版のスタイル */
body {
    text-align: left;
    padding: 1rem;
    margin: 0;
    width: 100%; /* 幅を100%に設定 */
    box-sizing: border-box;
    background-color: #f0f0f0;
    overflow-x: hidden; /* 横スクロールを防止 */
    font-size: 14px; /* フォントサイズを小さく調整 */
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ff7e5f, #feb47b); /* ヘッダーと同じグラデーション背景を追加 */
    z-index: -1; /* 背景の後ろに配置 */
}

body {
    overflow-x: hidden; /* 横スクロールを防止 */
}

html, body {
    max-width: 100%; /* 最大幅を100%に設定 */
    overflow-x: hidden; /* 横スクロールを防止 */
}

header {
    flex-direction: column;
    align-items: center;
    padding: 0.5rem; /* パディングを小さく調整 */
    width: 100%;
    box-sizing: border-box;
}

.logo img {
    height: 60px; /* 画像のサイズを小さく調整 */
    width: 60px;
}

nav ul {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
    margin: 0;
    width: 100%;
}

nav ul li {
    margin: 0.5rem 0;
}

@media (max-width: 768px) {
    .background-container {
        margin-top: 20px; /* 上に20pxのマージンを追加 */
    }
}

.background-container {
    height: 50px; /* 背景コンテナの高さを四分の一に調整 */
    width: 100%;
    box-sizing: border-box;
}

.background-image {
    background-size: contain; /* 背景画像のサイズをcontainに変更 */
    background-position: center;
    height: 100%;
    width: 100%;
    background-attachment: scroll; /* 背景画像の固定を解除 */
    background-repeat: no-repeat; /* 背景画像のリピートを排除 */
}

.background-image {
    transition: opacity 0.5s ease-in-out;
}

.fade-out {
    opacity: 0;
}

.fade-in {
    opacity: 1;
}

.background-container .background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

main {
    margin-top: 230px; /* mainセクションの位置をさらに下げる */
}

.image-container, .machine-image-container {
    flex-direction: column;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

.image-container img, .machine-image-container img {
    max-width: 90%;
    margin-bottom: 1rem;
}

footer {
    background-color: rgba(255, 255, 255, 0.8); /* 白透明に設定 */
    color: white;
    text-align: center;
    padding: 1rem 0;
    width: 100%;
    position: fixed; /* フッターを固定 */
    bottom: 0;
    left: 0;
    z-index: 1000;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.reservation-button {
    background-color: #ff7e5f;
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    margin-top: 1rem;
    transition: background-color 0.3s ease;
}

.reservation-button:hover {
    background-color: #feb47b;
}

section {
    background-color: #ffffff;
    margin: 1rem auto;
    padding: 1rem;
    max-width: 100%;
    box-sizing: border-box;
    width: 100%; /* 幅を100%に設定 */
}

section h2, section h3 {
    font-size: 1.2rem; /* 見出しのフォントサイズを小さく調整 */
}

.about-image img {
    max-width: 100%; /* 画像の最大幅を100%に設定 */
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border: 5px solid #ff7e5f;
}

.machine-image-container img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    object-fit: cover;
    border: 5px solid #ff7e5f;
}

.trainer-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    object-fit: cover;
    border: 5px solid #ff7e5f;
}

.reservation-button {
    width: 90%;
    padding: 0.5rem;
    font-size: 1rem;
}

/* モバイル版でコンテンツを中央に配置 */
.container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    height: 100vh;
}

.content {
    width: 90%;
    background-color: #fff;
    padding: 1rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    text-align: center;
}

/* インディケーターの位置を背景画像にかぶせる */
.indicator-container {
    position: absolute;
    bottom: 10px; /* インディケーターを背景画像の下部に配置 */
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 1001;
}

@media (max-width: 768px) {
    .indicator-container {
        position: absolute;
        top: 230px; /* mainセクションの位置に合わせる */
        left: 50%;
        transform: translateX(-50%);
        display: flex;
        gap: 10px;
        z-index: 1001;
    }

    /* モバイル版では背景画像を無効にする */
    body {
        background-image: none;
    }

    body::before {
        background: linear-gradient(135deg, #ff7e5f, #feb47b); /* ヘッダーと同じグラデーション背景を追加 */
    }
}