/* ==========================================================================
   首頁 — 場地搜尋、多元使用情境、最新消息、輕鬆使用
   尺寸皆為設計稿量得的數值 × --u（見 tokens.css）
   ========================================================================== */

/* 區塊標題：字距放寬的黑體，右側掛一個線性圖示 */
.s2 .section-title {
  display: flex;
  align-items: center;
  gap: calc(14 * var(--u));
  font-size: calc(44 * var(--u));
  font-weight: 700;
  letter-spacing: 0.09em;
  line-height: 1.35;
  color: var(--text);
}

.s2 .section-title svg {
  flex: none;
  width: calc(38 * var(--u));
  height: calc(38 * var(--u));
  color: var(--blue-dark);
}

.s2 .section-more {
  display: inline-flex;
  align-items: center;
  gap: calc(7 * var(--u));
  font-size: calc(16 * var(--u));
  white-space: nowrap;
  color: var(--blue-outline);
  transition: color var(--dur) var(--ease);
}

.s2 .section-more svg {
  width: calc(16 * var(--u));
  height: calc(16 * var(--u));
}

.s2 .section-more:hover {
  color: var(--purple);
  text-decoration: underline;
}

/* =========================================================== 場地搜尋區 */

.s2 .search {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  align-items: start;
  background: var(--bg);
}

/* ---- 左側篩選欄 ---- */

.s2 .filters {
  position: sticky;
  top: 0;
  min-height: calc(810 * var(--u));
  padding: calc(28 * var(--u)) calc(40 * var(--u)) calc(34 * var(--u)) calc(28 * var(--u));
  background: var(--white);
}

.s2 .filters__locate {
  margin-bottom: calc(20 * var(--u));
  font-size: calc(19 * var(--u));
  line-height: 1.7;
}

.s2 .filters__address {
  font-weight: 500;
  color: var(--text);
}

.s2 .filters__relocate {
  margin-left: calc(4 * var(--u));
  font-size: calc(18 * var(--u));
  color: var(--blue-outline);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.s2 .filters__relocate:hover {
  text-decoration: underline;
}

/* 桌機不需要收合，整組條件直接展開 */
.s2 .filters__toggle {
  display: none;
}

/* 滑桿：軌道用邊框灰，已選段用品牌紫 */
.s2 .range {
  padding-top: calc(6 * var(--u));
}

.s2 .range__input {
  display: block;
  width: 100%;
  height: calc(22 * var(--u));
  margin: 0;
  background: transparent;
  appearance: none;
  cursor: pointer;
}

.s2 .range__input::-webkit-slider-runnable-track {
  height: calc(5 * var(--u));
  border-radius: 3px;
  background: linear-gradient(
    to right,
    var(--purple) 0 var(--fill, 50%),
    var(--border) var(--fill, 50%) 100%
  );
}

.s2 .range__input::-moz-range-track {
  height: calc(5 * var(--u));
  border-radius: 3px;
  background: var(--border);
}

.s2 .range__input::-moz-range-progress {
  height: calc(5 * var(--u));
  border-radius: 3px;
  background: var(--purple);
}

.s2 .range__input::-webkit-slider-thumb {
  appearance: none;
  width: calc(17 * var(--u));
  height: calc(17 * var(--u));
  margin-top: calc(-6 * var(--u));
  background: var(--purple);
  border: 2px solid var(--white);
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.32);
  transition: transform 140ms var(--ease);
}

.s2 .range__input:hover::-webkit-slider-thumb,
.s2 .range__input:focus-visible::-webkit-slider-thumb {
  transform: scale(1.2);
}

.s2 .range__input::-moz-range-thumb {
  width: calc(14 * var(--u));
  height: calc(14 * var(--u));
  background: var(--purple);
  border: 2px solid var(--white);
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.32);
}

.s2 .range__ticks {
  display: flex;
  justify-content: space-between;
  margin-top: calc(2 * var(--u));
  font-family: var(--font-num);
  font-size: calc(13 * var(--u));
  white-space: nowrap;
  color: var(--text-muted);
}

