/*
=====================================
物件一覧ページ専用CSS v5
nlist5.php用スタイル
- 動画ボタン最小化（赤背景・白文字のみ）
- カード高さ統一
- レスポンシブ完全対応（横スクロール防止）
=====================================
*/

:root {
  --list-primary: #0095d8;
  --list-coop-green: #22ac38;
  --list-accent-orange: #f08200;
  --list-accent-red: #e60012;
  --list-type1: #0075c1;
  --list-type2: #f08200;
  --list-type3: #00b0ec;
  --list-type4: #e60012;
  --list-border: #ddd;
  --list-bg-light: #f9f9f9;
}

/* ========================================
   横スクロール防止（全体）
======================================== */
* {
  box-sizing: border-box;
}

html, body {
  overflow-x: hidden;
  width: 100%;
}

/* ========================================
   レイアウト
======================================== */
.subpage {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.main-block02 {
  width: 100%;
}

/* ========================================
   エリア表示（地図検索から来た場合）
======================================== */
.area-back-block {
  margin-bottom: 30px;
  padding: 20px;
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.area-back-link {
  margin-bottom: 15px;
}

.area-back-link a {
  display: inline-block;
  padding: 10px 20px;
  background-color: white;
  color: var(--list-primary);
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.area-back-link a:hover {
  background-color: var(--list-primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.area-name-title {
  font-size: 24px;
  font-weight: bold;
  color: var(--list-primary);
  text-align: center;
}

/* ========================================
   物件リスト（2カラムレイアウト - PC）
======================================== */
.list-data {
  width: 100%;
}

.list-data > ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

/* PC表示：2カラム */
@media (min-width: 900px) {
  .list-data > ul {
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
  }
}

.list-data > ul > li {
  background-color: white;
  border: 2px solid var(--list-border);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  overflow: hidden;
}

.list-data > ul > li:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

/* ========================================
   物件情報ヘッダー
======================================== */
.ledger-no {
  position: absolute;
  top: 15px;
  right: 15px;
  background-color: var(--list-bg-light);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  color: #666;
  font-weight: bold;
}

.bukken-type {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 6px;
  color: white;
  font-weight: bold;
  font-size: 13px;
  margin-bottom: 8px;
}

.bukken-type.seikyo {
  background-color: var(--list-type1);
}

.bukken-type.gesyuku {
  background-color: var(--list-type2);
}

.bukken-type.apaman {
  background-color: var(--list-type3);
}

.bukken-type.apart {
  background-color: var(--list-type4);
}

.bukken-no {
  display: inline-block;
  margin-left: 10px;
  font-size: 12px;
  color: #888;
}

/* ========================================
   物件ブロック（画像＋情報）
======================================== */
.bukken-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 10px 0;
}

.bukken-img {
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  background-color: var(--list-bg-light);
  position: relative;
}

.bukken-img img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  aspect-ratio: 4/3;
  max-width: 100%;
}

/* 動画ありバッジ（画像の右上） */
.movie-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background-color: #ff0000;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: bold;
  line-height: 1;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  z-index: 10;
}

/* 満室バッジ（画像の左上） */
.vacancy-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background-color: #ff9800;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: bold;
  line-height: 1;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  z-index: 10;
}

/* ========================================
   物件名
======================================== */
.bukken-name {
  display: block;
  font-size: 17px;
  font-weight: bold;
  color: #333;
  margin: 10px 0;
  line-height: 1.4;
}

.bukken-block > div:last-child {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bukken-block span {
  display: block;
  font-size: 14px;
  line-height: 1.5;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.address {
  color: #666;
  font-size: 13px;
}

.price {
  font-size: 15px;
  font-weight: bold;
  color: var(--list-accent-red);
}

.price span {
  font-size: 18px;
  display: inline;
}

.service {
  color: #666;
  font-size: 13px;
}

.distance {
  color: var(--list-primary);
  font-weight: bold;
  font-size: 14px;
}

/* ========================================
   間取り
======================================== */
.foot-print {
  display: block;
  padding: 8px 12px;
  background-color: var(--list-bg-light);
  border-radius: 6px;
  margin: 10px 0;
  font-size: 13px;
  color: #555;
  word-wrap: break-word;
}

/* ========================================
   設備バッジ
======================================== */
.equipment-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 10px 0;
}

.badge {
  display: inline-block;
  padding: 4px 8px;
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
  color: #1976d2;
  border-radius: 14px;
  font-size: 10px;
  font-weight: bold;
  border: 1px solid #90caf9;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.badge:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* バッジの種類別カラー */
.badge.meal {
  background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
  color: #e65100;
  border-color: #ffb74d;
}

.badge.kitchen {
  background: linear-gradient(135deg, #fce4ec 0%, #f8bbd0 100%);
  color: #c2185b;
  border-color: #f06292;
}

.badge.bath {
  background: linear-gradient(135deg, #e0f2f1 0%, #b2dfdb 100%);
  color: #00695c;
  border-color: #4db6ac;
}

.badge.heating {
  background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
  color: #c62828;
  border-color: #e57373;
}

.badge.security {
  background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
  color: #6a1b9a;
  border-color: #ba68c8;
}

.badge.furniture {
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
  color: #2e7d32;
  border-color: #66bb6a;
}

.badge.internet {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
  color: #1565c0;
  border-color: #42a5f5;
}

/* ========================================
   詳細ボタン（pc-onlyを削除して統一）
======================================== */
.detail-button,
.detail-link {
  margin-top: auto;
  padding-top: 12px;
}

.detail-button a,
.detail-link a {
  display: block;
  text-align: center;
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--list-primary) 0%, #0277bd 100%);
  color: white;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 14px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.detail-button a:hover,
.detail-link a:hover {
  background: linear-gradient(135deg, #0277bd 0%, #01579b 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* pc-onlyクラスを非表示に */
.pc-only {
  display: none !important;
}

/* ========================================
   ページネーション（改善版）
======================================== */
#pager {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin: 40px auto;
  padding: 15px 10px;
  list-style: none;
  max-width: 100%;
}

#pager li {
  margin: 0;
}

#pager li a {
  display: block;
  padding: 6px 10px;
  min-width: 32px;
  background-color: white;
  border: 1px solid var(--list-border);
  border-radius: 4px;
  color: var(--list-primary);
  text-decoration: none;
  font-weight: 500;
  font-size: 13px;
  text-align: center;
  transition: all 0.3s ease;
}

#pager li a:hover {
  background-color: var(--list-primary);
  color: white;
  border-color: var(--list-primary);
}

#pager li#current {
  padding: 6px 10px;
  min-width: 32px;
  background-color: var(--list-primary);
  color: white;
  border-radius: 4px;
  font-weight: 600;
  font-size: 13px;
  text-align: center;
}

#pager li.disabled {
  padding: 6px 10px;
  color: #ccc;
  cursor: not-allowed;
  font-size: 13px;
}

#pager li#prev a,
#pager li#next a {
  padding: 6px 12px;
  font-size: 12px;
  white-space: nowrap;
}

