/* ======================================= */
/* ファイル名: main-content-misc.css */
/* ======================================= */

/* ========================================================
   1. メインコンテンツ全体設定
   - コンテンツの最大幅、中央寄せ、パディング
   - ボックスサイズを境界込みに統一
========================================================= */
#main-content {
    max-width: 850px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}
#main-content * {
    box-sizing: border-box; /* 全ての子要素も同様に */
}

/* セクション間の余白：基本60px、スマホ時は40px */
.section-center {
    text-align: center;
    margin-bottom: 60px;
}

/* ========================================================
   2. タイトル・テキスト
========================================================= */
/* メインタイトル */
.block-top {
    font-size: 1.8rem;
    font-weight: bold;
    margin: 40px 0 20px;
    line-height: 1.4;
}

/* リード文（導入文） */
.extra-lead {
    margin-bottom: 20px;
    line-height: 1.6;
}

/* 通常テキスト */
.extra-text {
    font-size: 1rem;
    line-height: 1.7;
    padding: 10px 0;
}

/* 中身が空の要素は表示しない */
.extra-text:empty {
    display: none;
}

/* 強調タイトル（緑・客室名など） */
.highlight-green {
    color: #006400;
    font-weight: 900;
    font-size: 1.6rem;
    display: block;
    text-align: center;
    margin-bottom: 8px;
    line-height: 1.2;
}

/* 和風サブタイトル */
.block-top-sub {
    font-size: 1.4rem;
    font-weight: bold;
    color: #4B2E2E;             /* 濃い茶色文字 */
    text-align: center;
    position: relative;
    margin: 30px 0 20px;
    padding: 10px 20px;         /* 背景色が見える余白 */
    background-color: #FFF3E0;  /* 薄ベージュで和風感 */
    border-radius: 6px;         /* 角丸 */
    line-height: 1.3;
}

/* 左右の飾りマーク */
.block-top-sub::before,
.block-top-sub::after {
    content: "◆";
    font-size: 1.2rem;
    color: #C49B6C; /* 金色アクセント */
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}
.block-top-sub::before { left: 10px; }
.block-top-sub::after { right: 10px; }

/* 横線装飾 */
.block-top-sub span {
    display: inline-block;
    border-bottom: 2px solid #C49B6C; /* 太めで目立たせる */
    width: 50px;
    margin: 0 8px;
    vertical-align: middle;
}

/* ========================================================
   3. レイアウト構造 (Flexbox)
========================================================= */
/* 基本カード行 */
.card-row {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 30px; /* 行間 */
}

/* 画像とテキストが並ぶ行の微調整 */
.image-text-pair,
.room-variant-pair {
    display: flex;
    align-items: flex-start; /* 高さを揃える */
    margin-bottom: 15px;     /* ボタンなどと間隔調整 */
}

/* カラム共通 */
.card-col,
.card.image-box {
    flex: 1;
    min-width: 0;
}

/* 画像 */
.card-col img,
.image-box img {
    display: block;
    width: 100%;
    height: auto;
    margin-bottom: 5px; /* 下の要素と少し余白 */
}

/* カラム内最後の要素の余白を削除 */
.card-col *:last-child {
    margin-bottom: 0;
}

/* 小さい画像を実寸で表示し、中央に寄せる */
img.card-col-small {
    width: auto;         /* 親の幅に合わせず、画像本来の幅にする */
    max-width: 100%;     /* スマホなどで親要素を超えないようにする */
    display: block;      /* 左右marginを効かせるためにブロック化 */
    margin-left: auto;   /* 中央寄せ */
    margin-right: auto;
}

/* 3枚画像用 */
.card-row.three-col {
    display: flex;
    justify-content: space-between;
    gap: 15px; /* 画像間の隙間 */
}
.card-row.three-col .card img {
    height: 200px;      /* 高さ固定 */
    width: auto;         /* 幅は自動 */
    object-fit: cover;   /* 縦横比を維持して枠内収める */
    display: block;
}

