/* ==========================================================================
   9. Restored Category Grid (Office, Public, Residential)
   ========================================================================== */
.categories {
  background-color: var(--bg-secondary);
  position: relative;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 50px;
}

.category-card {
  position: relative;
  height: 480px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background-color: var(--bg-surface);
  overflow: hidden;
  transform-style: preserve-3d;
  perspective: 1200px;
  transition: var(--transition-smooth);
}

.category-card-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
  transition: transform 1.2s cubic-bezier(0.25, 1, 0.5, 1);
  z-index: 1;
}

.category-card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(7, 7, 8, 0) 0%, rgba(7, 7, 8, 0.7) 100%);
  z-index: 2;
  transition: background 0.6s ease;
}

.category-card-content {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 40px;
  z-index: 3;
  transform: translateZ(50px); /* 3D pop effect */
  transform-style: preserve-3d;
}

.category-title {
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--text-highlight);
  margin-bottom: 8px;
  transform: translateZ(30px);
  transition: var(--transition-medium);
}

.category-number {
  font-family: var(--font-body);
  font-size: 64px;
  font-weight: 600;
  color: transparent;
  -webkit-text-stroke: 1px rgba(201, 169, 110, 0.35);
  position: absolute;
  right: 40px;
  bottom: 30px;
  line-height: 1;
  z-index: 1;
  transition: var(--transition-medium);
}

.category-card {
  position: relative;
  height: 480px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background-color: var(--bg-surface);
  overflow: hidden;
  transform-style: preserve-3d;
  perspective: 1200px;
  transition: var(--transition-smooth);
}

.category-card-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
  transition: transform 1.2s cubic-bezier(0.25, 1, 0.5, 1);
  z-index: 1;
}

.category-card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(7, 7, 8, 0) 0%, rgba(7, 7, 8, 0.7) 100%);
  z-index: 2;
  transition: background 0.6s ease;
}

.category-card-content {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 40px;
  z-index: 3;
  transform: translateZ(50px); /* 3D pop effect */
  transform-style: preserve-3d;
}

.category-card:hover {
  border-color: var(--color-gold);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.category-card:hover .category-card-bg {
  transform: scale(1.06);
}

.category-card:hover .category-card-overlay {
  background: linear-gradient(180deg, rgba(7, 7, 8, 0) 0%, rgba(7, 7, 8, 0.55) 100%);
}

.category-card:hover .category-title {
  color: var(--color-gold-light);
}

.category-card:hover .category-number {
  -webkit-text-stroke-color: var(--color-gold-light);
  transform: scale(1.08) translateZ(20px);
}

.category-card-desc {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-top: 10px;
  margin-bottom: 0;
  max-width: 68%;
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.category-card:hover .category-card-desc {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 991px) {
  .categories-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .category-card {
    height: 380px;
  }
}
