/* ============================================================
   TOOLS PAGE — Premium Styles
   ============================================================ */

/* ---- Tools Hero ---- */
.tools-hero {
  position: relative;
  padding: 10rem 0 4rem;
  text-align: center;
  overflow: hidden;
}

.tools-hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 50% 0%, rgba(168, 85, 247, 0.18) 0%, transparent 60%),
    radial-gradient(ellipse 40% 35% at 20% 70%, rgba(6, 182, 212, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse 40% 30% at 80% 60%, rgba(244, 63, 94, 0.06) 0%, transparent 50%);
}

.tools-hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
  margin: 0 auto;
}

.tools-hero-content h1 {
  font-family: var(--ff-heading);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.tools-hero-content > p {
  font-size: 1.05rem;
  color: var(--clr-text-muted);
  line-height: 1.7;
  margin-bottom: 2rem;
}

/* Search Bar */
.tools-search-wrapper {
  position: relative;
  max-width: 520px;
  margin: 0 auto;
}

.tools-search-wrapper i.fa-search {
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--clr-text-dim);
  font-size: 0.95rem;
}

.tools-search-wrapper input {
  width: 100%;
  padding: 1rem 7rem 1rem 3rem;
  background: var(--clr-bg-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-full);
  color: var(--clr-text);
  font-size: 0.95rem;
  font-family: var(--ff-body);
  outline: none;
  transition: all 0.3s var(--ease-out);
  backdrop-filter: blur(10px);
}

.tools-search-wrapper input::placeholder {
  color: var(--clr-text-dim);
}

.tools-search-wrapper input:focus {
  border-color: var(--clr-primary);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.15), 0 8px 30px rgba(0, 0, 0, 0.3);
}

.search-count {
  position: absolute;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--clr-text-dim);
  background: var(--clr-surface);
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
}

/* ---- Filter Bar ---- */
.tools-filter-section {
  padding: 0 0 2rem;
  background: var(--clr-bg);
}

.tools-filter-bar {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
  padding: 1rem 0;
}

.tool-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.25rem;
  background: transparent;
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--clr-text-muted);
  font-family: var(--ff-body);
  cursor: pointer;
  transition: all 0.25s var(--ease-out);
}

.tool-filter-btn:hover {
  border-color: rgba(168, 85, 247, 0.3);
  color: var(--clr-white);
  background: rgba(168, 85, 247, 0.08);
}

.tool-filter-btn.active {
  background: var(--grad-primary);
  border-color: transparent;
  color: var(--clr-white);
  box-shadow: 0 4px 20px rgba(168, 85, 247, 0.3);
}

.tool-filter-btn i {
  font-size: 0.8rem;
}

/* ---- Tools Grid ---- */
.tools-grid-section {
  padding: 0 0 6rem;
  background: var(--clr-bg);
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

/* ---- Tool Card ---- */
.tool-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.75rem;
  background: var(--clr-bg-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(10px);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: all 0.4s var(--ease-out);
}

.tool-card-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.06) 0%, rgba(6, 182, 212, 0.03) 100%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}

.tool-card:hover {
  border-color: rgba(168, 85, 247, 0.25);
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(168, 85, 247, 0.12), 0 0 0 1px rgba(168, 85, 247, 0.1);
}

.tool-card:hover .tool-card-glow {
  opacity: 1;
}

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

/* Tool Number */
.tool-number {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  font-family: var(--ff-heading);
  font-size: 2.5rem;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.03);
  line-height: 1;
  z-index: 0;
  pointer-events: none;
}

/* Tool Badge */
.tool-badge {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  z-index: 2;
}

.premium-badge {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #1a1a2e;
}

.premium-badge i {
  font-size: 0.65rem;
}

/* Tool Icon */
.tool-icon-wrap {
  width: 52px;
  height: 52px;
  background: var(--grad-primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--clr-white);
  margin-bottom: 1.25rem;
  position: relative;
  z-index: 1;
  transition: transform 0.4s var(--ease-out);
  flex-shrink: 0;
}

.tool-card:hover .tool-icon-wrap {
  transform: scale(1.1) rotate(-5deg);
}

/* Premium icon override */
.premium-icon {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

.tool-card h3 {
  font-family: var(--ff-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--clr-white);
  margin-bottom: 0.6rem;
  position: relative;
  z-index: 1;
}

.tool-card > p {
  font-size: 0.875rem;
  color: var(--clr-text-muted);
  line-height: 1.7;
  flex: 1;
  position: relative;
  z-index: 1;
}

/* Tool Footer */
.tool-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--clr-border);
  position: relative;
  z-index: 1;
}

.tool-tag {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--clr-primary-light);
  background: rgba(168, 85, 247, 0.1);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
}

.tool-arrow {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--clr-text-muted);
  transition: all 0.3s var(--ease-out);
}

.tool-card:hover .tool-arrow {
  background: var(--grad-primary);
  border-color: transparent;
  color: var(--clr-white);
  transform: translateX(3px);
}

/* ---- Premium Card Special Style ---- */
.tool-card.premium {
  border-color: rgba(251, 191, 36, 0.2);
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.05) 0%, rgba(245, 158, 11, 0.02) 100%);
}

.tool-card.premium:hover {
  border-color: rgba(251, 191, 36, 0.4);
  box-shadow: 0 16px 48px rgba(251, 191, 36, 0.12), 0 0 0 1px rgba(251, 191, 36, 0.15);
}

.tool-card.premium .tool-tag {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
}

.tool-card.premium .tool-number {
  display: none;
}

/* ---- No Results ---- */
.no-results {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--clr-text-dim);
}

.no-results i {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--clr-text-dim);
  opacity: 0.4;
}

.no-results h3 {
  font-size: 1.3rem;
  color: var(--clr-text-muted);
  margin-bottom: 0.5rem;
}

.no-results p {
  font-size: 0.9rem;
  color: var(--clr-text-dim);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .tools-hero {
    padding: 7rem 0 3rem;
  }

  .tools-hero-content h1 {
    font-size: 2rem;
  }

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

  .tools-filter-bar {
    gap: 0.4rem;
  }

  .tool-filter-btn {
    padding: 0.45rem 0.9rem;
    font-size: 0.8rem;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 75%;
    max-width: 320px;
    height: 100vh;
    background: var(--clr-bg-light);
    border-left: 1px solid var(--clr-border);
    flex-direction: column;
    padding: 5rem 2rem 2rem;
    gap: 0.25rem;
    transition: right 0.4s var(--ease-out);
    z-index: 999;
  }

  .nav-menu.open { right: 0; }
  .nav-toggle { display: flex; z-index: 1001; }
  .nav-cta { display: none; }
}

@media (max-width: 480px) {
  .tools-hero-content h1 {
    font-size: 1.7rem;
  }

  .tool-card {
    padding: 1.5rem;
  }

  .tools-search-wrapper input {
    padding: 0.85rem 6rem 0.85rem 2.75rem;
    font-size: 0.88rem;
  }
}
