@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@400;500;700&family=Poppins:wght@400;500;600;700;800&display=swap');

html, body { margin: 0; padding: 0; }

.nc-spaces {
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334152;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --cyan-50: #ecfeff;
  --cyan-600: #0891b2;
  --cyan-700: #0e7490;
  --amber-50: #fffbeb;
  --amber-700: #b45309;
  --white: #ffffff;
  color: var(--slate-900);
  background: var(--white);
  font-family: 'Poppins', 'Noto Sans TC', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.7;
}

.nc-spaces *, .nc-spaces *::before, .nc-spaces *::after { box-sizing: border-box; }
.nc-spaces a { color: inherit; }

.nc-spaces .container { width: min(1000px, 100%); margin: 0 auto; padding: 0 1.5rem; }

.nc-spaces .header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--slate-200);
}

.nc-spaces .nav {
  min-height: 4.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nc-spaces .brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; font-size: 1.1rem; font-weight: 700; color: var(--slate-900); }
.nc-spaces .brand img { flex-shrink: 0; display: block; }
.nc-spaces .home-link { color: var(--cyan-700); font-weight: 600; text-decoration: none; font-size: .92rem; }
.nc-spaces .home-link:hover { text-decoration: underline; }

.nc-spaces .breadcrumb {
  font-size: .85rem;
  color: var(--slate-500);
  margin: 1.75rem 0 .5rem;
}
.nc-spaces .breadcrumb a { color: var(--slate-500); text-decoration: none; }
.nc-spaces .breadcrumb a:hover { color: var(--cyan-700); text-decoration: underline; }

.nc-spaces .section { padding: 2.5rem 0 5rem; }

