/* ========================================
   皮壮小分队 - 遛娃指南样式表
   设计基因：Pinterest 温暖视觉发现风格
   ======================================== */

/* CSS Variables */
:root {
  --brand-coral: #e85d4e;
  --brand-coral-dark: #c94a3d;
  --brand-green: #2d6a4f;
  --text-primary: #2d1f1c;
  --text-secondary: #62625b;
  --text-muted: #91918c;
  --bg-white: #ffffff;
  --bg-warm: #f7f6f3;
  --bg-sand: #e5e5e0;
  --bg-light: #e8e6e1;
  --border-color: #c8c8c1;
  --focus-blue: #435ee5;
  --walk-blue: #3a7ca5;
  --drive-orange: #d97c3e;
  --twin-blue: #5b8fc7;
  --footer-dark: #33332e;
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-white);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ========================================
   Navigation
   ======================================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.navbar.scrolled {
  border-bottom-color: var(--bg-sand);
  box-shadow: var(--shadow-sm);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.logo-icon {
  font-size: 22px;
}

.nav-search {
  display: none;
  align-items: center;
  flex: 1;
  max-width: 480px;
  margin: 0 24px;
  background: var(--bg-warm);
  border-radius: 50px;
  padding: 4px;
  border: 1px solid transparent;
  transition: border-color 0.2s;
}

.nav-search:focus-within {
  border-color: var(--focus-blue);
}

.nav-search input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 8px 16px;
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
}

.nav-search input::placeholder {
  color: var(--text-muted);
}

