/* ==========================================================================
   HEALTH SCREENING GUIDE - STYLESHEET (Updated for 2-Column Grid)
   ========================================================================== */

:root {
    --primary-color: #0d9488;    /* ティール / 清潔感のあるメディカルカラー */
    --primary-dark: #0f766e;
    --secondary-color: #2563eb;  /* ブルー / マップ・ナビゲーション用 */
    --accent-color: #f59e0b;     /* アンバー / 特徴・プレミアム表示用 */
    --text-main: #1f2937;
    --text-muted: #4b5563;
    --bg-light: #f8fafc;
    --bg-card: #ffffff;
    --border-color: #e2e8f0;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --transition-fast: 0.2s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Noto Sans', 'Noto Sans JP', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-main);
    line-height: 1.6;
    padding-bottom: 40px;
}

/* コンテナ幅を広げて2列分のスペースを確保 */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ヘッダーセクションのスタイル修正 */
.main-header {
    position: relative;
    /* 💡 保存した画像を背景に指定し、中央寄せ・カバーサイズに設定 */
    background: url('../images/back.jpg') no-repeat center center;
    background-size: cover;
    padding: 60px 20px 80px 20px;
    color: #ffffff;
    text-align: center;
    overflow: hidden;
}

/* 💡 文字の視認性を確保するための黒系グラデーション（必要に応じて透過度を調整してください） */
.header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.2), rgba(15, 23, 42, 0.9));
    z-index: 1;
}

/* ヘッダー内のコンテンツを前面に出す */
.header-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.lang-selector {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
}

.lang-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #ffffff;
    padding: 6px 14px;
    border-radius: var(--radius-lg);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-fast);
}

.lang-btn.active, .lang-btn:hover {
    background: #ffffff;
    color: var(--primary-dark);
    border-color: #ffffff;
    box-shadow: var(--shadow-sm);
}

#main-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
    line-height: 1.3;
}

#main-subtitle {
    font-size: 14px;
    color: rgba(255,255,255,0.9);
    font-weight: 400;
}

/* 2. コントロールパネル (検索 & Near Me) */
.control-panel {
    max-width: 1200px;
    margin: -24px auto 16px auto;
    padding: 0 16px;
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.search-box {
    position: relative;
    width: 100%;
}

.search-box input {
    width: 100%;
    padding: 14px 44px 14px 16px;
    font-size: 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--bg-card);
    box-shadow: var(--shadow-md);
    outline: none;
    transition: var(--transition-fast);
}

.search-box input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

.clear-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 22px;
    color: var(--text-muted);
    cursor: pointer;
    display: none;
}

.nearme-btn {
    width: 100%;
    background-color: var(--primary-color);
    color: #ffffff;
    border: none;
    padding: 14px;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition-fast);
}

.nearme-btn:active {
    background-color: var(--primary-dark);
}

.nearme-btn.active {
    background-color: #ef4444;
}

/* 3. カウンター */
.counter-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 8px 20px;
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

/* 4. クリニックリスト構造 (初期はスマホ用に縦1列) */
.clinic-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.clinic-card {
    background-color: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* ボタンを下部に固定するため */
    position: relative;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.clinic-card:hover {
    box-shadow: var(--shadow-md);
}

/* メイン情報エリア (名前と距離) */
.card-header-main {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}

.clinic-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.4;
    min-width: 0;
}

.distance-badge {
    background-color: #f1f5f9;
    color: var(--primary-dark);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

/* メタ詳細リスト */
.card-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    flex-grow: 1; /* コンテンツが短くても高さを揃える */
}

.detail-item {
    display: flex;
    flex-direction: column;
    border-bottom: 1px dashed #f1f5f9;
    padding-bottom: 6px;
}