/* ========================================
   該当なしメッセージ
======================================== */
.list-data p {
  text-align: center;
  padding: 60px 20px;
  font-size: 18px;
  color: #666;
  background-color: var(--list-bg-light);
  border-radius: 12px;
  margin: 40px 0;
}

/* ========================================
   レスポンシブ（SP）
======================================== */
@media (max-width: 899px) {
  .subpage {
    padding: 10px;
  }
  
  .area-back-block {
    padding: 15px;
  }
  
  .area-name-title {
    font-size: 20px;
  }
  
  .list-data > ul {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .list-data > ul > li {
    padding: 15px;
  }
  
  .ledger-no {
    position: static;
    display: inline-block;
    margin-left: 8px;
    font-size: 10px;
    padding: 3px 8px;
  }
  
  .bukken-type {
    font-size: 12px;
    padding: 5px 10px;
  }
  
  .bukken-name {
    font-size: 15px;
  }
  
  .bukken-block {
    gap: 10px;
  }
  
  .equipment-badges {
    gap: 4px;
  }
  
  .badge {
    font-size: 9px;
    padding: 3px 6px;
  }
  
  .price {
    font-size: 14px;
  }
  
  .price span {
    font-size: 16px;
  }
  
  #pager {
    gap: 3px;
    padding: 10px 5px;
  }
  
  #pager li a,
  #pager li#current,
  #pager li.disabled {
    padding: 5px 8px;
    min-width: 28px;
    font-size: 12px;
  }
  
  #pager li#prev a,
  #pager li#next a {
    padding: 5px 10px;
    font-size: 11px;
  }
}

/* ========================================
   タブレット表示
======================================== */
@media (min-width: 600px) and (max-width: 899px) {
  .bukken-block {
    flex-direction: row;
    gap: 15px;
  }
  
  .bukken-img {
    flex: 0 0 180px;
    max-width: 180px;
  }
  
  .bukken-block > div:last-child {
    flex: 1;
    min-width: 0;
  }
}