/* ============================================
   CLASS-MARKET - HOME PAGE CSS
   Hero & Features Styling & Animations
============================================ */

/* ============================================
   HERO SECTION
============================================ */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-hero);
  color: white;
  position: relative;
  overflow: hidden;
  padding: 60px 0;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 20%, rgba(120, 219, 255, 0.2) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(168, 85, 247, 0.2) 0%, transparent 50%),
    radial-gradient(circle at 40% 60%, rgba(59, 130, 246, 0.1) 0%, transparent 50%);
  z-index: 0;
  animation: shimmer 8s ease-in-out infinite;
}

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

.hero-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  animation: float 6s ease-in-out infinite;
}

.particle:nth-child(1) { top: 20%; left: 10%; animation-delay: 0s; }
.particle:nth-child(2) { top: 40%; left: 20%; animation-delay: 1s; }
.particle:nth-child(3) { top: 60%; left: 15%; animation-delay: 2s; }
.particle:nth-child(4) { top: 80%; left: 25%; animation-delay: 3s; }
.particle:nth-child(5) { top: 30%; left: 80%; animation-delay: 4s; }
.particle:nth-child(6) { top: 70%; left: 85%; animation-delay: 5s; }

@keyframes float {
  0%, 100% {
    transform: translateY(0px) translateX(0px);
    opacity: 0.6;
  }
  50% {
    transform: translateY(-30px) translateX(10px);
    opacity: 1;
  }
}

.hero .container {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

.hero-content {
  animation: fadeInUp 1s ease-out;
}

.hero h1 {
  font-size: clamp(2.5rem, 8vw, 5rem);
  margin-bottom: 30px;
  font-weight: 800;
  line-height: 1.1;
  animation: fadeInDown 0.8s ease-out;
  background: linear-gradient(135deg, #00d4ff 0%, #0ea5e9 50%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  display: inline-block;
}

.hero h1::after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 4px;
  background: linear-gradient(90deg, #0ea5e9, #06b6d4);
  border-radius: 2px;
  animation: expandWidth 1s ease-out 0.3s forwards;
}

@keyframes expandWidth {
  from { width: 0; }
  to { width: 100%; }
}

.hero h1 span {
  display: inline-block;
  animation: bounce 2s ease-in-out infinite;
  color: white;
  background: none;
  -webkit-text-fill-color: unset;
}

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

.hero p {
  font-size: clamp(1rem, 3vw, 1.5rem);
  margin-bottom: 50px;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.8;
  animation: fadeInUp 0.9s ease-out 0.2s both;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.hero-cta {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 1s ease-out 0.4s both;
}

.hero-cta .btn {
  animation: pulse 2s ease-in-out infinite;
  min-width: 200px;
}

.hero-cta .btn:hover {
  animation: none;
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
  }
  50% {
    box-shadow: 0 0 40px rgba(59, 130, 246, 0.6);
  }
}

/* ============================================
   FEATURES SECTION
============================================ */

.section-header {
  text-align: center;
  margin-bottom: 60px;
  animation: fadeInUp 0.8s ease-out;
}

.section-header h2 {
  color: var(--neutral-900);
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  margin-bottom: 20px;
  font-weight: 800;
  background: linear-gradient(135deg, #0f172a 0%, #0ea5e9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-header p {
  color: var(--neutral-600);
  font-size: 1.1rem;
  margin: 0;
}

.features {
  padding: 100px 0;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.features::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 10% 20%, rgba(120, 219, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 90% 80%, rgba(168, 85, 247, 0.1) 0%, transparent 50%);
  z-index: 0;
  pointer-events: none;
}

.features .container {
  position: relative;
  z-index: 1;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  animation: fadeInUp 1s ease-out;
}

.feature-card {
  padding: 40px;
  background: white;
  border: 1px solid var(--neutral-200);
  border-radius: 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  animation: slideInUp 0.8s ease-out;
  animation-fill-mode: both;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.feature-card:nth-child(1) { animation-delay: 0s; }
.feature-card:nth-child(2) { animation-delay: 0.1s; }
.feature-card:nth-child(3) { animation-delay: 0.2s; }
.feature-card:nth-child(4) { animation-delay: 0.3s; }
.feature-card:nth-child(5) { animation-delay: 0.4s; }
.feature-card:nth-child(6) { animation-delay: 0.5s; }

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
  transition: left 0.6s ease;
  z-index: 1;
}

.feature-card:hover::before {
  left: 100%;
}

.feature-card:hover {
  transform: translateY(-15px) scale(1.02);
  background: white;
  border-color: var(--primary-400);
  box-shadow: 0 25px 50px rgba(59, 130, 246, 0.15);
}

.feature-icon-box {
  width: 80px;
  height: 80px;
  margin: 0 auto 25px;
  background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: white;
  transition: all 0.4s ease;
  position: relative;
  z-index: 2;
  box-shadow: 0 10px 30px rgba(59, 130, 246, 0.2);
}

.feature-card:hover .feature-icon-box {
  transform: translateY(-10px) scale(1.1) rotate(5deg);
  box-shadow: 0 20px 50px rgba(6, 182, 212, 0.3);
}

.feature-icon {
  font-size: 3.5rem;
  margin-bottom: 20px;
  display: inline-block;
  animation: iconBounce 2s ease-in-out infinite;
  transition: transform 0.3s ease;
  position: relative;
  z-index: 2;
}

@keyframes iconBounce {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-15px) scale(1.1); }
}

.feature-card h3 {
  color: var(--neutral-900);
  font-size: 1.4rem;
  margin-bottom: 15px;
  font-weight: 700;
  position: relative;
  z-index: 2;
  animation: slideInRight 0.7s ease-out;
}

.feature-card h3::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, #0ea5e9, #06b6d4);
  border-radius: 2px;
  animation: expandWidth 0.6s ease-out 0.4s forwards;
}

