/* Categories Page - All classes prefixed with 'categories-' to avoid conflicts */

:root {
  --primary-color: #026181;
  --primary-hover: #037fa6;
  --bg-page: #f0f4f8;
  --text-main: #1f2937;
  --text-light: #ffffff;
}

.categories-container {
  max-width: 80rem;
  /* ≈ 1280px like max-w-7xl */
  margin: 0 auto;
  margin-bottom: 10px;
}

.categories-header {
  text-align: center;
  margin-bottom: 4rem;
}

.categories-header h1 {
  font-size: 3rem;
  font-weight: 800;
  color: var(--primary-color);
  letter-spacing: -0.025em;
  margin-bottom: 1rem;
}

.categories-header p {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--primary-color);
  opacity: 0.8;
  max-width: 48rem;
  margin: 0 auto;
}

.categories-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .categories-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Last row has 2 items → last card spans 2 (e.g. 11 cards) */
  .categories-card:nth-child(3n + 2):last-child {
    grid-column: span 2;
  }

  /* Last row has 1 item → last card spans 3 (e.g. 10 cards) */
  .categories-card:nth-child(3n + 1):last-child {
    grid-column: span 3;
  }
}

.categories-card {
  position: relative;
  overflow: hidden;
  height: 20rem;
  /* h-80 */
  border-radius: 1rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.categories-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px -10px rgba(2, 97, 129, 0.3);
}

.categories-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 97, 129, 0.7) 0%, rgba(2, 50, 70, 0.9) 100%);
  z-index: 1;
  transition: opacity 0.3s ease;
}

.categories-card:hover::before {
  background: linear-gradient(180deg, rgba(2, 97, 129, 0.8) 0%, rgba(0, 0, 0, 0.8) 100%);
}

.categories-bg-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
  z-index: 0;
}

.categories-card:hover .categories-bg-image {
  transform: scale(1.1);
}

.categories-card-content {
  position: relative;
  z-index: 10;
  height: 100%;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
}

.categories-icon-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.categories-icon-title .material-symbols-outlined {
  font-size: 2.5rem;
}

.categories-icon-title h3 {
  font-size: 1.875rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.categories-card-content p {
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.625;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.categories-explore-link {
  font-size: 1.125rem;
  font-weight: 700;
  transition: text-decoration 0.2s;
}

.categories-explore-link:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

/* Featured (Gaming) card adjustments */
.categories-card.featured {
  transform: translateY(-1rem);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  border: 4px solid rgba(255, 255, 255, 0.2);
}

.categories-card.featured .categories-explore-button {
  margin-top: auto;
  background-color: var(--primary-color);
  color: white;
  padding: 0.5rem 1.5rem;
  border-radius: 9999px;
  font-size: 1.125rem;
  font-weight: 700;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  transition: background-color 0.2s;
}

.categories-card.featured .categories-explore-button:hover {
  background-color: var(--primary-hover);
}

/* Footer */
.categories-footer {
  margin-top: 5rem;
  text-align: center;
  border-top: 1px solid #e5e7eb;
  padding-top: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.categories-footer button {
  background-color: var(--primary-color);
  color: white;
  padding: 1rem 2.5rem;
  border-radius: 9999px;
  font-size: 1.25rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: background-color 0.2s;
}

.categories-footer button:hover {
  background-color: var(--primary-hover);
}

.categories-footer p {
  margin-top: 2rem;
  color: var(--primary-color);
  font-weight: 600;
  font-size: 1.125rem;
}

/* Empty State */
.categories-no-content {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-main);
  font-style: italic;
}