/* style.css (最終修正版コード) */

/* --- 1. 基本設定：カラーとフォントの定義 --- */
@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400..700;1,400..700&family=Poppins:wght@300;400;600&display=swap');

:root {
    --bg-color: #F7F5F2;
    --text-color: #333333;
    --accent-color: #C0A172;
    --sub-color: #ffffff;
    --border-color: #e8e8e8;
    --font-heading: 'Lora', serif;
    --font-body: 'Poppins', 'Noto Sans JP', sans-serif;
}

/* --- 2. 【重要】レイアウト崩れを防ぐためのグローバル設定 --- */
html {
    box-sizing: border-box;
}
*, *:before, *:after {
    box-sizing: inherit; /* paddingとborderを要素の幅に含める */
}
body {
    overflow-x: hidden; /* ★★★ これがページ全体の横スクロールを強制的に防ぎます */
}


/* --- 3. 全体の基本スタイル --- */
html { font-size: 16px; }
body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 全ての画像とiframeがコンテナをはみ出さないように設定 */
img, iframe {
    max-width: 100%;
    height: auto;
}

h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); font-weight: 600; }
h2 { font-size: 2.5rem; text-align: center; margin-top: 0; margin-bottom: 3rem; }
h3 { font-size: 1.8rem; text-align: center; margin-top: 0; margin-bottom: 2rem; }
h3 small { font-family: var(--font-body); font-size: 0.9rem; font-weight: 400; color: #777; margin-left: 0.5rem; display: block; }
a { color: var(--accent-color); text-decoration: none; transition: color 0.3s; }
a:hover { color: #a5885b; }

main { padding: 0; width: 100%; }

section {
    background-color: var(--sub-color);
    box-shadow: 0 8px 30px rgba(0,0,0,0.06);
    margin: 4rem auto;
    padding: 4rem;
    max-width: 1100px;
    border-radius: 12px;
}
section:first-of-type { margin-top: 0; }
section + section { margin-top: 4rem; }


/* --- 4. ヘッダー --- */
header {
    background-color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}
header .header-title { display: flex; align-items: center; gap: 15px; }
header .header-title img { max-height: 50px; }
header h1 { font-size: 1.5rem; margin: 0; }
header .header-buttons { display: flex; gap: 25px; }
header .header-button { color: var(--text-color); font-weight: 600; padding: 5px; }
header .header-button:hover { color: var(--accent-color); }


/* --- 5. ヒーローセクション (#top) --- */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 5rem 2rem;
    margin: 0;
    max-width: 100%;
    width: 100vw; /* 画面幅ぴったりに設定 */
    border-radius: 0;
    background-image: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.3)), url('gallery4.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    box-shadow: none;
}
.hero h2 { color: white; font-size: 3.5rem; }
.hero p { font-size: 1.1rem; max-width: 600px; margin: 1rem auto 2rem; }
.new-member-benefits {
    background-color: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    text-align: left;
    padding: 1.5rem;
    max-width: 500px;
    margin: 2rem auto;
    backdrop-filter: blur(5px);
}
.new-member-benefits h3 { color: white; font-size: 1.2rem; }
.new-member-benefits p { font-size: 1rem; margin-bottom: 1rem; }

/* --- 6. ボタン --- */
.button {
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 600;
    display: inline-block;
    border: 2px solid transparent;
    transition: all 0.3s;
    margin: 0.5rem;
}
.button-primary { background-color: var(--accent-color); color: white; }
.button-primary:hover { background-color: #a5885b; color: white; }
.button-secondary { background-color: transparent; border-color: white; color: white; }
.button-secondary:hover { background-color: white; color: var(--text-color); }


/* --- 7. マシン紹介と料金表 --- */
.machine-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.machine { border: 1px solid var(--border-color); padding: 1.5rem; border-radius: 8px; text-align: center; background-color: white; }
.machine h4 { font-size: 1.4rem; }
.table-responsive-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.price-list table { width: 100%; border-collapse: collapse; margin-top: 2rem; min-width: 600px; }
.price-list th, .price-list td { border: none; padding: 1rem; text-align: left; border-bottom: 1px solid var(--border-color); }
.price-list th { font-family: var(--font-body); font-weight: 600; font-size: 0.9rem; color: #777; text-transform: uppercase; }
.price-list td[rowspan] { vertical-align: middle; text-align: center; width: 200px; }
.price-list .machine-name { font-family: var(--font-heading); font-weight: 600; font-size: 1.2rem; display: block; }


/* --- 8. ギャラリー --- */
.gallery-images { display: flex; gap: 1rem; overflow-x: auto; padding-bottom: 1rem; }
.gallery-images img {
    height: 250px;
    width: auto;
    flex-shrink: 0;
    object-fit: cover;
    border-radius: 8px;
}


/* --- 9. レスポンシブ対応 (スマートフォン向け) --- */
@media screen and (max-width: 768px) {
    html { font-size: 15px; }
    h2 { font-size: 1.8rem; margin-bottom: 2rem;}
    section { padding: 2rem 1.5rem; margin: 2rem auto; }
    section + section { margin-top: 2rem; }
    
    header { padding: 0.75rem 1rem; flex-wrap: wrap; }
    header .header-title { order: 1; }
    header .header-buttons { order: 2; width: 100%; justify-content: flex-start; gap: 10px; margin-top: 0.5rem; overflow-x: auto; padding-bottom: 0.5rem;}
    header .header-button { font-size: 0.9rem; flex-shrink: 0; }
    
    .hero { padding: 4rem 1.5rem; min-height: 60vh; }
    .hero h2 { font-size: 2.2rem; }
    .hero p { font-size: 1rem; }
    
    .button { padding: 12px 28px; }
    
    .machine-grid { grid-template-columns: 1fr; }
}
/* 【修正】予約セクションのスクロールをなくす */

#reservation iframe {
    width: 100%;
    height: 800px; /* 予約フォームの固有の高さを設定 */
    border: 1px solid var(--border-color); /* デザイン統一のため枠線を追加 */
    border-radius: 8px; /* 角を丸くする */
}