/* toolsfor.co — HUB-ONLY components: Modern Card Grid, Header, Hero, Search & Footer */

/* ---- Header ---- */

.tf-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--tf-line);
}

.tf-header-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.25rem;
}

.tf-brand-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.tf-brand-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  border-radius: 9px;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

.tf-logo {
  font-family: var(--tf-font-display);
  font-size: 1.3125rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--tf-ink);
}

.tf-logo b {
  color: var(--tf-brand);
  font-weight: 800;
}

.tf-header-badges {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tf-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--tf-brand-sunk);
  color: var(--tf-brand-text);
  border: 1px solid var(--tf-brand-border);
  padding: 5px 12px;
  border-radius: var(--tf-radius-full);
}

/* ---- Hero Section ---- */

.tf-hero {
  padding: 56px 0 40px;
  text-align: center;
  max-width: 820px;
  margin: 0 auto;
}

.tf-hero-announcement {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid var(--tf-line);
  color: var(--tf-ink-soft);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: var(--tf-radius-full);
  box-shadow: var(--tf-shadow-sm);
  margin-bottom: 20px;
}

.tf-hero h1 {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.035em;
  color: var(--tf-ink);
  margin: 0 0 18px;
}

@media (max-width: 640px) {
  .tf-hero h1 { font-size: 2.125rem; }
}

.tf-hero p {
  font-size: 1.1875rem;
  line-height: 1.6;
  color: var(--tf-ink-muted);
  margin: 0 auto 32px;
  max-width: 640px;
}

/* Feature Highlights */
.tf-features-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.tf-feature-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid var(--tf-line);
  padding: 8px 16px;
  border-radius: var(--tf-radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--tf-ink-soft);
  box-shadow: var(--tf-shadow-sm);
}

.tf-feature-chip svg {
  color: var(--tf-brand);
}

/* ---- Modern Search Bar ---- */

.tf-search-container {
  max-width: 640px;
  margin: 0 auto 56px;
  position: relative;
}

.tf-search-box {
  position: relative;
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 2px solid var(--tf-line);
  border-radius: var(--tf-radius);
  box-shadow: var(--tf-shadow-card);
  transition: all 0.2s ease;
}

.tf-search-box:focus-within {
  border-color: var(--tf-brand);
  box-shadow: var(--tf-shadow-glow), var(--tf-shadow-card);
}

.tf-search-icon-left {
  position: absolute;
  left: 18px;
  color: var(--tf-ink-faint);
  display: flex;
  align-items: center;
  pointer-events: none;
}

.tf-search-input {
  width: 100%;
  height: 56px;
  padding: 0 54px 0 52px;
  font-family: inherit;
  font-size: 1.0625rem;
  color: var(--tf-ink);
  background: transparent;
  border: none;
  outline: none;
}

.tf-search-input::placeholder {
  color: var(--tf-ink-faint);
}

.tf-search-hint {
  position: absolute;
  right: 16px;
  background: var(--tf-bg-alt);
  color: var(--tf-ink-faint);
  font-family: var(--tf-font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--tf-line);
  pointer-events: none;
}

.tf-search-feedback {
  margin-top: 12px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--tf-ink-soft);
  text-align: center;
}

/* ---- Cluster Section ---- */

.tf-cluster-section {
  margin-bottom: 56px;
}

.tf-cluster-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--tf-accent-border, var(--tf-line-subtle));
}

.tf-cluster-header h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--tf-accent, var(--tf-ink));
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.tf-cluster-count-badge {
  font-size: 0.8125rem;
  font-weight: 700;
  background: var(--tf-accent-bg, var(--tf-surface));
  color: var(--tf-accent, var(--tf-ink-soft));
  border: 1px solid var(--tf-accent-border, var(--tf-line));
  padding: 4px 12px;
  border-radius: var(--tf-radius-full);
}

/* ---- Tool Cards Grid ---- */

.tf-cards-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 24px;
}

@media (max-width: 480px) {
  .tf-cards-grid {
    grid-template-columns: 1fr;
  }
}

.tf-card-item {
  display: flex;
}

/* Card Outer Container */
.tf-tool-card {
  width: 100%;
  background: var(--tf-surface);
  border: 1px solid var(--tf-line);
  border-radius: var(--tf-radius);
  box-shadow: var(--tf-shadow-card);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  padding: 28px 24px 22px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.2s ease;
}

/* Top colored accent line */
.tf-tool-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--tf-accent, var(--tf-brand));
}

.tf-tool-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--tf-shadow-hover);
  border-color: var(--tf-accent-border, var(--tf-brand-border));
}

/* Card Top Section */
.tf-card-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.tf-card-icon-wrapper {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--tf-accent-bg, var(--tf-brand-sunk));
  border: 1px solid var(--tf-accent-border, var(--tf-brand-border));
  color: var(--tf-accent, var(--tf-brand));
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.tf-tool-card:hover .tf-card-icon-wrapper {
  transform: scale(1.06);
}

.tf-card-cluster-pill {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--tf-accent-bg, var(--tf-brand-sunk));
  color: var(--tf-accent-text, var(--tf-brand-text));
  border: 1px solid var(--tf-accent-border, var(--tf-brand-border));
  padding: 4px 10px;
  border-radius: var(--tf-radius-full);
}

/* Card Content */
.tf-card-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.tf-card-title {
  font-size: 1.3125rem;
  font-weight: 700;
  color: var(--tf-ink);
  margin: 0 0 10px;
  line-height: 1.25;
}

.tf-card-desc {
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--tf-ink-muted);
  margin: 0 0 20px;
  flex-grow: 1;
}

/* Card Footer */
.tf-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--tf-line-subtle);
  padding-top: 16px;
  margin-top: auto;
}