/* ========================================================
   4. テーブル (info-table)
========================================================= */
.extra-text.info-table {
    padding-top: 5px;
    padding-bottom: 0;
}
.info-table table {
    width: 100%;
    border-collapse: collapse;
    border-top: 1px solid #ccc;
    margin: 0;
}
.info-table th,
.info-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #ccc;
    text-align: left;
}
.info-table th {
    width: 35%;
    background-color: #f9f9f9;
    font-weight: bold;
}

/* --------------------------------------------------------
   4-1. 概要まとめ表 (info-summary)
--------------------------------------------------------- */
.info-summary {
  max-width: 400px;
  margin: 20px auto 20px;
  font-size: 1rem;
  line-height: 1.5;
}

.info-summary table {
  width: 100%;
  border-collapse: collapse;
  border-top: 1px solid #ccc;
}

.info-summary th,
.info-summary td {
  padding: 8px 10px;
  border-bottom: 1px solid #ccc;
  text-align: left;
  vertical-align: top;
}

.info-summary th {
  width: 100px;
  font-weight: bold;
  color: #333;
}

/* info-summary 内の th を改行せず表示 */
.info-summary th {
    white-space: nowrap; /* 改行禁止 */
}

.info-summary td strong {
  font-size: 1.2rem;
}

/* ========================================================
   4-2. 2列ドットリスト (two-col-dot-list)
========================================================= */
.two-col-dot-list {
  width: 100%;
  border-collapse: separate;
  border-spacing: 30px 10px; /* 横・縦の間隔 */
  table-layout: fixed;
}

.two-col-dot-list td {
  position: relative;
  padding-left: 20px;
  text-align: left;
  vertical-align: top;
  list-style: none;
}

/* 空でないセルだけにドットを表示 */
.two-col-dot-list td:not(:empty)::before {
  content: "・";
  position: absolute;
  left: 5px;
  top: 50%;
  transform: translateY(-50%);
  color: #555;
  font-weight: bold;
  font-size: 1.2em;
}

/* ========================================================
   5. highlight-box: グレー背景の重要案内ボックス
========================================================= */
.highlight-box {
    background-color: #f0f0f0; /* 薄いグレー背景 */
    padding: 20px;
    border-radius: 6px;
    line-height: 1.6;
    font-size: 1rem;
    color: #333;
    margin-top: 0; 
    margin-bottom: 40px;
    text-align: left;
}

.highlight-box strong {
    font-weight: bold;
    display: block;
    margin-top: 10px;
}

/* ========================================================
   6. ボタン・リンク
========================================================= */
/* 一般ボタンリンク */
.card-link {
    display: inline-block;
    margin: 0 auto 50px; /* 下に50px余白 */
    padding: 10px 30px;
    border: 1px solid #333;
    color: #333;
    text-decoration: none;
    transition: 0.3s;
}
/* ボタン直前の要素との隙間調整 */
.card-row + .card-link,
.extra-lead + .card-link {
    margin-top: 10px;
}
.card-link:hover {
    background: #333;
    color: #fff;
}

/* 宿泊約款などの単体画像リンク */
.simple-image-links {
    display: flex;
    justify-content: center;
    padding: 20px 0;
}
.simple-image-links a {
    max-width: 450px;
    transition: opacity 0.3s;
}
.simple-image-links a:hover {
    opacity: 0.8;
}


