/* ══════════════════════════════════════
   TOOLS DIRECTORY
══════════════════════════════════════ */

/* ── Hero ── */
.tl-hero {
  background: linear-gradient(135deg, #eef4ff 0%, #f0f7ff 50%, #e8f0fe 100%);
  padding: 56px 24px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid #dbeafe;
}
.tl-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 70% at 50% -10%, rgba(37,99,235,.1) 0%, transparent 60%),
    radial-gradient(ellipse 35% 45% at 10% 90%,  rgba(99,102,241,.08) 0%, transparent 55%),
    radial-gradient(ellipse 35% 45% at 90% 90%,  rgba(6,182,212,.07) 0%, transparent 55%);
  pointer-events: none;
}
.tl-hero-inner { position: relative; z-index: 1; max-width: 640px; margin: 0 auto; }

.tl-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 20px;
  box-shadow: 0 1px 4px rgba(37,99,235,.1);
}
.tl-hero-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 6px rgba(34,197,94,.6);
  animation: tl-dot 2s ease-in-out infinite;
}
@keyframes tl-dot {
  0%,100% { opacity:1; } 50% { opacity:.4; }
}

.tl-hero-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -.03em;
  margin-bottom: 12px;
}
.tl-hero-title span { color: #2563eb; }
.tl-hero-sub {
  font-size: 1rem;
  color: #475569;
  margin-bottom: 32px;
  line-height: 1.6;
}

/* ── Search ── */
.tl-search-form { width: 100%; max-width: 480px; margin: 0 auto; }
.tl-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.tl-search-icon {
  position: absolute;
  left: 14px;
  color: #94a3b8;
  pointer-events: none;
  flex-shrink: 0;
}
.tl-search-input {
  width: 100%;
  background: #fff;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  color: #0f172a;
  font-size: .95rem;
  padding: 12px 44px 12px 46px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  font-family: inherit;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.tl-search-input::placeholder { color: #94a3b8; }
.tl-search-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.tl-search-clear {
  position: absolute;
  right: 14px;
  color: #94a3b8;
  font-size: .8rem;
  text-decoration: none;
  padding: 4px;
  transition: color .15s;
}
.tl-search-clear:hover { color: #475569; }

/* ── Filters ── */
.tl-filters-wrap {
  background: rgba(255,255,255,.92);
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
}
.tl-filters {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.tl-filter-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.tl-filter-pricing { padding-top: 4px; border-top: 1px solid #f1f5f9; }

.tl-pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 600;
  color: #475569;
  border: 1px solid #cbd5e1;
  background: #fff;
  text-decoration: none;
  transition: all .15s;
  white-space: nowrap;
}
.tl-pill:hover { color: #1d4ed8; border-color: #93c5fd; background: #eff6ff; text-decoration: none; }
.tl-pill.active {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}

/* ── Page wrap ── */
.tl-page-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}
.tl-results-meta {
  font-size: .85rem;
  color: #64748b;
  margin-bottom: 24px;
}

/* ── Grid ── */
.tl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

/* ── Card ── */
.tl-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 20px;
  text-decoration: none;
  color: inherit;
  transition: border-color .18s, background .18s, transform .18s, box-shadow .18s;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.tl-card:hover {
  border-color: #2563eb;
  background: #f0f6ff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37,99,235,.12);
  text-decoration: none;
  color: inherit;
}
.tl-card--featured {
  border-color: #bfdbfe;
  background: #f0f6ff;
}

.tl-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.tl-card-logo {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
}
.tl-card-logo img {
  width: 100%; height: 100%;
  object-fit: contain;
}
.tl-card-initial {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
}
.tl-card-badges {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

/* ── Badges ── */
.tl-badge {
  display: inline-block;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 20px;
  white-space: nowrap;
}
.tl-cat-badge { background: #dbeafe; color: #1d4ed8; border: 1px solid #bfdbfe; }
.tl-free      { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.tl-freemium  { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
.tl-paid      { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.tl-oss       { background: #ede9fe; color: #5b21b6; border: 1px solid #c4b5fd; }
.tl-featured-badge { background: #fef9c3; color: #854d0e; border: 1px solid #fde68a; }

.tl-card-body { flex: 1; }
.tl-card-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 5px;
  line-height: 1.3;
}
.tl-card-tagline {
  font-size: .82rem;
  color: #2563eb;
  font-weight: 500;
  margin-bottom: 8px;
  line-height: 1.4;
}
.tl-card-desc {
  font-size: .8rem;
  color: #475569;
  line-height: 1.55;
}

.tl-card-foot { margin-top: 16px; }
.tl-visit-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .78rem;
  font-weight: 700;
  color: #2563eb;
  transition: color .15s;
}
.tl-card:hover .tl-visit-btn { color: #1d4ed8; }

/* ── Empty state ── */
.tl-empty {
  text-align: center;
  padding: 80px 24px;
  color: #475569;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.tl-btn-reset {
  display: inline-block;
  padding: 8px 20px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: #475569;
  text-decoration: none;
  font-size: .85rem;
  transition: all .15s;
}
.tl-btn-reset:hover { border-color: #2563eb; color: #1d4ed8; text-decoration: none; }

/* ── Pagination ── */
.tl-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 48px;
}
.tl-page-btn {
  padding: 8px 20px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: #475569;
  text-decoration: none;
  font-size: .85rem;
  font-weight: 600;
  transition: all .15s;
}
.tl-page-btn:hover { border-color: #2563eb; color: #1d4ed8; text-decoration: none; }
.tl-page-info { font-size: .82rem; color: #64748b; }

/* ── Show (detail) page ── */
.tl-show-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}
.tl-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .78rem;
  color: #64748b;
  margin-bottom: 32px;
}
.tl-breadcrumb a { color: #2563eb; text-decoration: none; }
.tl-breadcrumb a:hover { text-decoration: underline; }

.tl-show-head {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.tl-show-logo {
  width: 80px; height: 80px;
  border-radius: 16px;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid #e2e8f0;
}
.tl-show-logo img { width: 100%; height: 100%; object-fit: contain; }
.tl-show-initial { width: 80px; height: 80px; font-size: 2rem; border-radius: 16px; }
.tl-show-meta { flex: 1; min-width: 200px; }
.tl-show-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.tl-show-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 6px;
  line-height: 1.2;
}
.tl-show-tagline { font-size: 1rem; color: #2563eb; font-weight: 500; }
.tl-show-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ddeeff;
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 700;
  font-size: .9rem;
  text-decoration: none;
  box-shadow: 0 0 20px rgba(37,99,235,.35);
  transition: opacity .15s, transform .15s;
  white-space: nowrap;
  align-self: flex-start;
}
.tl-show-cta:hover { opacity: .88; transform: translateY(-1px); text-decoration: none; color: #ddeeff; }

.tl-show-desc {
  font-size: .95rem;
  color: #334155;
  line-height: 1.75;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 32px;
  white-space: pre-line;
}

.tl-back-link {
  display: inline-block;
  color: #2563eb;
  text-decoration: none;
  font-size: .85rem;
  font-weight: 600;
  margin-bottom: 48px;
}
.tl-back-link:hover { text-decoration: underline; }

.tl-related-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 20px;
}
.tl-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .tl-hero { padding: 44px 16px 40px; }
  .tl-filters { padding: 10px 16px; }
  .tl-page-wrap { padding: 24px 16px 60px; }
  .tl-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .tl-card { padding: 14px; }
  .tl-show-wrap { padding: 24px 16px 60px; }
  .tl-show-head { flex-direction: column; }
  .tl-show-cta { width: 100%; justify-content: center; }
}
@media (max-width: 400px) {
  .tl-grid { grid-template-columns: 1fr; }
}
