/* 全体の基本設定 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Helvetica Neue', Arial, sans-serif;
}

body {
    background-color: #121212;
    color: #e0e0e0;
    line-height: 1.6;
}

/* 言語セレクター */
.lang-selector-container {
    position: absolute;
    top: 15px;
    right: 20px;
    z-index: 10;
    display: flex;
    gap: 8px;
}

.lang-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 5px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: bold;
    transition: all 0.3s ease;
}

.lang-btn.active, .lang-btn:hover {
    background: #a07855;
    border-color: #a07855;
    color: #fff;
}

/* ヘッダーセクション */
.main-header {
    position: relative;
    width: 100%;
    min-height: 320px; /* 画像が見やすくなるよう少し高さを広げました */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-bottom: 1px solid #2a2a2a;
    color: #ffffff;
    
    /* 背景画像の設定（ローカル環境でも確実に動くパスに修正） */
    background: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)), 
                url('../images/back.jpg') no-repeat center center;
    background-size: cover;
    background-attachment: scroll;
    
    padding: 40px 20px;
    box-sizing: border-box;
}

.header-content {
    position: relative;
    z-index: 2;
    padding: 0 20px;
}

/* タイトル文字（HTML側のID名 #main-title に合わせて統合） */
#main-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.8rem;
    color: #ffffff;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.8); /* 画像の上でもクッキリ見えるように影を強化 */
}

/* サブタイトル（HTML側のID名 #main-subtitle に合わせて統合） */
#main-subtitle {
    font-size: 1.1rem;
    color: #e0e0e0;
    max-width: 650px;
    margin: 0 auto;
    font-weight: 300;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
}
/* メインコンテンツ配置ラッパー */
.main-content-wrapper {
    max-width: 1120px;
    margin: 0 auto;
    padding: 30px 20px;
}
header {
    position: relative;
    width: 100%;
    min-height: 400px; /* ヘッダーの高さ（画像の縦幅に合わせて調整してください） */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #ffffff;
    
    /* 背景画像の設定 */
    /* linear-gradientを重ねることで、画像の上に薄い黒いモヤをかけ、文字を爆発的に見やすくします */
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), 
                url('../images/back.jpg') no-repeat center center;
    background-size: cover; /* 画像を画面幅いっぱいに綺麗にフィットさせる */
    background-attachment: scroll; /* スマホでの挙動を安定させる（パララックスにするならfixed） */
    
    padding: 60px 20px;
    box-sizing: border-box;
}

/* ヘッダー内のタイトル文字（視認性をさらに高めるシャドウ付き） */
header h1 {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 15px;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.7); /* 文字の輪郭をくっきりさせる */
    letter-spacing: 1px;
}

/* ヘッダー内のサブテキスト（紹介文など） */
header p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
    opacity: 0.95;
}

/* 検索バーコンテナ */
.search-container {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.search-input-wrapper {
    position: relative;
    flex: 1;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #777;
    font-size: 1.05rem;
}

#search-bar {
    width: 100%;
    background: #1c1c1f;
    border: 1px solid #2d2d30;
    padding: 14px 16px 14px 48px;
    border-radius: 6px;
    color: #ffffff;
    font-size: 0.98rem;
    transition: all 0.3s ease;
}

#search-bar:focus {
    outline: none;
    border-color: #a07855;
    background: #222226;
}

#near-me-btn {
    background: #1c1c1f;
    border: 1px solid #2d2d30;
    color: #e0e0e0;
    padding: 0 22px;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

#near-me-btn:hover {
    background: #a07855;
    border-color: #a07855;
    color: #fff;
}

.location-status-text {
    font-size: 0.85rem;
    color: #a07855;
    margin-top: -12px;
    margin-bottom: 18px;
    min-height: 18px;
    font-weight: 500;
}

/* フィルターUIボックス */
.filter-box {
    background: #161619;
    border: 1px solid #262629;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.area-filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.area-badge {
    background: #222226;
    border: 1px solid #333337;
    color: #aaaaaa;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.area-badge.active, .area-badge:hover {
    background: #a07855;
    border-color: #a07855;
    color: #ffffff;
}

.checkbox-filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.custom-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #cccccc;
    cursor: pointer;
    user-select: none;
}

.custom-checkbox-label input {
    cursor: pointer;
    accent-color: #a07855;
    width: 16px;
    height: 16px;
}

/* 件数表示 */
.results-header-container {
    margin-bottom: 16px;
    border-bottom: 1px solid #222;
    padding-bottom: 8px;
}

#results-count {
    font-size: 0.92rem;
    color: #888888;
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* 📋 カードグリッド配置 */
.cards-grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
}

.item-card {
    background: #161619;
    border: 1px solid #262629;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), border-color 0.3s ease;
}

