/* /todas-as-ferramentas/ only — overrides tools-discovery.css inside .tf-page */

body.is-tools-catalog .main-container.is-tools-catalog {
  margin-top: 0;
  max-width: none;
  padding: 0;
}

.tf-page {
  --tf-blue: #1d4ed8;
  --tf-navy: #142a63;
  --tf-ink: #0f172a;
  --tf-muted: #5b6b85;
  --tf-line: #e6ebf3;
  --tf-yellow: #f7c948;
  margin: 0 0 48px;
  color: var(--tf-ink);
}

.tf-shell {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- hero ---------- */

.tf-hero-band {
  overflow: hidden;
  padding: 82px 0 18px;
  background:
    radial-gradient(260px 200px at 3% 26%, rgba(219, 234, 254, 0.9) 0%, rgba(219, 234, 254, 0) 70%),
    radial-gradient(700px 320px at 50% 0%, #eef4ff 0%, rgba(238, 244, 255, 0) 70%),
    linear-gradient(180deg, #f5f9ff 0%, #f8fbff 100%);
}

.tf-crumb {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin: 0 0 20px 18px;
  font-size: 0.92rem;
  color: #64748b;
}

.tf-crumb a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--tf-blue);
  text-decoration: none;
  font-weight: 500;
}

.tf-crumb .is-current {
  color: #1f2937;
}

.tf-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 660px);
  gap: 30px;
  align-items: center;
}

.tf-hero-copy {
  padding-left: 18px;
}

.tf-hero h1 {
  margin: 0 0 18px;
  font-size: clamp(2.3rem, 4.6vw, 3.6rem);
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: var(--tf-navy);
}

.tf-hero-copy p {
  margin: 0;
  max-width: 40rem;
  color: var(--tf-muted);
  font-size: 1.12rem;
  line-height: 1.55;
}

