/*
 * land.css
 * 株式会社井清不動産 - 宅地事例ページ
 * iseifudousan-child テーマ用
 */

/* ============================================================
   共通変数
   ============================================================ */
:root {
  --brown-dark:    #341d0a;
  --brown-mid:     #5a3320;
  --gold:          #c8945a;
  --gold-light:    #c8a878;
  --orange:        #df641f;
  --orange-light:  #f08e3a;
  --text-dark:     #3d2010;
  --text-light:    #8c7060;
  --bg-cream:      #faf7f3;
  --border-color:  #341d09;
}

/* ============================================================
   ページ全体
   ============================================================ */
.land-archive {
  background-color: #ffffff;
  padding: 56px 0 96px;
}

.land-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 40px;
}

/* ============================================================
   ページタイトル
   ============================================================ */
.land-heading {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border-color);
  margin-bottom: 40px;
}

.land-title {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--text-dark);
  letter-spacing: 0.3em;
  margin: 0;
}

.land-title-en {
  font-family: acumin-variable, sans-serif;
  font-variation-settings: "slnt" -12, "wdth" 67.5, "wght" 300;
  font-size: 1.2rem;
  color: var(--gold);
  letter-spacing: 0.15em;
}

/* ============================================================
   一覧(アコーディオン)
   ============================================================ */
.land-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.land-item {
  margin: 0;
}

/* ヘッダー部分(ボタン) */
.land-item-header {
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
  padding: 14px 18px 14px 0;
  background-color: var(--brown-dark);
  border: none;
  border-radius: 4px;
  color: #fff;
  cursor: pointer;
  text-align: left;
  font: inherit;
  transition: background-color 0.2s;
}

.land-item-header:hover {
  background-color: var(--brown-mid);
}

/* 区画タイプタグ(オレンジ) */
.land-type-label {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 180px;
  padding: 8px 12px;
  background-color: var(--orange);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  border-radius: 4px;
  margin-left: 14px;
  box-sizing: border-box;
  text-align: center;
}

/* 物件吁E*/
.land-item-name {
  flex-shrink: 0;
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  color: #ffffff;
}

/* 完売情報 */
.land-item-status {
  flex: 1;
  font-size: 0.8125rem;
  color: #ffffff;
  letter-spacing: 0.04em;
  line-height: 1;
}

/* 開閉矢印 */
.land-item-arrow {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background-color: #ffffff;
  border-radius: 50%;
  position: relative;
  transition: transform 0.3s, background-color 0.2s;
}

.land-item-arrow::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid #df641f;
  transform: translate(-50%, -40%);
}

.land-item.is-open .land-item-arrow {
  transform: rotate(-180deg);
}

/* パネル(画像表示エリア) */
.land-item-panel {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.4s ease;
}

.land-item.is-open .land-item-panel {
  max-height: 1500px;
}

.land-item-panel-inner {
  padding: 24px 12px;
  text-align: center;
}

.land-item-img-btn {
  display: inline-block;
  padding: 0;
  background: transparent;
  border: none;
  cursor: zoom-in;
  font: inherit;
  transition: opacity 0.2s;
}

.land-item-img-btn:hover {
  opacity: 0.85;
}

.land-item-img-btn:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 4px;
}

.land-item-img {
  max-width: 100%;
  height: auto;
  display: inline-block;
}

/* ============================================================
   画像モーダル
   ============================================================ */
.land-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  box-sizing: border-box;
}

.land-modal.is-open {
  display: flex;
}

.land-modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.85);
  cursor: zoom-out;
}

.land-modal-content {
  position: relative;
  z-index: 1;
  max-width: 95vw;
  max-height: 95vh;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: landModalFadeIn 0.2s ease-out;
}

@keyframes landModalFadeIn {
  from { opacity: 0; transform: scale(0.97); }
  to   { opacity: 1; transform: scale(1); }
}

.land-modal-image {
  max-width: 95vw;
  max-height: 80vh;
  width: auto;
  height: auto;
  display: block;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.land-modal-close {
  position: absolute;
  top: -44px;
  right: -4px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #fff;
  font-size: 32px;
  line-height: 1;
  padding: 0;
  transition: opacity 0.2s;
}

.land-modal-close:hover {
  opacity: 0.7;
}

@media (max-width: 600px) {
  .land-modal-close {
    top: -36px;
    width: 32px;
    height: 32px;
    font-size: 26px;
  }
}

/* ============================================================
   ページネーション
   ============================================================ */
.land-pagination {
  margin-top: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
  font-size: 0.9375rem;
  color: var(--text-dark);
}

.land-pagination .page-numbers {
  text-decoration: none;
  color: var(--text-dark);
  padding: 4px 6px;
}

.land-pagination .page-numbers.current {
  font-weight: 700;
}

.land-pagination-edge {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  font-size: 0.9375rem;
  padding: 0 4px;
}

.page-edge-link {
  text-decoration: none;
  color: var(--text-dark);
}

.page-edge-link:hover {
  color: var(--gold);
}

.page-edge-link.is-disabled {
  pointer-events: none;
  opacity: 0.35;
}

/* 空表示 */
.land-empty {
  text-align: center;
  color: var(--text-light);
  padding: 80px 20px;
  font-size: 0.9375rem;
}

/* ============================================================
   レスポンシブ
   ============================================================ */
@media (max-width: 700px) {
  .land-archive {
    padding: 32px 0 64px;
  }

  .land-inner {
    padding: 0 20px;
  }

  .land-title {
    font-size: 1.375rem;
    letter-spacing: 0.2em;
  }

  .land-item-header {
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 12px;
  }

  /* 1段目:タグ + 矢印(タグの右側いっぱい) */
  .land-type-label {
    order: 1;
    flex: 120px;
    margin-left: 0;
    padding: 6px 12px;
    font-size: 0.75rem;
    width: 120px;
  }

  .land-item-arrow {
    order: 4;
    margin-left: auto;
  }

  /* 2段目以降:名前と完売情報を改行 */
  .land-item-name {
    order: 2;
    flex: 50%;
    font-size: 1.25rem;
    letter-spacing: 0.1em;
  }

  .land-item-status {
    order: 3;
    flex: 80%;
    font-size: 0.7rem;
    margin-top: 2px;
  }

  .land-item-panel-inner {
    padding: 16px 6px;
  }
}
