/**
 * 全站界面丰富层 — 工具条、卡片标签、引导带等
 */

/* —— 常用工具（首页）—— */
.bm-tools-section {
  padding: clamp(2.5rem, 6vw, 3.5rem) 0;
  background: var(--bm-surface);
  border-bottom: 1px solid var(--bm-border-light);
}

.bm-tools-section .bm-section-head {
  margin-bottom: clamp(1.5rem, 4vw, 2rem);
}

.bm-tools-section .row > [class*="col"] {
  display: flex;
}

.bm-tool-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  width: 100%;
  height: 100%;
  padding: 1rem 1.15rem;
  background: var(--bm-surface-card);
  border: 1px solid var(--bm-border-light);
  border-radius: var(--bm-radius-lg);
  box-shadow: var(--bm-shadow-card);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.bm-tool-card.bm-card-shine {
  position: relative;
  overflow: hidden;
}

.bm-tool-card:hover {
  border-color: var(--bm-border-brand);
  box-shadow: var(--bm-shadow-hover);
  color: inherit;
}

.bm-tool-card__icon {
  flex-shrink: 0;
  align-self: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: var(--bm-radius-md);
  background: linear-gradient(145deg, var(--bm-brand-subtle), var(--bm-accent-subtle));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.bm-tool-card__icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.35rem;
}

.bm-tool-card__icon i {
  font-size: 1.35rem;
  color: var(--bm-brand);
}

.bm-tool-card__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-self: stretch;
  min-height: 100%;
}

/* 同行等高时，留白留在底栏下方，不挤在简介与标签之间 */
.bm-tool-card__body::after {
  content: "";
  flex: 1 1 auto;
  min-height: 0;
}

.bm-tool-card__title {
  font-size: var(--bm-text-md);
  font-weight: 700;
  margin: 0 0 0.3rem;
  padding: 0;
  color: var(--bm-text);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bm-tool-card__desc {
  font-size: var(--bm-text-sm);
  color: var(--bm-text-muted);
  margin: 0;
  padding: 0;
  line-height: 1.4;
  min-height: calc(1.4em * 2);
  max-height: calc(1.4em * 2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bm-tool-card__foot {
  margin-top: 0.45rem;
  flex-shrink: 0;
  min-height: 1.5rem;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.35rem;
  overflow: hidden;
}

.bm-tool-card__foot .bm-pill {
  flex-shrink: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bm-tool-card__link {
  flex-shrink: 0;
  margin-left: auto;
  font-size: var(--bm-text-xs);
  font-weight: 600;
  color: var(--bm-brand);
  white-space: nowrap;
}

.bm-tool-card__link i {
  font-size: 0.75em;
  transition: transform 0.2s ease;
}

.bm-tool-card:hover .bm-tool-card__link i {
  transform: translateX(3px);
}

/* —— 通用标签 —— */
.bm-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: var(--bm-radius-pill);
  line-height: 1.3;
}

.bm-pill--brand {
  background: var(--bm-brand-subtle);
  color: var(--bm-brand);
  border: 1px solid var(--bm-brand-muted);
}

.bm-pill--muted {
  background: var(--bm-surface-section);
  color: var(--bm-text-muted);
  border: 1px solid var(--bm-border-light);
}

.bm-pill--accent {
  background: var(--bm-accent-subtle);
  color: #2563eb;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

/* —— 平台卡片「进入」—— */
.category-go {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.5rem;
  font-size: var(--bm-text-xs);
  font-weight: 600;
  color: var(--bm-brand);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.category-card:hover .category-go,
.category-card:focus-visible .category-go {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .category-go {
    opacity: 1;
    transform: none;
  }
}

/* —— 信任条改为胶囊组 —— */
.bm-trust-bar {
  gap: 0.5rem;
}

.bm-trust-item {
  padding: 0.4rem 0.75rem;
  background: var(--bm-surface-card);
  border: 1px solid var(--bm-border-light);
  border-radius: var(--bm-radius-pill);
  box-shadow: var(--bm-shadow-sm);
}

/* —— 首页底部引导带 —— */
.bm-cta-band {
  padding: clamp(2.5rem, 6vw, 3.5rem) 0;
  background:
    linear-gradient(135deg, rgba(13, 159, 110, 0.08) 0%, rgba(59, 130, 246, 0.06) 100%),
    var(--bm-surface-section);
  border-top: 1px solid var(--bm-border-light);
}

.bm-cta-band__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: clamp(1.25rem, 3vw, 1.75rem) clamp(1.5rem, 4vw, 2rem);
  background: var(--bm-surface-card);
  border: 1px solid var(--bm-border-light);
  border-radius: var(--bm-radius-xl);
  box-shadow: var(--bm-shadow-md);
}

.bm-cta-band__title {
  font-size: var(--bm-text-xl);
  font-weight: 700;
  margin: 0 0 0.35rem;
  color: var(--bm-text);
}

.bm-cta-band__text {
  margin: 0;
  font-size: var(--bm-text-sm);
  color: var(--bm-text-muted);
}

.bm-cta-band__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.bm-btn-solid {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.35rem;
  font-size: var(--bm-text-sm);
  font-weight: 600;
  color: #fff;
  background: var(--bm-gradient-brand, var(--bm-brand));
  border: none;
  border-radius: var(--bm-radius-pill);
  text-decoration: none;
  box-shadow: var(--bm-shadow-brand);
  transition: filter 0.2s ease;
}

.bm-btn-solid:hover {
  color: #fff;
  filter: brightness(1.06);
}

/* —— 页脚平台链接 —— */
.footer-platform-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--bm-text-secondary);
  text-decoration: none;
  font-size: var(--bm-text-sm);
  padding: 0.15rem 0;
  transition: color 0.15s ease;
}

.footer-platform-link:hover {
  color: var(--bm-brand);
}

.footer-platform-link i {
  width: 1.1em;
  text-align: center;
  color: var(--bm-text-muted);
}

.footer-platform-link:hover i {
  color: var(--bm-brand);
}

/* —— 分类区背景层次 —— */
.categories-section {
  position: relative;
}

.categories-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 50% at 50% 0%, var(--bm-brand-subtle) 0%, transparent 55%);
  pointer-events: none;
  opacity: 0.5;
}

.categories-section > .container {
  position: relative;
  z-index: 1;
}

.featured-section {
  background: linear-gradient(180deg, var(--bm-surface-muted) 0%, var(--bm-surface-section) 100%);
}
