/* ============================================
   Home Page - Udemy Style Design
   ============================================ */

/* Hero Section */
.home-hero {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
  color: #fff;
  padding: 3rem 0 4rem;
  position: relative;
  overflow: hidden;
}

.home-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
  opacity: 0.3;
}

.home-hero__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 1;
}

.home-hero__content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.home-hero__title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, #fff 0%, #e0e7ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.home-hero__subtitle {
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1.6;
  margin-bottom: 2rem;
  color: rgba(255, 255, 255, 0.9);
}

.home-hero__stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}

.home-hero__stat {
  text-align: center;
}

.home-hero__stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  display: block;
  color: #fff;
  margin-bottom: 0.25rem;
}

.home-hero__stat-label {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.8);
}

/* Section Styles */
.home-section {
  padding: 2.5rem 0;
}

.home-section--alt {
  background: #f7f8fa;
}

.home-section__header {
  max-width: 1200px;
  margin: 0 auto 2rem;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.home-section__title {
  font-size: 2rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
}

.home-section__subtitle {
  font-size: 1.125rem;
  color: #64748b;
  margin-top: 0.5rem;
}

.home-section__link {
  color: #5624d0;
  font-weight: 700;
  text-decoration: none;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
}

.home-section__link:hover {
  color: #4c1d95;
  transform: translateX(4px);
}

/* Course Grid */
.course-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.course-card {
  background: #fff;
  border-radius: 0.5rem;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
}

.course-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
  border-color: #cbd5e1;
}

.course-card__image-wrapper {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 aspect ratio */
  overflow: hidden;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.course-card__image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.course-card__badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.375rem 0.75rem;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  backdrop-filter: blur(10px);
}

.course-card__body {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.course-card__title {
  font-size: 1rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 0.5rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.course-card__instructor {
  font-size: 0.875rem;
  color: #64748b;
  margin-bottom: 0.5rem;
}

.course-card__meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: #64748b;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.course-card__rating {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: #f59e0b;
  font-weight: 700;
}

.course-card__price {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e293b;
  margin-top: auto;
}

.course-card__price--free {
  color: #059669;
}

/* Featured Section */
.featured-section {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
  color: #fff;
  padding: 2.5rem 0;
  position: relative;
  overflow: hidden;
}

.featured-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
  opacity: 0.3;
}

.featured-card {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.featured-card__image {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: 0.5rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.featured-card__content {
  color: #fff;
}

.featured-card__badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 0.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1rem;
  backdrop-filter: blur(10px);
}

.featured-card__title {
  font-size: 2.5rem;
  font-weight: 800;
  margin: 0 0 1rem;
  line-height: 1.2;
}

.featured-card__text {
  font-size: 1.125rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2rem;
}

.featured-card__button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  background: #fff;
  color: #1e1b4b;
  border-radius: 0.5rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.featured-card__button:hover {
  background: #f3f4f6;
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* Category Filters */
.category-filters {
  max-width: 1200px;
  margin: 0 auto 3rem;
  padding: 0 2rem;
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.category-filters::-webkit-scrollbar {
  display: none;
}

.category-filter {
  flex-shrink: 0;
  padding: 0.75rem 1.5rem;
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 2rem;
  text-decoration: none;
  color: #1e293b;
  font-weight: 600;
  font-size: 0.9375rem;
  transition: all 0.3s ease;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.category-filter:hover {
  border-color: #5624d0;
  color: #5624d0;
  background: #f5f3ff;
}

.category-filter__image {
  width: 24px;
  height: 24px;
  object-fit: cover;
  border-radius: 0.25rem;
}

/* CTA Banner */
.cta-banner {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 2.5rem 2rem;
  background: linear-gradient(135deg, #5624d0 0%, #4c1d95 100%);
  border-radius: 1rem;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  border-radius: 50%;
}

.cta-banner__title {
  font-size: 2rem;
  font-weight: 800;
  margin: 0 0 1rem;
  position: relative;
  z-index: 1;
}

.cta-banner__text {
  font-size: 1.125rem;
  margin: 0 0 2rem;
  color: rgba(255, 255, 255, 0.9);
  position: relative;
  z-index: 1;
}

.cta-banner__button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  background: #fff;
  color: #5624d0;
  border-radius: 0.5rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 1rem;
  position: relative;
  z-index: 1;
}

.cta-banner__button:hover {
  background: #f3f4f6;
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* Responsive */
@media (max-width: 1024px) {
  .home-hero__title {
    font-size: 2.5rem;
  }
  
  .home-hero__subtitle {
    font-size: 1.25rem;
  }
  
  .featured-card {
    grid-template-columns: 1fr;
  }
  
  .course-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }
}

@media (max-width: 768px) {
  .home-hero {
    padding: 3rem 0 4rem;
  }
  
  .home-hero__title {
    font-size: 2rem;
  }
  
  .home-hero__subtitle {
    font-size: 1.125rem;
  }
  
  .home-hero__stats {
    gap: 2rem;
  }
  
  .home-hero__stat-number {
    font-size: 2rem;
  }
  
  .home-section__header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .course-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
  }
  
  .featured-card__title {
    font-size: 2rem;
  }
  
  .cta-banner__title {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .home-hero__title {
    font-size: 1.75rem;
  }
  
  .course-grid {
    grid-template-columns: 1fr;
  }
  
  .featured-card__image {
    height: 250px;
  }
}

