/**
 * BeeForge Tools — homepage hub layout.
 * Warm charcoal + bee yellow (matches brand; avoids cool blue-gray cards).
 */

.bf-hub {
  --bf-hub-bg: #0c0c0c;
  --bf-hub-panel: #141414;
  --bf-hub-card: #1a1a1a;
  --bf-hub-text: #f3f3f3;
  --bf-hub-muted: #a8a8a8;
  --bf-hub-accent: #ffc107;
  --bf-hub-accent-soft: rgba(255, 193, 7, 0.14);
  --bf-hub-border: rgba(255, 193, 7, 0.22);
  /* Surface text (hero / section titles on the page background). */
  --bf-hub-on-surface: var(--bf-hub-text);
  --bf-hub-on-surface-muted: var(--bf-hub-muted);

  box-sizing: border-box;
  width: 100%;
  max-width: 90rem;
  margin-inline: auto;
  padding-inline: clamp(0.75rem, 1.5vw, 1.25rem);
  font-family: var(--bf-font, "Segoe UI", system-ui, sans-serif);
  color: var(--bf-hub-on-surface);
}

/* Optional: force light-surface typography only when Elementor section is explicitly light. */
.bf-hub.bf-hub--on-light {
  --bf-hub-on-surface: #141414;
  --bf-hub-on-surface-muted: #5c5c5c;
}

.bf-hub.bf-hub--on-light .bf-hub__featured {
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

.bf-hub.bf-hub--on-light .bf-discovery__chip {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.14);
  color: #222;
}

.bf-hub.bf-hub--on-light .bf-discovery__chip:hover {
  border-color: rgba(255, 193, 7, 0.55);
  color: #111;
}

.bf-hub.bf-hub--on-light .bf-discovery__meta,
.bf-hub.bf-hub--on-light .bf-discovery__count {
  color: var(--bf-hub-on-surface-muted);
}

/* Virtual /tools/ already has .bf-page__inner width — avoid double gutters. */
.bf-tools-virtual .bf-hub {
  max-width: none;
  padding-inline: 0;
}

.bf-hub__hero {
  margin: 0 0 1.5rem;
  max-width: 48rem;
}

.bf-hub__title {
  margin: 0 0 0.55rem;
  font-size: clamp(1.65rem, 3.2vw, 2.25rem);
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--bf-hub-on-surface);
}

.bf-hub__lead {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.45;
  color: var(--bf-hub-on-surface-muted);
}

.bf-hub__about {
  margin: 0.85rem 0 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--bf-hub-on-surface-muted);
}

.bf-hub__browse-all {
  margin: 1.5rem 0 0;
}

.bf-hub__search-results {
  margin: 1rem 0 0;
}

.bf-hub__search-results[hidden] {
  display: none !important;
}

.bf-hub__result-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.bf-hub__result-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: var(--bf-hub-card);
  border: 1px solid var(--bf-hub-border);
  color: var(--bf-hub-text);
  text-decoration: none;
}

.bf-hub__result-link:hover,
.bf-hub__result-link:focus-visible {
  border-color: var(--bf-hub-accent);
  outline: none;
}

.bf-hub__result-title {
  font-weight: 650;
}

.bf-hub__result-cta {
  flex-shrink: 0;
  color: var(--bf-hub-accent);
  font-size: 0.9rem;
}

.bf-hub__cat-links {
  flex-wrap: wrap;
}

.bf-hub__cat-links .bf-discovery__chip {
  text-decoration: none;
}

.bf-hub__search {
  margin-bottom: 1.75rem;
}