.s2 .range__value {
  float: right;
  font-weight: 500;
  color: var(--purple);
}

.s2 .filters__actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: calc(12 * var(--u));
  margin-top: calc(24 * var(--u));
}

.s2 .filters__reset {
  margin-top: calc(18 * var(--u));
  font-size: calc(15 * var(--u));
  color: var(--text-2);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.s2 .filters__reset:hover {
  color: var(--purple);
  text-decoration: underline;
}

/* 定位進行中的狀態列 */
.s2 .locate-status {
  display: none;
  align-items: center;
  gap: calc(9 * var(--u));
  margin-top: calc(16 * var(--u));
  padding: calc(11 * var(--u)) calc(14 * var(--u));
  font-size: calc(15 * var(--u));
  line-height: 1.5;
  border-radius: 6px;
}

.s2 .locate-status.is-busy {
  display: flex;
  color: var(--info);
  background: var(--info-bg);
}

.s2 .locate-status.is-done {
  display: flex;
  color: var(--green-dark);
  background: var(--green-light);
}

.s2 .locate-status svg {
  flex: none;
  width: calc(16 * var(--u));
  height: calc(16 * var(--u));
}

.s2 .spinner {
  flex: none;
  width: calc(15 * var(--u));
  height: calc(15 * var(--u));
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---- 右側結果區 ---- */

.s2 .results {
  padding: calc(16 * var(--u)) calc(20 * var(--u)) calc(24 * var(--u)) calc(21 * var(--u));
}

.s2 .results__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(18 * var(--u));
  height: calc(34 * var(--u));
  margin-bottom: calc(8 * var(--u));
  padding: 0 calc(2 * var(--u));
}

.s2 .results__count {
  font-size: calc(16 * var(--u));
  color: var(--text-2);
}

.s2 .results__count b {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-size: calc(20 * var(--u));
  font-weight: 700;
  color: var(--purple);
}

.s2 .results__sort {
  display: flex;
  align-items: center;
  gap: calc(9 * var(--u));
  font-size: calc(15 * var(--u));
  color: var(--text-2);
}

.s2 .results__sort select {
  padding: calc(5 * var(--u)) calc(11 * var(--u));
  font-size: calc(15 * var(--u));
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
}

.s2 .results__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: calc(22 * var(--u));
}

.s2 .results__empty {
  display: none;
  padding: calc(64 * var(--u)) calc(28 * var(--u));
  text-align: center;
  background: var(--white);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
}

.s2 .results__empty.is-shown {
  display: block;
}

.s2 .results__empty h3 {
  margin-bottom: calc(8 * var(--u));
  font-size: calc(22 * var(--u));
  font-weight: 700;
}

.s2 .results__empty p {
  font-size: calc(17 * var(--u));
  color: var(--text-2);
}

/* ---- 場地卡片 ---- */

.s2 .venue {
  display: grid;
  grid-template-columns: calc(247 * var(--u)) 1fr;
  min-height: calc(381 * var(--u));
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--border-card);
  border-radius: 4px;
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease),
    border-color var(--dur) var(--ease);
}

.s2 .venue:hover {
  transform: translateY(-3px);
  border-color: var(--purple-light);
  box-shadow: var(--shadow-hover);
}

.s2 .venue.is-hidden {
  display: none;
}

.s2 .venue__figure {
  position: relative;
  overflow: hidden;
  background: var(--bg);
}

.s2 .venue__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 560ms var(--ease);
}

.s2 .venue:hover .venue__img {
  transform: scale(1.05);
}

.s2 .venue__distance {
  position: absolute;
  left: calc(12 * var(--u));
  top: calc(12 * var(--u));
  display: none;
  align-items: center;
  gap: calc(6 * var(--u));
  padding: calc(5 * var(--u)) calc(12 * var(--u));
  font-size: calc(15 * var(--u));
  font-weight: 500;
  color: var(--white);
  background: rgba(47, 111, 169, 0.94);
  border-radius: 999px;
}