.feature-card p {
  color: var(--neutral-600);
  font-size: 1rem;
  line-height: 1.6;
  margin: 0 0 20px 0;
  position: relative;
  z-index: 2;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.feature-highlight {
  display: inline-block;
  color: var(--primary-600);
  font-size: 0.9rem;
  font-weight: 600;
  position: relative;
  z-index: 2;
}

.feature-highlight i {
  margin-right: 6px;
  color: var(--success);
}

/* ============================================
   HERO BADGE
============================================ */

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(6, 182, 212, 0.1));
  border: 1px solid rgba(59, 130, 246, 0.3);
  padding: 12px 24px;
  border-radius: 50px;
  margin-bottom: 30px;
  color: #0ea5e9;
  font-weight: 600;
  font-size: 0.95rem;
  backdrop-filter: blur(10px);
}

.hero-badge i {
  animation: pulse 2s ease-in-out infinite;
}

/* ============================================
   HERO STATS
============================================ */

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 60px;
  margin-top: 60px;
  flex-wrap: wrap;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.stat {
  text-align: center;
  animation: slideInUp 0.8s ease-out;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: white;
  background: linear-gradient(135deg, #00d4ff 0%, #0ea5e9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.stat-label {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
  margin-top: 8px;
}

/* ============================================
   CATEGORIES SECTION
============================================ */

.categories-highlight {
  padding: 100px 0;
  position: relative;
  overflow: hidden;
}

.categories-highlight::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 10% 20%, rgba(120, 219, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 90% 80%, rgba(168, 85, 247, 0.1) 0%, transparent 50%);
  z-index: 0;
  pointer-events: none;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  position: relative;
  z-index: 1;
}

.category-card {
  background: white;
  border: 1px solid var(--neutral-200);
  border-radius: 18px;
  padding: 35px 25px;
  text-align: center;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
  position: relative;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.category-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(6, 182, 212, 0.05));
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 0;
}

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

.category-card:hover {
  transform: translateY(-15px) scale(1.02);
  border-color: var(--primary-400);
  box-shadow: 0 25px 50px rgba(59, 130, 246, 0.15);
}

.category-image {
  width: 100px;
  height: 100px;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: white;
  transition: all 0.4s ease;
  position: relative;
  z-index: 1;
  box-shadow: 0 10px 30px rgba(59, 130, 246, 0.2);
}

.category-card:hover .category-image {
  transform: scale(1.15) rotate(-5deg);
  box-shadow: 0 20px 50px rgba(6, 182, 212, 0.3);
}

.category-card h3 {
  color: var(--neutral-900);
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0 0 10px 0;
  position: relative;
  z-index: 1;
}

