/* KL24GYM/css/style.css */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* 1. 画面全体の背景（データ部背景） */
body {
    background-color: #0d0d0d !important; /* 深みのある漆黒 */
    color: #e0e0e0 !important;          /* 文字は読みやすいライトグレー */
}
/* 2. Refine Features（フィルターエリア）の文字を明るく読みやすく修正 */
.refine-features,
.filter-sidebar,
.refine-features label,
.filter-sidebar label,
.refine-features .filter-item { /* 一般的なクラス名を網羅 */
    color: #e0e0e0 !important; /* 沈んでいたグレーを明るいライトグレーに */
}

/* チェックボックス横のテキスト用（labelタグが使われている場合） */
.refine-features label {
    display: inline-block;
    margin-left: 8px;
    color: #e0e0e0 !important;
    cursor: pointer;
}

/* チェックボックス項目にホバーした時に少し白く光らせる演出 */
.refine-features label:hover {
    color: #ffffff !important;
}

.lang-selector {
    position: absolute;
    top: 15px;
    right: 20px;
    display: flex;
    gap: 8px;
}

.lang-btn {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.4);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    font-size: 12px;
    transition: 0.3s;
}

.lang-btn:hover, .lang-btn.active {
    background: white;
    color: #144e40;
}

#main-title {
    font-size: 28px;
    margin-bottom: 8px;
    font-weight: 700;
}

#main-subtitle {
    font-size: 15px;
    opacity: 0.9;
    margin-bottom: 25px;
}

/* 検索・現在地セクション */
.search-container-wrapper {
    display: flex;
    justify-content: center;
    gap: 12px;
    max-width: 700px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 280px;
}

#search-input {
    width: 100%;
    padding: 12px 40px 12px 16px;
    border-radius: 30px;
    border: none;
    font-size: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

#clear-search {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 16px;
    color: #999;
    cursor: pointer;
}

#nearme-btn {
    background-color: #00b489;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

#nearme-btn:hover, #nearme-btn.active {
    background-color: #008766;
}

/* レイアウト構成 */
.content-wrapper {
    max-width: 1200px;
    margin: 30px auto;
    display: flex;
    gap: 25px;
    padding: 0 20px;
}

/* サイドバーフィルター */
.filter-sidebar {
    width: 280px;
    background: white;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.05);
    height: fit-content;
    position: sticky;
    top: 20px;
}

.filter-sidebar h3 {
    font-size: 16px;
    margin-bottom: 16px;
    color: #144e40;
    border-bottom: 2px solid #f0f2f5;
    padding-bottom: 8px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.filter-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #4a5568;
    cursor: pointer;
    user-select: none;
}

.filter-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #00b489;
    cursor: pointer;
}

/* メイン結果表示 */
.results-area {
    flex: 1;
}

#result-counter {
    font-size: 15px;
    color: #718096;
    margin-bottom: 15px;
    font-weight: 500;
}

.gym-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 20px;
}

/* 4. ジムのカード部分（ソリッドな黒とエッジの効いた立体感） */
.gym-card {
    background-color: #121212 !important; /* カード背景 */
    border: 1px solid #2c2c2c !important;  /* 境界線 */
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6) !important;
    color: #e0e0e0 !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* カードにホバーしたときの艶感を演出 */
.gym-card:hover {
    border-color: #444444 !important;
    box-shadow: 0 12px 30px rgba(255, 255, 255, 0.05) !important;
}

.gym-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

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

/* 5. テキスト色・ラベルの調整 */
.gym-name, h2 {
    color: #ffffff !important; /* 店舗名は純白 */
}

.detail-label {
    color: #888888 !important; /* 項目名（Area, Hoursなど）は落ち着いたグレー */
}

.detail-value {
    color: #f0f0f0 !important; /* 値は明るく */
}

/* 価格強調（アクセントカラーとしてゴールドやシルバーが映えます） */
.detail-item strong {
    color: #dfb76c !important; /* ピアノブラックに映える上品なゴールド */
}

/* 6. 入力フィード・ボタンの微調整 */
input[type="text"], select {
    background-color: #1a1a1a !important;
    border: 1px solid #333333 !important;
    color: #ffffff !important;
}

/* 距離ボタンやタグの背景も浮かび上がらないよう暗色化 */
.tag-row-wrapper span, .badge {
    background-color: #222222 !important;
    color: #cccccc !important;
    border: 1px solid #333333 !important;
}

.distance-badge {
    background-color: #ebf8ff;
    color: #2b6cb0;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    white-space: nowrap;
}

.tag-row-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.gym-tag-item {
    font-size: 11px;
    background-color: #f0f2f5;
    color: #4a5568;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.card-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
    flex: 1;
}

.detail-item {
    display: flex;
    font-size: 13.5px;
    line-height: 1.4;
}

.detail-label {
    width: 110px;
    color: #718096;
    font-weight: 600;
    flex-shrink: 0;
}

.detail-value {
    color: #2d3748;
}