/* ========================================================
   7. マップ用ボタン・リンク
========================================================= */
/* ボタンを横に並べるコンテナ */
.button-group {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

/* Googleマップボタン（公式サイトボタンとデザインを統一） */
.card-link.map-btn {
    background-color: #ffffff; /* 白背景 */
    border: 1px solid #333;    /* 黒枠 */
    color: #333 !important;    /* 黒文字 */
    font-weight: normal;       /* 主張を抑えるため標準の太さに */
}

/* ホバー時の挙動（反転演出） */
.card-link.map-btn:hover {
    background-color: #333;    /* 背景を黒に */
    color: #ffffff !important; /* 文字を白に */
}

/* スマホでは縦に並べる */
@media screen and (max-width: 768px) {
    .button-group {
        flex-direction: column;
    }
}


/* スポットリスト内のボタン（Googleマップで確認）の調整 */
.spot-list .card-link {
    font-size: 0.9rem; /* 少しだけ小さくして1行に収まりやすくする */
    padding: 10px 15px; /* 左右の余白を調整 */
}

@media screen and (max-width: 768px) {
    .spot-list .card-link {
        font-size: 1rem; /* スマホでは押しやすさ優先で標準サイズに */
    }
}


/* ========================================================
   8. 中央表示画像
========================================================= */
/* --- 中央表示画像 --- */
.center-image {
  max-width: 800px; /* 幅の最大値 */
  margin: 0 auto 40px; /* 下側の余白を 40px に広げました（以前は0または30） */
  overflow: hidden; 
}

.center-image img {
  width: 100%;
  height: auto;
  display: block;
}


/* ========================================================
   8. スマートフォン表示 (768px以下)
========================================================= */
@media screen and (max-width: 768px) {
    .section-center { margin-bottom: 40px; }

    /* 行を縦並びにして間隔調整 */
    .card-row,
    .image-text-pair,
    .room-variant-pair,
    .simple-image-links {
        flex-direction: column;
        align-items: center;
        gap: 25px;
    }

    .card-col,
    .image-box,
    .simple-image-links a {
        width: 100%;
    }

    /* 画像下余白を少し増やす */
    .card-col img,
    .image-box img {
        margin-bottom: 10px;
    }

    /* ボタン下余白調整 */
    .card-link { margin-bottom: 40px; }

    /* フォントサイズ調整 */
    .block-top { font-size: 1.5rem; }
    .highlight-green { font-size: 1.4rem; }

    /* 3枚画像 横並び維持 */
    .card-row.three-col {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
    }
    .card-row.three-col .card {
        flex: 0 1 calc(33.333% - 10px); /* 3列分の幅 */
        min-width: 80px;                /* 最小幅 */
    }
}

/* ========================================================
   9. エラーページ専用スタイル（修正版）
========================================================= */

/* セクション全体の余白調整と、背面数字の基準点設定 */
.error-page {
    padding: 60px 0;
    position: relative;
}

/* 背景の大きな404数字：重なりを制御し視認性を向上 */
.error-number {
    font-size: clamp(5rem, 15vw, 10rem); /* 最大サイズを少し拡大 */
    font-weight: 900;
    color: #f5f5f5; /* 薄いグレーで背景に馴染ませる */
    line-height: 1;
    margin-bottom: -0.5em; /* タイトルとの重なりをフォントサイズに比例させる */
    letter-spacing: 0.1em;
    z-index: -1; /* タイトルの背面に確実に配置 */
    position: relative;
}

/* 案内ボックスの中央寄せと読みやすさの調整 */
.error-info-box {
    max-width: 600px;
    margin: 40px auto;
    text-align: center;
}

/* エラーページの「トップページへ戻る」ボタン：旅館のトーンに合わせた強調 */
.error-page .card-link {
    background-color: #4B2E2E; /* 旅館らしい濃い茶色 */
    color: #fff;
    border: none;
    padding: 15px 40px;
    font-weight: bold;
    border-radius: 4px;
    margin-bottom: 50px;
    transition: all 0.3s ease;
}

.error-page .card-link:hover {
    background-color: #C49B6C; /* 金色アクセントでホバー感を出唆 */
    color: #fff;
    transform: translateY(-2px); /* 軽く浮かせてクリック感を出す */
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* 主要リンク集の調整（もしHTMLに追加された場合用） */
.error-link-list {
    max-width: 500px;
    margin: 0 auto;
}

.error-link-list td a {
    color: #4B2E2E;
    text-decoration: none;
    font-weight: bold;
    display: block;
    padding: 8px 0;
    transition: all 0.3s ease;
}

.error-link-list td a:hover {
    color: #C49B6C;
    transform: translateX(5px);
}

/* PCのみ改行制御 */
@media screen and (min-width: 769px) {
    .pc-only { display: inline; }
}

/* スマホ表示 (768px以下) の最適化 */
@media screen and (max-width: 768px) {
    .error-page {
        padding: 40px 0;
    }
    
    .error-number {
        margin-bottom: -0.3em;
    }

    .error-info-box {
        text-align: center; /* 中央揃え */
        padding: 20px;
        margin: 30px 10px;
    }

    .error-page .card-link {
        width: 100%; /* スマホでは押しやすいようフルサイズに */
        box-sizing: border-box;
    }
}