/* ── Tools Section ── */
.tools-section {
  position: relative;
  background: radial-gradient(circle at top, #ffffff, #f5f5fb);
  padding: 100px 0 120px;
  z-index: 2;
  font-family: "Inter", sans-serif;
  overflow: hidden;
  border-top: 1px solid rgba(79, 70, 229, 0.04);
}

.tools-section * {
  box-sizing: border-box;
}

.tools-section .container {
  width: 100%;
  max-width: 1520px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* =========================
   TOP
========================= */

.tools-section .top {
  text-align: center;
  margin-bottom: 60px;
  animation: tools-fadeUp 1s ease;
}

.tools-section .badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid #e8dcff;
  backdrop-filter: blur(20px);
  color: #8b5cf6;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 20px;
  box-shadow: 0 8px 20px rgba(139, 92, 246, 0.08);
}

.tools-section .top h1 {
  font-size: clamp(2rem, 3.2vw, 3.2rem);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -1.5px;
  margin-bottom: 20px;
  color: #07112f;
}

.tools-section .top h1 span {
  background: linear-gradient(
    90deg,
    #3b82f6 0%,
    #60a5fa 20%,
    #818cf8 40%,
    #8b5cf6 60%,
    #a855f7 80%,
    #c084fc 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

.tools-section .top p {
  max-width: 700px;
  margin: auto;
  color: #6b7280;
  font-size: 15px;
  line-height: 1.6;
  font-weight: 500;
}

/* =========================
   GRID
========================= */

.tools-section .grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}

/* =========================
   CARD
========================= */

.tools-section .card {
  position: relative;
  min-height: 200px;
  padding: 24px 18px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(24px);
  border: 1px solid #ececf5;
  border-radius: 20px;
  overflow: hidden;
  text-align: center;
  transition: all 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
  animation: tools-fadeUp 1s ease;
}

.tools-section .card:hover {
  transform: translateY(-10px) scale(1.03);
  box-shadow: 0 30px 60px rgba(139, 92, 246, 0.12);
  border-color: rgba(139, 92, 246, 0.25);
}

.tools-section .card.active {
  border: 1.5px solid #c8b6ff;
  box-shadow: 0 20px 50px rgba(139, 92, 246, 0.12);
}

.tools-section .card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(139, 92, 246, 0.04),
    rgba(96, 165, 250, 0.03)
  );
  opacity: 0;
  transition: 0.4s;
  pointer-events: none;
}

.tools-section .card:hover::before {
  opacity: 1;
}

/* =========================
   ICON BOX
========================= */

.tools-section .icon-box {
  width: 64px;
  height: 64px;
  margin: auto auto 16px;
  border-radius: 16px;
  background: linear-gradient(180deg, #f7f7ff, #eef4ff);
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  animation: tools-float 4s ease-in-out infinite;
}

.tools-section .icon-box::before {
  content: "";
  position: absolute;
  width: 140%;
  height: 140%;
  background: linear-gradient(
    135deg,
    transparent,
    rgba(255, 255, 255, 0.9),
    transparent
  );
  transform: rotate(25deg);
  animation: tools-shine 4s linear infinite;
}

.tools-section .icon {
  font-size: 32px;
  position: relative;
  z-index: 2;
}

/* =========================
   TEXT
========================= */

.tools-section .card h3 {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 8px;
  color: #07112f;
}

.tools-section .card p {
  color: #5f6677;
  line-height: 1.6;
  font-size: 13px;
  max-width: 220px;
  margin: auto;
}

/* =========================
   FOOTER
========================= */

.tools-section .footer {
  margin-top: 36px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  color: #6b7280;
  font-size: 15px;
  font-weight: 600;
  animation: tools-fadeUp 1.2s ease;
}

.tools-section .footer strong {
  background: linear-gradient(90deg, #8b5cf6, #60a5fa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

.tools-section .footer-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8b5cf6, #60a5fa);
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  box-shadow: 0 10px 25px rgba(139, 92, 246, 0.2);
  animation: tools-pulse 2s infinite;
  font-size: 14px;
}

/* =========================
   ANIMATIONS
========================= */

@keyframes tools-fadeUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes tools-float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes tools-shine {
  0% {
    transform: translateX(-150%) rotate(25deg);
  }
  100% {
    transform: translateX(150%) rotate(25deg);
  }
}

@keyframes tools-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.3);
  }
  70% {
    box-shadow: 0 0 0 18px rgba(139, 92, 246, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(139, 92, 246, 0);
  }
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1400px) {
  .tools-section .grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 1100px) {
  .tools-section .grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .tools-section .top h1 {
    font-size: 32px;
    letter-spacing: -1px;
  }
  .tools-section .top p {
    font-size: 14px;
  }
}

@media (max-width: 768px) {
  .tools-section {
    padding: 60px 0;
  }
  .tools-section .grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .tools-section .top h1 {
    font-size: 26px;
    letter-spacing: -0.5px;
    margin-bottom: 16px;
  }
  .tools-section .top p {
    font-size: 13px;
  }
  .tools-section .footer {
    flex-direction: column;
    text-align: center;
    font-size: 14px;
    gap: 10px;
  }
}

@media (max-width: 520px) {
  .tools-section .grid {
    grid-template-columns: 1fr;
  }
}

/* ── Dark Mode for Tools Section ── */
body.dark-mode .tools-section {
  background: radial-gradient(circle at top, #040112, #02000a);
  border-top: 1px solid rgba(255, 255, 255, 0.03);
}
body.dark-mode .tools-section .top h1 {
  color: #f8fafc;
}
body.dark-mode .tools-section .top p {
  color: #94a3b8;
}
body.dark-mode .tools-section .badge {
  background: rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.3);
  color: #c084fc;
}
body.dark-mode .tools-section .card {
  background: rgba(15, 23, 42, 0.45);
  border-color: rgba(139, 92, 246, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}
body.dark-mode .tools-section .card:hover {
  border-color: rgba(139, 92, 246, 0.35);
  box-shadow: 0 30px 60px rgba(139, 92, 246, 0.2);
}
body.dark-mode .tools-section .card.active {
  border: 1.5px solid #a855f7;
  box-shadow: 0 20px 50px rgba(168, 85, 247, 0.2);
}
body.dark-mode .tools-section .card h3 {
  color: #f8fafc;
}
body.dark-mode .tools-section .card p {
  color: #cbd5e1;
}
body.dark-mode .tools-section .icon-box {
  background: linear-gradient(
    180deg,
    rgba(139, 92, 246, 0.12),
    rgba(96, 165, 250, 0.05)
  );
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
body.dark-mode .tools-section .footer {
  color: #94a3b8;
}

