/* ==========================================================================
   🔑 共通リセット＆ベース設定（KLWBATH/KL24GYMスタイルを踏襲）
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: #0d0d0d !important; /* 深みのある漆黒 */
    color: #e0e0e0 !important;          /* 文字は読みやすいライトグレー */
    line-height: 1.6;
}

/* ==========================================================================
   🌅 ヘッダーセクション（グラデーション＆背後を明るく露出）
   ========================================================================== */
.main-header {
    position: relative;
    padding: 40px 20px;
    text-align: center;
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.6)), /* 👈 ここをお好みで調整 */
                url('../images/back.jpg') no-repeat center center;
    background-size: cover;
    border-bottom: 1px solid #222;
}

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

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

.lang-btn:hover, .lang-btn.active {
    background: #4a7c59; /* 🌳 芝生グリーンに変更 */
    border-color: #4a7c59;
}

#main-title {
    font-size: 2.2rem;
    margin-bottom: 10px;
    color: #fff;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8) !important;
}

#main-subtitle {
    font-size: 1rem;
    color: #a0aec0;
    max-width: 700px;
    margin: 0 auto 25px;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8) !important;
}

/* 検索エリア */
.search-container {
    display: flex;
    justify-content: center;
    gap: 12px;
    max-width: 650px;
    margin: 0 auto;
}

.search-box {
    position: relative;
    flex: 1;
}

.search-box input {
    width: 100%;
    padding: 14px 40px 14px 16px;
    background: #111;
    border: 1px solid #333;
    border-radius: 8px;
    color: #fff;
    font-size: 15px;
}

.search-box input:focus {
    border-color: #4a7c59; /* 🌳 芝生グリーン */
    outline: none;
}

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

#nearme-btn {
    background: #222;
    border: 1px solid #333;
    color: #fff;
    padding: 0 20px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

#nearme-btn:hover, #nearme-btn.active {
    background: #64b5f6; /* 🌤️ 青空のスカイブルー */
    border-color: #64b5f6;
}


/* ==========================================================================
   レイアウトのベース（PC向け：サイドバー固定）
   ========================================================================== */
.main-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 💻 PC環境：サイドバーを画面に固定 */
.sidebar {
    width: 280px;
    flex-shrink: 0;
    position: sticky;
    top: 20px; 
    max-height: calc(100vh - 40px); 
    overflow-y: auto;
    background-color: #111; /* 元の暗色に統一 */
    padding: 20px;
    border-radius: 8px;
}

/* メインの物件リストエリア */
.content-area {
    flex-grow: 1;
    flex: 1;
}

.filter-group {
    background: #111;
    border: 1px solid #222;
    border-bottom: 1px solid #333; 
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.filter-group h3 {
    font-size: 14px;
    color: #ccc;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.area-badges {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.area-badge {
    background: #1a1a1a;
    border: 1px solid transparent;
    color: #cbd5e1;
    padding: 10px;
    text-align: left;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.area-badge:hover, .area-badge.active {
    background: #1e291e;   /* ほんのりグリーン */
    border-color: #4a7c59; /* 🌳 芝生グリーン */
    color: #fff;
}

.filter-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    cursor: pointer;
    font-size: 14px;
    color: #e0e0e0 !important;
}

.filter-group label:hover {
    color: #ffffff !important;
}

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

.property-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); 
    gap: 20px;                             
}

/* ==========================================================================
   🃏 プロパティカード＆各種リンクボタン
   ========================================================================== */
.property-card {
    background: #111;
    border: 1px solid #222;
    border-radius: 12px;
    padding: 24px;
    display: flex;
    flex-direction: column;   
    justify-content: space-between;
    transition: transform 0.2s, border-color 0.2s;
}

.property-card:hover {
    border-color: #4a7c59; /* 🌳 ホバー時に芝生グリーン */
}

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

.prop-name {
    font-size: 1.25rem;
    color: #fff;
    font-weight: bold;
}

