/* ===== DVMReady Clinical Tools — Colorful Enhancements ===== */

/* --- Category Color Map --- */
:root {
  --cat-emergency: #dc2626;
  --cat-emergency-bg: rgba(220, 38, 38, 0.08);
  --cat-drug: #2563eb;
  --cat-drug-bg: rgba(37, 99, 235, 0.08);
  --cat-fluids: #0891b2;
  --cat-fluids-bg: rgba(8, 145, 178, 0.08);
  --cat-toxicology: #d97706;
  --cat-toxicology-bg: rgba(217, 119, 6, 0.08);
  --cat-anesthesia: #7c3aed;
  --cat-anesthesia-bg: rgba(124, 58, 237, 0.08);
  --cat-bloodgas: #ea580c;
  --cat-bloodgas-bg: rgba(234, 88, 12, 0.08);
  --cat-cardiology: #e11d48;
  --cat-cardiology-bg: rgba(225, 29, 72, 0.08);
  --cat-transfusion: #be123c;
  --cat-transfusion-bg: rgba(190, 18, 60, 0.08);
  --cat-internal: #059669;
  --cat-internal-bg: rgba(5, 150, 105, 0.08);
  --cat-reproduction: #db2777;
  --cat-reproduction-bg: rgba(219, 39, 119, 0.08);
  --cat-equine: #7c4a03;
  --cat-equine-bg: rgba(124, 74, 3, 0.08);
}

/* --- Hero Gradient Blobs --- */
.tools-hero {
  position: relative;
  overflow: hidden;
}
.tools-hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.3;
  pointer-events: none;
}
.tools-hero-blob--tl {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(216, 161, 95, 0.5), transparent 70%);
  top: -100px;
  left: -80px;
}
.tools-hero-blob--br {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(15, 118, 110, 0.4), transparent 70%);
  bottom: -80px;
  right: -60px;
}

/* --- Stats Bar Enhancement --- */
.stats-bar-grid {
  gap: 16px;
}
.stat-item {
  background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(255,255,255,0.8));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.stat-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}
.stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--brand);
  letter-spacing: -0.04em;
}
.stat-label {
  font-size: 0.82rem;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  margin-top: 4px;
}

/* --- Category Cards (Colorful) --- */
.category-card {
  position: relative;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease;
}
.category-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}
.category-card:hover::before {
  opacity: 1;
}
.category-card[aria-pressed="true"]::before {
  opacity: 1;
}

/* Category accent colors */
.category-card[data-category="emergency-critical-care"]::before { background: var(--cat-emergency); }
.category-card[data-category="emergency-critical-care"] .category-icon-svg { color: var(--cat-emergency); background: var(--cat-emergency-bg); }
.category-card[data-category="drug-dosing-medications"]::before { background: var(--cat-drug); }
.category-card[data-category="drug-dosing-medications"] .category-icon-svg { color: var(--cat-drug); background: var(--cat-drug-bg); }
.category-card[data-category="fluids-electrolytes-cri"]::before { background: var(--cat-fluids); }
.category-card[data-category="fluids-electrolytes-cri"] .category-icon-svg { color: var(--cat-fluids); background: var(--cat-fluids-bg); }
.category-card[data-category="toxicology"]::before { background: var(--cat-toxicology); }
.category-card[data-category="toxicology"] .category-icon-svg { color: var(--cat-toxicology); background: var(--cat-toxicology-bg); }
.category-card[data-category="anesthesia-analgesia"]::before { background: var(--cat-anesthesia); }
.category-card[data-category="anesthesia-analgesia"] .category-icon-svg { color: var(--cat-anesthesia); background: var(--cat-anesthesia-bg); }
.category-card[data-category="blood-gas-acid-base"]::before { background: var(--cat-bloodgas); }
.category-card[data-category="blood-gas-acid-base"] .category-icon-svg { color: var(--cat-bloodgas); background: var(--cat-bloodgas-bg); }
.category-card[data-category="cardiology"]::before { background: var(--cat-cardiology); }
.category-card[data-category="cardiology"] .category-icon-svg { color: var(--cat-cardiology); background: var(--cat-cardiology-bg); }
.category-card[data-category="transfusion-hematology"]::before { background: var(--cat-transfusion); }
.category-card[data-category="transfusion-hematology"] .category-icon-svg { color: var(--cat-transfusion); background: var(--cat-transfusion-bg); }
.category-card[data-category="internal-medicine-monitoring"]::before { background: var(--cat-internal); }
.category-card[data-category="internal-medicine-monitoring"] .category-icon-svg { color: var(--cat-internal); background: var(--cat-internal-bg); }
.category-card[data-category="reproduction-wellness-specialty"]::before { background: var(--cat-reproduction); }
.category-card[data-category="reproduction-wellness-specialty"] .category-icon-svg { color: var(--cat-reproduction); background: var(--cat-reproduction-bg); }
.category-card[data-category="equine"]::before { background: var(--cat-equine); }
.category-card[data-category="equine"] .category-icon-svg { color: var(--cat-equine); background: var(--cat-equine-bg); }
.sidebar-item[data-category="equine"] .sidebar-item-icon,
.filter-pill[data-category="equine"],
.tool-row--equine .tool-status {
  border-color: rgba(124, 74, 3, 0.18);
}
.sidebar-item[data-category="equine"].is-active,
.filter-pill[data-category="equine"].is-active {
  background: var(--cat-equine-bg);
  color: var(--cat-equine);
}

.category-icon-svg {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}
.category-card:hover .category-icon-svg {
  transform: scale(1.1);
}
.category-icon-svg svg {
  width: 22px;
  height: 22px;
}

