/* community.html only.
   Shared rules (tokens, base, layout, nav, footer, i18n-zh) are linked
   separately and must not be redeclared here. */

/* ── NAV ──
   Everything else comes from components/nav.css; this page only opts into a
   sticky header. */
    .nav { position: sticky; top: 0; }

/* ── HERO ── */
    .page-hero {
      padding: var(--gap-sec) var(--pad);
      max-width: calc(var(--max) + var(--pad)*2);
      margin: 0 auto;
      border-bottom: 1px solid var(--light-gray);
    }

.collab-badge {
      display: inline-flex; align-items: center; flex-wrap: wrap; gap: 10px;
      margin-bottom: 28px;
    }

.collab-badge-puppyhood {
      font-size: var(--step--1); font-weight: 700; color: var(--blue);
      letter-spacing: 0.06em; text-transform: uppercase;
    }

.collab-badge-x {
      font-size: var(--step--1); color: var(--gray); font-weight: 300;
    }

.collab-badge-mohi {
      font-size: var(--step--1); font-weight: 700; color: var(--purple);
      letter-spacing: 0.06em; text-transform: uppercase;
    }

.page-hero-title {
      font-size: clamp(1.75rem, 3.286vw + 1.019rem, 4rem);
      font-weight: 700; letter-spacing: -0.03em;
      line-height: 1.0; margin-bottom: 20px;
    }

.page-hero-title .blue { color: var(--blue); font-style: normal; }

.page-hero-title .purple { color: var(--purple); font-style: normal; }

.page-hero-sub {
      font-family: var(--font-soft); font-size: var(--step-1);
      color: var(--gray); line-height: 1.6; max-width: 620px;
    }

/* ── TABS ── */
    .tabs-bar {
      position: sticky; top: var(--nav-h); z-index: 90;
      background: var(--white);
      border-bottom: 1px solid var(--light-gray);
    }

.tabs-inner {
      max-width: calc(var(--max) + var(--pad)*2);
      margin: 0 auto; padding: 0 var(--pad);
      display: flex; gap: 0;
    }

.tab-btn {
      padding: 18px 0; margin-right: 36px;
      font-size: var(--step--1); font-weight: 500;
      white-space: nowrap;
      color: var(--gray); background: none; border: none;
      cursor: pointer; font-family: var(--font-main);
      border-bottom: 2px solid transparent;
      transition: color .15s, border-color .15s;
    }

@media (hover: hover) and (pointer: fine) {
  .tab-btn:hover { color: var(--black); }
  .tips-filter-btn:hover { border-color: var(--black); }
  .tip-card:hover { border-color: var(--black); box-shadow: 0 4px 24px rgba(0,0,0,0.06); }
  .btn-submit-purple:hover, .btn-submit-blue:hover { opacity: .85; }
}

.tab-btn.active { color: var(--black); border-bottom-color: var(--black); }

/* ── TAB PANELS ── */
    .tab-panel { display: none; }

.tab-panel.active { display: block; }

/* ── TIPS SECTION ── */
    .tips-section {
      padding: var(--gap-sec) var(--pad);
      max-width: calc(var(--max) + var(--pad)*2);
      margin: 0 auto;
    }

.tips-filters {
      display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: var(--gap-col);
    }

.tips-filter-btn {
      padding: 7px 16px; border-radius: 20px;
      border: 1.5px solid var(--light-gray);
      font-size: var(--step--1); font-weight: 500;
      background: var(--white); color: var(--black);
      cursor: pointer; transition: all .15s;
      font-family: var(--font-main);
    }

.tips-filter-btn.active { background: var(--black); color: var(--white); border-color: var(--black); }

.tips-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: var(--gap-grid);
    }

.tip-card {
      border: 1.5px solid var(--light-gray);
      border-radius: 16px; padding: var(--card-pad);
      transition: border-color .2s, box-shadow .2s;
    }

.tip-tag {
      display: inline-block; font-size: 11px; font-weight: 600;
      letter-spacing: 0.06em; text-transform: uppercase;
      padding: 4px 10px; border-radius: 10px;
      margin-bottom: 16px;
    }

.tip-tag.lost { background: rgba(177,35,35,0.08); color: var(--red-accent); }

.tip-tag.mental { background: var(--blue-soft); color: var(--blue); }

.tip-tag.daily { background: var(--bg-soft); color: var(--gray); }

.tip-tag.chip { background: var(--purple-soft); color: var(--purple); }

.tip-title { font-size: var(--step-1); font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; margin-bottom: 12px; }

.tip-body { font-family: var(--font-soft); font-size: var(--step-0); color: var(--gray); line-height: 1.7; }

/* ── ABOUT SECTION ── */
    .about-section {
      padding: var(--gap-sec) var(--pad);
      max-width: calc(var(--max) + var(--pad)*2);
      margin: 0 auto;
    }

.about-grid {
      display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap-col);
      margin-bottom: var(--gap-sec); align-items: center;
    }

.about-label { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 16px; }

.about-label.blue { color: var(--blue); }

.about-label.purple { color: var(--purple); }

.about-title { font-size: var(--step-4); font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; margin-bottom: 20px; }

.about-body { font-family: var(--font-soft); font-size: var(--step-1); color: var(--gray); line-height: 1.8; }

.about-divider { height: 1px; background: var(--light-gray); margin: var(--gap-sec) 0; }

.about-visual {
      background: var(--bg-soft); border-radius: 20px;
      aspect-ratio: 4/3;
      display: flex; align-items: center; justify-content: center;
      font-size: clamp(48px, 3.76vw + 33.9px, 80px);
    }

