/* Ultra Modern Featured Categories Styles */
.popular_category_list {
  background: #ffffff;
  padding: 60px 0;
  position: relative;
  overflow: hidden;
}

.popular_category_list::before {
  display: none;
}

@keyframes backgroundPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}

.modern-category-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 24px 16px;
  text-align: center;
  transition: all 0.4s ease;
  border: 1px solid rgba(0, 0, 0, 0.08);
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  margin-bottom: 10px;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.5s ease forwards;
}

.modern-category-card::before {
  display: none;
}

/* All cards appear at the same time */
.popular_category_list .swiper-slide .modern-category-card { 
  animation-delay: 0s; 
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modern-category-card::after {
  display: none;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}


.modern-category-card .shine-effect {
  position: absolute;
  top: -100%;
  left: -100%;
  width: 300%;
  height: 300%;
  background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.4) 50%, transparent 70%);
  opacity: 0;
  transition: opacity 0.6s ease, transform 0.8s ease;
  pointer-events: none;
  z-index: 1;
  border-radius: 50%;
}

.modern-category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(73, 195, 198, 0.15);
  border-color: rgba(73, 195, 198, 0.3);
}


.modern-category-card:hover .shine-effect {
  opacity: 1;
  transform: translate(50%, 50%) rotate(45deg);
}

.modern-category-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f9fa;
  border-radius: 12px;
  transition: all 0.4s ease;
  position: relative;
  overflow: visible;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.modern-category-icon::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(
    from 0deg,
    transparent 0%,
    rgba(73, 195, 198, 0.1) 25%,
    transparent 50%,
    rgba(1, 60, 95, 0.1) 75%,
    transparent 100%
  );
  opacity: 0;
  transition: opacity 0.5s ease;
  animation: rotate 3s linear infinite paused;
}

.modern-category-card:hover .modern-category-icon::before {
  opacity: 1;
  animation-play-state: running;
}

@keyframes rotate {
  to { transform: rotate(360deg); }
}

.modern-category-icon::after {
  content: '';
  position: absolute;
  top: 2px;
  right: 2px;
  bottom: 2px;
  left: 2px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.6));
  border-radius: 22px;
  z-index: 0;
  transition: opacity 0.5s ease;
}

.modern-category-card:hover .modern-category-icon {
  transform: scale(1.1);
  background: linear-gradient(135deg, #49C3C6 0%, #013c5f 100%);
  box-shadow: 0 4px 16px rgba(73, 195, 198, 0.3);
}

@keyframes gradientMove {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.modern-category-card:hover .modern-category-icon::after {
  opacity: 0;
}

.modern-category-icon img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  transition: all 0.4s ease;
  position: relative;
  z-index: 2;
  filter: brightness(0) saturate(100%) invert(74%) sepia(64%) saturate(474%) hue-rotate(139deg) brightness(97%) contrast(88%);
}

.modern-category-card:hover .modern-category-icon img {
  filter: brightness(0) invert(1);
}

.modern-category-title {
  font-size: 14px;
  font-weight: 600;
  color: #1a202c;
  margin: 0;
  transition: all 0.4s ease;
  letter-spacing: -0.01em;
  position: relative;
  z-index: 2;
  line-height: 1.3;
}

.modern-category-card:hover .modern-category-title {
  color: #49C3C6;
}

.modern-category-link {
  text-decoration: none;
  display: block;
  width: 100%;
  height: 100%;
  color: inherit;
  position: relative;
  z-index: 2;
}

.modern-category-link:hover {
  text-decoration: none;
  color: inherit;
}

.section-title h2{
  line-height: unset !important;
}

/* Section Title Styling */
.popular_category_list .section-title {
  margin-bottom: 30px;
  position: relative;
  z-index: 1;
}

.popular_category_list .section-title h2 {
  font-size: 24px;
  font-weight: 600;
  color: #1a202c;
  margin-bottom: 0;
  text-align: center;
  letter-spacing: -0.02em;
  position: relative;
  display: block;
  width: 100%;
  line-height: 1.3;
}

/* Fallback for browsers that don't support gradient text */
@supports not (-webkit-background-clip: text) {
  .popular_category_list .section-title h2 {
    color: #1a202c !important;
    background: none !important;
    -webkit-text-fill-color: #1a202c !important;
  }
}

/* Additional mobile-specific fallback */
@media (max-width: 991px) {
  .popular_category_list .section-title h2 {
    /* Strong fallback for tablets and below */
    color: #1a202c;
  }
  
  /* If gradient text fails, ensure solid color shows */
  @supports (-webkit-background-clip: text) {
    .popular_category_list .section-title h2 {
      background: linear-gradient(135deg, #1a202c 0%, #013c5f 50%, #49C3C6 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
    }
  }
}

.popular_category_list .section-title::after {
  display: none;
}

/* Swiper Customization */
.popular_category_list .swiper-slide {
  height: auto;
}

.popular_category_list .swiper-container {
  padding: 20px 0;
  position: relative;
  z-index: 1;
}


/* Responsive Design */
@media (max-width: 992px) {
  .popular_category_list {
    padding: 50px 0;
  }
  
  .popular_category_list .section-title {
    margin-bottom: 25px;
  }
  
  .popular_category_list .section-title h2 {
    font-size: 22px;
  }
}

@media (max-width: 768px) {
  .popular_category_list {
    padding: 40px 0;
  }
  
  .popular_category_list .section-title {
    margin-bottom: 20px;
  }
  
  .popular_category_list .section-title h2 {
    font-size: 20px;
  }
  
  .modern-category-card {
    padding: 20px 12px;
    border-radius: 12px;
  }
  
  .modern-category-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 12px;
    border-radius: 10px;
  }
  
  .modern-category-icon img {
    width: 32px;
    height: 32px;
  }
  
  .modern-category-title {
    font-size: 12px;
  }
  
  .popular_category_list .swiper-container {
    padding: 10px 0;
  }
}

@media (max-width: 576px) {
  .popular_category_list {
    padding: 35px 0;
  }
  
  .popular_category_list .section-title {
    margin-bottom: 18px;
  }
  
  .popular_category_list .section-title h2 {
    font-size: 18px;
  }
  
  .modern-category-card {
    padding: 18px 10px;
    border-radius: 12px;
  }
  
  .modern-category-icon {
    width: 55px;
    height: 55px;
    border-radius: 10px;
    margin-bottom: 10px;
  }
  
  .modern-category-icon img {
    width: 28px;
    height: 28px;
  }
  
  .modern-category-title {
    font-size: 11px;
  }
  
  .popular_category_list .swiper-container {
    padding: 8px 0;
  }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  .modern-category-card,
  .modern-category-icon,
  .modern-category-icon img,
  .modern-category-title {
    animation: none !important;
    transition: opacity 0.2s ease, transform 0.2s ease !important;
  }
  
  .modern-category-card::before,
  .modern-category-card::after,
  .modern-category-icon::before {
    animation: none !important;
  }
}

/* Fix for browsers that don't support backdrop-filter */
@supports not (backdrop-filter: blur(20px)) {
  .modern-category-card {
    background: rgba(255, 255, 255, 0.98);
    border: 2px solid rgba(240, 244, 248, 0.8);
  }
}

