/* ---------------------------------------------------------------------- */
/* 0. CSS変数定義 & リセットCSS */
/* ---------------------------------------------------------------------- */
:root {
    /* 色の定義（ここを変えるだけでサイト全体の色が変わります） */
    --main-color: #4A235A;   /* 紫 */
    --accent-color: #D4AC0D; /* 金 */
    --accent-hover: #e6c533; /* 明るい金 */
    --bg-color: #F5F5F0;     /* 生成り色 */
    --text-color: #333333;   /* 黒に近いグレー */
    --white: #ffffff;
    
    /* フォントの定義 */
    --main-font: "Hiragino Kaku Gothic ProN", "メイリオ", sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

a {
    text-decoration: none;
    color: inherit;
}

li {
    list-style: none;
}

html {
    scroll-behavior: smooth;
}

/* ---------------------------------------------------------------------- */
/* 1. 全体の基本設定 */
/* ---------------------------------------------------------------------- */
body {
    background-color: var(--bg-color);
    font-family: var(--main-font);
    color: var(--text-color);
}

/* ユーティリティクラス（HTMLからstyle属性を消すために追加） */
.center-btn-container {
    text-align: center;
    margin-top: 40px;
}

.mt-large {
    margin-top: 80px;
}

.mt-mid {
    margin-top: 30px;
}

.reviews-section {
    background-color: #f9f9f9;
}

/* ---------------------------------------------------------------------- */
/* 2. ヘッダー */
/* ---------------------------------------------------------------------- */
.main-header {
    background-color: var(--main-color);
    color: var(--bg-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative; /* スマホ時の基準点 */
    z-index: 100;
}

.logo {
    font-size: 40px;
    font-weight: bold;
    letter-spacing: 2px;
}

.hamburger-menu-button {
    display: none; /* PCでは非表示 */
}

.main-nav ul {
    display: flex;
    gap: 30px;
}

.main-nav a:hover {
    opacity: 0.8;
}

.cta-button {
    background-color: var(--accent-color);
    color: var(--main-color);
    padding: 8px 15px;
    border-radius: 4px;
    font-weight: bold;
    transition: background-color 0.3s;
    border: none;
    cursor: pointer;
    display: inline-block; /* リンクでもボタンでも同じ見た目に */
}

.cta-button:hover {
    background-color: var(--accent-hover);
}

/* ---------------------------------------------------------------------- */
/* 3. メインビジュアル */
/* ---------------------------------------------------------------------- */
.hero {
    background-image: url('hero.jpg');
    background-size: cover;
    background-position: center;
    height: 70vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--bg-color);
    position: relative;
    z-index: 1;
}

/* 背景を暗くするフィルター */
.hero::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: 2;
}

.hero-content {
    padding: 40px;
    border-radius: 10px;
    z-index: 3;
    position: relative;
}

.catchphrase-small {
    font-size: 18px;
    margin-bottom: 10px;
}

.catchphrase-main {
    font-size: 48px;
    margin-bottom: 20px;
    font-family: serif;
    font-weight: 300;
    color: #ffffff;
}

.tagline {
    font-size: 16px;
}

/* ---------------------------------------------------------------------- */
/* 4. 運勢ボタン */
/* ---------------------------------------------------------------------- */
#fortune-button {
    font-size: 20px;
    padding: 12px 30px;
    margin-top: 25px;
    border-radius: 5px;
}

#fortune-result {
    margin-top: 15px;
    font-size: 20px;
    font-weight: bold;
    color: #FFD700;
    min-height: 25px;
}

/* ---------------------------------------------------------------------- */
/* 5. 鑑定メニュー */
/* ---------------------------------------------------------------------- */
.section-padding {
    padding: 80px 5%; 
    text-align: center;
}

h2 {
    font-size: 32px;
    margin-bottom: 5px;
    color: var(--main-color);
}

.section-subtitle {
    margin-bottom: 40px;
    color: #666;
}