.item-card:hover {
    transform: translateY(-4px);
    border-color: #3e3e42;
}

.card-body-content {
    padding: 22px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-main-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}

.item-name {
    font-size: 1.22rem;
    color: #ffffff;
    font-weight: 600;
    line-height: 1.3;
}

.area-tag-label {
    background: #252528;
    color: #999999;
    font-size: 0.72rem;
    padding: 3px 8px;
    border-radius: 3px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.distance-badge-ui {
    background: rgba(160, 120, 85, 0.1);
    border: 1px solid rgba(160, 120, 85, 0.25);
    color: #e2b78d;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-bottom: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    align-self: flex-start;
}

.meta-specs-strip {
    background: #1b1b1e;
    padding: 10px 12px;
    border-radius: 4px;
    font-size: 0.82rem;
    margin-bottom: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    border: 1px solid #202023;
}

.item-description-text {
    font-size: 0.88rem;
    color: #aaaaaa;
    line-height: 1.55;
    margin-bottom: 16px;
    flex-grow: 1;
}

.feature-tags-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.feature-tags-flex span {
    background: #202024;
    color: #88888c;
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 500;
}

/* 📱 独自Appダウンロードバッジ用スタイル */
.app-links-wrapper {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    border-top: 1px solid #222;
    padding-top: 12px;
}

.app-badge-btn {
    flex: 1;
    background: #222225;
    border: 1px solid #333336;
    color: #fff;
    padding: 6px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-weight: 500;
    transition: all 0.2s;
}

.app-badge-btn:hover {
    background: #2d2d32;
    border-color: #444449;
}

/* 地図ボタン */
.map-action-btn {
    background: #a07855;
    color: #ffffff;
    border: none;
    padding: 10px 14px;
    border-radius: 4px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s ease;
}

.map-action-btn:hover {
    background: #b38964;
}

/* ❓ FAQ アコーディオン UI */
.faq-item-node {
    background: #161619;
    border: 1px solid #262629;
    border-radius: 6px;
    overflow: hidden;
}

.faq-q-trigger {
    padding: 16px 20px;
    font-weight: 600;
    font-size: 0.92rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    transition: background 0.2s;
}

.faq-q-trigger:hover {
    background: #1c1c20;
}

.faq-a-content {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    color: #9ca3af;
    font-size: 0.88rem;
    border-top: 0 solid #262629;
    transition: all 0.25s ease-out;
}

.faq-item-node.active .faq-a-content {
    padding: 16px 20px;
    max-height: 250px;
    border-top: 1px solid #262629;
}

.faq-q-trigger i {
    transition: transform 0.25s;
    font-size: 0.85rem;
    color: #888;
}

.faq-item-node.active .faq-q-trigger i {
    transform: rotate(180deg);
    color: #a07855;
}

/* レスポンシブ */
@media (max-width: 768px) {
    #main-title { font-size: 1.85rem; }
    #main-subtitle { font-size: 0.9rem; }
    .main-header { height: 210px; }
    .cards-grid-layout { grid-template-columns: 1fr; }
    .checkbox-filter-group { gap: 12px; }
}
/* 📍 位置情報ステータス表示の微調整（エラー時に浮かないようシックな警告色に） */
.location-status-text {
    font-size: 0.85rem;
    color: #cca300; /* 派手すぎないゴールド・アンバー系に変更 */
    margin-top: -12px;
    margin-bottom: 18px;
    min-height: 18px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* 🟢💗📱💬 チェックボックス全体のスタイリング向上 */
.checkbox-filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.custom-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #cccccc;
    cursor: pointer;
    user-select: none;
    padding: 4px 10px;
    border-radius: 4px;
    background: #1c1c22;
    border: 1px solid #2d2d35;
    transition: all 0.2s ease;
}

.custom-checkbox-label:hover {
    background: #25252d;
    border-color: #3d3d48;
    color: #ffffff;
}

/* チェックが入った時のラベル全体の微変形（お好みで） */
.custom-checkbox-label input:checked + span {
    font-weight: bold;
}

.custom-checkbox-label input {
    cursor: pointer;
    accent-color: #a07855; /* チェックマークの色をガイドのテーマカラーに固定 */
    width: 15px;
    height: 15px;
}
/* スマホ用設定：画面幅が768px以下の場合に適用 */
@media screen and (max-width: 768px) {
    .main-header {
        min-height: 220px; /* 高さを短縮 */
        padding: 20px 15px; /* 余白を縮小 */
    }

    #main-title {
        font-size: 1.8rem; /* タイトルを小さく */
        margin-bottom: 5px;
    }

    #main-subtitle {
        font-size: 0.9rem; /* サブタイトルを小さく */
        line-height: 1.4;
    }
}