.connection-block {
      text-align: center; padding: var(--gap-sec) var(--pad);
      background: var(--bg-soft); border-radius: 24px;
    }

.connection-title { font-size: var(--step-3); font-weight: 700; letter-spacing: -0.02em; margin-bottom: 16px; }

.connection-body { font-family: var(--font-soft); font-size: var(--step-1); color: var(--gray); line-height: 1.8; max-width: 640px; margin: 0 auto; }

.connection-brands { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 16px 24px; margin-top: 40px; }

.brand-pill {
      padding: 10px 24px; border-radius: 24px;
      font-size: var(--step--1); font-weight: 700; letter-spacing: 0.06em;
      text-transform: uppercase;
    }

.brand-pill.blue { background: var(--blue-soft); color: var(--blue); }

.brand-pill.purple { background: var(--purple-soft); color: var(--purple); }

.brand-x { font-size: 20px; color: var(--light-gray); }

/* ── JOIN SECTION ── */
    .join-section {
      padding: var(--gap-sec) var(--pad);
      max-width: calc(var(--max) + var(--pad)*2);
      margin: 0 auto;
    }

.join-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap-col); margin-top: var(--gap-col); }

.join-card {
      border: 1.5px solid var(--light-gray);
      border-radius: 20px; padding: var(--card-pad);
    }

.join-card-label { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 12px; }

.join-card-label.purple { color: var(--purple); }

.join-card-label.blue { color: var(--blue); }

.join-card-title { font-size: var(--step-2); font-weight: 700; letter-spacing: -0.02em; margin-bottom: 12px; }

.join-card-desc { font-family: var(--font-soft); font-size: var(--step-0); color: var(--gray); line-height: 1.7; margin-bottom: 32px; }

.join-roles { display: flex; flex-direction: column; gap: 10px; margin-bottom: 32px; }

.join-role { display: flex; align-items: flex-start; gap: 10px; font-size: var(--step--1); line-height: 1.5; }

.join-role-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; margin-top: 6px; }

.join-role-dot.purple { background: var(--purple); }

.join-role-dot.blue { background: var(--blue); }

/* form */
    .form-group { margin-bottom: 16px; }

.form-label { font-size: var(--step--2); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--gray); margin-bottom: 6px; display: block; }

.form-input { width: 100%; padding: 11px 14px; min-height: var(--tap); border: 1.5px solid var(--light-gray); border-radius: 8px; font-size: var(--text-input); color: var(--black); font-family: var(--font-main); outline: none; transition: border-color .15s; }

.form-input:focus { border-color: var(--black); }

.form-select { width: 100%; padding: 11px 14px; min-height: var(--tap); border: 1.5px solid var(--light-gray); border-radius: 8px; font-size: var(--text-input); color: var(--black); font-family: var(--font-main); outline: none; background: var(--white); cursor: pointer; }

.form-textarea { width: 100%; padding: 11px 14px; border: 1.5px solid var(--light-gray); border-radius: 8px; font-size: var(--text-input); color: var(--black); font-family: var(--font-main); outline: none; resize: vertical; min-height: 80px; transition: border-color .15s; }

.form-textarea:focus { border-color: var(--black); }

.btn-submit-purple { width: 100%; padding: 13px; min-height: var(--tap); background: var(--purple); color: var(--white); border: none; border-radius: 8px; font-size: var(--step-0); font-weight: 600; cursor: pointer; font-family: var(--font-main); transition: opacity .15s; }

.btn-submit-blue { width: 100%; padding: 13px; min-height: var(--tap); background: var(--blue); color: var(--white); border: none; border-radius: 8px; font-size: var(--step-0); font-weight: 600; cursor: pointer; font-family: var(--font-main); transition: opacity .15s; }

.success-msg { display: none; background: #f0faf4; border: 1px solid #a8d5b5; border-radius: 8px; padding: 14px 16px; font-size: var(--step--1); color: #2d7a4a; margin-top: 12px; line-height: 1.6; }

/* ── SHARED ── */
    /* layout.css's .s-title is a step larger; this page wants the smaller one. */
    .s-title { font-size: var(--step-3); }

.full-divider { height: 1px; background: var(--light-gray); width: 100%; }

/* Footer rules live in components/footer.css. */

/* zh overrides */
    [lang="zh"] .page-hero-title { letter-spacing: 0; line-height: 1.1; }

[lang="zh"] .page-hero-sub { line-height: 1.3; }

[lang="zh"] .tip-title { letter-spacing: 0; }

[lang="zh"] .about-title { letter-spacing: 0; }

/* ── TABLET PORTRAIT ── */
@media (max-width: 1023px) {
  .tips-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; }
  .join-grid { grid-template-columns: 1fr; }

  .tips-filter-btn { min-height: var(--tap); }
  /* padding:18px 0 gave the tab a 53px-tall target that was only as wide as its
     own text, with the 36px separation outside the button. */
  .tab-btn { padding: 14px 12px; margin-right: 12px; min-height: var(--tap); }
  .tabs-inner { padding: 0 calc(var(--pad) - 12px); }
}

/* ── PHONE LANDSCAPE / SMALL TABLET ── */
@media (max-width: 767px) {
  .tips-grid { grid-template-columns: 1fr; }

  /* Three tabs fit today; a fourth would silently overflow. Scrolling sideways
     is the graceful version of that, and the snap keeps a tab edge-aligned. */
  .tabs-inner {
    overflow-x: auto;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }
  .tabs-inner::-webkit-scrollbar { display: none; }
  .tab-btn { scroll-snap-align: start; }

  .connection-block { border-radius: 16px; }
}