/* メニューカード一覧 */
.menu-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 50px;
}

.menu-item {
    background-color: #F8F4FA; 
    padding: 25px;
    border-radius: 8px;
    border-left: 5px solid var(--main-color);
    text-align: left;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.menu-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.menu-item h3 {
    color: var(--main-color);
    margin-bottom: 15px;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 5px;
}

.price {
    font-size: 24px;
    font-weight: bold;
    color: var(--accent-color);
    margin-top: 5px;
    margin-bottom: 15px;
}

/* 鑑定手法ボックス */
.method-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 30px;
}

.method-box {
    border: 1px solid #E0E0E0;
    padding: 20px;
    border-radius: 6px;
    text-align: left;
    background-color: var(--white);
}

.method-box h3 {
    color: var(--main-color);
    border-bottom: 1px dashed var(--main-color);
    padding-bottom: 5px;
}

/* ---------------------------------------------------------------------- */
/* 6. プロフィール */
/* ---------------------------------------------------------------------- */
.profile-container {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    gap: 50px;
    align-items: flex-start;
    text-align: left;
}

.profile-photo {
    flex-basis: 300px;
    flex-shrink: 0;
}

.profile-img {
    border-radius: 50%;
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: 20px;
}

.profile-text {
    flex-grow: 1;
}

.profile-text h3 {
    color: var(--main-color);
    margin-top: 0;
    margin-bottom: 10px;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 5px;
}

.profile-text p {
    margin-bottom: 20px;
}

/* ---------------------------------------------------------------------- */
/* 7. お客様の声 */
/* ---------------------------------------------------------------------- */
.reviews-container {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.review-item {
    width: 45%;
    min-width: 300px;
}

.review-bubble {
    background-color: var(--white);
    padding: 20px;
    border-radius: 10px;
    position: relative;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    text-align: left;
    line-height: 1.6;
}

.review-bubble::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 30px;
    border-top: 10px solid var(--white);
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
}

.reviewer-name {
    font-weight: bold;
    color: var(--main-color);
}

/* ---------------------------------------------------------------------- */
/* 8. アクセス */
/* ---------------------------------------------------------------------- */
.access-container {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    margin-top: 40px;
}

.access-info {
    flex-basis: 40%;
    padding-right: 20px;
    text-align: left;
}

.map-area {
    flex-basis: 60%;
}

.map-placeholder {
    width: 100%;
    height: 350px;
    background-color: #E0E0E0;
    border: 1px solid #C0C0C0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #666;
    font-size: 14px;
}

.access-info h3 {
    color: var(--main-color);
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 5px;
    margin-bottom: 15px;
}

.access-info p {
    line-height: 1.8;
}

.access-info .note {
    font-size: 13px;
    color: #888;
    margin-top: 10px;
}

/* フッター */
#main-footer {
    background-color: var(--main-color);
    color: var(--bg-color);
    text-align: center;
    padding: 20px;
    font-size: 14px;
    margin-top: 50px;
}

/* ---------------------------------------------------------------------- */
/* 9. 予約モーダルウィンドウ */
/* ---------------------------------------------------------------------- */
.modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    padding-top: 50px;
}

.modal.open {
    display: block;
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: var(--main-color);
}

.modal-content input[type="text"],
.modal-content input[type="email"],
.modal-content input[type="datetime-local"],
.modal-content select,
.modal-content textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.modal-content textarea {
    resize: vertical;
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
}

.close-button:hover {
    color: #333;
}

/* ---------------------------------------------------------------------- */
/* 10. トップに戻るボタン */
/* ---------------------------------------------------------------------- */
#scroll-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    line-height: 50px;
    text-align: center;
    background-color: var(--accent-color);
    color: var(--main-color);
    border: none;
    border-radius: 50%;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    display: none;
    z-index: 90;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease;
}

#scroll-to-top:hover {
    background-color: var(--accent-hover);
}

