/* ============================================================
   遛小孩 liuxiaohai.com — style.css  v1.0.3
   完整重寫：消除歷史 patch 衝突，恢復親子柔和品牌感
   ============================================================ */

/* ── CSS 變數 ── */
:root {
  --milk:   #fff6e8;
  --cream:  #fffaf2;
  --coffee: #3b2b22;
  --muted:  #8b7466;
  --peach:  #ffd9c8;
  --green:  #cfe7c6;
  --sky:    #ccefeb;
  --sun:    #fff0b7;
  --pink:   #ffe1de;
  --white:  #fffdf8;
  --coral:  #d96b4f;
  --shadow: 0 14px 34px rgba(92,62,36,.12);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Noto Sans TC", "Microsoft JhengHei", Segoe UI, sans-serif;
  color: var(--coffee);
  background: linear-gradient(180deg, #f7ead7 0%, #fffaf2 28%, #fff6e8 100%);
}
a { color: inherit; }

/* 全域 button reset — 消滅所有原生樣式 */
button {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  outline: none;
  cursor: pointer;
  font-family: inherit;
  background: transparent;
  padding: 0;
}

/* ── 版面容器 ── */
.wrap {
  width: min(100% - 32px, 980px);
  margin: 0 auto;
  padding: 22px 0 64px;
}

/* ── Hero ── */
.hero {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  background:
    linear-gradient(90deg,
      rgba(255,250,242,.88) 0%,
      rgba(255,250,242,.52) 44%,
      rgba(255,250,242,.08) 100%),
    url('assets/hero.png');
  background-size: cover;
  background-position: center;
  min-height: 340px;
  box-shadow: var(--shadow);
  padding: 34px 36px;
  display: flex;
  align-items: flex-start;
}
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 520px;
}
.logo {
  width: 76px;
  height: 76px;
  border-radius: 999px;
  object-fit: cover;
  box-shadow: 0 8px 22px rgba(92,62,36,.14);
  background: #fff;
}
h1 {
  font-size: 42px;
  line-height: 1.08;
  margin: 16px 0 10px;
  letter-spacing: .03em;
}
.subtitle {
  font-size: 19px;
  margin: 0 0 8px;
  color: #5b4638;
  font-weight: 700;
}
.value {
  font-size: 15px;
  color: #6f5a4d;
  margin: 0 0 16px;
}
.date-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.9);
  border: 1px solid rgba(255,255,255,.95);
  padding: 9px 16px;
  border-radius: 999px;
  font-weight: 700;
  color: #c45b40;
  font-size: 14px;
  box-shadow: 0 6px 18px rgba(92,62,36,.10);
}

/* ── Section ── */
.section { margin-top: 32px; }
h2 { font-size: 24px; margin: 0 0 6px; }
.lead { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.7; }