.detail-label {
    font-weight: 700;
    color: var(--text-muted);
    font-size: 11px;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.detail-value {
    color: var(--text-main);
    word-break: break-word;
}

/* バッジスタイル表記 */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}
.badge-free { background-color: #dcfce7; color: #166534; }
.badge-paid { background-color: #fee2e2; color: #991b1b; }

/* 5. 2段式アクションボタン */
.card-actions-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto; /* カードの最下部に押し下げる */
}

.action-row-top {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.action-row-bottom {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.btn-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 4px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    border: 1px solid var(--border-color);
    background-color: #f8fafc;
    color: var(--text-main);
    transition: var(--transition-fast);
}

.btn-action span.icon {
    font-size: 16px;
    margin-bottom: 2px;
}

.btn-action:active {
    background-color: #ede9fe;
    transform: scale(0.98);
}

.btn-waze { background-color: #33d4ff; color: #000; border: none; }
.btn-gmaps { background-color: #ffffff; color: #34a853; }
.btn-primary-action { background-color: var(--primary-color); color: #ffffff; border: none; }
.btn-primary-action:active { background-color: var(--primary-dark); }

.btn-wechat { color: #07c160; }
.btn-whatsapp { color: #25d366; }

/* 6. その他システム用スタイル */
.no-results {
    text-align: center;
    padding: 40px 16px;
    color: var(--text-muted);
    font-weight: 500;
}

.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(15, 23, 42, 0.9);
    color: #ffffff;
    padding: 12px 24px;
    border-radius: var(--radius-lg);
    font-size: 14px;
    font-weight: 500;
    z-index: 1000;
    box-shadow: var(--shadow-md);
    opacity: 1;
    transition: opacity 0.3s ease;
}

.main-footer {
    text-align: center;
    padding: 30px 16px 10px 16px;
    font-size: 12px;
    color: var(--text-muted);
}

.hidden {
    display: none !important;
}

/* ==========================================================================
   【ここを強化】タブレット・PC向けレスポンシブ拡張
   ========================================================================== */
@media (min-width: 480px) {
    #main-title { font-size: 28px; }
    .control-panel { flex-direction: row; }
    .search-box { flex: 1; }
    .nearme-btn { width: auto; white-space: nowrap; padding: 0 24px; }
    .detail-item { flex-direction: row; align-items: baseline; }
    .detail-label { min-width: 140px; margin-bottom: 0; padding-right: 8px; }
}

/* 画面幅が 850px 以上の環境（PCや大型タブレット）で綺麗な2列（Grid）に切り替える */
@media (min-width: 850px) {
    .clinic-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr); /* 均等に2列並べる */
        gap: 24px; /* カード同士の間隔 */
    }
}
/* フッター内シェアボタンのスタイル */
.footer-share-container {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.btn-share-foot {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-fast);
}

.btn-share-foot:active {
    transform: scale(0.98);
}

/* 各SNSブランドカラーのホバー・アクティブ効果 */
.btn-share-foot.btn-wechat { color: #07c160; }
.btn-share-foot.btn-wechat:hover { background-color: #07c160; color: #fff; border-color: #07c160; }

.btn-share-foot.btn-whatsapp { color: #25d366; }
.btn-share-foot.btn-whatsapp:hover { background-color: #25d366; color: #fff; border-color: #25d366; }

.btn-share-foot.btn-line { color: #06c755; }
.btn-share-foot.btn-line:hover { background-color: #06c755; color: #fff; border-color: #06c755; }

.btn-share-foot.btn-copy { color: var(--primary-color); }
.btn-share-foot.btn-copy:hover { background-color: var(--primary-color); color: #fff; border-color: var(--primary-color); }

.main-footer .copyright {
    margin-top: 10px;
    font-size: 12px;
    color: var(--text-muted);
}
/* 免責事項表示ボックスのスタイル */
.footer-disclaimer-box {
    max-width: 800px;
    margin: 16px auto 20px auto;
    padding: 12px 16px;
    background-color: #f1f5f9; /* 落ち着いたグレー背景 */
    border-left: 4px solid #cbd5e1;
    border-radius: 4px;
    text-align: left; /* 長文を読みやすくするため左寄せ */
}

#footer-disclaimer-text {
    font-size: 11px;
    line-height: 1.5;
    color: #64748b; /* マイルドなテキストカラー */
}

.main-footer .copyright {
    margin-top: 14px;
    font-size: 11px;
    color: var(--text-muted);
}