/* ====================================================================== */
/* 11. スマホ・タブレット専用スタイル (レスポンシブ対応) */
/* ====================================================================== */
@media (max-width: 768px) {
    /* --- ヘッダー & ナビゲーション --- */
    .main-header {
        position: relative;
        display: block;
        padding: 15px;
        height: auto;
    }
    /* メインビジュアルの高さ調整 */
    .hero {
        /* スマホでは高さを固定(70vh)すると文字が溢れるので、auto(自動)にする */
        height: auto; 
        /* 最低でも少しは高さがあるようにする */
        min-height: 60vh; 
        /* 上下に余白を入れて、ヘッダーとの重なりを防ぐ */
        padding-top: 60px;
        padding-bottom: 60px;
    }

    /* 文字サイズの微調整（もし文字が大きすぎる場合） */
    .catchphrase-main {
        font-size: 32px; /* 少し小さくして収まりを良くする */
    }
    .logo {
        display: inline-block;
        font-size: 24px;
        width: 100%;
        text-align: left;
    }

    .hamburger-menu-button {
        display: block;
        position: absolute;
        top: 15px;
        right: 15px;
        width: 30px;
        height: 30px;
        background: none;
        border: none;
        cursor: pointer;
        z-index: 20;
    }

    .hamburger-menu-button span {
        display: block;
        width: 100%;
        height: 2px;
        background-color: var(--bg-color);
        margin-bottom: 6px;
        transition: transform 0.3s, opacity 0.3s;
    }

    /* ハンバーガーアニメーション */
    .hamburger-menu-button.open span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .hamburger-menu-button.open span:nth-child(2) {
        opacity: 0;
    }
    .hamburger-menu-button.open span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .main-nav {
        position: fixed;
        top: 0; left: 0;
        width: 100%;
        height: 100vh;
        background-color: rgba(74, 35, 90, 0.95);
        z-index: 15;
        transform: translateX(-100%);
        transition: transform 0.4s ease-out;
    }
    
    .main-nav.open {
        transform: translateX(0%);
    }
    
    .main-nav ul {
        flex-direction: column;
        padding: 100px 0 0 0;
        gap: 20px;
        align-items: center;
    }
    
    .main-nav ul li .cta-button {
        display: block;
        width: 200px;
        margin-top: 20px;
    }

    /* --- レイアウト調整 (Grid/Flex解除) --- */
    .menu-list, 
    .method-container,
    .access-container,
    .profile-container {
        display: block; /* 強制的に縦並び */
        grid-template-columns: none;
    }

    .menu-item, 
    .method-box {
        margin-bottom: 20px;
    }
    
    .profile-photo {
        margin: 0 auto 20px auto;
        width: 80%;
    }
    
    .profile-text {
        text-align: left;
    }
    
    /* アクセス情報の調整 */
    .access-info {
        margin-bottom: 30px;
    }
    
    /* 予約ボタンの調整 */
    .access-info .cta-button {
        display: block;
        width: 85%;
        max-width: 300px;
        margin: 20px auto 30px auto;
        text-align: center;
    }

    /* モーダル */
    .modal-content {
        margin: 20px auto;
    }
}

/* --- スマホ横向き (ランドスケープ) --- */
@media screen and (max-height: 480px) and (orientation: landscape) {
    .main-header {
        padding: 5px 15px;
        display: flex;
    }
    .logo {
        font-size: 20px;
        width: auto;
    }
    .main-nav {
        display: block;
        position: static;
        height: auto;
        width: auto;
        background: none;
        transform: none;
    }
    .main-nav ul {
        flex-direction: row;
        padding: 0;
        gap: 15px;
    }
    .main-nav a {
        font-size: 12px;
    }
    .hamburger-menu-button {
        display: none;
    }
    .hero {
        height: 100vh;
        padding-top: 50px;
    }
    .catchphrase-main {
        font-size: 28px;
    }
}