.s2 .venue__distance svg {
  width: calc(13 * var(--u));
  height: calc(13 * var(--u));
}

.s2 .venue__distance.is-shown {
  display: inline-flex;
}

.s2 .venue__body {
  display: flex;
  flex-direction: column;
  padding: calc(18 * var(--u)) calc(20 * var(--u)) calc(18 * var(--u)) calc(18 * var(--u));
}

.s2 .venue__name {
  font-size: calc(23 * var(--u));
  font-weight: 700;
  line-height: 1.45;
  color: var(--text);
}

.s2 .venue__uses {
  margin-top: calc(12 * var(--u));
  font-size: calc(15 * var(--u));
  line-height: 1.65;
  color: var(--text-2);
}

.s2 .venue__uses dd {
  margin: 0;
}

.s2 .venue__meta {
  margin-top: calc(13 * var(--u));
  display: grid;
  gap: calc(4 * var(--u));
}

.s2 .venue__meta-row {
  display: flex;
  align-items: center;
  gap: calc(8 * var(--u));
  font-size: calc(17 * var(--u));
  line-height: 1.5;
  color: var(--text);
}

.s2 .venue__meta-row svg {
  flex: none;
  width: calc(18 * var(--u));
  height: calc(18 * var(--u));
  color: var(--blue);
}

.s2 .venue__price {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums lining-nums;
  font-weight: 600;
  color: var(--purple);
}

.s2 .venue__actions {
  display: flex;
  gap: calc(12 * var(--u));
  margin-top: auto;
  padding-top: calc(15 * var(--u));
}

/* =========================================================== 多元使用情境 */

.s2 .scenes {
  padding: calc(62 * var(--u)) 0 calc(80 * var(--u));
  background: var(--purple-section);
}

.s2 .scenes__wrap {
  width: min(100% - var(--gutter) * 2, var(--wrap));
  margin: 0 auto;
}

.s2 .scenes__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: calc(24 * var(--u));
}

.s2 .scenes__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: calc(11 * var(--u));
  margin: calc(20 * var(--u)) 0 calc(30 * var(--u));
}

.s2 .scene-tab {
  padding: calc(9 * var(--u)) calc(22 * var(--u));
  font-size: calc(18 * var(--u));
  font-weight: 500;
  line-height: 1.45;
  color: #333333;
  background: var(--white);
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease);
}

.s2 .scene-tab:hover {
  box-shadow: 0 2px 10px rgba(84, 55, 138, 0.16);
}

.s2 .scene-tab[aria-selected="true"] {
  color: var(--white);
  background: var(--purple);
  box-shadow: var(--shadow-pop);
}

.s2 .scenes__panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: calc(526 * var(--u));
  overflow: hidden;
  border-radius: calc(26 * var(--u));
}

.s2 .scenes__copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(48 * var(--u)) calc(60 * var(--u));
  background: var(--purple);
  color: var(--white);
}

.s2 .scenes__headline {
  font-size: calc(30 * var(--u));
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.6;
}

.s2 .scenes__chips {
  display: flex;
  flex-wrap: wrap;
  gap: calc(11 * var(--u));
  margin-top: calc(26 * var(--u));
  max-width: calc(470 * var(--u));
}

.s2 .scenes__chip {
  padding: calc(7 * var(--u)) calc(18 * var(--u));
  font-size: calc(16 * var(--u));
  line-height: 1.45;
  color: #333333;
  background: var(--white);
  border-radius: 999px;
}

.s2 .scenes__figure {
  position: relative;
  overflow: hidden;
  background: var(--purple-dark);
}

.s2 .scenes__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 切換時整組淡入，讓標題、標籤、照片一起換 */
.s2 .scenes__headline,
.s2 .scenes__chips,
.s2 .scenes__photo {
  transition: opacity 240ms var(--ease);
}

