/* ===== Courses Page Styles - Enhanced with Global Theme ===== */
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css');

#courses {
  width: 100%;
  overflow: hidden;
}

/* ===== Hero Section - Enhanced with Purple Gradient ===== */
.hero-section {
  position: relative;
  min-height: 550px;
  border-radius: 24px;
  overflow: hidden;
  margin-bottom: 4rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Back to Home Button */
.back-home-button {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.back-home-button:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateX(-5px);
  border-color: rgba(255, 255, 255, 0.4);
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #4c1d95 100%);
  background-size: 200% 200%;
  animation: gradientShift 15s ease infinite;
}

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

.background-pattern {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 20% 50%, rgba(255,255,255,0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(255,255,255,0.1) 0%, transparent 50%),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat;
}

.hero-tagline {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 10;
}

.hero-tagline i {
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border-radius: 30px;
  transition: all 0.3s ease;
}

.hero-tagline i:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateX(-5px);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 5rem 2rem;
  color: white;
  text-align: center;
}

.hero-text {
  max-width: 800px;
  margin: 0 auto 3rem;
}

.hero-tagline span {
  display: inline-block;
  padding: 8px 20px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  margin-bottom: 1rem;
  text-transform: uppercase;
  color: rgb(249, 247, 247);
}

.courses-label {
  display: inline-block;
  padding: 8px 20px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  margin-bottom: 1rem;
  text-transform: uppercase;
  color: rgb(249, 247, 247);
}

.hero-title {
  font-size: 4.5rem;
  font-weight: 800;
  margin: 0.5rem 0;
  background: linear-gradient(135deg, #ffffff 0%, #fdf4ff 30%, #fde68a 62%, #ffffff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
  letter-spacing: -0.02em;
  position: relative;
  display: inline-block;
}

.hero-title::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120%;
  height: 120%;
  background: radial-gradient(ellipse at center, rgba(255,255,255,0.1) 0%, transparent 70%);
  filter: blur(40px);
  z-index: -1;
}

.hero-subtitle {
  font-size: 1.25rem;
  opacity: 0.95;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.cta-button {
  padding: 14px 36px;
  font-size: 1rem;
  font-weight: 600;
  color: #667eea;
  background: white;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
}

.cta-button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  color: #764ba2;
}

.cta-button:hover::before {
  width: 200%;
  height: 200%;
}

/* ===== Horizontal Scrolling Logos ===== */
.hero-logos {
  margin-top: 2rem;
}

.logos-title {
  font-size: 1rem;
  opacity: 0.8;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  font-weight: 600;
}

.logos-scroll-container {
  overflow: hidden;
  padding: 1rem 0;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  border-radius: 60px;
}

.logos-scroll-track {
  display: flex;
  animation: scroll 30s linear infinite;
  width: fit-content;
}

.logos-scroll-track:hover {
  animation-play-state: paused;
}

.logo-item {
  flex: 0 0 auto;
  padding: 0.6rem 2rem;
  margin: 0 0.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: white;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 40px;
  backdrop-filter: blur(8px);
  white-space: nowrap;
  transition: all 0.3s ease;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.logo-item:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.05);
  border-color: rgba(255, 255, 255, 0.4);
}

@keyframes scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* ===== Video Section ===== */
.simple-video-section {
  padding: 4rem 0;
  text-align: center;
  background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg) 100%);
  border-radius: 24px;
  margin: 2rem 0;
}

.simple-video-section h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.simple-video-section .subtitle {
  font-size: 1.1rem;
  color: var(--text-light);
  margin-bottom: 2rem;
}

.video-embed {
  max-width: 800px;
  margin: 0 auto 2rem;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.video-embed video {
  width: 100%;
  height: 450px;
  object-fit: cover;
}

.video-call-to-action {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.video-call-to-action .btn-primary {
  padding: 14px 32px;
  font-size: 1rem;
  min-width: 220px;
}

/* ===== Category Tabs ===== */
.course-categories {
  margin: 3rem 0 2rem;
}

.category-tabs {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.category-tab {
  padding: 12px 28px;
  background: var(--bg-light);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 40px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-tab:hover {
  background: rgba(var(--primary-rgb), 0.1);
  color: var(--primary);
  transform: translateY(-2px);
  border-color: var(--primary);
}

.category-tab.active {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.3);
}

/* ===== Courses Grid ===== */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin: 2rem 0;
}

/* Course Card - Enhanced */
.course-card {
  background: var(--card-bg);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  border: 1px solid var(--border);
}

.dark-theme .course-card {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.course-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
  border-color: var(--primary);
}

.course-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  color: white;
  padding: 0.4rem 1rem;
  border-radius: 30px;
  font-size: 0.8rem;
  font-weight: 700;
  z-index: 2;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.3);
}

