/* ═══════════════════════════════════════════════════════════════
   tool-cards.css  — Premium SaaS Tool Card System
   Redesigned: equal-height, fully clickable, responsive grid
   Desktop: 4 col | Tablet: 2 col | Mobile: 1 col
   ═══════════════════════════════════════════════════════════════ */

/* ── Standard Tool Card (full grid card) ─────────────────────── */
.tf-tool-card {
  background: #fff;
  border: 1px solid #e8eaed;
  border-radius: 16px;
  padding: 24px 20px 20px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  height: 100%; /* equal height within grid rows */
  position: relative;
  overflow: hidden;
  transition:
    transform 0.22s cubic-bezier(0.4,0,0.2,1),
    box-shadow 0.22s cubic-bezier(0.4,0,0.2,1),
    border-color 0.22s;
}

/* Top accent line */
.tf-tool-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--card-accent, #f27328);
  opacity: 0;
  transition: opacity 0.22s;
}

.tf-tool-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 36px rgba(0,0,0,0.10);
  border-color: #c7cad0;
}
.tf-tool-card:hover::before { opacity: 1; }

.tf-tool-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  flex-shrink: 0;
  font-size: 1.4rem;
  transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1);
}
.tf-tool-card:hover .tf-tool-card-icon {
  transform: scale(1.1) translateY(-2px);
}
.tf-tool-card-icon svg { width: 22px; height: 22px; }

.tf-tool-card-name {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 7px;
  line-height: 1.3;
  transition: color 0.18s;
}
.tf-tool-card:hover .tf-tool-card-name { color: #f27328; }

.tf-tool-card-desc {
  font-size: 12.5px;
  color: #9ca3af;
  line-height: 1.55;
  margin: 0;
  /* Limit to 2 lines */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

/* CTA link at bottom */
.tf-tool-card-cta {
  margin-top: 16px;
  font-size: 12px;
  font-weight: 700;
  color: #f27328;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.2s, transform 0.2s;
}
.tf-tool-card:hover .tf-tool-card-cta {
  opacity: 1;
  transform: translateX(0);
}
.tf-tool-card-cta svg { width: 12px; height: 12px; }

/* ── Tool Card Grid (4 → 2 → 1 columns) ─────────────────────── */
.tf-tool-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  align-items: stretch;
}
@media (max-width: 1024px) {
  .tf-tool-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
  .tf-tool-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}
@media (max-width: 480px) {
  .tf-tool-grid { grid-template-columns: 1fr; gap: 10px; }
  /* On mobile: horizontal layout for compactness */
  .tf-tool-card {
    flex-direction: row;
    align-items: center;
    padding: 16px;
    gap: 14px;
  }
  .tf-tool-card-icon { margin-bottom: 0; flex-shrink: 0; }
  .tf-tool-card-content { flex: 1; min-width: 0; }
  .tf-tool-card-desc { display: none; }
  .tf-tool-card-cta { display: none; }
  .tf-tool-card-name { margin-bottom: 0; font-size: 13.5px; }
}

/* ── Compact / Sidebar Card ──────────────────────────────────── */
.tf-tool-card-sm {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid #e8eaed;
  border-radius: 12px;
  padding: 13px 16px;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.tf-tool-card-sm:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
  border-color: #c7cad0;
}
.tf-tool-card-sm-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
}
.tf-tool-card-sm-icon svg { width: 17px; height: 17px; }
.tf-tool-card-sm-info { flex: 1; min-width: 0; }
.tf-tool-card-sm-name {
  font-size: 13px;
  font-weight: 600;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tf-tool-card-sm-desc {
  font-size: 11.5px;
  color: #9ca3af;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}
