/* ===== Tools Page Styles ===== */

/* --- Nav link active state --- */
.nav-link.active {
  color: #3b82f6;
  font-weight: 600;
}

/* --- Tools Hero --- */
.tools-hero {
  position: relative;
  overflow: hidden;
  padding: 64px 0 48px;
  background: #fafafa;
}

.tools-hero-bg {
  position: absolute;
  top: -120px;
  left: -80px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.1) 0%, rgba(239, 68, 68, 0.05) 40%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.tools-hero::before {
  content: '';
  position: absolute;
  bottom: -60px;
  right: -60px;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.08) 0%, transparent 60%);
  border-radius: 50%;
  pointer-events: none;
}

.tools-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  text-align: center;
}

.tools-hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #f97316;
  background: rgba(249, 115, 22, 0.08);
  padding: 6px 20px;
  border-radius: 20px;
  margin-bottom: 24px;
  border: 1px solid rgba(249, 115, 22, 0.12);
}

.tools-hero-title {
  font-size: 44px;
  font-weight: 900;
  color: #0f172a;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.tools-hero-desc {
  font-size: 15px;
  color: #64748b;
  line-height: 1.5;
  max-width: 680px;
  margin: 0 auto 24px;
}

/* --- Main Section --- */
.tools-main {
  padding: 40px 0 80px;
  background: #fff;
}

.tools-main-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ===== Tools Filter Tabs ===== */
.tools-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 13.5px;
  font-weight: 500;
  color: #64748b;
  background: #f1f5f9;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.filter-btn:hover {
  background: #e2e8f0;
  color: #334155;
}

.filter-btn.active {
  background: #fff;
  color: #3b82f6;
  border-color: #3b82f6;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.12);
}

.filter-count {
  font-size: 11px;
  font-weight: 700;
  background: rgba(0,0,0,0.06);
  padding: 1px 7px;
  border-radius: 10px;
}

.filter-btn.active .filter-count {
  background: rgba(59, 130, 246, 0.12);
  color: #3b82f6;
}

/* ===== Tools Layout (Sidebar + Content) ===== */
.tools-layout {
  display: flex;
  gap: 32px;
  align-items: flex-start;
}

.tools-sidebar {
  width: 200px;
  flex-shrink: 0;
  position: sticky;
  top: 80px;
  background: #fafbfc;
  border-radius: 12px;
  padding: 16px 12px;
  border: 1px solid #f1f5f9;
}

.sidebar-title {
  font-size: 13px;
  font-weight: 700;
  color: #94a3b8;
  margin-bottom: 12px;
  padding-left: 4px;
}

.tools-sidebar .sidebar-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  color: #64748b;
  transition: all 0.2s;
  text-decoration: none;
  margin-bottom: 2px;
}

.tools-sidebar .sidebar-link:hover {
  background: #f1f5f9;
  color: #334155;
}

.tools-sidebar .sidebar-link.active {
  background: #eff6ff;
  color: #3b82f6;
  font-weight: 600;
}

.tools-sidebar .sidebar-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.tools-sidebar .sidebar-count {
  margin-left: auto;
  font-size: 11px;
  color: #94a3b8;
  font-weight: 600;
}

.tools-content {
  flex: 1;
  min-width: 0;
}

/* ===== Category Sections ===== */
.tools-category {
  margin-bottom: 48px;
  scroll-margin-top: 80px;
}

.tools-category:last-child {
  margin-bottom: 0;
}

.category-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid #f1f5f9;
}

.category-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  color: #fff;
}

.category-title {
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 2px;
}

.category-desc {
  font-size: 13px;
  color: #94a3b8;
}

/* ===== Tool Cards Grid ===== */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.tool-card {
  background: #fff;
  border-radius: 12px;
  padding: 18px;
  border: 1px solid #f1f5f9;
  transition: all 0.25s;
  display: flex;
  flex-direction: column;
}

.tool-card:hover {
  border-color: #e2e8f0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

.tool-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.tool-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.tool-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.tool-name {
  font-size: 14.5px;
  font-weight: 650;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tool-tag {
  font-size: 10.5px;
  font-weight: 600;
  padding: 1px 8px;
  border-radius: 4px;
  width: fit-content;
}

.tool-tag.orange { color: #ea580c; background: #fff7ed; }
.tool-tag.blue { color: #2563eb; background: #eff6ff; }
.tool-tag.purple { color: #7c3aed; background: #f5f3ff; }
.tool-tag.green { color: #16a34a; background: #f0fdf4; }
.tool-tag.pink { color: #db2777; background: #fdf2f8; }
.tool-tag.cyan { color: #0891b2; background: #ecfeff; }
.tool-tag.red { color: #dc2626; background: #fff1f2; }
.tool-tag.violet { color: #7c3aed; background: #faf5ff; }
.tool-tag.lobster { color: #dc2626; background: #fef2f2; }

.tool-desc {
  font-size: 12.5px;
  color: #64748b;
  line-height: 1.7;
  flex: 1;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tool-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid #f8fafc;
}

.tool-stat {
  font-size: 11.5px;
  color: #94a3b8;
  white-space: nowrap;
}

.tool-link {
  margin-left: auto;
  font-size: 12px;
  font-weight: 600;
  color: #3b82f6;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s;
}

.tool-link:hover {
  color: #2563eb;
}

/* ===== Hidden class for filtering ===== */
.tools-category.hidden {
  display: none;
}

.tool-card.hidden {
  display: none;
}

/* ===== Responsive ===== */
@media (max-width: 1100px) {
  .tools-sidebar {
    display: none;
  }

  .tools-layout {
    gap: 0;
  }
}

@media (max-width: 900px) {
  .tools-hero-title {
    font-size: 32px;
  }

  .tools-filter {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 6px;
    padding-bottom: 8px;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .tools-filter::-webkit-scrollbar {
    display: none;
  }

  .filter-btn {
    font-size: 12px;
    padding: 8px 14px;
    white-space: nowrap;
    flex-shrink: 0;
  }
}

@media (max-width: 600px) {
  .tools-hero {
    padding: 40px 0 32px;
  }

  .tools-hero-inner {
    padding: 0 16px;
  }

  .tools-hero-title {
    font-size: 26px;
  }

  .tools-main-inner {
    padding: 0 16px;
  }

  .tools-grid {
    grid-template-columns: 1fr;
  }

  .category-title {
    font-size: 17px;
  }
}
