/* ============ Tips page ============ */

/* ---- Hero ---- */
.tips-hero {
  padding: 140px 24px 40px;
  text-align: center;
  background:
    radial-gradient(ellipse at 50% 60%, rgba(212, 136, 106, 0.06) 0%, transparent 65%),
    linear-gradient(to bottom, var(--bg) 0%, var(--bg-deep) 100%);
}
.tips-hero-title {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--mauve);
  margin-bottom: 12px;
}
.tips-hero-sub {
  color: var(--text-soft);
  font-size: 1.05rem;
  margin-bottom: 10px;
}
.tips-hero-note {
  color: var(--text-soft);
  font-size: 0.88rem;
  opacity: 0.7;
}

/* ---- Tag filter bar ---- */
.tips-filter {
  padding: 24px 0 8px;
  background: var(--bg-deep);
  position: sticky;
  top: 64px;
  z-index: 50;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.tips-tags {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: none;
}
.tips-tags::-webkit-scrollbar { display: none; }

.tips-tag-btn {
  flex-shrink: 0;
  padding: 7px 16px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-soft);
  font-size: 0.88rem;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--t);
  white-space: nowrap;
}
.tips-tag-btn:hover {
  border-color: rgba(212, 136, 106, 0.35);
  color: var(--coral);
}
.tips-tag-btn.active {
  background: var(--coral);
  color: #fff;
  border-color: var(--coral);
}

/* ---- Tips grid ---- */
.tips-section {
  padding: 32px 0 80px;
  background: linear-gradient(to bottom, var(--bg-deep) 0%, var(--bg) 30%);
  min-height: 40vh;
}
.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

/* ---- Tip card ---- */
.tip-card {
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: box-shadow var(--t), transform var(--t);
}
.tip-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}
.tip-card.hidden { display: none; }

.tip-text {
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.8;
  flex-grow: 1;
}
.tip-text strong { color: var(--mauve); }
.tip-text kbd {
  display: inline-block;
  background: rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  padding: 1px 7px;
  font-size: 0.85rem;
  font-family: inherit;
  font-weight: 600;
  color: var(--text);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
}
.tip-text code {
  background: rgba(0, 0, 0, 0.06);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.88rem;
  font-family: "Cascadia Code", "Consolas", monospace;
}

.tip-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.tip-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.tip-tag {
  display: inline-block;
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: 20px;
  color: var(--coral);
  background: var(--coral-soft);
  border: 1px solid rgba(212, 136, 106, 0.2);
}
.tip-credit {
  font-size: 0.82rem;
  color: var(--text-soft);
  opacity: 0.7;
  white-space: nowrap;
}

/* ---- Empty state ---- */
.tips-empty {
  display: none;
  text-align: center;
  padding: 60px 24px;
  color: var(--text-soft);
}
.tips-empty.visible { display: block; }
.tips-empty i {
  font-size: 2.5rem;
  opacity: 0.3;
  margin-bottom: 16px;
  display: block;
}
.tips-empty p { font-size: 1.05rem; }

/* ---- Contribute CTA ---- */
.tips-cta-section {
  padding: 0 0 80px;
  background: var(--bg);
}
.tips-cta-card {
  max-width: 520px;
  margin: 0 auto;
  text-align: center;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 32px;
}
.tips-cta-icon {
  font-size: 2rem;
  color: var(--coral);
  margin-bottom: 16px;
  display: block;
}
.tips-cta-card h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--mauve);
  margin-bottom: 10px;
}
.tips-cta-card p {
  color: var(--text-soft);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 20px;
}

/* ---- Count indicator ---- */
.tips-count {
  text-align: center;
  color: var(--text-soft);
  font-size: 0.88rem;
  margin-bottom: 24px;
  opacity: 0.7;
}

/* ---- Nav active state (shared with faq.css) ---- */
.nav-active {
  color: var(--coral) !important;
  font-weight: 500;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .tips-hero { padding: 100px 24px 32px; }
  .tips-hero-title { font-size: 1.7rem; }
  .tips-section { padding: 24px 0 56px; }
  .tips-grid { grid-template-columns: 1fr; }
  .tip-meta { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 480px) {
  .tips-hero-title { font-size: 1.4rem; }
  .tips-hero-sub { font-size: 0.92rem; }
  .tips-filter { top: 64px; }
}