.course-header {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  padding: 2rem;
  text-align: center;
  color: white;
  position: relative;
  overflow: hidden;
}

.course-header::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.4s;
}

.course-card:hover .course-header::before {
  opacity: 1;
}

.course-header i {
  font-size: 3rem;
  margin-bottom: 1rem;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.course-header h3 {
  font-size: 1.4rem;
  margin: 0;
  line-height: 1.3;
  font-weight: 700;
}

.course-body {
  padding: 1.5rem;
}

.course-body p {
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 1.25rem;
  min-height: 70px;
  font-size: 0.9rem;
}

.course-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
  font-size: 0.85rem;
}

.course-meta span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-light);
}

.course-meta i {
  color: var(--primary);
  width: 16px;
}

.course-price {
  font-size: 1.75rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 1.25rem;
}

.original-price {
  font-size: 0.9rem;
  color: var(--text-light);
  text-decoration: line-through;
  margin-left: 0.5rem;
  font-weight: normal;
}

/* Buttons - Enhanced */
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  border: none;
  padding: 12px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  display: inline-block;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.5s, height 0.5s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(var(--primary-rgb), 0.35);
}

.btn-primary:hover::before {
  width: 200%;
  height: 200%;
}

.btn-primary.in-cart {
  background: linear-gradient(135deg, #10b981, #059669);
}

.btn-primary.in-cart:hover {
  background: linear-gradient(135deg, #059669, #047857);
}

/* Cart Button */
.view-cart-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 60px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(var(--primary-rgb), 0.4);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.view-cart-btn:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 35px rgba(var(--primary-rgb), 0.5);
}

.cart-count {
  background: white;
  background: linear-gradient(135deg, #fff, #f0f0f0);
  color: var(--primary);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 800;
}

/* Loading and Error States */
.loading-courses,
.error-message,
.no-courses {
  text-align: center;
  padding: 3rem;
  background: var(--card-bg);
  border-radius: 20px;
  margin: 2rem 0;
  border: 1px solid var(--border);
}

.error-message {
  color: #ef4444;
}

/* ===== Dark Theme Specific Overrides ===== */
.dark-theme .course-price {
  background: linear-gradient(135deg, #a78bfa, #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
}

.dark-theme .category-tab {
  background: var(--bg-light);
  border-color: var(--border);
}

.dark-theme .category-tab.active {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
}

/* ===== Responsive Design ===== */
@media (max-width: 1024px) {
  .courses-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .hero-title {
    font-size: 3.5rem;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .simple-video-section h2 {
    font-size: 2rem;
  }
  
  .video-embed video {
    height: 300px;
  }
  
  .courses-grid {
    grid-template-columns: 1fr;
  }
  
  .category-tabs {
    flex-direction: column;
    align-items: stretch;
    padding: 0 1rem;
  }
  
  .category-tab {
    width: 100%;
    text-align: center;
  }
  
  .video-call-to-action {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }
  
  .video-call-to-action .btn-primary {
    width: 100%;
    max-width: 280px;
  }
  
  .logo-item {
    font-size: 0.9rem;
    padding: 0.4rem 1.2rem;
  }
  
  .hero-content {
    padding: 2rem 1rem;
  }
  
  .hero-section {
    min-height: 450px;
  }
  
  .back-home-button {
    padding: 8px 15px;
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }
  
  .course-header i {
    font-size: 2.5rem;
  }
  
  .course-header h3 {
    font-size: 1.2rem;
  }
  
  .course-price {
    font-size: 1.5rem;
  }
  
  .course-body p {
    min-height: auto;
  }
  
  .view-cart-btn {
    bottom: 1rem;
    right: 1rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
  }
  
  .hero-tagline span {
    font-size: 0.75rem;
    padding: 6px 15px;
  }
  
  .courses-label {
    font-size: 0.75rem;
    padding: 6px 15px;
  }
  
  .back-home-button {
    padding: 6px 12px;
    font-size: 0.75rem;
    top: 10px;
    left: 10px;
  }
}

/* ===== Accessibility ===== */
.course-card:focus-visible,
.category-tab:focus-visible,
.logo-item:focus-visible,
.btn-primary:focus-visible,
.view-cart-btn:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
}

/* ===== Print Styles ===== */
@media print {
  .hero-section,
  .simple-video-section,
  .view-cart-btn,
  .category-tabs {
    display: none;
  }
  
  .course-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ddd;
  }
}