/* ============================================
   TOOLS SECTION
   ============================================ */
.tools-section {
  padding: 100px 0;
  background: var(--bg-2);
  position: relative;
  overflow: hidden;
}
.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 56px;
  align-items: start;
}
.tool-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color var(--ease), transform var(--ease), box-shadow var(--ease);
  text-decoration: none;
  min-width: 0;
  word-break: break-word;
  color: var(--text);
}
.tool-card:hover {
  border-color: var(--border-h);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,212,255,.08);
}
.tool-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--tool-color, var(--cyan)), transparent);
  opacity: 0;
  transition: opacity var(--ease);
}
.tool-card:hover::before { opacity: 1; }

/* Status badge */
.tool-status {
  position: absolute;
  top: 16px; right: 16px;
  font-family: var(--font-mono);
  font-size: .6rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 2px;
}
.status-live {
  background: rgba(0,229,160,.12);
  color: var(--green);
  border: 1px solid rgba(0,229,160,.25);
}
.status-live::before {
  content: '●';
  margin-right: 5px;
  animation: blink .9s step-end infinite;
}
.status-beta {
  background: rgba(255,140,66,.1);
  color: var(--orange);
  border: 1px solid rgba(255,140,66,.2);
}
.status-coming {
  background: rgba(122,155,175,.08);
  color: var(--text-dim);
  border: 1px solid rgba(122,155,175,.15);
}

/* Tool emoji/icon */
.tool-icon {
  font-size: 1.8rem;
  line-height: 1;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
}
.tool-card h3 {
  font-size: 1.05rem;
  color: var(--text);
  margin: 0;
  line-height: 1.3;
}
.tool-card .tool-tagline {
  font-family: var(--font-mono);
  font-size: .68rem;
  color: var(--tool-color, var(--cyan));
  letter-spacing: .04em;
  margin-top: -4px;
  line-height: 1.4;
}
.tool-card p {
  font-size: .84rem;
  color: var(--text-muted);
  line-height: 1.7;
  flex: 1;
  min-width: 0;
}
.tool-features {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 4px;
}
.tool-feature {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: .75rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
  line-height: 1.5;
  min-width: 0;
}
.tool-feature::before {
  content: '→';
  color: var(--tool-color, var(--cyan));
  flex-shrink: 0;
}
.tool-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}
.tool-card-footer .tool-link {
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .08em;
  color: var(--tool-color, var(--cyan));
  display: flex;
  align-items: center;
  gap: 6px;
}
.tool-card-footer .tool-link svg {
  width: 14px; height: 14px;
}

/* Color variants */
.tool-portray   { --tool-color: #00D4FF; }
.tool-nsd       { --tool-color: #00E5A0; }
.tool-eyeotea   { --tool-color: #FF8C42; }

@media (max-width: 1024px) {
  .tools-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .tools-grid { grid-template-columns: 1fr; }
}

/* Ensure tools section has full width container */
.tools-section .container {
  max-width: var(--max-w);
}
/* Prevent any card content from breaking the grid */
.tool-card * {
  max-width: 100%;
}
/* Fix the explore link alignment */
.tool-card-footer {
  flex-wrap: wrap;
  gap: 8px;
}

/* Tool logo image slot */
.tool-logo-wrap {
  width: 52px;
  height: 52px;
  border-radius: var(--r);
  border: 1px solid var(--border);
  background: rgba(0,0,0,.3);
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tool-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  padding: 6px;
}
.tool-logo-fallback {
  display: none;
  font-size: 1.6rem;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}