/* バッジ類 */
.badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
}
.badge-free { background-color: #e6fffa; color: #319795; }
.badge-paid { background-color: #fffaf0; color: #dd6b20; }

/* アクションボタン */
.card-actions-wrapper {
    border-top: 1px solid #edf2f7;
    padding-top: 15px;
}

.action-row-top {
    display: grid;
    grid-template-columns: 1fr 1fr 1.3fr;
    gap: 8px;
}

.btn-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
    font-weight: bold;
    transition: 0.2s;
    text-align: center;
}

.btn-waze { background-color: #ebf8ff; color: #2b6cb0; }
.btn-waze:hover { background-color: #bee3f8; }
.btn-gmaps { background-color: #f7fafc; color: #4a5568; border: 1px solid #e2e8f0; }
.btn-gmaps:hover { background-color: #edf2f7; }

.btn-primary-action { background-color: #144e40; color: white; }
.btn-primary-action:hover { background-color: #0b2e26; }
.btn-whatsapp-color { background-color: #25D366; color: white; }
.btn-whatsapp-color:hover { background-color: #1ebd56; }

/* フッター */
/* ==========================================
   追加修正：フッター色合わせ ＆ フィルター文字視認性向上
   ========================================== */

/* 1. フッターをピアノブラック調に統一 */
footer,
.footer-container,
div[style*="background-color"] ~ footer { /* 階層構造に応じて確実に上書き */
    background: linear-gradient(180deg, #111111 0%, #050505 100%) !important;
    border-top: 1px solid #222222;
    color: #888888 !important; /* 免責事項などのテキストは落ち着いたグレーに */
}

/* フッター内のリンクやコピーライトの文字色調整 */
footer a, 
footer p, 
footer span {
    color: #aaaaaa !important;
}
.main-footer {
    background-color: #1a202c;
    color: #a0aec0;
    padding: 40px 20px;
    text-align: center;
    margin-top: 60px;
}

.share-actions-row {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 25px;
}

.btn-share-global {
    padding: 10px 20px;
    border-radius: 20px;
    border: none;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
}
.share-wa { background-color: #25D366; color: white; }
.share-line { background-color: #06C755; color: white; }
.share-copy { background-color: #4a5568; color: white; }

.disclaimer-box {
    max-width: 800px;
    margin: 0 auto 15px;
    font-size: 11.5px;
    line-height: 1.6;
    opacity: 0.7;
}

.copyright {
    font-size: 12px;
}

.hidden { display: none !important; }

/* トースト */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #2d3748;
    color: white;
    padding: 12px 30px;
    border-radius: 30px;
    font-size: 14px;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* レスポンシブ設計 */
@media (max-width: 850px) {
    .content-wrapper {
        flex-direction: column;
    }
    .filter-sidebar {
        width: 100%;
        position: relative;
        top: 0;
    }
    .filter-group {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
    .gym-grid {
        grid-template-columns: 1fr;
    }
}
/* 追加または既存のstyle.cssを上書き */
.map-badge-id {
    background-color: #e53e3e;
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: bold;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(229, 62, 62, 0.2);
}
/* ==========================================
   レイアウトを崩さないピアノブラック調カスタム
   ========================================== */

/* 1. タイトルとサブタイトルのフォント切り替え（Google Fonts） */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@800&family=Inter:wght@400&display=swap');

#main-title {
    font-family: 'Montserrat', 'Helvetica Neue', Arial, sans-serif !important;
    font-weight: 800 !important;
    letter-spacing: 0.5px !important;
    color: #ffffff !important;
}

#main-subtitle {
    font-family: 'Inter', sans-serif !important;
    font-weight: 400 !important;
    letter-spacing: 0.2px !important;
    color: #b3b3b3 !important;
}

/* 2. 画面全体の背景（データ部背景）を漆黒に */
body {
    background-color: #0d0d0d !important;
    color: #e0e0e0 !important;
}

/* 3. ヘッダーを艶のあるピアノブラックに */
.main-header {
    background: linear-gradient(135deg, #050505 0%, #1a1a1a 100%) !important;
    border-bottom: 1px solid #262626 !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8) !important;
}

/* 4. フッターの色をヘッダーと同調 */
.main-footer {
    background: linear-gradient(180deg, #111111 0%, #050505 100%) !important;
    border-top: 1px solid #222222 !important;
}

.main-footer p, 
.main-footer span, 
.main-footer .disclaimer-box {
    color: #777777 !important;
}

/* 5. 左側フィルター枠内の文字色だけを明るく調整（背景や枠線は元のまま触りません） */
.refine-features h3,
.refine-features label,
.refine-features span {
    color: #e0e0e0 !important;
}
/* ==========================================
   【最終解決】サイドバー白飛び修正 ＆ フォント適用
   ========================================== */

/* 1. タイトルとサブタイトルのフォントを実際に適用 */
#main-title {
    font-family: 'Montserrat', 'Helvetica Neue', Arial, sans-serif !important;
    font-weight: 800 !important;
    letter-spacing: 0.5px !important;
}
#main-subtitle {
    font-family: 'Inter', sans-serif !important;
    font-weight: 400 !important;
    letter-spacing: 0.2px !important;
}

/* 2. 白く浮いていたサイドバーの背景をピアノブラック調に修正 */
.filter-sidebar {
    background-color: #141414 !important; /* 深みのある黒に近いダークグレー */
    border: 1px solid #262626 !important;  /* 目立たない薄い境界線 */
    box-shadow: 0 4px 16px rgba(0,0,0,0.5) !important; /* 影を暗く */
}

/* 3. サイドバー内の文字色を読みやすく調整 */
.filter-sidebar h3 {
    color: #ffffff !important;           /* タイトル「Refine Features」を純白に */
    border-bottom: 2px solid #262626 !important; /* 区切り線も暗色化 */
}

.filter-group label {
    color: #cccccc !important;           /* チェックボックスの文字を明るいグレーに */
}

/* 4. ヘッダー自体の背景（元のグリーンや白を上書き） */
header, .main-header, div[style*="background-color"] {
    background: linear-gradient(135deg, #050505 0%, #1a1a1a 100%) !important;
}
/* ==========================================
   ヘッダータイトル・サブタイトルの中央配置
   ========================================== */

/* ヘッダー全体のテキスト配置を中央寄せに変更 */
.main-header {
    text-align: center !important;
    padding: 30px 20px !important; /* 上下の余白を少し広げて、よりバランスを良くします */
}

/* タイトルとサブタイトルが中央に美しく収まるように調整 */
#main-title {
    margin: 0 auto 10px auto !important;
    display: block !important;
}

#main-subtitle {
    margin: 0 auto !important;
    display: block !important;
    max-width: 800px; /* 横に広がりすぎないよう制限をかけ、2行に綺麗に折り返るバランスにします */
    line-height: 1.5 !important;
}
/* ==========================================
   ヘッダー背景画像の適用 ＆ 操作エリアの余白調整
   ========================================== */

/* 1. 保存した背景画像をヘッダーに美しく適用 */
header, .main-header {
    background: linear-gradient(rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0.85)), 
                url('../images/back.jpg') no-repeat center center !important;
    background-size: cover !important;
    text-align: center !important;
}

/* 2. サブタイトルの下にしっかりとした余白（約24px）を確保 */
#main-subtitle {
    margin: 0 auto 24px auto !important; /* 下側に24pxの余白を空けて、下の検索エリアと離します */
    display: block !important;
    max-width: 800px;
    line-height: 1.5 !important;
}

/* 3. 検索窓とNear Meボタンを包むコンテナの配置バランスを微調整 */
.search-container, .search-box-wrapper, .search-bar {
    margin-top: 0 !important; /* 重複する不要なマージンをリセット */
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px; /* 検索窓とNear Meボタンの間の横方向の隙間 */
}
/* ==========================================
   ヘッダー背景画像をしっかり見える明るさに調整
   ========================================== */

header, .main-header {
    /* 黒い重なりを「0.65〜0.85」から「0.3〜0.5」へ大幅に薄くし、画像を明るく露出させます */
    background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.5)), 
                url('../images/back.jpg') no-repeat center center !important;
    background-size: cover !important;
}

/* 画像を明るくした分、白文字にうっすら影をつけて文字のクッキリ感をキープします */
#main-title {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8) !important;
}

#main-subtitle {
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8) !important;
}
/* ==========================================
   モバイル画面でのスタイル（最終調整版）
   ========================================== */

@media (max-width: 768px) {
    /* 🚀 スマホ用ヘッダー：干渉を防ぐため、headerと.main-headerを完全に統一して明るくします */
    header, .main-header {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        padding: 20px 15px 25px 15px !important; /* モバイル用に余白を最適化 */
        
        /* 🔥【完全修正】黒いフィルターを極限まで薄くし、back2.jpg の明るさを引き出します */
        background: linear-gradient(rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.1)), 
                    url('../images/back2.jpg') no-repeat center bottom !important;
        background-size: cover !important;
    }

    /* 言語ボタンの位置を上部に安全に配置（重なり防止） */
    .lang-selector {
        position: static !important; /* 絶対配置を解除して重なりを完全に防ぐ */
        margin-bottom: 15px !important; /* タイトルとの間に隙間を空ける */
        display: flex !important;
        gap: 8px !important;
    }

    /* モバイルでのタイトルサイズ */
    #main-title {
        font-size: 1.8rem !important;
        line-height: 1.2 !important;
        margin-bottom: 12px !important;
    }

    /* サブタイトルと下の検索窓の隙間 */
    #main-subtitle {
        font-size: 0.95rem !important;
        margin-bottom: 20px !important;
    }
}
/* ==========================================
   モバイル画面専用：ヘッダーを明るく表示
   ========================================== */
@media (max-width: 768px) {
    header.main-header, 
    .main-header {
        /* 現在の設定(0.3, 0.5)を(0.1, 0.1)に下げて、
           背後の画像をより明るく透過させます。
        */
        background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0)), 
                    url('../images/back.jpg') no-repeat center bottom !important;
        background-size: cover !important;
    }
}