.nc-spaces .tag {
  display: inline-block;
  background: var(--cyan-50);
  color: var(--cyan-700);
  padding: .25rem .75rem;
  border-radius: 9999px;
  font-size: .85rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.nc-spaces .tag-warn { background: var(--amber-50); color: var(--amber-700); }

.nc-spaces h1, .nc-spaces h2, .nc-spaces h3, .nc-spaces p { margin-top: 0; }
.nc-spaces h1, .nc-spaces h2, .nc-spaces h3 { text-wrap: balance; }
.nc-spaces .lead, .nc-spaces .body-copy { text-wrap: pretty; }

.nc-spaces h1 { max-width: 820px; margin-bottom: 1rem; font-size: clamp(1.8rem, 4.5vw, 2.6rem); font-weight: 800; line-height: 1.18; }
.nc-spaces h2 { max-width: 820px; margin-bottom: 1.25rem; font-size: clamp(1.5rem, 3.5vw, 2rem); font-weight: 800; line-height: 1.22; }
.nc-spaces h3 { margin-bottom: .6rem; font-size: 1.15rem; font-weight: 700; }

.nc-spaces .lead { max-width: 720px; color: var(--slate-700); font-size: clamp(1.02rem, 2vw, 1.15rem); margin-bottom: 1rem; }
.nc-spaces .body-copy { max-width: 760px; color: var(--slate-600); font-size: 1.02rem; line-height: 1.85; margin-bottom: 1rem; }
.nc-spaces .small-copy { color: var(--slate-500); font-size: .88rem; line-height: 1.7; }

.nc-spaces .btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-weight: 600;
  padding: .7rem 1.4rem;
  border-radius: .5rem;
  text-decoration: none;
  font-size: .95rem;
  transition: all .2s ease;
}
.nc-spaces .btn-primary { background: var(--cyan-600); color: #fff; }
.nc-spaces .btn-primary:hover { background: var(--cyan-700); transform: translateY(-2px); }
.nc-spaces .btn-outline { border: 2px solid var(--cyan-600); color: var(--cyan-600); }
.nc-spaces .btn-outline:hover { background: var(--cyan-50); }

.nc-spaces .filter-bar { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
.nc-spaces .filter-chip {
  border: 1px solid var(--slate-200);
  background: var(--white);
  color: var(--slate-600);
  padding: .5rem 1rem;
  border-radius: 9999px;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s ease;
}
.nc-spaces .filter-chip:hover { border-color: var(--cyan-600); color: var(--cyan-700); }
.nc-spaces .filter-chip.active { background: var(--cyan-600); border-color: var(--cyan-600); color: #fff; }

.nc-spaces .card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }

.nc-spaces .program-card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: 1rem;
  overflow: hidden;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}
.nc-spaces .program-card:hover { transform: translateY(-3px); box-shadow: 0 16px 24px -12px rgba(0,0,0,.12); }
.nc-spaces .program-card-body { padding: 1.5rem; display: flex; flex-direction: column; gap: .75rem; }
.nc-spaces .program-card h3 { margin-bottom: 0; }
.nc-spaces .program-card .card-meta { color: var(--slate-500); font-size: .85rem; }
.nc-spaces .program-card .card-summary { color: var(--slate-600); font-size: .92rem; line-height: 1.65; }

/* 品牌化示意卡片(E6-F3):每種計畫類型一組漸層 + icon,取代真實外部照片 */
.nc-spaces .card-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 108px;
  flex-shrink: 0;
  background-image:
    repeating-linear-gradient(135deg, rgba(255,255,255,.08) 0 2px, transparent 2px 18px);
}
.nc-spaces .card-visual.detail-visual {
  height: 168px;
  border-radius: 1rem;
  margin-top: 1.5rem;
}
.nc-spaces .card-visual svg { opacity: .95; filter: drop-shadow(0 2px 6px rgba(0,0,0,.15)); }
.nc-spaces .card-visual .flag-emoji { font-size: 2.75rem; line-height: 1; filter: drop-shadow(0 2px 6px rgba(0,0,0,.2)); }
.nc-spaces .card-visual.visual-cafe { background-color: #0e7490; background-image: linear-gradient(135deg, #0891b2, #0e7490), repeating-linear-gradient(135deg, rgba(255,255,255,.08) 0 2px, transparent 2px 18px); }
.nc-spaces .card-visual.visual-coworking { background-color: #b45309; background-image: linear-gradient(135deg, #f59e0b, #b45309), repeating-linear-gradient(135deg, rgba(255,255,255,.08) 0 2px, transparent 2px 18px); }
.nc-spaces .card-visual.visual-hostel { background-color: #4338ca; background-image: linear-gradient(135deg, #6366f1, #4338ca), repeating-linear-gradient(135deg, rgba(255,255,255,.08) 0 2px, transparent 2px 18px); }
.nc-spaces .card-visual.visual-teahouse { background-color: #047857; background-image: linear-gradient(135deg, #34d399, #047857), repeating-linear-gradient(135deg, rgba(255,255,255,.08) 0 2px, transparent 2px 18px); }
.nc-spaces .card-visual.visual-bookstore { background-color: #be185d; background-image: linear-gradient(135deg, #f472b6, #be185d), repeating-linear-gradient(135deg, rgba(255,255,255,.08) 0 2px, transparent 2px 18px); }

/* 照片預留區(v1 尚無自有照片,先用示意卡片頂替;之後有 NexCircle 自己
   拍攝或取得授權的照片時,直接把 detail-visual 換成 <img> 即可) */
.nc-spaces .photo-placeholder {
  height: 200px;
  border-radius: 1rem;
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--slate-100);
  color: var(--slate-400);
  font-size: .85rem;
  text-align: center;
  padding: 1rem;
}

/* 實用資訊表(插座/網速/安靜度/空間感/參考價) */
.nc-spaces .info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  background: var(--slate-50);
  border-radius: 1rem;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}
.nc-spaces .info-item { display: flex; flex-direction: column; gap: .2rem; }
.nc-spaces .info-item .info-label { font-size: .75rem; color: var(--slate-500); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.nc-spaces .info-item .info-value { font-size: .95rem; color: var(--slate-900); font-weight: 600; }
.nc-spaces .maps-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: var(--cyan-700);
  font-weight: 600;
  text-decoration: none;
  font-size: .92rem;
}
.nc-spaces .maps-link:hover { text-decoration: underline; }

.nc-spaces .status-pill {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .75rem;
  font-weight: 700;
  padding: .2rem .6rem;
  border-radius: 9999px;
  width: fit-content;
}
.nc-spaces .status-open { background: #dcfce7; color: #166534; }
.nc-spaces .status-cohort_based { background: var(--cyan-50); color: var(--cyan-700); }
.nc-spaces .status-closed { background: var(--slate-100); color: var(--slate-500); }

.nc-spaces .type-badge {
  display: inline-block;
  font-size: .75rem;
  font-weight: 600;
  color: var(--slate-500);
  background: var(--slate-100);
  padding: .2rem .6rem;
  border-radius: .4rem;
}

.nc-spaces .notice-box {
  background: var(--amber-50);
  color: var(--amber-700);
  border-radius: .75rem;
  padding: 1rem 1.25rem;
  font-size: .92rem;
  font-weight: 600;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.nc-spaces .highlight-list { padding-left: 1.2rem; margin: 0 0 2rem; color: var(--slate-700); }
.nc-spaces .highlight-list li { margin-bottom: .5rem; line-height: 1.65; }

.nc-spaces table { width: 100%; border-collapse: collapse; font-size: .92rem; margin-bottom: 2rem; }
.nc-spaces th, .nc-spaces td { text-align: left; padding: .75rem 1rem; border-bottom: 1px solid var(--slate-200); vertical-align: top; }
.nc-spaces th { color: var(--slate-500); font-weight: 600; font-size: .82rem; text-transform: uppercase; letter-spacing: .03em; }
.nc-spaces td { color: var(--slate-600); line-height: 1.6; }
.nc-spaces td strong { color: var(--slate-900); }
.nc-spaces tr:last-child td { border-bottom: 0; }
.nc-spaces .table-wrap { overflow-x: auto; margin-bottom: 2rem; }

.nc-spaces .sources { font-size: .85rem; color: var(--slate-500); }
.nc-spaces .sources a { color: var(--cyan-700); text-decoration: underline; }

.nc-spaces .data-verified { font-size: .8rem; color: var(--slate-400); margin-top: .35rem; }
.nc-spaces .data-verified.is-stale { color: var(--amber-700); font-weight: 600; }

.nc-spaces .footer {
  padding: 2rem 0;
  border-top: 1px solid var(--slate-200);
  color: var(--slate-500);
  font-size: .88rem;
  text-align: center;
}

@media (max-width: 640px) {
  .nc-spaces .container { padding: 0 1rem; }
  .nc-spaces table, .nc-spaces thead, .nc-spaces tbody, .nc-spaces th, .nc-spaces td, .nc-spaces tr { display: block; }
  .nc-spaces thead { display: none; }
  .nc-spaces tr { border: 1px solid var(--slate-200); border-radius: .75rem; margin-bottom: 1rem; padding: .75rem 1rem; }
  .nc-spaces td { border-bottom: 0; padding: .35rem 0; }
  .nc-spaces td::before { content: attr(data-label); display: block; font-size: .75rem; font-weight: 600; color: var(--slate-400); text-transform: uppercase; }
}
