/* ▼▼▼ 配色設定（エステサロン向け：清潔感のあるベージュ・ホワイト基調に変更） ▼▼▼ */
:root {
    --bg: #fdfdfd;      /* 背景色：オフホワイト */
    --text: #5d5d5d;    /* 文字色：ダークグレー */
    --gold: #bfa37e;    /* アクセント：落ち着いたゴールド */
    --light-bg: #f4f1ea; /* サブ背景色：薄いベージュ */
    --border: #e0e0e0;  /* 境界線 */
}

body {
    margin: 0; padding: 0;
    background: var(--bg); color: var(--text);
    font-family: 'Cormorant Garamond', 'Noto Serif JP', serif;
    overflow-x: hidden;
}

/* 共通設定 */
a { text-decoration: none; color: inherit; transition: 0.3s; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 5%; }

/* ヘッダー */
header {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 100;
    padding: 2rem 5%; display: flex; justify-content: space-between; align-items: center;
    /* 背景が白になるため、反転色で見やすくする */
    mix-blend-mode: difference; color: #fff;
}
.brand { font-size: 1.5rem; letter-spacing: 0.2em; text-transform: uppercase; font-weight: 600; }
.menu-btn { font-size: 0.9rem; letter-spacing: 0.1em; cursor: pointer; border-bottom: 1px solid transparent; }
.menu-btn:hover { border-bottom-color: #fff; }

/* ヒーローセクション */
.hero {
    height: 100vh; position: relative; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
}
.hero-bg-wrap {
    position: absolute; top: 0; left: 0; width: 100%; height: 120%;
    transform: translateY(0);
    z-index: 0;
}
.hero-slide {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover; 
    /* エステなので少し明るく清潔感を出すためフィルターを調整 */
    filter: brightness(0.85);
    opacity: 0; transition: opacity 2s ease-in-out;
}
.hero-slide.active { opacity: 1; }

.hero-content {
    position: relative; z-index: 1; text-align: center;
    opacity: 0; transform: translateY(30px); animation: fadeUp 1.5s ease forwards 0.5s;
    /* 白背景用に見やすく文字影を追加 */
    text-shadow: 0 2px 10px rgba(0,0,0,0.1);
    mix-blend-mode: difference; color: #fff; 
}
.hero-title { font-size: 4rem; margin: 0; letter-spacing: 0.1em; line-height: 1.2; font-weight: 300; }
.hero-sub { display: block; margin-top: 1.5rem; font-size: 1.1rem; letter-spacing: 0.3em; color: #fff; opacity: 0.9; }

/* コンセプト */
/* 余白を調整: 10rem -> 5rem */
.concept { padding: 5rem 0; text-align: center; background: var(--bg); }
.c-lead { font-size: 2rem; line-height: 2; margin-bottom: 3rem; color: #333; }
.c-desc { font-size: 1rem; line-height: 2.2; color: #777; max-width: 600px; margin: 0 auto; }

/* メニュー（旧プロジェクト）セクション */
/* 余白を調整: 5rem -> 3rem */
.projects-sec { background: #fff; padding: 3rem 0; }
.sec-title {
    font-size: 3rem; text-align: center; margin-bottom: 5rem; color: var(--gold);
    font-weight: 300;
}

.p-item {
    display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center;
    margin-bottom: 10rem;
}
.p-item:nth-child(even) { direction: rtl; } 
.p-item:nth-child(even) .p-info { direction: ltr; } 

.p-img-wrap { overflow: hidden; height: 60vh; position: relative; }
/* ★修正：heightを120%から100%に変更し、transitionを削除 */
.p-img { width: 100%; height: 100%; object-fit: cover; }

/* ★追加修正：セラピスト画像（3番目のアイテム）の顔が切れないように表示位置を上に合わせる */
.p-item:nth-of-type(3) .p-img {
    object-position: top center;
}

.p-info { padding: 0 2rem; }
.p-loc { color: var(--gold); letter-spacing: 0.2em; font-size: 0.9rem; display: block; margin-bottom: 1rem; }
.p-name { font-size: 2.2rem; margin: 0 0 1.5rem; color: #333; }
.p-text { color: #888; line-height: 1.8; margin-bottom: 2rem; }
.p-link { border-bottom: 1px solid #333; padding-bottom: 5px; font-size: 0.9rem; cursor: pointer; color: #333; }
.p-link:hover { opacity: 0.6; }

/* ニュースリスト */
.news-sec { padding: 8rem 0; background: var(--light-bg); }
.news-row {
    display: flex; border-top: 1px solid #ccc; padding: 2rem 0;
    transition: 0.3s; cursor: pointer; color: #444;
}
.news-row:last-child { border-bottom: 1px solid #ccc; }
.news-row:hover { padding-left: 2rem; background: #fff; }
.n-date { width: 150px; color: var(--gold); font-family: sans-serif; font-size: 0.9rem; }
.n-title { font-size: 1.1rem; }

/* 店舗情報エリア */
.company-sec {
    padding: 6rem 0; background: #fff; border-top: 1px solid var(--border);
}
.comp-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 4rem;
}
.comp-title { font-size: 1.5rem; color: var(--gold); margin-bottom: 2rem; letter-spacing: 0.1em; }
.comp-row { display: flex; margin-bottom: 1.5rem; border-bottom: 1px solid #eee; padding-bottom: 1rem; }
.comp-th { width: 150px; color: #999; font-size: 0.9rem; }
/* 住所・営業時間などのフォントを統一 */
.comp-td { 
    flex: 1; 
    color: #444; 
    font-family: 'Lato', 'Noto Serif JP', sans-serif; /* Latoと日本語フォントを併用 */
}

/* ★問い合わせボタン用スタイル */
.contact-btn {
    display: inline-block;
    padding: 1rem 3rem;
    border: 1px solid var(--gold);
    color: #333;
    font-size: 1rem;
    letter-spacing: 0.1em;
    background: #fff;
    transition: 0.3s;
    font-family: 'Noto Serif JP', serif;
    text-decoration: none;
    cursor: pointer;
}
.contact-btn:hover {
    background: var(--gold);
    color: #fff;
    border-color: var(--gold);
}

/* フッター */
footer { padding: 5rem 0; text-align: center; border-top: 1px solid #eee; font-size: 0.9rem; color: #999; background: #fff; }

/* --- モーダル --- */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(255,255,255,0.6); backdrop-filter: blur(8px);
    z-index: 1000; opacity: 0; pointer-events: none;
    transition: opacity 0.5s ease;
    display: flex; align-items: center; justify-content: center;
}
.modal-overlay.active { opacity: 1; pointer-events: all; }

.modal-container {
    background: #fff; width: 90%; max-width: 1000px; height: 80vh;
    border: 1px solid #eee;
    /* 画像とコンテンツの比率 (0.8fr : 1.2fr) */
    display: grid; grid-template-columns: 0.8fr 1.2fr;
    transform: translateY(30px); transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
}
.modal-overlay.active .modal-container { transform: translateY(0); }

.modal-close {
    position: absolute; top: 1.5rem; right: 2rem;
    z-index: 10;
    width: 48px; height: 48px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid rgba(0,0,0, 0.1);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    font-size: 1.5rem; color: #333; 
    cursor: pointer; 
    line-height: 1; opacity: 1; 
    transition: 0.3s;
}
.modal-close:hover { 
    background: #333; color: #fff;
    border-color: #333;
        }

.modal-img-box {
    position: relative; overflow: hidden; height: 100%; background: #f0f0f0;
}
/* 通常画像（スライドショーでない場合） */
.modal-img {
    width: 100%; height: 100%; object-fit: cover;
    cursor: pointer;
    position: relative; z-index: 1;
}

/* スライドショー画像用スタイル */
.modal-slide {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0; transition: opacity 1.5s ease-in-out;
    z-index: 0;
}
.modal-slide.active { opacity: 1; z-index: 1; }

/* コンテンツエリア設定 */
.modal-content-box {
    /* 上下の余白を大幅に削減 (4rem -> 1.5rem) */
    padding: 1.5rem 3rem; 
    overflow-y: auto;
    display: flex; 
    flex-direction: column; 
    justify-content: flex-start;
    background: #fff;
}

.m-desc { color: #666; line-height: 2; font-size: 0.95rem; margin-bottom: 2rem; text-align: justify; }

/* モーダル内のリスト用スタイル */
.menu-list { list-style: none; padding: 0; margin: 0 0 2rem; }
.menu-item { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1px solid #eee; padding: 0.8rem 0; }

/* フォント設定 */
.menu-name { 
    font-weight: 500; 
    color: #444; 
    font-family: 'Lato', 'Noto Serif JP', sans-serif;
}
.menu-price { 
    color: var(--gold); 
    font-family: 'Lato', sans-serif;
    font-weight: 700; 
    font-size: 1.1rem; 
    letter-spacing: 0.05em;
}

@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }

/* ★修正：ブレークポイントを768pxから1024pxに変更し、タブレットでもスマホレイアウトを適用 */
@media (max-width: 1024px) {
    .hero-title { font-size: 2.5rem; }
    .c-lead { font-size: 1.4rem; }
    .menu-btn { display: none; }
    
    .p-item, .p-item:nth-child(even) { grid-template-columns: 1fr; direction: ltr; gap: 2rem; }
    .p-img-wrap { height: 40vh; }
    .p-info { padding: 0; }
    .news-row { flex-direction: column; }
    .n-date { margin-bottom: 0.5rem; }
    .comp-grid { grid-template-columns: 1fr; gap: 2rem; }

    /* ★追加修正：タブレット・スマホではセラピスト画像を中央寄せに戻して、顔と体のバランスを調整 */
    .p-item:nth-of-type(3) .p-img {
        /* 頭が切れないよう、さらに上部（10%の位置）を基準に表示 */
        object-position: center 10%;
    }

    /* ★追加修正：スマホ・タブレットでRESERVATIONエリアと問い合わせボタンを中央寄せ */
    .comp-grid > div:last-child {
        text-align: center;
    }

    /* ★スマホ・タブレット版モーダル設定 */
    .modal-container { 
        display: block; 
        height: 85vh; 
        overflow-y: auto; /* ★全体をスクロール可能に変更 (hidden -> auto) */
        -webkit-overflow-scrolling: touch;
    }
    .modal-img-box { 
        display: none; 
    }
    /* サロン空間など、画像をスマホでも見せたい場合のクラス */
    .modal-container.show-sp-img .modal-img-box {
        display: block;
        height: 35vh; /* スマホでの画像高さ */
        /* 固定化させないため、position指定などはせず自然に配置 */
    }
    .modal-container.show-sp-img .modal-content-box {
        height: auto; /* ★高さ固定を解除し、コンテンツ量に応じる */
    }

    .modal-content-box { 
        height: auto; /* ★高さ固定を解除 */
        box-sizing: border-box;
        display: block; 
        padding: 4rem 1.5rem 10rem; 
        overflow: visible; /* ★内部スクロールを解除し、親コンテナでスクロールさせる */
    }
    .m-title { font-size: 1.8rem; }
}