.distance-badge {
    display: inline-block;
    font-size: 12px;
    background: #64b5f6; /* 🌤️ スカイブルーに変更 */
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 8px;
    vertical-align: middle;
}

.map-badge-id {
    font-size: 11px;
    background: #222;
    color: #a0aec0;
    padding: 3px 8px;
    border-radius: 4px;
    font-family: monospace;
}

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

.tag-row-wrapper span {
    background: rgba(74, 124, 89, 0.1);  /* 🌿 薄いグリーン */
    border: 1px solid rgba(74, 124, 89, 0.2);
    color: #a3ccab;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 12px;
}

/* 特徴タグのカラー調整 */
.tag-amenity {
    background: rgba(74, 124, 89, 0.2) !important;
    border: 1px solid rgba(74, 124, 89, 0.4) !important;
    color: #81c784 !important; /* 公園・カフェを連想する鮮やか緑 */
}
.tag-size {
    background: rgba(176, 125, 98, 0.15) !important; /* 🪵 温かい土・犬の毛並みの茶 */
    border: 1px solid rgba(176, 125, 98, 0.3) !important;
    color: #d7ccc8 !important;
}

.card-details {
    background: #050505;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    flex-grow: 1; 
}

.detail-item {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    margin-bottom: 6px;
}

.detail-item:last-child {
    margin-bottom: 0;
}

.detail-label {
    color: #718096;
}

.detail-value {
    color: #e2e8f0;
}

/* ボタン関係 */
.card-actions-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto; 
}

.action-row-portal, .action-row-nav {
    display: flex;
    gap: 10px;
}

.btn-portal {
    flex: 1;
    text-align: center;
    padding: 12px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 14px;
    text-decoration: none;
    transition: opacity 0.2s;
}