.bf-hub__featured {
  margin-bottom: 2.75rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.bf-hub__featured-title,
.bf-hub__section-title {
  margin: 0 0 0.55rem;
  font-size: clamp(1.4rem, 2.6vw, 1.85rem);
  font-weight: 750;
  letter-spacing: -0.03em;
  color: var(--bf-hub-on-surface);
}

.bf-hub__featured-lead {
  margin: 0 0 1.15rem;
  color: var(--bf-hub-on-surface-muted);
  max-width: 40rem;
  line-height: 1.55;
  font-size: 0.98rem;
}

.bf-hub__section {
  margin: 0 0 2.75rem;
  padding: 0 0 0 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  content-visibility: auto;
  contain-intrinsic-size: 800px;
}

.bf-hub__section.is-empty {
  display: none !important;
}

.bf-hub__section-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem 1.35rem;
  align-items: start;
  margin-bottom: 1.35rem;
  padding: 1.15rem 1.25rem;
  border-radius: 16px;
  background: var(--bf-hub-panel);
  border: 1px solid var(--bf-hub-border);
  border-left: 4px solid var(--bf-hub-accent);
}

.bf-hub__bee {
  width: 64px;
  height: 64px;
  object-fit: contain;
  flex-shrink: 0;
  padding: 0.45rem;
  box-sizing: border-box;
  border-radius: 12px;
  background: #0a0a0a;
  border: 1px solid rgba(255, 193, 7, 0.3);
}

.bf-hub__bee-fallback {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #0a0a0a;
  border: 1px solid rgba(255, 193, 7, 0.3);
  color: var(--bf-hub-accent);
  font-weight: 800;
  font-size: 1.35rem;
}

.bf-hub__section-intro {
  margin: 0;
  color: var(--bf-hub-muted);
  line-height: 1.6;
  font-size: 0.95rem;
  max-width: 52rem;
}

.bf-hub__section-link {
  display: inline-flex;
  margin-top: 0.7rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--bf-hub-accent);
  text-decoration: none;
}

.bf-hub__section-link:hover,
.bf-hub__section-link:focus-visible {
  text-decoration: underline;
  outline: none;
}

.bf-hub__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.95rem;
}

@media (min-width: 640px) {
  .bf-hub__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .bf-hub__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 639px) {
  .bf-hub__section-head {
    grid-template-columns: 1fr;
  }

  .bf-hub__bee,
  .bf-hub__bee-fallback {
    width: 52px;
    height: 52px;
  }

  .bf-discovery__input {
    font-size: 16px;
  }

  .bf-discovery__chip {
    min-height: 40px;
  }
}

/* Hub cards: warm charcoal (override cool blue-gray discovery defaults) */
.bf-hub .bf-card__link {
  background: var(--bf-hub-card);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  box-shadow: none;
}

.bf-hub .bf-card__link:hover,
.bf-hub .bf-card__link:focus-visible {
  border-color: rgba(255, 193, 7, 0.55);
  box-shadow: 0 0 0 1px rgba(255, 193, 7, 0.2);
  transform: translateY(-2px);
}

.bf-hub .bf-card__icon {
  background: #0a0a0a;
  border-color: rgba(255, 193, 7, 0.3);
}

.bf-hub .bf-card__badge {
  color: #111;
  background: var(--bf-hub-accent);
  border-radius: 6px;
  letter-spacing: 0.03em;
}

.bf-hub .bf-card__title {
  color: var(--bf-hub-text);
}

.bf-hub .bf-card__summary {
  color: var(--bf-hub-muted);
}

.bf-hub .bf-card__cta {
  color: var(--bf-hub-accent);
}

.bf-hub .bf-discovery__search-shell {
  background: var(--bf-hub-panel);
  border-color: var(--bf-hub-border);
  box-shadow: none;
}

.bf-hub .bf-discovery__chip.is-active {
  background: var(--bf-hub-accent);
  border-color: var(--bf-hub-accent);
  color: #111;
}

/* Virtual page shell (.bf-page*) lives in beeforge-tools.css so tool pages get gutters. */

@media (prefers-reduced-motion: reduce) {
  .bf-hub .bf-card__link:hover,
  .bf-hub .bf-card__link:focus-visible {
    transform: none;
  }
}