.s2 .scenes__panel.is-swapping .scenes__headline,
.s2 .scenes__panel.is-swapping .scenes__chips,
.s2 .scenes__panel.is-swapping .scenes__photo {
  opacity: 0;
}

/* 標籤逐一浮現 */
.s2 .scenes__chip {
  animation: chip-in 320ms var(--ease) backwards;
}

@keyframes chip-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .s2 .scenes__chip {
    animation: none;
  }
}

/* =========================================================== 最新消息 */

.s2 .news {
  padding: calc(80 * var(--u)) 0 calc(84 * var(--u));
  background: var(--white);
}

.s2 .news__wrap {
  display: grid;
  grid-template-columns: calc(300 * var(--u)) 1fr;
  gap: calc(28 * var(--u));
  width: min(100% - var(--gutter) * 2, var(--wrap));
  margin: 0 auto;
}

.s2 .news__aside {
  padding-top: calc(4 * var(--u));
  padding-left: calc(39 * var(--u));
}

.s2 .news__aside .section-more {
  margin-top: calc(12 * var(--u));
}

.s2 .news__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-right: 1px solid var(--rule);
}

.s2 .news__item {
  display: flex;
  flex-direction: column;
  padding: calc(4 * var(--u)) calc(38 * var(--u)) calc(6 * var(--u));
  border-left: 1px solid var(--rule);
}

.s2 .news__date {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-size: calc(18 * var(--u));
  color: var(--text-2);
}

.s2 .news__title {
  margin-top: calc(8 * var(--u));
  font-size: calc(23 * var(--u));
  font-weight: 500;
  line-height: 1.7;
  color: var(--text);
  transition: color var(--dur) var(--ease);
}

.s2 .news__item:hover .news__title {
  color: var(--purple);
}

.s2 .news__cta {
  align-self: center;
  margin-top: calc(22 * var(--u));
  padding: calc(8 * var(--u)) calc(20 * var(--u));
  font-size: calc(17 * var(--u));
}

/* =========================================================== 輕鬆使用 */

.s2 .easy {
  position: relative;
  padding: calc(96 * var(--u)) 0 calc(94 * var(--u));
  overflow: hidden;
  background: var(--white);
}

.s2 .easy__bg {
  position: absolute;
  inset: 0;
  object-fit: cover;
  width: 100%;
  height: 100%;
  filter: saturate(0.45) contrast(0.9);
}

.s2 .easy__mask {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.86);
}

.s2 .easy__wrap {
  position: relative;
  width: min(100% - var(--gutter) * 2, var(--wrap));
  margin: 0 auto;
}

.s2 .easy__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: calc(27 * var(--u));
  margin-top: calc(34 * var(--u));
  min-height: calc(242 * var(--u));
}

.s2 .easy__card {
  padding: calc(26 * var(--u)) calc(26 * var(--u)) calc(28 * var(--u));
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--green-border);
  border-radius: calc(18 * var(--u));
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
    background var(--dur) var(--ease);
}

.s2 .easy__card:hover {
  transform: translateY(-4px);
  background: var(--white);
  box-shadow: 0 12px 28px rgba(67, 140, 82, 0.18);
}

.s2 .easy__icon {
  width: calc(62 * var(--u));
  height: calc(62 * var(--u));
  color: var(--green);
}

.s2 .easy__card-title {
  margin-top: calc(24 * var(--u));
  font-size: calc(32 * var(--u));
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.4;
  color: var(--text);
}

.s2 .easy__card-desc {
  margin-top: calc(9 * var(--u));
  font-size: calc(17 * var(--u));
  line-height: 1.7;
  color: var(--text-2);
}

.s2 .easy__cta {
  display: flex;
  justify-content: center;
  margin-top: calc(40 * var(--u));
}

.s2 .easy__cta .btn {
  padding: calc(11 * var(--u)) calc(26 * var(--u));
  font-size: calc(18 * var(--u));
}

/* =========================================================== 響應式 */