/* ── 篩選區 ── */
.filter-panel {
  margin: 24px 0 20px;
  padding: 24px 26px;
  border-radius: 28px;
  background: rgba(255,255,255,.90);
  border: 1px solid rgba(92,62,36,.06);
  box-shadow: 0 18px 42px rgba(92,62,36,.10);
}
.filter-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}
.filter-panel h2 { font-size: 22px; margin: 0 0 4px; color: #3b2b22; }
.filter-panel p  { color: #8b7466; margin: 0; font-weight: 700; font-size: 14px; }

.selected-filters {
  display: inline-block;
  font-size: 13px;
  font-weight: 800;
  color: #6b4c35;
  background: #fff4d8;
  border: 1px solid rgba(255,210,140,.45);
  border-radius: 999px;
  padding: 8px 14px;
  margin: 10px 0 12px;
}

.clear-filter-btn {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  cursor: pointer;
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 900;
  font-family: inherit;
  background: #3b2b22;
  color: #fffaf2;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(59,43,34,.18);
  transition: transform .18s ease, box-shadow .18s ease;
}
.clear-filter-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(59,43,34,.24);
}

.filter-more {
  border: 0;
  margin-top: 10px;
}
.filter-more summary {
  cursor: pointer;
  font-weight: 900;
  color: #3b2b22;
  list-style: none;
  margin-bottom: 10px;
  font-size: 14px;
}
.filter-more summary::-webkit-details-marker { display: none; }
.filter-more summary::after  { content: "＋"; display: inline-block; margin-left: 6px; font-weight: 900; }
.filter-more[open] summary::after { content: "－"; }

.filter-group { margin: 12px 0 14px; }
.filter-group-title {
  font-size: 12px;
  font-weight: 900;
  color: #9a5b3e;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

/* ── Filter chip — 核心 pill 樣式 ── */
.filter-chip {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid rgba(255,210,140,.45);
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  font-family: inherit;
  cursor: pointer;
  background: #fff4d8;
  color: #3b2b22;
  box-shadow: 0 4px 12px rgba(92,62,36,.08);
  transition:
    transform .18s ease,
    box-shadow .18s ease,
    background .18s ease,
    color .18s ease,
    border-color .18s ease;
}
.filter-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(92,62,36,.13);
  background: #ffe9b8;
  border-color: rgba(255,180,100,.55);
}
.filter-chip.active {
  background: var(--coral);
  color: #fffaf2;
  border-color: transparent;
  box-shadow: 0 6px 18px rgba(180,72,40,.24);
  transform: translateY(-1px);
}
.filter-chip:focus-visible {
  outline: 3px solid rgba(255,190,120,.55);
  outline-offset: 2px;
}

/* ── 推薦卡 pick grid ── */
.pick-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 14px;
}
.pick-card {
  background: var(--white);
  border: 1px solid rgba(92,62,36,.09);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(92,62,36,.12);
  transition: transform .2s ease, box-shadow .2s ease;
}
.pick-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(92,62,36,.15);
}
.pick-cover {
  height: 104px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 46px;
}
.pick-body { padding: 16px 18px 18px; }
.kicker {
  font-size: 11px;
  letter-spacing: .08em;
  color: #c45b40;
  font-weight: 900;
  text-transform: uppercase;
}
.pick-title {
  font-size: 20px;
  line-height: 1.22;
  margin: 6px 0 8px;
  font-weight: 900;
}
.desc {
  font-size: 14px;
  line-height: 1.7;
  color: #5b4638;
  margin: 0 0 10px;
}

/* ── 主清單 main-grid ── */
.main-list-section h2 { margin-bottom: 4px; }
.main-list-section .section-note {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 14px;
}
.result-count {
  font-size: 14px;
  font-weight: 700;
  color: #7b6657;
  margin: 4px 0 16px;
  letter-spacing: .01em;
}
.main-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

