/* Product hubs (partials/hub-hero.html) — hero + featured cards + filterable tool list (hub_hero) */

.hh {
  --hh-ink: #0f1f47;
  --hh-text: #334155;
  --hh-muted: #64748b;
  --hh-card: #fff;
  --hh-line: #e6ebf3;
  --hh-soft: #f5f8fc;
  --hh-chip: #fff;
  --hh-active: #0b3d91;
  --hh-hero-bg: linear-gradient(120deg, #eef4ff 0%, #f5f8ff 45%, #eef0ff 100%);
  --hh-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.05);
  color: var(--hh-text);
  margin: 0 0 32px;
}
html[data-theme="dark"] .hh {
  --hh-ink: #f1f5f9;
  --hh-text: #cbd5e1;
  --hh-muted: #94a3b8;
  --hh-card: #1a2130;
  --hh-line: #2a3446;
  --hh-soft: #151b27;
  --hh-chip: #1a2130;
  --hh-active: #3b82f6;
  --hh-hero-bg: linear-gradient(120deg, #141c2e 0%, #121826 50%, #17162b 100%);
  --hh-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Theme link decorations off inside the hub */
.article .post-content .hh a {
  text-decoration: none !important;
  color: inherit;
}
.article .post-content .hh a::after {
  content: none !important;
  display: none !important;
}
.hh ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.hh ul li {
  margin: 0;
}
.hh ul li::before {
  content: none;
}
.hh svg {
  display: block;
  fill: currentColor;
}

/* ---------- Hero ---------- */
.hh-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  margin: 0 -8px 28px;
  padding: 28px 32px;
  border-radius: 24px;
  background: var(--hh-hero-bg);
  overflow: hidden;
}
.article .post-content .hh .hh-h1 {
  margin: 0 0 10px;
  padding: 0;
  border: 0;
  font-size: clamp(1.6rem, 1.1rem + 1.9vw, 2.45rem);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--hh-ink);
}
.article .post-content .hh .hh-lead {
  margin: 0 0 18px;
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--hh-text);
}
.hh-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.hh .hh-badges li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 8px 10px;
  border-radius: 999px;
  background: var(--hh-card);
  box-shadow: var(--hh-shadow);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--hh-ink);
}
.hh-badge-ico {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.hh-badge-ico svg { width: 14px; height: 14px; }
.hh-badge-ico.is-green { background: #22c55e; }
.hh-badge-ico.is-yellow { background: transparent; color: #f59e0b; }
.hh-badge-ico.is-yellow svg,
.hh-badge-ico.is-blue svg { width: 18px; height: 18px; }
.hh-badge-ico.is-blue { background: transparent; color: #2563eb; }

.hh-hero-art {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 210px;
}
.hh-art {
  flex: 0 1 280px;
  min-width: 160px;
  height: auto;
}
.hh-art .hh-art-back { fill: #c7d9ff; opacity: 0.7; }
.hh-art .hh-spark { fill: #fbbf24; }
html[data-theme="dark"] .hh-art .hh-art-back { fill: #334a7a; }

.hh-formats {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.hh .hh-formats li {
  min-width: 70px;
  padding: 5px 12px;
  border-radius: 10px;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #fff;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.12);
}
.hh .hh-formats li:nth-child(even) { transform: translateX(6px); }
.hh-formats .is-c1 { background: linear-gradient(135deg, #60a5fa, #2563eb); }
.hh-formats .is-c2 { background: linear-gradient(135deg, #4ade80, #16a34a); }
.hh-formats .is-c3 { background: linear-gradient(135deg, #a78bfa, #7c3aed); }
.hh-formats .is-c4 { background: linear-gradient(135deg, #fdba74, #ea580c); }
.hh-formats .is-c5 { background: linear-gradient(135deg, #f9a8d4, #db2777); }
.hh .hh-formats li { white-space: nowrap; }

/* Per-hub hero tint */
.hh--video, .hh--geradores { --hh-hero-bg: linear-gradient(120deg, #f1eeff 0%, #f6f5ff 45%, #eef0ff 100%); }
.hh--pdf { --hh-hero-bg: linear-gradient(120deg, #fff0ee 0%, #fbf6f5 45%, #eef2ff 100%); }
.hh--gif, .hh--zip { --hh-hero-bg: linear-gradient(120deg, #fff4e8 0%, #fbf7f2 45%, #f3f0ff 100%); }
.hh--whatsapp { --hh-hero-bg: linear-gradient(120deg, #e9f9ef 0%, #f4faf6 45%, #eef4ff 100%); }
.hh--texto { --hh-hero-bg: linear-gradient(120deg, #f1f3f8 0%, #f6f7fb 45%, #eef0ff 100%); }
html[data-theme="dark"] .hh--video, html[data-theme="dark"] .hh--geradores { --hh-hero-bg: linear-gradient(120deg, #1a1733 0%, #121826 60%); }
html[data-theme="dark"] .hh--pdf { --hh-hero-bg: linear-gradient(120deg, #2a1618 0%, #121826 60%); }
html[data-theme="dark"] .hh--gif, html[data-theme="dark"] .hh--zip { --hh-hero-bg: linear-gradient(120deg, #2a1f12 0%, #121826 60%); }
html[data-theme="dark"] .hh--whatsapp { --hh-hero-bg: linear-gradient(120deg, #10261b 0%, #121826 60%); }
html[data-theme="dark"] .hh--texto { --hh-hero-bg: linear-gradient(120deg, #181c28 0%, #121826 60%); }

.article .post-content .hh .hh-note {
  align-self: flex-start;
  flex-shrink: 0;
  margin: 4px 0 0 6px;
  font-family: "Segoe Print", "Bradley Hand", "Comic Sans MS", cursive;
  font-size: 0.9rem;
  line-height: 1.25;
  color: #1e3a8a;
  transform: rotate(-8deg);
  text-align: left;
}
html[data-theme="dark"] .article .post-content .hh .hh-note { color: #93c5fd; }

/* ---------- Section headings ---------- */
.hh-block { margin: 0 0 28px; }
.article .post-content .hh .hh-h2 {
  margin: 0 0 2px;
  padding: 0;
  border: 0;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--hh-ink);
}
.article .post-content .hh .hh-sub {
  margin: 0 0 14px;
  font-size: 0.92rem;
  color: var(--hh-muted);
}

/* ---------- Icons ---------- */
.hh-ico {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 4px 10px -4px rgba(15, 23, 42, 0.35);
}
.hh-ico svg { width: 22px; height: 22px; }
/* Tone tokens: --hh-c1 light stop, --hh-c2 dark stop (icons, tags, pills) */
.hh .is-orange { --hh-c1: #fb923c; --hh-c2: #ea580c; }
.hh .is-sky    { --hh-c1: #38bdf8; --hh-c2: #2563eb; }
.hh .is-purple { --hh-c1: #a78bfa; --hh-c2: #7c3aed; }
.hh .is-green  { --hh-c1: #4ade80; --hh-c2: #16a34a; }
.hh .is-indigo { --hh-c1: #818cf8; --hh-c2: #4f46e5; }
.hh .is-pink   { --hh-c1: #f472b6; --hh-c2: #db2777; }
.hh .is-teal   { --hh-c1: #2dd4bf; --hh-c2: #0d9488; }
.hh .is-mint   { --hh-c1: #34d399; --hh-c2: #00a896; }
.hh .is-yellow { --hh-c1: #facc15; --hh-c2: #f59e0b; }
.hh .is-slate  { --hh-c1: #94a3b8; --hh-c2: #475569; }
.hh .is-ink    { --hh-c1: #475569; --hh-c2: #1e293b; }
.hh .is-red    { --hh-c1: #f87171; --hh-c2: #dc2626; }
.hh .is-blue   { --hh-c1: #60a5fa; --hh-c2: #2563eb; }
.hh-ico { background: linear-gradient(145deg, var(--hh-c1, #818cf8), var(--hh-c2, #4f46e5)); }

.hh-go {
  color: var(--hh-muted);
  transition: transform 0.15s ease, color 0.15s ease;
}
.hh-go svg {
  width: 20px;
  height: 20px;
  fill: none !important;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Featured cards ---------- */
.hh-featured {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.hh-featured.is-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hh-featured.is-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hh-feat {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 18px 18px 16px;
  border-radius: 18px;
  border: 1px solid var(--hh-line);
  background: var(--hh-card);
  box-shadow: var(--hh-shadow);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.hh-feat .hh-ico { width: 50px; height: 50px; border-radius: 14px; margin-bottom: 8px; }
.hh-feat .hh-ico svg { width: 26px; height: 26px; }
.hh-feat .hh-go { position: absolute; top: 20px; right: 16px; }
.hh-feat-title {
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--hh-ink);
}
.hh-feat-desc {
  flex: 1;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--hh-muted);
}
.hh-tag {
  margin-top: 10px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}
.hh-tag {
  background: color-mix(in srgb, var(--hh-c1, #818cf8) 16%, #fff);
  color: color-mix(in srgb, var(--hh-c2, #4f46e5) 82%, #000);
}
html[data-theme="dark"] .hh-tag {
  background: color-mix(in srgb, var(--hh-c2, #4f46e5) 22%, transparent);
  color: color-mix(in srgb, var(--hh-c1, #818cf8) 70%, #fff);
}

.hh-feat:hover,
.hh-row:hover {
  border-color: #c7d2fe;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.09);
  transform: translateY(-2px);
}
.hh-feat:hover .hh-go,
.hh-row:hover .hh-go {
  color: var(--hh-active);
  transform: translateX(2px);
}
.hh-feat:focus-visible,
.hh-row:focus-visible,
.hh-chip:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

/* ---------- All tools: header, search, chips ---------- */
.hh-all-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.hh-all-head .hh-sub { margin-bottom: 12px; }
.hh-search {
  position: relative;
  display: block;
  width: min(100%, 280px);
  margin: 0 0 12px;
}
.hh-search-ico {
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
  color: var(--hh-muted);
  pointer-events: none;
}
.hh-search-ico svg { width: 20px; height: 20px; }
.hh-search input {
  width: 100%;
  box-sizing: border-box;
  height: 44px;
  padding: 0 14px 0 44px;
  border: 1px solid var(--hh-line);
  border-radius: 999px;
  background: var(--hh-card);
  color: var(--hh-ink);
  font: inherit;
  font-size: 0.92rem;
}
.hh-search input:focus {
  outline: none;
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}
.hh-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.hh-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
}
.hh-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 20px;
  border-radius: 999px;
  border: 1px solid var(--hh-line);
  background: var(--hh-chip);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--hh-ink) !important;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.hh-chip:hover { border-color: #93c5fd; }
.hh-chip.is-active {
  background: var(--hh-active);
  border-color: var(--hh-active);
  color: #fff !important;
}

/* ---------- Groups + row cards ---------- */
.hh-group { margin: 0 0 22px; scroll-margin-top: 90px; }
.hh-group[hidden] { display: none; }
.article .post-content .hh .hh-h3 {
  margin: 0 0 10px;
  padding: 0;
  border: 0;
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.3;
  color: var(--hh-ink);
  text-transform: none;
  letter-spacing: 0;
}
.article .post-content .hh .hh-h3 span {
  margin-left: 8px;
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--hh-muted);
}
.hh-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.hh-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px 12px 16px;
  border-radius: 14px;
  border: 1px solid var(--hh-line);
  background: var(--hh-card);
  box-shadow: var(--hh-shadow);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.hh-row[hidden] { display: none; }
.hh-row-txt {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  gap: 1px;
}
.hh-row-title {
  font-size: 0.93rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--hh-ink);
}
.hh-row-desc {
  font-size: 0.8rem;
  line-height: 1.35;
  color: var(--hh-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.article .post-content .hh .hh-empty {
  margin: 8px 0 0;
  padding: 18px;
  border-radius: 14px;
  background: var(--hh-soft);
  text-align: center;
  color: var(--hh-muted);
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .hh-featured,
  .hh-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .hh-hero { grid-template-columns: 1fr; padding: 24px 22px; }
  .hh-hero-art { justify-content: center; min-height: 0; }
  .hh-featured,
  .hh-featured.is-3,
  .hh-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hh-featured.is-3 .hh-feat:last-child { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .hh-hero { margin: 0 -4px 22px; padding: 20px 16px; gap: 14px; }
  .article .post-content .hh .hh-note { display: none; }
  .hh-art { flex-basis: 210px; min-width: 150px; }
  .hh-formats { gap: 5px; }
  .hh .hh-formats li { min-width: 58px; padding: 3px 10px; font-size: 0.72rem; }
  .hh .hh-badges li { font-size: 0.78rem; padding: 6px 10px 6px 8px; }
  .hh-featured,
  .hh-featured.is-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .hh-feat { padding: 14px 12px; }
  .hh-feat .hh-ico { width: 42px; height: 42px; }
  .hh-feat .hh-go { top: 16px; right: 10px; }
  .hh-feat-title { font-size: 0.98rem; }
  .hh-feat-desc { font-size: 0.82rem; }
  .hh-tag { font-size: 0.72rem; padding: 3px 9px; }
  .hh-grid { grid-template-columns: 1fr; gap: 8px; }
  .hh-search { width: 100%; }
  .article .post-content .hh .hh-h3 span { display: block; margin: 2px 0 0; }
  .hh-chips { flex-wrap: nowrap; overflow-x: auto; margin-right: -16px; padding-bottom: 4px; scrollbar-width: none; }
  .hh-chip { flex-shrink: 0; padding: 7px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .hh-feat, .hh-row, .hh-go { transition: none; }
}
