/* ==========================================================================
   Categories content section
   ========================================================================== */
.section-categories-page {
  padding-block: 30px;
  position: relative;
}

/* ==========================================================================
   Categories showcase — modern soft cards
   ========================================================================== */

.page-categories .categories-showcase {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.page-categories .categories-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .page-categories .categories-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .page-categories .categories-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.125rem;
  }
}

/* ----- Option A: Soft & Minimal ----- */

.page-categories .category-card--soft {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.875rem;
  padding: 1.75rem 1rem;
  background: #fff;
  border: 1px solid rgba(19, 78, 136, 0.07);
  border-radius: 1.25rem;
  text-align: center;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 2px 16px rgba(19, 78, 136, 0.04);
  transition:
    background-color 0.35s ease,
    border-color 0.35s ease,
    box-shadow 0.35s ease;
}

.page-categories .category-card--soft:hover {
  background: linear-gradient(180deg, #fafcff 0%, #fff 100%);
  border-color: rgba(19, 78, 136, 0.14);
  box-shadow: 0 8px 28px rgba(19, 78, 136, 0.09);
}

.page-categories .category-card--soft .category-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  background: linear-gradient(145deg, #f3f8fd 0%, #e9f1fa 100%);
  transition: background 0.35s ease;
}

.page-categories .category-card--soft:hover .category-card__icon {
  background: linear-gradient(145deg, #e4eef8 0%, #d9e8f5 100%);
}

.page-categories .category-card--soft .category-card__icon img {
  width: 1.25rem;
  height: 1.25rem;
  object-fit: contain;
  opacity: 0.85;
}

.page-categories .category-card--soft .category-card__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.5;
  color: var(--color-text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.35s ease;
}

.page-categories .category-card--soft:hover .category-card__title {
  color: var(--color-primary);
}

@media (min-width: 1024px) {
  .page-categories .category-card--soft {
    min-height: 10rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-categories .category-card--soft,
  .page-categories .category-card--soft .category-card__icon {
    transition: none;
  }
}

.page-categories .categories-grid .category-card {
  opacity: 0;
  animation: fadeInUp 0.65s ease-out forwards;
}

.page-categories .categories-grid .category-card:nth-child(1) {
  animation-delay: 0.05s;
}

.page-categories .categories-grid .category-card:nth-child(2) {
  animation-delay: 0.1s;
}

.page-categories .categories-grid .category-card:nth-child(3) {
  animation-delay: 0.15s;
}

.page-categories .categories-grid .category-card:nth-child(4) {
  animation-delay: 0.2s;
}

.page-categories .categories-grid .category-card:nth-child(5) {
  animation-delay: 0.25s;
}

.page-categories .categories-grid .category-card:nth-child(6) {
  animation-delay: 0.3s;
}

.page-categories .categories-grid .category-card:nth-child(7) {
  animation-delay: 0.35s;
}

.page-categories .categories-grid .category-card:nth-child(8) {
  animation-delay: 0.4s;
}

.page-categories .categories-grid .category-card:nth-child(9) {
  animation-delay: 0.45s;
}

@media (prefers-reduced-motion: reduce) {
  .page-categories .categories-grid .category-card {
    animation: none;
    opacity: 1;
  }
}
