@charset "UTF-8";
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700&display=swap');

/* --------------------------------------------------
   変数定義 (Color Palette)
   -------------------------------------------------- */
:root {
    --primary-color: #00a040;       /* 楽天グリーン */
    --primary-hover: #008033;
    --secondary-color: #f5b000;
    --text-color: #333333;
    --text-light: #666666;
    --bg-color: #f4f6f8;
    --white: #ffffff;
    --border-color: #e0e0e0;
    
    /* ★追加: 価格用の赤色 */
    --price-color: #bf0000;
    
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

/* --------------------------------------------------
   基本設定 (Base)
   -------------------------------------------------- */
body {
    font-family: 'Noto Sans JP', "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
    color: #0056b3;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    vertical-align: bottom;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
}

/* --------------------------------------------------
   ヘッダー
   -------------------------------------------------- */
header {
    background-color: var(--white);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
    margin-bottom: 0;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

header h1 {
    margin: 0;
    font-size: 20px;
    text-align: center;
    font-weight: 700;
}

header h1 a {
    color: var(--primary-color);
}

/* --------------------------------------------------
   ヒーローエリア
   -------------------------------------------------- */
.hero-area {
    background: linear-gradient(135deg, var(--primary-color), #4CAF50);
    color: var(--white);
    padding: 60px 20px;
    text-align: center;
    margin-bottom: 30px;
}

.hero-title {
    margin: 0 0 10px 0;
    font-size: 28px;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.hero-desc {
    margin: 0 0 30px 0;
    font-size: 16px;
    opacity: 0.95;
}

/* --------------------------------------------------
   共通パーツ: ボタン
   -------------------------------------------------- */
.btn-geo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    color: var(--primary-color);
    font-weight: bold;
    padding: 12px 28px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    border: none;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-geo:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.btn-link, .area-btn {
    display: block;
    background: var(--white);
    border: 1px solid var(--border-color);
    padding: 15px;
    text-align: center;
    border-radius: var(--radius-md);
    color: var(--text-color);
    font-weight: 500;
    transition: all 0.2s;
}

.btn-link:hover, .area-btn:hover {
    background-color: var(--white);
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.btn-detail {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 10px 24px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
}

.btn-detail:hover {
    background-color: var(--primary-hover);
    color: var(--white);
    box-shadow: 0 2px 8px rgba(0, 160, 64, 0.3);
}

.btn-rakuten {
    display: block;
    width: 100%;
    text-align: center;
    background: var(--primary-color);
    color: var(--white);
    font-size: 18px;
    font-weight: bold;
    padding: 18px 0;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    transition: 0.3s;
}

.btn-rakuten:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    color: var(--white);
}

.btn-area-ranking {
    display: inline-block;
    background: #ffd700;
    color: #333;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: bold;
    text-decoration: none;
    box-shadow: var(--shadow-sm);
    transition: 0.3s;
}
.btn-area-ranking:hover {
    background: #ffc107;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: #333;
}

.btn-fav {
    border: 1px solid var(--secondary-color);
    color: var(--secondary-color);
    background: var(--white);
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-fav:hover {
    background-color: #fff8e1;
}

.btn-fav.active {
    background-color: var(--secondary-color);
    color: var(--white);
}

/* ページ上部へ戻るボタン */
#back-to-top {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 50px;
    height: 50px;
    background-color: var(--text-color);
    color: var(--white);
    border-radius: 50%;
    text-align: center;
    line-height: 50px;
    font-size: 20px;
    cursor: pointer;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

#back-to-top.show {
    opacity: 0.9;
    visibility: visible;
    transform: translateY(0);
}

#back-to-top:hover {
    background-color: var(--primary-color);
    opacity: 1;
}

/* --------------------------------------------------
   見出し・セクション
   -------------------------------------------------- */
.section-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-color);
    margin: 40px 0 20px;
    padding-left: 15px;
    border-left: 5px solid var(--primary-color);
    position: relative;
}

.section-head {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-color);
    margin: 30px 0 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

/* --------------------------------------------------
   グリッド・リスト
   -------------------------------------------------- */
.grid-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
}

.pref-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 10px;
    margin-bottom: 30px;
}

.region-title {
    font-size: 16px;
    font-weight: bold;
    color: var(--text-light);
    margin-bottom: 10px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
}

.pref-link {
    font-size: 14px;
    padding: 10px;
}

/* --------------------------------------------------
   履歴スクローラー
   -------------------------------------------------- */
.history-scroller {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding: 5px 5px 20px 5px;
    -webkit-overflow-scrolling: touch;
}

.history-card {
    min-width: 160px;
    width: 160px;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s;
}

.history-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.history-img {
    width: 100%;
    height: 100px;
    object-fit: cover;
}