.category-card p {
  color: var(--neutral-600);
  font-size: 0.9rem;
  margin: 0 0 20px 0;
  position: relative;
  z-index: 1;
}

.category-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary-600);
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
}

.category-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-600);
  transition: width 0.3s ease;
}

.category-card:hover .category-link::after {
  width: 100%;
}

.category-link i {
  transition: transform 0.3s ease;
}

.category-card:hover .category-link i {
  transform: translateX(5px);
}

/* ============================================
   CTA SECTION
============================================ */

.cta-section {
  padding: 80px 0;
  background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.2) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
  z-index: 0;
  pointer-events: none;
}

.cta-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: white;
}

.cta-content h2 {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  margin-bottom: 20px;
  font-weight: 800;
  line-height: 1.2;
}

.cta-content p {
  font-size: 1.1rem;
  margin-bottom: 40px;
  opacity: 0.95;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.text-gradient {
  background: linear-gradient(135deg, #00d4ff 0%, #0ea5e9 50%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

/* ============================================
   HERO STYLES (Updated)
============================================ */

.hero h1 {
  font-size: clamp(2.5rem, 8vw, 5rem);
  margin-bottom: 30px;
  font-weight: 800;
  line-height: 1.1;
  animation: fadeInDown 0.8s ease-out;
  color: white;
}

.hero h1 span {
  display: inline-block;
}

.hero h1::after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 4px;
  background: linear-gradient(90deg, #0ea5e9, #06b6d4);
  border-radius: 2px;
  animation: expandWidth 1s ease-out 0.3s forwards;
}

@keyframes expandWidth {
  from { width: 0; }
  to { width: 100%; }
}

/* ============================================
   ANIMATIONS
============================================ */

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ============================================
   RESPONSIVE
============================================ */

/* Tablet & Large Mobile */
@media (max-width: 768px) {
  .hero {
    min-height: 80vh;
    padding: 50px 0;
  }

  .hero h1 {
    font-size: clamp(1.8rem, 6vw, 3rem);
    margin-bottom: 20px;
  }

  .hero p {
    font-size: 1rem;
    margin-bottom: 35px;
  }

  .hero-cta {
    gap: 15px;
  }

  .hero-cta .btn {
    min-width: 160px;
    padding: 12px 20px;
    font-size: 0.9rem;
  }

  .features {
    padding: 70px 0;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
  }

  .feature-card {
    padding: 30px;
  }

  .feature-icon {
    font-size: 2.8rem;
  }

  .feature-card h3 {
    font-size: 1.2rem;
  }

  .feature-card p {
    font-size: 0.9rem;
  }
}

/* Mobile - Medium */
@media (max-width: 600px) {
  .hero {
    min-height: 70vh;
    padding: 40px 0;
  }

  .hero h1 {
    font-size: 1.5rem;
  }

  .hero h1::after {
    display: none;
  }

  .hero p {
    font-size: 0.95rem;
    margin-bottom: 30px;
  }

  .hero-cta {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-cta .btn {
    width: 100%;
  }

  .features {
    padding: 50px 0;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .feature-card {
    padding: 25px;
  }

  .feature-icon {
    font-size: 2.4rem;
  }

  .feature-card h3 {
    font-size: 1.1rem;
  }

  .feature-card p {
    font-size: 0.85rem;
  }
}

/* Mobile - Small */
@media (max-width: 420px) {
  .hero {
    min-height: 60vh;
    padding: 30px 0;
  }

  .hero h1 {
    font-size: 1.2rem;
    margin-bottom: 15px;
  }

  .hero span {
    display: block;
  }

  .hero p {
    font-size: 0.85rem;
    margin-bottom: 25px;
  }

  .hero-cta {
    flex-direction: column;
    gap: 10px;
  }

  .hero-cta .btn {
    padding: 10px 16px;
    font-size: 0.8rem;
  }

  .features {
    padding: 40px 0;
  }

  .features-grid {
    gap: 15px;
  }

  .feature-card {
    padding: 20px;
  }

  .feature-icon {
    font-size: 2rem;
    margin-bottom: 12px;
  }

  .feature-card h3 {
    font-size: 1rem;
  }

  .feature-card p {
    font-size: 0.8rem;
  }

  .particle {
    width: 2px;
    height: 2px;
  }
}