.tf-promo {
  position: relative;
  min-height: 214px;
  padding: 18px 20px 18px;
  border: 1px solid #dce8f8;
  border-radius: 18px;
  background:
    radial-gradient(240px 200px at 62% 55%, #d6e6fb 0%, rgba(214, 230, 251, 0) 75%),
    linear-gradient(135deg, #eef4fd 0%, #e7f0fc 100%);
  overflow: hidden;
}

.tf-promo-copy {
  position: relative;
  z-index: 1;
  max-width: 46%;
}

.tf-promo h2 {
  margin: 0 0 8px;
  font-size: 1.15rem;
  line-height: 1.3;
  color: var(--tf-navy);
}

.tf-promo p,
.tf-promo li {
  margin: 0;
  color: #475569;
  font-size: 0.86rem;
  line-height: 1.4;
}

.tf-promo ul {
  display: grid;
  gap: 6px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.tf-promo li {
  position: relative;
  padding-left: 28px;
}

.tf-promo li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #22a55b url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='white' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/></svg>") center / 12px no-repeat;
}

.tf-promo-art {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 47%;
  width: 29%;
  overflow: hidden;
  pointer-events: none;
}

.tf-page .tf-promo-art img {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 250%;
  max-width: none;
  height: auto;
  transform: translate(-50%, -50%);
  mix-blend-mode: multiply;
  -webkit-mask-image: radial-gradient(32% 44% at 52% 50%, #000 62%, rgba(0, 0, 0, 0) 100%);
  mask-image: radial-gradient(32% 44% at 52% 50%, #000 62%, rgba(0, 0, 0, 0) 100%);
}

.tf-promo-note {
  position: absolute;
  right: 18px;
  top: 50%;
  max-width: 8.5rem;
  font-family: Georgia, "Palatino Linotype", Palatino, serif;
  font-style: italic;
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1.3;
  color: var(--tf-navy);
  transform: translateY(-40%) rotate(-12deg);
  pointer-events: none;
}

.tf-promo-note::after {
  content: "";
  display: block;
  margin: 5px 0 0 18%;
  width: 82%;
  height: 7px;
  border-radius: 0 0 60% 60%;
  border-bottom: 3px solid var(--tf-yellow);
}

/* ---------- catalog body ---------- */

.tf-body {
  padding-top: 18px;
}

.tf-page .tools-discovery.is-catalog.is-standalone {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
}

.tf-page .td-hero {
  display: none;
}

.tf-page .td-filters {
  order: 1;
  justify-content: flex-start;
  max-width: none;
  margin: 0 0 30px;
  gap: 8px;
}

.tf-page .tf-featured {
  order: 2;
}

.tf-page .tf-toolbar {
  order: 3;
}

.tf-page .tf-list-head {
  order: 4;
}

.tf-page .td-groups {
  order: 5;
}

/* filter pills */

.tf-page .td-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 15px 0 12px;
  border: 1px solid #edf1f7;
  background: #f4f7fc;
  color: #1f2937;
  font-size: 0.86rem;
  font-weight: 600;
  box-shadow: none;
}

.tf-page .td-filter:hover {
  border-color: #cfdcf0;
  background: #fff;
}

.tf-page .td-filter.is-active {
  border-color: #1e3a8a;
  background: #1e3a8a;
  color: #fff;
  box-shadow: 0 6px 16px rgba(30, 58, 138, 0.25);
}

.td-filter-ico {
  display: grid;
  place-items: center;
}

.tf-page .td-filter-ico svg {
  display: block;
  width: 18px;
  height: 18px;
  max-width: none;
}

.tf-page .td-filter--pdf .td-filter-ico { color: #e0312b; }
.tf-page .td-filter--image .td-filter-ico { color: #16a34a; }
.tf-page .td-filter--video .td-filter-ico { color: #7c3aed; }
.tf-page .td-filter--whatsapp .td-filter-ico { color: #16a34a; }
.tf-page .td-filter--zip .td-filter-ico { color: #ea580c; }
.tf-page .td-filter--audio .td-filter-ico { color: #2563eb; }
.tf-page .td-filter--gif .td-filter-ico { color: #e11d48; }
.tf-page .td-filter--texto .td-filter-ico { color: #475569; }
.tf-page .td-filter--tests .td-filter-ico { color: #4f46e5; }
.tf-page .td-filter--printables .td-filter-ico { color: #2563eb; }
.tf-page .td-filter--util .td-filter-ico { color: #2563eb; }
.tf-page .td-filter.is-active .td-filter-ico { color: #fff; }

/* section heads */

.tf-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 14px;
}

.tf-featured-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
  color: var(--tf-navy);
}

.tf-page .tf-head-ico {
  flex: none;
  width: 28px;
  height: 28px;
  max-width: none;
  color: #f5b50b;
}

.tf-section-link {
  flex: none;
  color: var(--tf-blue);
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
}

.tf-section-link:hover {
  text-decoration: underline;
}

.tf-list-head {
  margin-top: 6px;
}

/* hub cards */

.tf-page .tools-discovery.is-catalog .td-grid.td-catalog-hubs {
  gap: 14px;
  margin: 0 0 16px;
}

.tf-page .tools-discovery.is-catalog .td-catalog-hubs a.td-card {
  position: relative;
  gap: 14px;
  min-height: 118px;
  padding: 14px 34px 14px 14px;
  border-color: var(--tf-line);
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}

.tf-page .td-catalog-hubs .td-badge {
  width: 56px;
  height: 56px;
  border-radius: 14px;
}

.tf-page .td-catalog-hubs .td-badge svg {
  width: 30px;
  height: 30px;
}

.tf-page .td-catalog-hubs .td-card-body {
  display: grid;
  gap: 6px;
  padding-top: 4px;
}

.tf-page .td-catalog-hubs .td-title {
  font-size: 1rem;
  color: var(--tf-navy);
}

.tf-page .tools-discovery.is-catalog .td-catalog-hubs .td-desc {
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--tf-muted);
}

.tf-page .td-card-chev {
  position: absolute;
  right: 12px;
  bottom: 14px;
  width: 20px;
  height: 20px;
  max-width: none;
  color: var(--tf-blue);
}

/* per-hub badge colors (mockup) */
.tf-page .td-hub--pdf .td-badge { background: #fde4e4; color: #e0312b; }
.tf-page .td-hub--image .td-badge { background: #dcf5e4; color: #16a34a; }
.tf-page .td-hub--video .td-badge { background: #ece6fd; color: #7c3aed; }
.tf-page .td-hub--whatsapp .td-badge { background: #dcf5e4; color: #16a34a; }
.tf-page .td-hub--zip .td-badge { background: #ffeddc; color: #ea580c; }
.tf-page .td-hub--geradores .td-badge { background: #e8e8fd; color: #4f46e5; }
.tf-page .td-hub--diagnostico .td-badge { background: #e0ecfd; color: #2563eb; }
.tf-page .td-hub--audio .td-badge { background: #e0ecfd; color: #2563eb; }
.tf-page .td-hub--gif .td-badge { background: #fde4ea; color: #e11d48; }
.tf-page .td-hub--texto .td-badge { background: #e8edf4; color: #334155; }
.tf-page .td-hub--printables .td-badge { background: #e0ecfd; color: #1d4ed8; }

/* tip + search bar */

.tf-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 34px;
  padding: 10px 18px 10px 22px;
  border: 1px solid #dfe9f7;
  border-radius: 14px;
  background: #eaf1fc;
}

.tf-hint {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  font-size: 0.92rem;
  color: #475569;
}

.tf-hint strong {
  color: var(--tf-navy);
}

.tf-page .tf-hint-ico {
  flex: none;
  width: 30px;
  height: 30px;
  max-width: none;
}

.tf-search {
  position: relative;
  flex: 0 1 390px;
}

.tf-page .tf-search-ico {
  position: absolute;
  left: 14px;
  top: 50%;
  width: 20px;
  height: 20px;
  max-width: none;
  color: var(--tf-navy);
  transform: translateY(-50%);
  pointer-events: none;
}

.tf-page .tf-search input {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 0 14px 0 44px;
  border: 1px solid #dfe6f1;
  border-radius: 10px;
  background: #fff;
  font: inherit;
  font-size: 0.92rem;
}

.tf-page .visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

/* ---------- responsive ---------- */

@media (max-width: 1180px) {
  .tf-hero {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  }

  .tf-promo-note {
    display: none;
  }

  .tf-promo-copy {
    max-width: 58%;
  }

  .tf-promo-art {
    left: auto;
    right: 0;
    width: 42%;
  }

  .tf-page .tools-discovery.is-catalog .td-grid.td-catalog-hubs {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 900px) {
  .tf-hero {
    grid-template-columns: 1fr;
  }

  .tf-crumb,
  .tf-hero-copy {
    margin-left: 0;
    padding-left: 0;
  }

  .tf-page .tools-discovery.is-catalog .td-grid.td-catalog-hubs {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .tf-search {
    flex-basis: 100%;
  }
}

@media (max-width: 600px) {
  .tf-page .tools-discovery.is-catalog .td-grid.td-catalog-hubs {
    grid-template-columns: 1fr !important;
  }

  .tf-section-head {
    flex-wrap: wrap;
  }

  .tf-promo-copy {
    max-width: 62%;
  }

  .tf-promo-art {
    width: 40%;
  }
}

/* ---------- dark ---------- */

html[data-theme="dark"] .tf-page {
  --tf-navy: #dbeafe;
  --tf-ink: #e5e7eb;
  --tf-muted: #94a3b8;
  --tf-line: #2b3547;
  --tf-blue: #7aa7f8;
}

html[data-theme="dark"] .tf-hero-band {
  background: #0f1420;
}

html[data-theme="dark"] .tf-page .tools-discovery.is-catalog.is-standalone {
  background: none;
}

html[data-theme="dark"] .tf-crumb .is-current {
  color: #cbd5e1;
}

html[data-theme="dark"] .tf-promo {
  border-color: #2b3547;
  background: linear-gradient(135deg, #16203a 0%, #131a2b 100%);
}

html[data-theme="dark"] .tf-promo p,
html[data-theme="dark"] .tf-promo li,
html[data-theme="dark"] .tf-hint {
  color: #a8b6cc;
}

html[data-theme="dark"] .tf-page .tf-promo-art img {
  mix-blend-mode: normal;
  opacity: 0.95;
}

html[data-theme="dark"] .tf-page .td-filter {
  background: #151b28;
  border-color: #2b3547;
  color: #cbd5e1;
}

html[data-theme="dark"] .tf-page .td-filter.is-active {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

html[data-theme="dark"] .tf-toolbar {
  background: #16233a;
  border-color: #23344f;
}

html[data-theme="dark"] .tf-page .tf-search input {
  background: #151b28;
  border-color: #2b3547;
  color: #e5e7eb;
}

html[data-theme="dark"] .tf-page .td-catalog-hubs .td-badge {
  filter: saturate(0.9) brightness(0.9);
}
