/* Categories Section - Premium Dynamic Design */

.categories-section {
  position: relative;
  padding: 100px 0;
  background: 
    linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 50%, #2d2d2d 100%),
    radial-gradient(circle at 30% 30%, rgba(255, 106, 0, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 70% 70%, rgba(255, 193, 7, 0.06) 0%, transparent 50%);
  overflow: hidden;
}

.categories-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 60"><defs><pattern id="hexagon" width="60" height="60" patternUnits="userSpaceOnUse"><polygon points="30,5 50,17.5 50,42.5 30,55 10,42.5 10,17.5" fill="none" stroke="rgba(255,106,0,0.08)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23hexagon)"/></svg>');
  opacity: 0.4;
  animation: pattern-drift 25s linear infinite;
}

@keyframes pattern-drift {
  0% { transform: translateX(0) translateY(0); }
  100% { transform: translateX(60px) translateY(60px); }
}

.categories-section .container {
  position: relative;
  z-index: 2;
}

/* Enhanced Section Header */
.categories-section .section-head {
  text-align: center;
  margin-bottom: 80px;
  position: relative;
}

.categories-section .section-head::before {
  content: '';
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--primary), #ffc107, var(--primary), transparent);
  border-radius: 2px;
  animation: glow-pulse 3s ease-in-out infinite;
}

@keyframes glow-pulse {
  0%, 100% { opacity: 0.6; box-shadow: 0 0 10px rgba(255, 106, 0, 0.3); }
  50% { opacity: 1; box-shadow: 0 0 20px rgba(255, 106, 0, 0.6); }
}

.categories-section .section-head h2 {
  font-size: 3.5rem;
  font-weight: 800;
  color: white;
  margin-bottom: 20px;
  font-family: var(--font-accent);
  position: relative;
  display: inline-block;
}

.categories-section .section-head h2 i {
  color: var(--primary);
  margin-right: 15px;
  animation: category-bounce 2s ease-in-out infinite;
}

@keyframes category-bounce {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-5px) rotate(-5deg); }
  50% { transform: translateY(0) rotate(0deg); }
  75% { transform: translateY(-3px) rotate(3deg); }
}

.categories-section .section-head p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.2rem;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Premium Categories Grid */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 40px;
  margin-top: 60px;
}

.category-card {
  position: relative;
  height: 400px;
  border-radius: 24px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.category-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 106, 0, 0.1) 0%, rgba(255, 193, 7, 0.05) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 1;
}

.category-card:hover::before {
  opacity: 1;
}

.category-card:hover {
  transform: translateY(-20px) scale(1.03);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 106, 0, 0.4);
}

/* Category Image */
.category-image {
  position: relative;
  height: 60%;
  overflow: hidden;
}

.category-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.category-card:hover .category-image img {
  transform: scale(1.15);
}

.category-image::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60%;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  z-index: 2;
}

/* Category Badge */
.category-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 3;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: linear-gradient(135deg, var(--primary), #ff8f00);
  color: white;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  animation: badge-float 3s ease-in-out infinite;
}

@keyframes badge-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

/* Category Content */
.category-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 30px;
  z-index: 3;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
}

.category-content h3 {
  font-size: 2rem;
  font-weight: 800;
  color: white;
  margin-bottom: 10px;
  font-family: var(--font-accent);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.category-description {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
  line-height: 1.5;
  margin-bottom: 20px;
}

.category-stats {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
}

.stat-item i {
  color: var(--primary);
  font-size: 1rem;
}

/* Category Action Button */
.category-action {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--primary), #ff8f00);
  color: white;
  text-decoration: none;
  border-radius: 25px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.category-action::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #ff8f00, var(--primary));
  transition: left 0.3s ease;
  z-index: -1;
}

.category-action:hover::before {
  left: 0;
}

.category-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 106, 0, 0.4);
}

/* Hover Effects */
.category-card .category-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 106, 0, 0.1);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 2;
}

.category-card:hover .category-overlay {
  opacity: 1;
}

/* Floating Elements */
.categories-section::after {
  content: '';
  position: absolute;
  top: 15%;
  left: 5%;
  width: 80px;
  height: 80px;
  background: radial-gradient(circle, rgba(255, 193, 7, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  animation: float-left 8s ease-in-out infinite;
}

@keyframes float-left {
  0%, 100% { transform: translateY(0) translateX(0) rotate(0deg); }
  50% { transform: translateY(-30px) translateX(20px) rotate(180deg); }
}

/* Additional Floating Element */
.categories-section .container::after {
  content: '';
  position: absolute;
  top: 20%;
  right: 8%;
  width: 60px;
  height: 60px;
  background: radial-gradient(circle, rgba(255, 106, 0, 0.12) 0%, transparent 70%);
  border-radius: 50%;
  animation: float-right 6s ease-in-out infinite reverse;
}

@keyframes float-right {
  0%, 100% { transform: translateY(0) translateX(0) scale(1); }
  50% { transform: translateY(-25px) translateX(-15px) scale(1.2); }
}

/* Responsive Design */
@media (max-width: 1200px) {
  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }
  
  .category-card {
    height: 380px;
  }
}

@media (max-width: 992px) {
  .categories-section {
    padding: 80px 0;
  }
  
  .categories-section .section-head h2 {
    font-size: 2.8rem;
  }
  
  .categories-grid {
    gap: 25px;
  }
}

@media (max-width: 768px) {
  .categories-section {
    padding: 60px 0;
  }
  
  .categories-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .categories-section .section-head h2 {
    font-size: 2.2rem;
  }
  
  .category-card {
    height: 350px;
  }
  
  .category-content {
    padding: 20px;
  }
  
  .category-content h3 {
    font-size: 1.6rem;
  }
  
  .category-stats {
    flex-direction: column;
    gap: 10px;
  }
}

@media (max-width: 480px) {
  .categories-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .category-card {
    height: 320px;
  }
  
  .category-content {
    padding: 15px;
  }
}

/* Loading Animation */
.category-card.loading {
  animation: card-shimmer 1.5s ease-in-out infinite;
}

@keyframes card-shimmer {
  0% { opacity: 0.7; }
  50% { opacity: 1; }
  100% { opacity: 0.7; }
}