.tf-tag-feature {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--tf-ink-soft);
  background: var(--tf-bg-alt);
  border: 1px solid var(--tf-line);
  padding: 3px 8px;
  border-radius: 4px;
}

.tf-tag-final-check {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.6875rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #1d4ed8;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 3px 8px;
  border-radius: 4px;
}

.tf-tag-decision,
.tf-tag-to-develop {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.6875rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #b45309;
  background: #fffbeb;
  border: 1px solid #fde68a;
  padding: 3px 8px;
  border-radius: 4px;
}

.tf-tag-ready {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.6875rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #047857;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  padding: 3px 8px;
  border-radius: 4px;
}

.tf-card-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--tf-accent, var(--tf-brand));
  transition: gap 0.15s ease;
}

.tf-tool-card:hover .tf-card-action-btn {
  gap: 10px;
}

.tf-card-action-btn svg {
  transition: transform 0.15s ease;
}

.tf-tool-card:hover .tf-card-action-btn svg {
  transform: translateX(2px);
}

/* Empty search state */
.tf-empty-state {
  text-align: center;
  padding: 64px 20px;
  background: var(--tf-surface);
  border: 1px dashed var(--tf-line-strong);
  border-radius: var(--tf-radius);
  max-width: 540px;
  margin: 40px auto;
}

.tf-empty-state svg {
  color: var(--tf-ink-faint);
  margin-bottom: 16px;
}

.tf-empty-state h3 {
  font-size: 1.25rem;
  color: var(--tf-ink);
  margin-bottom: 8px;
}

.tf-empty-state p {
  font-size: 0.9375rem;
  color: var(--tf-ink-muted);
  margin: 0;
}

/* ---- Footer ---- */

.tf-footer {
  margin-top: auto;
  border-top: 1px solid var(--tf-line);
  background: #ffffff;
  padding: 44px 0 36px;
}

.tf-footer-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.tf-footer-brand {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tf-footer-disclaimer {
  font-size: 0.8125rem;
  color: var(--tf-ink-faint);
  margin: 0;
}

.tf-footer-copy {
  font-size: 0.875rem;
  color: var(--tf-ink-muted);
  margin: 0;
}

.tf-footer-legal {
  font-size: 0.8125rem;
  color: var(--tf-ink-muted);
  margin: 0 0 6px;
}

.tf-footer-legal a {
  color: var(--tf-ink-muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.tf-footer-legal a:hover {
  color: var(--tf-brand);
  border-bottom-color: var(--tf-brand);
}

/* ---- Cookie Consent ---- */

.tf-consent {
  position: fixed;
  inset: auto 0 0 0;
  background: #0f172a;
  color: #ffffff;
  padding: 16px 24px;
  z-index: 1000;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.2);
}

.tf-consent[hidden] {
  display: none;
}

.tf-consent-in {
  max-width: var(--tf-page);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.tf-consent p {
  margin: 0;
  font-size: 0.875rem;
  color: #cbd5e1;
}

.tf-consent-btns {
  display: flex;
  gap: 10px;
}

.tf-btn-accept {
  background: #2563eb;
  color: #ffffff;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.875rem;
  padding: 8px 18px;
  border: none;
  border-radius: var(--tf-radius-sm);
  cursor: pointer;
  transition: background 0.15s ease;
}

.tf-btn-accept:hover {
  background: #1d4ed8;
}

.tf-btn-reject {
  background: transparent;
  color: #cbd5e1;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 8px 16px;
  border: 1px solid #475569;
  border-radius: var(--tf-radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.tf-btn-reject:hover {
  background: #1e293b;
  color: #ffffff;
}

/* ---- Ad Banner (Reserved dimensions for zero CLS) ---- */

.tf-ad-wrap {
  width: 100%;
  margin: 48px 0 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tf-ad-label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--tf-ink-faint);
  margin-bottom: 8px;
}

.tf-ad-slot {
  width: 100%;
  max-width: 728px;
  min-height: 280px;
  background: #ffffff;
  border: 1px dashed var(--tf-line-strong);
  border-radius: var(--tf-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--tf-shadow-sm);
}

@media (min-width: 768px) {
  .tf-ad-slot {
    min-height: 250px;
  }
}



/* ---- Interactive Cluster Filter Buttons Bar ---- */
.tf-tab-bar-container {
  width: 100%;
  max-width: 1100px;
  margin: -24px auto 40px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  padding: 4px 4px 12px;
}

.tf-tab-bar-container::-webkit-scrollbar {
  height: 6px;
}
.tf-tab-bar-container::-webkit-scrollbar-track {
  background: var(--tf-bg-alt, #f1f5f9);
  border-radius: 4px;
}
.tf-tab-bar-container::-webkit-scrollbar-thumb {
  background: var(--tf-line, #cbd5e1);
  border-radius: 4px;
}

.tf-tab-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.tf-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  color: var(--tf-ink-soft, #475569);
  border: 1.5px solid var(--tf-line, #e2e8f0);
  border-radius: 24px;
  padding: 8px 14px;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.tf-tab-btn:hover {
  background: var(--tf-bg-alt, #f8fafc);
  color: var(--tf-ink, #0f172a);
  border-color: var(--tf-line-subtle, #cbd5e1);
  transform: translateY(-1px);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.06);
}

.tf-tab-btn.is-active {
  background: var(--tf-brand, #2563eb);
  color: #ffffff !important;
  border-color: var(--tf-brand, #2563eb);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
  transform: translateY(-1px);
}

.tf-tab-icon {
  font-size: 1rem;
  line-height: 1;
}

.tf-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.06);
  color: inherit;
  margin-left: 2px;
}

.tf-tab-btn.is-active .tf-tab-count {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}