.search-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brand-coral);
  color: white;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-menu {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 18px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.nav-menu:hover {
  background: var(--bg-warm);
}

/* ========================================
   Hero
   ======================================== */
.hero {
  padding: 48px 20px 32px;
  text-align: center;
  background: linear-gradient(180deg, #fff 0%, var(--bg-warm) 100%);
}

.hero-title {
  font-size: 40px;
  font-weight: 600;
  color: var(--brand-coral);
  line-height: 1.1;
  margin-bottom: 12px;
}

.hero-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 28px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.filter-group {
  margin-bottom: 20px;
}

.filter-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-pills,
.category-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.pill,
.pill-cat {
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s;
  white-space: nowrap;
}

.pill {
  background: var(--bg-sand);
  color: var(--text-secondary);
}

.pill:hover {
  background: var(--bg-light);
}

.pill.active {
  background: var(--text-primary);
  color: #fff;
}

.pill-cat {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.pill-cat:hover {
  border-color: var(--text-muted);
  color: var(--text-primary);
}

.pill-cat.active {
  background: var(--brand-coral);
  color: #fff;
  border-color: var(--brand-coral);
}

/* ========================================
   Stats Bar
   ======================================== */
.stats-bar {
  display: flex;
  justify-content: center;
  gap: 32px;
  padding: 20px;
  background: var(--bg-white);
  border-bottom: 1px solid var(--bg-warm);
  overflow-x: auto;
}

.stat-item {
  text-align: center;
  min-width: 60px;
}

.stat-num {
  display: block;
  font-size: 24px;
  font-weight: 700;
  color: var(--brand-coral);
  line-height: 1;
}

.stat-label {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ========================================
   Main Content
   ======================================== */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 16px 64px;
}

.section-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 20px;
  padding-left: 4px;
}

/* Masonry Grid */
.masonry-grid {
  column-count: 1;
  column-gap: 16px;
}

.place-card {
  break-inside: avoid;
  margin-bottom: 16px;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--bg-warm);
  transition: border-color 0.2s, box-shadow 0.2s;
  will-change: border-color, box-shadow;
}

.place-card:hover {
  border-color: var(--bg-sand);
  box-shadow: var(--shadow-md);
}

.card-image {
  position: relative;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.3s;
}

.place-card:hover .card-image img {
  transform: scale(1.03);
}

.card-badges {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.badge {
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  backdrop-filter: blur(6px);
}

.badge-walk {
  background: rgba(232, 244, 248, 0.92);
  color: var(--walk-blue);
}

.badge-drive {
  background: rgba(254, 243, 232, 0.92);
  color: var(--drive-orange);
}

.card-body {
  padding: 16px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 6px;
}

.card-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
}

.card-rating {
  font-size: 13px;
  font-weight: 600;
  color: #b46900;
  white-space: nowrap;
  background: #fff8e7;
  padding: 3px 8px;
  border-radius: 50px;
}

.card-address {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 10px;
  line-height: 1.5;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.tag {
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 11px;
  font-weight: 500;
  background: var(--bg-warm);
  color: var(--text-secondary);
}

.tag-age {
  background: #fde8e6;
  color: var(--brand-coral);
}

.tag-twin {
  background: #edf4fc;
  color: var(--twin-blue);
}

.card-review {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 14px;
  padding: 12px;
  background: var(--bg-warm);
  border-radius: var(--radius-md);
  position: relative;
}

.card-review::before {
  content: """;
  position: absolute;
  top: 6px;
  left: 10px;
  font-size: 24px;
  color: var(--bg-sand);
  font-family: Georgia, serif;
  line-height: 1;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px solid var(--bg-warm);
  padding-top: 12px;
}

/* Hidden state for filtering */
.place-card.hidden {
  display: none;
}

/* ========================================
   FAB Map Button
   ======================================== */
.fab-map {
  position: fixed;
  right: 20px;
  bottom: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--brand-coral);
  color: #fff;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  z-index: 99;
  transition: transform 0.2s, background 0.2s;
}

.fab-map:hover {
  background: var(--brand-coral-dark);
  transform: scale(1.05);
}

/* ========================================
   Map Modal
   ======================================== */
.map-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.2s;
}

.map-modal.open {
  display: flex;
  opacity: 1;
}

.map-modal-content {
  background: var(--bg-white);
  width: 100%;
  max-width: 560px;
  border-radius: var(--radius-xl);
  padding: 24px;
  position: relative;
  box-shadow: var(--shadow-md);
}

.map-modal-content h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
  padding-right: 32px;
}

.map-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-warm);
  color: var(--text-secondary);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.map-close:hover {
  background: var(--bg-sand);
}

.map-placeholder {
  background: linear-gradient(135deg, #e8f4f8 0%, #fde8e6 100%);
  border-radius: var(--radius-lg);
  padding: 20px;
  min-height: 200px;
  display: flex;
  align-items: center;
}

.map-note {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.8;
}

.map-note p {
  margin-bottom: 10px;
}

.map-tip {
  margin-top: 12px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.8);
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--text-secondary);
}

/* ========================================
   Footer
   ======================================== */
.footer {
  background: var(--footer-dark);
  color: var(--text-muted);
  padding: 48px 20px;
  text-align: center;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 12px;
}

.footer-desc {
  font-size: 13px;
  line-height: 1.7;
  margin-bottom: 20px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
}

.footer-links a {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #fff;
}

.footer-copy {
  font-size: 12px;
  color: #777;
}

/* ========================================
   Responsive
   ======================================== */
@media (min-width: 576px) {
  .masonry-grid {
    column-count: 2;
  }

  .hero-title {
    font-size: 48px;
  }
}

@media (min-width: 768px) {
  .navbar {
    padding: 12px 32px;
  }

  .nav-search {
    display: flex;
  }

  .nav-menu {
    display: none;
  }

  .hero {
    padding: 64px 32px 40px;
  }

  .hero-title {
    font-size: 56px;
  }

  .hero-subtitle {
    font-size: 18px;
  }

  .stats-bar {
    gap: 64px;
  }

  .container {
    padding: 48px 32px 80px;
  }

  .section-title {
    font-size: 24px;
    margin-bottom: 24px;
  }
}

@media (min-width: 1024px) {
  .masonry-grid {
    column-count: 3;
    column-gap: 20px;
  }

  .place-card {
    margin-bottom: 20px;
  }
}

@media (min-width: 1312px) {
  .masonry-grid {
    column-count: 4;
  }
}

@media (min-width: 1440px) {
  .masonry-grid {
    column-count: 4;
  }
}

/* ========================================
   Accessibility
   ======================================== */
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--focus-blue);
  outline-offset: 2px;
}

/* Mobile horizontal scroll for pills */
@media (max-width: 767px) {
  .filter-pills,
  .category-pills {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .filter-pills::-webkit-scrollbar,
  .category-pills::-webkit-scrollbar {
    display: none;
  }

  .hero-content {
    text-align: left;
  }

  .filter-label {
    text-align: left;
  }
}