.category-icon-img {
  display: block;
  width: 40px;
  height: 40px;
}

/* --- Tool Cards Enhancement --- */
.tool-card {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
  position: relative;
  overflow: hidden;
}
.tool-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}
.tool-card:hover::before {
  opacity: 1;
}
.tool-card-live:hover::before { background: var(--success); opacity: 0.6; }
.tool-card-preview:hover::before { background: var(--accent); opacity: 0.6; }

/* Staggered entrance animation */
.tool-grid .tool-card {
  opacity: 0;
  transform: translateY(20px);
  animation: toolCardIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.tool-grid .tool-card:nth-child(1) { animation-delay: 0.02s; }
.tool-grid .tool-card:nth-child(2) { animation-delay: 0.05s; }
.tool-grid .tool-card:nth-child(3) { animation-delay: 0.08s; }
.tool-grid .tool-card:nth-child(4) { animation-delay: 0.11s; }
.tool-grid .tool-card:nth-child(5) { animation-delay: 0.14s; }
.tool-grid .tool-card:nth-child(6) { animation-delay: 0.17s; }
.tool-grid .tool-card:nth-child(7) { animation-delay: 0.20s; }
.tool-grid .tool-card:nth-child(8) { animation-delay: 0.23s; }
@keyframes toolCardIn {
  to { opacity: 1; transform: translateY(0); }
}

/* Tool card icon */
.tool-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(15, 118, 110, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}
.tool-card-icon svg {
  width: 18px;
  height: 18px;
  color: var(--brand);
}

/* --- Quick Access Cards --- */
.quick-access-section {
  padding: 38px 0 10px;
}
.quick-access-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}
.quick-access-head h2 {
  margin: 0;
  color: var(--text, #1c2729);
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
  line-height: 1.2;
}
.quick-access-link {
  color: var(--brand, #0f766e);
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}
.quick-access-link:hover,
.quick-access-link:focus-visible {
  text-decoration: underline;
}
.quick-access-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.quick-tool {
  display: grid;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--line, rgba(20, 33, 47, 0.08));
  border-radius: var(--radius-lg, 18px);
  padding: 18px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.quick-tool:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}
.quick-tool-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.quick-tool-link {
  display: grid;
  gap: 8px;
  color: inherit;
  text-decoration: none;
}
.quick-tool-title {
  color: var(--text, #1c2729);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.25;
}
.quick-tool-copy {
  color: var(--text-soft, #58676b);
  font-size: 0.9rem;
  line-height: 1.5;
}
.quick-tool-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(15, 118, 110, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
}
.quick-tool-icon svg {
  width: 16px;
  height: 16px;
  color: var(--brand);
}

/* --- Filter Pills Enhancement --- */
.filter-pill {
  transition: all 0.2s ease;
}
.filter-pill:hover {
  transform: translateY(-1px);
}
.filter-pill.is-active {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 2px 8px rgba(15, 118, 110, 0.25);
}
.filter-pill[data-category="equine"].is-active {
  background: var(--cat-equine-bg);
  color: var(--cat-equine);
  box-shadow: 0 2px 8px rgba(124, 74, 3, 0.18);
}

/* --- Empty State Enhancement --- */
.empty-state {
  text-align: center;
  padding: 48px 24px;
}
.empty-state__icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  background: rgba(15, 118, 110, 0.06);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.empty-state__icon svg {
  width: 32px;
  height: 32px;
  color: var(--brand);
  opacity: 0.6;
}

/* --- Support Section Icons --- */
.support-point-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(15, 118, 110, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}
.support-point-icon svg {
  width: 20px;
  height: 20px;
  color: var(--brand);
}

/* --- Section entrance animations --- */
.stagger-children > * {
  opacity: 0;
  transform: translateY(16px);
  animation: sectionFadeIn 0.5s ease forwards;
}
.stagger-children > *:nth-child(1) { animation-delay: 0.05s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.10s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.15s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.20s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.25s; }
.stagger-children > *:nth-child(6) { animation-delay: 0.30s; }
@keyframes sectionFadeIn {
  to { opacity: 1; transform: translateY(0); }
}

/* --- Cross-link CTA Banner --- */
.cta-banner {
  max-width: var(--container, 1180px);
  margin: 48px auto 32px;
  padding: 0 16px;
}
.cta-inner {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #1c2729 0%, #2a3a3d 100%);
  border-radius: var(--radius-xl, 24px);
  padding: 48px 32px;
  text-align: center;
}
.cta-inner::before {
  content: none;
}
.cta-inner h2 {
  position: relative;
  color: #fff;
  font-size: clamp(1.3rem, 3vw, 1.7rem);
  font-weight: 800;
  margin: 0 0 10px;
  line-height: 1.25;
}
.cta-inner p {
  position: relative;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
  max-width: 460px;
  margin: 0 auto 24px;
  line-height: 1.5;
}
.cta-inner .cta-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-sm, 12px);
  background: var(--brand, #0f766e);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.2s ease;
}
.cta-inner .cta-btn:hover {
  background: var(--brand-strong, #0b5b55);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15, 118, 110, 0.35);
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  .tool-grid .tool-card,
  .stagger-children > *,
  .quick-tool,
  .stat-item,
  .filter-pill,
  .cta-inner .cta-btn {
    opacity: 1;
    transform: none;
    animation: none;
    transition: none;
  }
}

@media (max-width: 760px) {
  .quick-access-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .quick-access-grid {
    grid-template-columns: 1fr;
  }
}