/* ── Event card ── */
.event-card {
  background: rgba(255,255,255,.94);
  border: 1px solid rgba(92,62,36,.08);
  border-radius: 22px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 24px rgba(92,62,36,.09);
  transition: transform .2s ease, box-shadow .2s ease;
}
.event-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(92,62,36,.13);
}
.event-card.hidden { display: none !important; }
.event-cover {
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
}
.card-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.event-card h3 {
  font-size: 16px;
  line-height: 1.35;
  margin: 0 0 6px;
  font-weight: 900;
  color: #3b2b22;
}
.card-summary {
  font-size: 13px;
  line-height: 1.65;
  color: #5b4638;
  margin: 0 0 8px;
}
.mini-info {
  display: grid;
  gap: 4px;
  font-size: 12px;
  line-height: 1.5;
  color: #7b6657;
  margin: 7px 0 9px;
  background: rgba(255,250,242,.75);
  border-radius: 10px;
  padding: 7px 9px;
}
.info-row { display: block; }
.rec-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 900;
  padding: 4px 8px;
  border-radius: 999px;
  background: #ffe1d5;
  color: #b94d34;
  margin: 4px 6px 6px 0;
}
.source-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 900;
  padding: 4px 8px;
  border-radius: 999px;
  background: #fff3d8;
  color: #8b5d25;
  margin: 4px 0 6px;
}
.verified-date {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #9a8778;
  margin: 5px 0 4px;
}
.verified-date.unverified { color: #c0876a; font-style: italic; }

/* ── Tag 膠囊 ── */
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 800;
  background: #f3e8d8;
  color: #6a4a33;
}
.tag.free   { background: #e6f5d8; color: #3e7b36; }
.tag.indoor { background: #e4f4f1; color: #2d746d; }
.tag.warn   { background: #ffe5df; color: #ab4c3a; }

/* ── 連結 ── */
.more {
  display: inline-block;
  margin-top: auto;
  padding-top: 10px;
  font-size: 13px;
  font-weight: 900;
  color: #b7523a;
  text-decoration: none;
}
.more:hover { text-decoration: underline; }

/* ── Event 狀態 badge ── */
.event-status-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 900;
  padding: 3px 9px;
  border-radius: 999px;
  margin: 0 6px 6px 0;
  vertical-align: middle;
}
.badge-upcoming { background: #e3eeff; color: #2b5ebb; }
.badge-ongoing  { background: #e2f5e1; color: #2e7d32; }
.badge-last     { background: #fff0cc; color: #a05a00; }
.event-date {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  color: #7b6657;
  margin: 0 6px 6px 0;
  vertical-align: middle;
}

/* ── 空狀態 ── */
.empty-state {
  display: none;
  padding: 20px 22px;
  border-radius: 18px;
  background: #fff7db;
  border: 1px solid #f2d98f;
  color: #5b4638;
  margin-top: 14px;
  font-weight: 800;
  line-height: 1.7;
}
.empty-state.show { display: block; }
.empty-hints {
  font-size: 13px;
  font-weight: 700;
  color: #8b7466;
  margin: 4px 0 12px;
}

/* ── 注意事項 / footer ── */
.notice {
  margin-top: 34px;
  background: #fff7db;
  border: 1px solid #f2d98f;
  border-radius: 18px;
  padding: 18px 20px;
  line-height: 1.8;
  color: #5b4638;
  font-size: 14px;
}
.footer {
  text-align: center;
  color: #9a8778;
  font-size: 13px;
  margin-top: 24px;
}

/* ── 主題色 ── */
.sky   { background: var(--sky);   }
.sun   { background: var(--sun);   }
.peach { background: var(--peach); }
.green { background: var(--green); }
.pink  { background: var(--pink);  }

/* ============================================================
   Responsive
   ============================================================ */

/* 平板 ≤ 900px */
@media (max-width: 900px) {
  .main-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
  .pick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .filter-head { flex-direction: column; }
  .clear-filter-btn { align-self: flex-start; }
}

/* 手機 ≤ 560px */
@media (max-width: 560px) {
  .wrap { width: min(100% - 24px, 100%); }

  .hero {
    min-height: 300px;
    border-radius: 24px;
    padding: 24px 22px;
    background-position: 64% center;
  }
  /* 手機 hero overlay 稍微不透明讓文字更清楚 */
  .hero {
    background:
      linear-gradient(90deg,
        rgba(255,250,242,.92) 0%,
        rgba(255,250,242,.70) 52%,
        rgba(255,250,242,.20) 100%),
      url('assets/hero.png');
    background-size: cover;
    background-position: 64% center;
  }

  h1 { font-size: 32px; }
  .subtitle { font-size: 16px; }
  .logo { width: 64px; height: 64px; }

  .filter-panel { padding: 18px 16px; border-radius: 22px; }
  .filter-panel h2 { font-size: 20px; }
  .filter-bar { gap: 7px; }
  .filter-chip { font-size: 12px; padding: 8px 11px; }

  .main-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .pick-grid { grid-template-columns: 1fr; }

  h2 { font-size: 21px; }
}
