/* 客室紹介 rooms.css - 完全版 */

/* ============================================================
   PC表示の基本レイアウト (変更なし)
   ============================================================ */
.room-container {
    display: flex;
    flex-direction: row;
    gap: 30px;
    padding: 40px 20px;
    background-color: #fff;
    max-width: 1200px;
    margin: 0 auto;
    border-bottom: 1px solid #eee;
}

.room-left {
    flex: 1;
    margin-top: 10px; /* 見出しのフォントサイズやラインに合わせた微調整 */
    min-width: 300px;
}

.room-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.room-plans {
    margin-top: 25px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.room-plans .plans-link {
    position: relative;
    width: 100%;
    max-width: 320px;
    padding: 15px 20px;
    font-size: 15px;
    background-color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    border-radius: 4px;
    text-align: center;
    box-sizing: border-box;
    transition: all 0.4s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
}

.room-plans .plans-link::after {
    content: '›';
    position: absolute;
    right: 20px;
    font-size: 20px;
}

.room-plans .smoking { border: 1px solid #999999; color: #555555 !important; }
.room-plans .no-smoking { border: 1px solid #006633; color: #006633 !important; }
.room-plans .smoking:hover { background-color: #666666; color: #ffffff !important; }
.room-plans .no-smoking:hover { background-color: #006633; color: #ffffff !important; }

.room-right {
    flex: 1.5;
}

.room-right h1 { /* メインタイトル用（もしあれば） */
    font-size: 28px;
    color: #006633;
    margin: 0 0 15px 0;
}

.room-description {
    font-size: 16px;
    color: #333;
    line-height: 1.8;
    margin-bottom: 25px;
}

.room-right h2 { /* 客室名 */
    font-size: 28px;
    color: #006633;
    margin-top: 0px;
    margin-bottom: 12px;
    border-bottom: 2px solid #006633;
    padding-bottom: 5px;
}

.room-right h3 { /* 客室情報・設備の見出し */
    font-size: 18px;
    color: #006633;
    margin-top: 20px;
    margin-bottom: 10px;
}

.room-info-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.room-info-table th, .room-info-table td {
    border: 1px solid #ccc;
    padding: 12px;
    text-align: left;
    font-size: 15px;
}

.room-info-table th {
    background-color: #f0f8f0;
    width: 120px;
}

.room-equipment {
    margin-top: 0;
    margin-bottom: 0;
    font-size: 15px;
    color: #555;
    line-height: 1.8;
    white-space: pre-wrap;
}

.room-note {
    margin-top: 0;
    font-size: 13px;
    color: #ff0000;
    font-weight: bold;
    line-height: 1.5;
}

/* ============================================================
   スマホ表示 (SP) の構成設定：ご希望の順序に完全対応
   ============================================================ */
@media screen and (max-width: 768px) {
    .room-container {
        display: flex;
        flex-direction: column;
        padding: 20px 15px;
        gap: 0;
    }

    /* contents展開により、子要素のorderを直接制御可能にする */
    .room-left, .room-right, .room-right section {
        display: contents;
    }

    /* 1. 客室名 (h2) */
    .room-right h2 {
        order: 1;
        font-size: 26px;
        margin-top: 0;
        margin-bottom: 5px;
        line-height: 1.3;
        border-bottom: none; /* スマホでは下線を消す設定 */
        padding-bottom: 0;
    }

    /* 2. キャッチコピー */
    .room-description {
        order: 2;
        margin-top: 0;
        margin-bottom: 20px;
        line-height: 1.6;
    }

    /* 3. 客室画像 */
    .room-left .room-image {
        order: 3;
        margin-top: 0;
        margin-bottom: 25px;
    }

    /* 4. 「客室情報」見出し (h3の1番目) */
    .room-right h3:nth-of-type(1) { 
        order: 4; 
        margin-top: 0; 
        margin-bottom: 10px;
        border-bottom: 2px solid #006633;
        padding-bottom: 5px;
    }

    /* 5. 客室情報テーブル */
    .room-info-table {
        order: 5;
        margin-bottom: 25px;
        display: table; /* display:contentsの影響を防ぐ */
    }

    /* 6. 「客室設備・備品」見出し (h3の2番目) */
    .room-right h3:nth-of-type(2) { 
        order: 6; 
        margin-top: 0; 
        margin-bottom: 10px;
        border-bottom: 2px solid #006633;
        padding-bottom: 5px;
    }

    /* 7. 客室設備テキスト (p.room-equipment) */
    .room-equipment {
        order: 7;
        margin-top: 0;
        margin-bottom: 20px;
        line-height: 1.6;
    }

    /* 8. 宿泊プラン予約ボタン */
    .room-left .room-plans {
        order: 8;
        width: 100%;
        margin-top: 0;
        margin-bottom: 20px;
    }

    /* 9. 注意書き (※繁忙期...) */
    .room-note {
        order: 9;
        text-align: left;
        margin-top: 0;
        padding: 15px;
        background-color: #fff5f5;
        border-radius: 4px;
        box-sizing: border-box;
    }
}

/* アンカーリンク調整用 */
.anchor {
    display: block;
    position: relative;
    top: -100px; /* ヘッダーの高さに合わせて微調整してください */
    visibility: hidden;
}

.anchor-sp {
    display: block;
    position: relative;
    top: -80px;
    height: 0;
    visibility: hidden;
}


/* ============================================================
   パンくずリストの直後の要素の padding-top を殺す
   ============================================================ */
/* PC表示での余白短縮 */
@media screen and (min-width: 769px) {
    /* パンくずリスト自体の下マージンを詰める */
    .breadcrumb-nav {
        margin-bottom: 0 !important;
    }
    
    /* その直後の最初の客室コンテナの padding-top を最小化 */
    #main-content .room-container:first-of-type {
        padding-top: 0 !important;
    }
}