/*
Theme Name: 碧海楼 (Hekikairou)
Author: Gemini Partner
Description: 観光ホテル「碧海楼」デモサイト用テーマ
Version: 1.5
*/

/* -----------------------------------------------------------
  1. リセット & 基本設定
----------------------------------------------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Yu Mincho", "MS Mincho", serif;
    color: #333;
    line-height: 1.8;
    background-color: #fff;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

a:hover {
    opacity: 0.7;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* -----------------------------------------------------------
  2. ヘッダー
----------------------------------------------------------- */
.site-header {
    position: absolute;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 100;
    padding: 40px 0; /* ロゴが大きくなるので上下余白を少し広げました */
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center; /* 大きくなったロゴとメニューの高さ中央を合わせる */
}

.logo {
    font-size: 3rem; /* ご要望通り 3rem に拡大 */
    font-weight: normal;
    letter-spacing: 0.3em;
    line-height: 1.2;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 40px;
    align-items: center;
}

/* -----------------------------------------------------------
  3. メインビジュアル (PC)
----------------------------------------------------------- */
.main-visual {
    height: 100vh;
    width: 100%;
    background-image: linear-gradient(rgba(0,0,0,0.1), rgba(0,0,0,0.1)), 
                      url('images/main-visual.jpg');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.mv-text {
    writing-mode: vertical-rl;
    text-orientation: upright;
    letter-spacing: 0.6em;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    line-height: 1.5;
    text-shadow: 0 0 20px rgba(0,0,0,0.3);
}

/* -----------------------------------------------------------
  4. コンセプト & 魅力セクション
----------------------------------------------------------- */
.concept { padding: 120px 0; text-align: center; }
.section-title { text-align: center; margin-bottom: 50px; }
.sub-title { display: block; font-size: 0.8rem; letter-spacing: 0.3em; color: #999; margin-bottom: 15px; }
.concept h3 { font-size: 2rem; margin-bottom: 40px; font-weight: normal; letter-spacing: 0.2em; }
.concept p { max-width: 600px; margin: 0 auto; color: #555; }

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 50px;
    padding-bottom: 120px;
}

.feature-img {
    width: 100%;
    height: 350px;
    margin-bottom: 25px;
    background-size: cover;
    background-position: center;
    transition: all 0.4s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.feature-item:hover .feature-img {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

/* 画像割り当て */
.rooms-img { background-image: url('images/room.jpg'); }
.cuisine-img { background-image: url('images/cuisine.jpg'); }
.onsen-img { background-image: url('images/onsen.jpg'); }

/* -----------------------------------------------------------
  5. お知らせ
----------------------------------------------------------- */
.news { padding: 100px 0; }
.news-list { list-style: none; border-top: 1px solid #eee; }
.news-list li {
    padding: 20px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    gap: 30px;
    align-items: center;
}
.news-list .date { color: #999; font-size: 0.9rem; }
.news-list .category { background: #f4f4f4; padding: 2px 10px; font-size: 0.7rem; color: #666; }
.news-list li a { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* -----------------------------------------------------------
  6. アクセス & お問い合わせ
----------------------------------------------------------- */
.access-contact { display: grid; grid-template-columns: 1.5fr 1fr; gap: 80px; padding-bottom: 120px; }
.map-wrapper { width: 100%; height: 350px; margin-bottom: 20px; }
.map-wrapper iframe { width: 100%; height: 100%; filter: grayscale(0.3); }
.contact-box { background: #f9f9f9; padding: 40px; text-align: center; }

.btn-contact {
    display: inline-block;
    background: #333;
    color: #fff;
    padding: 15px 40px;
    margin: 30px 0;
    letter-spacing: 0.1em;
}

.tel { font-size: 1.5rem; letter-spacing: 0.1em; margin-top: 10px; }

/* -----------------------------------------------------------
  7. フッター (NEW)
----------------------------------------------------------- */
.site-footer {
    background: #333;
    color: #fff;
    padding: 60px 0 20px;
}
.footer-flex {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 40px;
}
.footer-info .logo { font-size: 1.5rem; margin-bottom: 15px; }
.footer-info p { font-size: 0.85rem; color: #ccc; }
.footer-nav ul { list-style: none; display: flex; gap: 20px; }
.footer-nav a { font-size: 0.85rem; }
.copyright {
    text-align: center;
    font-size: 0.7rem;
    color: #888;
    border-top: 1px solid #444;
    padding-top: 20px;
}
.copyright {
    text-align: center;
    font-size: 0.75rem;
    color: #888;
    border-top: 1px solid #444;
    padding: 25px 20px; /* 上下の余白を少し増やして文字が呼吸できるようにします */
    line-height: 1.6;
}

/* -----------------------------------------------------------
  8. フォーム (page-contact.php用)
----------------------------------------------------------- */
.form-item { margin-bottom: 30px; text-align: left; }
.form-item label { display: block; font-size: 0.9rem; margin-bottom: 10px; font-weight: bold; }
.form-item label span { background: #e6b422; color: #fff; font-size: 0.6rem; padding: 2px 6px; margin-left: 10px; }
.form-item input, .form-item textarea { width: 100%; padding: 15px; border: 1px solid #ddd; background: #fcfcfc; }

/* -----------------------------------------------------------
  9. レスポンシブ対応 (スマホ専用)
----------------------------------------------------------- */
@media screen and (max-width: 768px) {
    /* ヘッダーを少しコンパクトにする */
    .site-header { padding: 15px 0; }
    .header-flex { padding: 0 15px; }
    .logo { font-size: 1.1rem; }
    .main-nav ul { gap: 10px; font-size: 0.7rem; }

    /* メインビジュアル：重なりを防ぐための調整 */
    .main-visual { 
        align-items: flex-end; 
        padding-bottom: 15%; 
        background-position: 35% center; 
    }

    .mv-text { 
        font-size: 1.1rem; 
        line-height: 1.4; 
        margin-left: 30%; 
        text-shadow: 0 0 15px rgba(0,0,0,0.8);
    }

    /* --- ここから修正：画像と文字の横並びを解消 --- */

    /* 魅力セクション（客室・料理・温泉）を縦並びに */
    .features { 
        display: block; /* gridを解除 */
    }

    .feature-item {
        margin-bottom: 60px; /* 各項目の下の余白 */
        display: block;      /* 確実に縦並びに */
    }

    .feature-img { 
        width: 100%;
        height: 250px; 
        margin-bottom: 20px; /* 画像のすぐ下に文字がくるように */
    }

    /* アクセス & お問い合わせ */
    .access-contact { 
        display: block; /* gridを解除 */
    }

    .access-box, .contact-box {
        width: 100%;
        margin-bottom: 80px;
    }

    /* お知らせリスト */
    .news-list li { 
        flex-direction: column; 
        align-items: flex-start; 
        gap: 5px; 
        padding: 20px 10px;
    }
    .news-list li a { white-space: normal; }
}

/* -----------------------------------------------------------
  下層ページ共通スタイル
----------------------------------------------------------- */
.page-header {
    height: 400px;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-align: center;
}

.header-overlay {
    background: rgba(0,0,0,0.3);
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.page-header h2 {
    font-size: 2.5rem;
    font-weight: normal;
    letter-spacing: 0.2em;
}

.page-content {
    padding: 80px 20px;
}

.intro-text {
    text-align: center;
    margin-bottom: 80px;
}

.intro-text h3 {
    font-size: 1.5rem;
    margin-bottom: 30px;
    font-weight: normal;
}

/* 詳細グリッド */
.detail-grid {
    display: grid;
    gap: 80px;
}

.detail-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.detail-img {
    height: 400px;
    background-size: cover;
    background-position: center;
}

.detail-txt h4 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

/* スマホで下層ページの画像が表示されない場合の対策 */
@media screen and (max-width: 768px) {
    .page-header, .detail-img {
        display: block !important;
        width: 100% !important;
        visibility: visible !important;
    }
}

/* 偶数番目のアイテムを左右反転させる（PCのみ） */
@media screen and (min-width: 769px) {
    .detail-item.inv {
        grid-template-columns: 1fr 1fr;
    }
}

/* 温泉データ表のスマホ対応 */
@media screen and (max-width: 768px) {
    .onsen-data th, .onsen-data td {
        display: block;
        width: 100% !important;
    }
    .onsen-data th {
        padding: 10px 20px;
    }
}

/* -----------------------------------------------------------
  詳細ページ（料理・温泉・客室）のスマホ表示調整
----------------------------------------------------------- */
@media screen and (max-width: 768px) {
    /* 横並び(grid)を解除して、縦並び(block)にする */
    .detail-item {
        display: block !important;
        margin-bottom: 50px;
    }

    /* 画像を横いっぱいに広げ、下に余白を作る */
    .detail-img {
        width: 100% !important;
        height: 250px !important; /* スマホで見やすい高さ */
        margin-bottom: 20px !important; /* これで文章が下に落ちる */
    }

    /* 文章の横幅を100%にして、回り込みを完全に防ぐ */
    .detail-txt {
        width: 100% !important;
        display: block !important;
    }
}

/* セクションタイトル(お知らせ、交通案内など)のサイズ調整 */
.concept h2, .section-title h2 {
    font-size: 2rem; /* 元のh3と同じサイズ感に */
    margin-bottom: 40px;
    font-weight: normal;
    letter-spacing: 0.2em;
}

/* 魅力セクションの各項目(客室など)のサイズ調整 */
.feature-item h3 {
    font-size: 1.2rem; /* 元のh4と同じサイズ感に */
    margin-bottom: 10px;
}

/* 追尾予約ボタンのデザイン */
.floating-reserve {
    position: fixed;
    right: 20px;
    bottom: 40px; /* 位置を調整 */
    z-index: 9999;
}

.reserve-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    background-color: #003366; /* 濃紺 */
    color: #fff !important;
    text-decoration: none;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    transition: all 0.3s ease;
    text-align: center;
}

.reserve-btn .icon {
    font-size: 1.6rem;
    margin-bottom: 2px;
}

.reserve-btn .text {
    font-size: 0.75rem;
    font-weight: bold;
    line-height: 1.3;
}

/* ホバー時の演出 */
.reserve-btn:hover {
    background-color: #004a92;
    transform: scale(1.05); /* 少し大きく */
}

/* スマホ表示での最適化 */
@media (max-width: 768px) {
    .floating-reserve {
        right: 15px;
        bottom: 20px;
    }
    .reserve-btn {
        width: 85px;
        height: 85px;
    }
    .reserve-btn .text {
        font-size: 0.65rem;
    }
}

/* 予約ページ専用スタイル */
.reserve-header {
    background-color: #003366;
    color: #fff;
    padding: 120px 0 60px;
    text-align: center;
}

.reserve-content {
    padding: 60px 0;
    max-width: 800px !important;
}

/* 予約フロー */
.reserve-flow {
    display: flex;
    justify-content: space-between;
    margin-bottom: 50px;
    border-bottom: 2px solid #eee;
}
.flow-step {
    padding-bottom: 15px;
    color: #ccc;
    font-weight: bold;
    flex: 1;
    text-align: center;
}
.flow-step.active {
    color: #003366;
    border-bottom: 2px solid #003366;
}

/* フォーム装飾 */
.reserve-form-wrapper {
    background: #fdfdfd;
    padding: 40px;
    border: 1px solid #eee;
}

.form-group {
    margin-bottom: 30px;
}

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 10px;
}

.form-group label span {
    background: #c00;
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 10px;
    vertical-align: middle;
}

.reserve-form input[type="text"],
.reserve-form input[type="email"],
.reserve-form input[type="date"],
.reserve-form select,
.reserve-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.btn-submit {
    display: block;
    width: 100%;
    padding: 20px;
    background: #003366;
    color: #fff;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    transition: 0.3s;
}

.btn-submit:hover {
    background: #004a92;
}

/* 料理ページのメイン画像 */
.cuisine-hero {
    /* imagesフォルダ内のcuisine.jpgを指定 */
    background-image: url('images/cuisine.jpg'); 
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    width: 100%;
    height: 45vh; /* 画面高さの45%程度に設定（お好みで） */
    position: relative;
}

/* 文字を読みやすくするための黒い透過レイヤー */
.header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4); /* 40%の暗さ */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
}

/* 404ページ専用のヘッダーカラー */
.error-header {
    background-color: #8e9aaf; /* 少し落ち着いたブルーグレー */
}

.sitemap-links a:hover {
    text-decoration: underline;
    color: #003366 !important;
}

/* リンク一覧をスマホで縦並びにする調整 */
@media (max-width: 600px) {
    .sitemap-links ul {
        flex-direction: column;
        gap: 10px;
    }
}

/* 固定ページ（宿泊予約・お問い合わせ等）で背景が空っぽの場合の強制表示 */
body.page .page-header,
body.single .page-header,
body.archive .page-header {
    background-image: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.3)), 
                      url('images/main-visual.jpg') !important;
    background-size: cover !important;
    background-position: center !important;
    display: block !important; /* 要素が消えている場合の対策 */
    min-height: 400px; /* 高さを確保 */
}

/* -----------------------------------------------------------
  パンくずを画像の下へ強制移動させる修正
----------------------------------------------------------- */

/* 1. 下層ページの画像エリアの設定 */
/* absoluteを使わず、その場に留まらせます */
.page-header, 
.rooms-header {
    position: relative;
    height: 400px; /* PCでの高さ */
    z-index: 10;
}

/* 2. パンくずバーの修正（header.phpにあるもの） */
.breadcrumb-sticky-fix {
    background: #fff;
    border-bottom: 1px solid #eee;
    width: 100%;
    position: relative;
    z-index: 20;
    /* 本来は画像の上に表示されるはずのものを、画像の下へ配置する */
    margin-top: 0; 
}

/* 3. 本文との繋ぎ目を綺麗にする */
#main-content {
    margin-top: 0;
}

/* パンくずの中身（文字など） */
.breadcrumbs ul, .breadcrumbs ol {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 15px 0;
    font-size: 0.8rem;
}

.breadcrumbs li + li::before {
    content: "/";
    margin: 0 12px;
    color: #ccc;
}

.breadcrumb-sticky-fix {
    position: absolute;
    top: 400px; /* 画像の高さ分だけ下に下げる */
    width: 100%;
}

/* -----------------------------------------------------------
  【重要】スマホ対応
----------------------------------------------------------- */
@media screen and (max-width: 768px) {
    /* スマホで画像高さが250pxになる場合、パンくずの位置も連動させる */
    .page-header, .rooms-header {
        height: 250px;
    }
}

