/* =============================================
   1. ページ全体の強制リセット（機能を維持）
   ============================================= */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh;
    background-color: #f8f9fa;
    /* フォント設定維持 */
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    color: #333;
    /* ★重要：中身を絶対に中央に寄せるための設定 */
    display: flex;
    flex-direction: column;
    align-items: center; 
}

/* 2. ヘッダー */
header {
    width: 100%;
    padding: 60px 20px 20px;
    text-align: center;
    box-sizing: border-box;
}

header h1 {
    margin: 0;
    font-size: 1.8rem;
    color: #2c3e50;
    display: inline-block;
}

/* 3. メインコンテナ（ここが左寄りの原因） */
/* mainタグ自体の幅を固定して真ん中に置きます */
.contact-container {
    display: block !important;
    max-width: 800px !important; 
    width: 92% !important;
    /* ★重要：上下の余白を作りつつ左右を自動で均等にする */
    margin-left: auto !important;
    margin-right: auto !important;
    margin-top: 0;
    margin-bottom: 60px;
    text-align: center;
}

.contact-lead {
    margin-bottom: 30px;
    text-align: center;
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* 4. フォーム外枠（装飾維持） */
.form-wrapper {
    width: 100%;
    background: #ffffff;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-bottom: 50px;
}

/* 5. iframe（レスポンシブ維持） */
iframe {
    display: block;
    width: 100%;
    border: none;
    min-height: 850px; 
}

/* 6. フッター（機能をすべて維持） */
footer {
    width: 100%;
    padding: 50px 20px;
    background-color: #fff;
    border-top: 1px solid #eee;
    box-sizing: border-box;
}

footer nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

footer nav a {
    color: #007bff;
    text-decoration: none;
    font-size: 0.9rem;
    transition: opacity 0.3s;
}

footer nav a:hover {
    opacity: 0.7;
}

/* スマホ用レスポンシブ維持 */
@media (max-width: 600px) {
    header { padding: 40px 10px 10px; }
    header h1 { font-size: 1.5rem; }
    footer nav {
        flex-direction: column;
        align-items: center;
    }
}

.back-button-container {
    margin: 10px 0;
    text-align: center;
}

.back-button {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: #888;          /* 初期カラー */
    font-size: 0.9rem;
    letter-spacing: 0.15em;
    position: relative;   /* 下線の基準 */
    padding: 10px 15px;
    transition: color 0.3s ease;
    cursor: pointer;
}

/* 矢印のデザイン */
.back-button .arrow {
    margin-right: 8px;
    display: inline-block;
    transition: transform 0.3s ease; /* 動きを滑らかに */
}

/* ホバー時の挙動 */
.back-button:hover {
    color: #000;          /* 文字を黒にする */
}

.back-button:hover .arrow {
    transform: translateX(-5px); /* 矢印を左に動かす */
}

/* 下線のアニメーション設定 */
.back-button::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;             /* 最初は線なし */
    height: 1px;
    background: #333;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.back-button:hover::after {
    width: 100%;          /* ホバーで線が伸びる */
}