.history-body {
    padding: 10px;
}

.history-title {
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 5px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.8em;
}

.history-price {
    color: var(--price-color); /* ★変更: 赤 */
    font-weight: bold;
    font-size: 13px;
}

/* --------------------------------------------------
   ホテル一覧カード (Search, Ranking)
   -------------------------------------------------- */
.hotel-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.hotel-card {
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid transparent;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.hotel-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: #f0f0f0;
}

@media (min-width: 768px) {
    .hotel-card {
        flex-direction: row;
        min-height: 220px;
    }
    .hotel-img {
        width: 300px;
        flex-shrink: 0;
        position: relative;
    }
    .hotel-img a {
        display: block;
        width: 100%;
        height: 100%;
        min-height: 220px;
    }
    .hotel-img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        position: absolute;
        top: 0;
        left: 0;
    }
    .hotel-info {
        padding: 20px;
        flex-grow: 1;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }
}

@media (max-width: 767px) {
    .hotel-img {
        width: 100%;
        height: 200px;
        position: relative;
    }
    .hotel-img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    .hotel-info {
        padding: 15px;
    }
}

.hotel-name {
    font-size: 18px;
    font-weight: bold;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.hotel-name a {
    color: var(--text-color);
}

.hotel-name a:hover {
    color: var(--primary-color);
}

.hotel-catch {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hotel-access {
    font-size: 12px;
    color: #888;
    margin-bottom: 5px;
}

.hotel-price {
    font-size: 20px;
    color: var(--price-color); /* ★変更: 赤 */
    font-weight: bold;
    margin-top: auto;
    padding-top: 10px;
}

/* --------------------------------------------------
   詳細ページ (Detail)
   -------------------------------------------------- */
.detail-header h2 {
    font-size: 24px;
    margin-bottom: 15px;
    line-height: 1.4;
}

.detail-special {
    background: #e8f5e9;
    padding: 15px;
    border-radius: var(--radius-sm);
    color: var(--text-color);
    font-size: 14px;
    line-height: 1.6;
}

.info-box {
    background: var(--white);
    padding: 25px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    margin-bottom: 30px;
}

.info-table th {
    width: 30%;
    background-color: #f9f9f9;
    color: var(--text-light);
    font-weight: 500;
}

.price-area {
    background-color: #fff8f8; /* ★変更: 薄い赤 */
    border: 1px solid #ffcccc;  /* ★変更: 薄い赤 */
    color: var(--price-color);  /* ★変更: 赤 */
    text-align: center;
    padding: 20px;
    border-radius: var(--radius-md);
    margin: 20px 0;
}

/* --------------------------------------------------
   パンくずリスト
   -------------------------------------------------- */
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
    font-size: 13px;
    color: var(--text-light);
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "/";
    padding: 0 8px;
    color: #ccc;
}

.breadcrumb a {
    color: var(--text-light);
}

.breadcrumb a:hover {
    color: var(--primary-color);
}

.breadcrumb span {
    color: var(--text-color);
    font-weight: bold;
}

/* --------------------------------------------------
   ページネーション
   -------------------------------------------------- */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 10px;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-color);
    font-weight: bold;
    transition: all 0.2s;
}

.page-link:hover:not(.active) {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.page-link.active {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
    pointer-events: none;
}

/* --------------------------------------------------
   ランキングバッジ・レビュー
   -------------------------------------------------- */
.rank-badge {
    position: absolute;
    top: 0;
    left: 0;
    width: 40px;
    height: 40px;
    background: #333;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    border-bottom-right-radius: 10px;
    z-index: 10;
}
.rank-1 { background: #ffd700; color: #333; width: 50px; height: 50px; font-size: 20px; }
.rank-2 { background: #c0c0c0; color: #333; }
.rank-3 { background: #cd7f32; color: #fff; }

.review-score-large {
    color: #f5b000;
    font-weight: bold;
    font-size: 1.1em;
    background: #fff8e1;
    padding: 5px 10px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 10px;
}

/* --------------------------------------------------
   フッター
   -------------------------------------------------- */
footer {
    margin-top: 60px;
    padding: 30px 0;
    background-color: var(--white);
    border-top: 1px solid var(--border-color);
    color: var(--text-light);
    font-size: 12px;
    text-align: center;
}

/* --------------------------------------------------
   ユーティリティ
   -------------------------------------------------- */
.msg-box, .error-box {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius-md);
    text-align: center;
    box-shadow: var(--shadow-sm);
    margin-bottom: 30px;
}

.area-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.area-btn {
    display: inline-block;
    background: var(--white);
    border: 1px solid #007bff;
    color: #007bff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    text-decoration: none;
    transition: 0.2s;
}

.area-btn:hover {
    background: #007bff;
    color: var(--white);
}