.btn-pg { background-color: #e00000; color: #fff; }
.btn-ip { background-color: #ff5a00; color: #fff; }

.btn-action {
    flex: 1;
    text-align: center;
    padding: 10px;
    border-radius: 6px;
    font-size: 13px;
    text-decoration: none;
    color: #fff;
    background: #1a1a1a;
    border: 1px solid #333;
    transition: background 0.2s;
}

.btn-waze:hover { background: #64b5f6; border-color: #64b5f6; } /* 🌤️ スカイブルー */
.btn-gmaps:hover { background: #4a7c59; border-color: #4a7c59; } /* 🌳 グリーン */
.btn-portal:hover, .btn-action:hover { opacity: 0.9; }

/* ==========================================================================
   💡 ペットFAQ＆インフォメーションセクション
   ========================================================================== */
.pet-faq-section {
    background: #0a0a0a;
    border-top: 1px solid #222;
    padding: 50px 20px;
}

.faq-container {
    max-width: 1100px;
    margin: 0 auto;
}

.faq-container h2 {
    font-size: 1.8rem;
    color: #fff;
    margin-bottom: 30px;
    text-align: center;
}

.faq-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.faq-card {
    background: #111;
    border: 1px solid #222;
    border-left: 4px solid #4a7c59; /* 🌳 グリーン */
    border-radius: 0 8px 8px 0;
    padding: 20px;
}

.faq-card h3 {
    font-size: 16px;
    color: #fff;
    margin-bottom: 10px;
}

.faq-card p {
    font-size: 14px;
    color: #a0aec0;
    text-align: justify;
}

/* ==========================================================================
   フッター＆ソーシャルシェア
   ========================================================================== */
.main-footer {
    background: #0d0d0d;
    border-top: 1px solid #222;
    padding: 40px 20px;
    text-align: center;
}

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

.btn-share-global {
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: bold;
    text-decoration: none;
    color: #fff;
    cursor: pointer;
    border: none;
}

.share-wc { background: #07c160 !important; } 
.share-wa { background: #25d366; }
.share-line { background: #06c755; }
.share-copy { background: #4a7c59; } /* 🌳 グリーン */

.copyright {
    font-size: 12px;
    color: #555;
}

/* ==========================================================================
   📱 モバイル対応（メディアクエリ：768px以下）
   ========================================================================== */
@media (max-width: 768px) {
    header, .main-header {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        padding: 20px 15px 25px 15px !important;
        background: linear-gradient(rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.1)), 
                    url('../images/back.jpg') no-repeat center bottom !important;
        background-size: cover !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;
    }

    .lang-selector {
        position: static !important;
        margin-bottom: 15px !important;
        display: flex !important;
        gap: 8px !important;
    }

    .search-container {
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }
    #nearme-btn { padding: 12px; }

    .main-layout {
        flex-direction: column;
        padding: 0 15px;
        margin: 15px auto !important;
        gap: 15px !important;
    }

    .sidebar {
        width: 100%;
        position: static; 
        max-height: none;
        padding: 16px;
    }
}
/* ==========================================================================
   📱 スマートフォン・モバイル専用のレイアウト最適化（768px以下）
   ========================================================================== */
@media (max-width: 768px) {
    /* 1. 固定高さは使わず、上下の余白（padding）を限界まで削って約40%スリム化 */
    .main-header {
        padding: 10px 15px 12px 15px !important; /* 上下の無駄な広がりを徹底的にカット */
        height: auto !important;                 /* 崩れの原因だった固定高さを解除 */
        min-height: 0 !important;
    }

    /* 言語ボタンがタイトルに被らないよう、右上隅の最適な位置へ配置 */
    .lang-selector {
        position: absolute !important;
        top: 6px !important;
        right: 10px !important;
    }
    .lang-btn {
        padding: 2px 6px !important;
        font-size: 11px !important;
    }

    /* タイトルの文字サイズを抑え、上下の余白を極限まで詰める */
    .main-header h1 {
        font-size: 19px !important;    
        margin-top: 22px !important;   /* ボタンと重ならない安全な隙間を確保 */
        margin-bottom: 2px !important; /* 下の説明文との隙間を最小に */
        line-height: 1.2 !important;
    }

    /* 説明文（Find your best...）の上下の余白を詰める */
    .main-header p {
        font-size: 11px !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;   /* ヘッダー最下部との隙間をカット */
        line-height: 1.2 !important;
    }

    /* 2. 検索窓エリアの不要な上下の隙間を排除 */
    .search-wrapper {
        max-width: 100% !important;
        margin: 5px auto 4px auto !important; /* 上下の外側余白をギリギリまで詰める */
        padding: 0 10px !important;
    }

    .search-container {
        gap: 5px !important; /* 検索窓とボタンの隙間を狭く */
    }

    /* 検索入力欄とNear Meボタンの高さをスマホ向けに少し薄くしてスマートに */
    #search-input {
        height: 38px !important;
        padding: 6px 12px !important;
        font-size: 13px !important;
    }

    button, .btn-nearme, #nearme-btn {
        height: 38px !important;
        padding: 6px 12px !important;
        font-size: 13px !important;
    }

    /* 3. 件数カウント（Found 〇〇 properties）の余白を縮小 */
    #result-counter {
        margin: 4px auto 8px auto !important;
        font-size: 12px !important;
        padding: 0 10px !important;
    }

    /* 4. 物件リストを美しい1列縦並びに統一 */
    #property-list {
        display: flex !important;
        flex-direction: column !important;
        grid-template-columns: none !important;
        gap: 12px !important; 
        padding: 0 10px 20px 10px !important;
    }

    .property-card {
        width: 100% !important;
    }

    /* 5. カード内の余白やボタンもスマホ向けに最適化 */
    .card-header-main {
        padding: 10px 12px !important;
    }
    .prop-name {
        font-size: 16px !important;
    }
    .card-details {
        padding: 10px 12px !important;
        gap: 6px !important;
    }
    .card-actions-wrapper {
        padding: 10px 12px !important;
        gap: 8px !important;
    }
    .btn-portal, .btn-action {
        padding: 8px 5px !important;
        font-size: 12px !important;
    }
}