/* Custom Styles for the new Tools Directory Page */

.text-gradient-primary {
  background: linear-gradient(135deg, var(--accent-primary), #3b82f6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.badge-orange,
.badge-blue {
  display: inline-flex;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-orange {
  background: #fff7ed;
  color: #ea580c;
  border: 1px solid rgba(234, 88, 12, 0.2);
}

.badge-blue {
  background: var(--accent-light);
  color: var(--accent-primary);
  border: 1px solid rgba(2, 87, 250, 0.2);
}


/* Subtly different button: Outline that fills on hover */
.btn-outline-primary {
  display: block;
  width: 100%;
  text-align: center;
  background: transparent;
  color: var(--accent-primary);
  border: 2px solid rgba(2, 87, 250, 0.15);
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  margin-top: 16px;
}

.tool-img-card:hover .btn-outline-primary {
  background: var(--accent-primary);
  color: white;
  border-color: var(--accent-primary);
}

/* Tools Hero */
.tools-hero {
  padding: 80px 0 60px;
  text-align: center;
  background: radial-gradient(circle at 50% -20%, var(--accent-light), #ffffff);
}

.tools-hero-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 800px;
  margin: 0 auto;
}

.tools-hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 24px;
  color: var(--text-dark);
  letter-spacing: -1.5px;
}

.tools-hero-subtitle {
  max-width: 650px;
  margin: 0 auto;
}

/* Tools Directory Card Grid */
.tools-directory-section {
  padding: 60px 0;
}

.tools-directory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 32px;
}

.tool-img-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  position: relative;
  /* added reference for absolute badge positioning */
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
  display: flex;
  flex-direction: column;
}

.tool-img-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 32px rgba(2, 87, 250, 0.08);
  /* slight blue shadow */
  border-color: rgba(2, 87, 250, 0.2);
}

/* Detail UI Change: Inset image instead of Full bleed image */
.tool-img-wrapper {
  position: relative;
  width: calc(100% - 24px);
  height: 170px;
  margin: 12px 12px 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-secondary);
}

.tool-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.tool-img-card:hover .tool-img-wrapper img {
  transform: scale(1.05);
}

.tool-img-card .badge-mini {
  position: absolute;
  top: -14px;
  left: 20px;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  background: linear-gradient(135deg, var(--accent-primary), #3b82f6);
  color: white;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 4px 12px rgba(2, 87, 250, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.tool-card-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.tool-card-content h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.tool-card-content p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: auto;
  /* Pushes the button to the bottom */
}

/* Info Blocks Section (What if / Why use) */
.info-blocks-section {
  padding: 60px 0;
}

.bg-very-light {
  background-color: #fafbfc;
}

.content-centered-header {
  text-align: center;
}

.content-centered-header h2 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 80px;
  /* Increased to fit floating icons */
  color: var(--text-dark);
  letter-spacing: -1px;
}

.info-blocks-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  text-align: center;
}

/* Detail UI Change: Floating overlapping icons over cards */
.info-block-card {
  padding: 40px 24px 32px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  background: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.01);
  position: relative;
  transition: transform 0.3s ease;
}

.info-block-card:hover {
  transform: translateY(-4px);
}

.solid-bg {
  background: white;
  border: none;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.03);
}

.info-block-icon {
  font-size: 1.8rem;
  margin-bottom: 20px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 64px;
  height: 64px;
  background: var(--accent-light);
  color: var(--accent-primary);
  border-radius: 50%;
  position: absolute;
  top: -32px;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid var(--bg-primary);
  /* Assuming parent background */
}

/* Fix overlapping border color for nested sections */
.bg-very-light .info-block-icon {
  border-color: #fafbfc;
}

.info-block-card.solid-bg .info-block-icon {
  border-color: white;
  /* Match card if card is white and dropshadowing */
}

.info-block-card h3 {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--text-dark);
}

.info-block-card p {
  color: var(--text-muted);
  line-height: 1.6;
  font-size: 1.05rem;
}

/* CTA Banner Override */
.cta-primary {
  background: linear-gradient(135deg, var(--accent-primary), #3b82f6);
}

.cta-primary::before {
  background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 60%);
}

@media (max-width: 1024px) {

  .tools-directory-grid,
  .info-blocks-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .tools-hero h1 {
    font-size: 2.5rem;
  }

  .content-centered-header h2 {
    font-size: 2rem;
  }

  .tools-directory-grid,
  .info-blocks-grid {
    grid-template-columns: 1fr;
    gap: 48px;
    /* Extra gap for floating icons */
  }
}