@media (max-width: 1024px) {
  .s2 .search {
    grid-template-columns: 260px 1fr;
  }

  .s2 .filters {
    min-height: 0;
    border-right: 1px solid var(--border);
  }

  .s2 .results__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .s2 .easy__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-height: 0;
  }

  .s2 .scenes__panel {
    min-height: 0;
  }
}

@media (max-width: 860px) {
  .s2 .search {
    grid-template-columns: minmax(0, 1fr);
  }

  .s2 .filters {
    position: static;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  /* 手機上先收起條件，讓場地清單直接出現在第一屏 */
  .s2 .filters__toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 13px 16px;
    font-size: 17px;
    font-weight: 500;
    color: var(--purple-dark);
    background: var(--purple-xlight);
    border: 1px solid var(--purple-light);
    border-radius: var(--radius);
    cursor: pointer;
  }

  .s2 .filters__toggle svg {
    transition: transform var(--dur) var(--ease);
  }

  .s2 .filters__toggle[aria-expanded="true"] svg {
    transform: rotate(180deg);
  }

  .s2 .filters__body {
    display: none;
    padding-top: 20px;
  }

  .s2 .filters__body.is-open {
    display: block;
  }

  .s2 .scenes__panel {
    grid-template-columns: minmax(0, 1fr);
  }

  .s2 .scenes__figure {
    min-height: 240px;
    order: -1;
  }

  .s2 .news__wrap {
    grid-template-columns: minmax(0, 1fr);
  }

  .s2 .news__list {
    grid-template-columns: minmax(0, 1fr);
    border-right: 0;
    border-top: 1px solid var(--rule);
  }

  .s2 .news__item {
    padding: 20px 0 22px;
    border-left: 0;
    border-bottom: 1px solid var(--rule);
  }

  .s2 .news__cta {
    align-self: flex-start;
  }
}

@media (max-width: 640px) {
  :root {
    --gutter: 18px;
  }

  .s2 .section-title {
    font-size: 26px;
  }

  .s2 .section-title svg {
    width: 24px;
    height: 24px;
  }

  .s2 .filters {
    padding: 22px 18px 26px;
  }

  .s2 .filters__actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .s2 .results {
    padding: 16px 18px 24px;
  }

  .s2 .venue {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }

  .s2 .venue__figure {
    height: 210px;
  }

  .s2 .scenes__copy {
    padding: 30px 24px 34px;
  }

  .s2 .scenes__headline {
    font-size: 22px;
  }

  .s2 .easy__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .s2 .easy__card-title {
    font-size: 24px;
  }
}

/* ==========================================================================
   以下為本專案補充（雛形未涵蓋的實際系統狀態）
   ========================================================================== */

/* ------------------------------------------------------ 待補正提醒 */

.s2 .home-alert {
  padding: calc(20 * var(--u)) 0 0;
  background: var(--bg);
}

.s2 .home-alert .note {
  align-items: center;
}

.s2 .home-alert__body {
  flex: 1;
  min-width: 0;
}

.s2 .home-alert__body b {
  font-size: calc(19 * var(--u));
}

.s2 .home-alert__body p {
  margin-top: calc(2 * var(--u));
  font-size: calc(16 * var(--u));
}

.s2 .home-alert__cases {
  display: flex;
  flex-wrap: wrap;
  gap: calc(8 * var(--u));
  margin-top: calc(10 * var(--u));
}

.s2 .home-alert__cases a:hover {
  text-decoration: underline;
}

@media (max-width: 640px) {
  .s2 .home-alert .note {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ------------------------------------------------------ 場地卡：尚無照片 */

.s2 .venue__img--placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: calc(180 * var(--u));
  font-size: calc(46 * var(--u));
  color: rgba(255, 255, 255, 0.85);
  background: linear-gradient(135deg, #7faed4, var(--blue-dark));
}

/* ------------------------------------------------------ 定位失敗狀態 */

.s2 .locate-status.is-failed {
  display: flex;
  color: #8e3232;
  background: var(--danger-bg);
}
