/* Hub cards — image, title, description, whole card clickable */

.hub-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.hub-card {
  position: relative;
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: var(--hub-radius);
  border: 1px solid var(--hub-border);
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.25, 0.1, 0.25, 1),
    box-shadow 0.35s ease,
    border-color 0.25s ease;
  animation: hub-card-in 0.5s ease backwards;
}

.hub-cards-grid .hub-card:nth-child(1) { animation-delay: 0.05s; }
.hub-cards-grid .hub-card:nth-child(2) { animation-delay: 0.1s; }
.hub-cards-grid .hub-card:nth-child(3) { animation-delay: 0.15s; }
.hub-cards-grid .hub-card:nth-child(4) { animation-delay: 0.2s; }
.hub-cards-grid .hub-card:nth-child(5) { animation-delay: 0.25s; }
.hub-cards-grid .hub-card:nth-child(6) { animation-delay: 0.3s; }
.hub-cards-grid .hub-card:nth-child(n+7) { animation-delay: 0.35s; }

@keyframes hub-card-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hub-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.25), transparent 40%, transparent 60%, rgba(96, 165, 250, 0.2));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.hub-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 24px 40px -12px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(139, 92, 246, 0.15), 0 20px 50px -15px var(--hub-accent-glow);
  border-color: rgba(139, 92, 246, 0.25);
}

.hub-card:hover::before {
  opacity: 1;
}

.hub-card:focus-visible {
  outline: 2px solid var(--hub-accent);
  outline-offset: 3px;
}

.hub-card-image-wrap {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: linear-gradient(145deg, rgba(139, 92, 246, 0.12), rgba(96, 165, 250, 0.08));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hub-card-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hub-card-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--hub-text-3);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hub-card-body {
  padding: 18px 20px;
}

.hub-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
  color: var(--hub-text);
}

.hub-card-desc {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--hub-text-2);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hub-card-arrow {
  position: absolute;
  bottom: 18px;
  right: 20px;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(139, 92, 246, 0.2);
  color: var(--hub-accent-2);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translate(4px, 4px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.hub-card:hover .hub-card-arrow {
  opacity: 1;
  transform: translate(0, 0);
}

.hub-card-arrow .iconify {
  font-size: 16px;
}
