/* Hero with gradient - connects to main */
.hero {
  background: 
    radial-gradient(ellipse at 30% 0%, rgba(247, 147, 30, 0.45) 0%, transparent 55%),
    radial-gradient(ellipse at 70% 20%, rgba(99, 102, 241, 0.35) 0%, transparent 55%),
    var(--bg-primary) !important;
  padding-bottom: 60px !important;
  margin-bottom: 0 !important;
}

[data-theme="light"] .hero {
  background: 
    radial-gradient(ellipse at 30% 0%, rgba(247, 147, 30, 0.25) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 20%, rgba(99, 102, 241, 0.2) 0%, transparent 50%),
    var(--bg-primary) !important;
}

/* Hero Section */
.hero p.lead {
  max-width: 700px;
}

/* Main content wrapper - ONE unified background for ALL sections */
main {
  background: 
    radial-gradient(ellipse at 15% 5%, rgba(247, 147, 30, 0.3) 0%, transparent 35%),
    radial-gradient(ellipse at 85% 15%, rgba(99, 102, 241, 0.25) 0%, transparent 35%),
    radial-gradient(ellipse at 25% 45%, rgba(99, 102, 241, 0.2) 0%, transparent 30%),
    radial-gradient(ellipse at 75% 55%, rgba(247, 147, 30, 0.25) 0%, transparent 35%),
    radial-gradient(ellipse at 50% 85%, rgba(99, 102, 241, 0.2) 0%, transparent 30%),
    var(--bg-primary) !important;
  position: relative;
}

[data-theme="light"] main {
  background: 
    radial-gradient(ellipse at 15% 5%, rgba(247, 147, 30, 0.18) 0%, transparent 35%),
    radial-gradient(ellipse at 85% 15%, rgba(99, 102, 241, 0.15) 0%, transparent 35%),
    radial-gradient(ellipse at 25% 45%, rgba(99, 102, 241, 0.12) 0%, transparent 30%),
    radial-gradient(ellipse at 75% 55%, rgba(247, 147, 30, 0.15) 0%, transparent 35%),
    radial-gradient(ellipse at 50% 85%, rgba(99, 102, 241, 0.12) 0%, transparent 30%),
    var(--bg-primary) !important;
}

/* ALL sections transparent - unified look */
#courses-list,
#trainers,
#why,
#courses-cta {
  background: transparent !important;
  padding-top: 50px;
  padding-bottom: 50px;
  margin: 0;
  border: none;
  box-shadow: none;
}

/* Slightly more spacing on desktop */
@media (min-width: 768px) {
  #courses-list,
  #trainers,
  #why,
  #courses-cta {
    padding-top: 70px;
    padding-bottom: 70px;
  }
}

.trainer-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 32px 24px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, background 0.3s ease;
  position: relative;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

[data-theme="light"] .trainer-card {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.trainer-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transform: scaleX(0);
  transition: transform 0.4s ease;
  border-radius: 0 0 3px 3px;
}

.trainer-card:hover {
  transform: translateY(-8px);
  box-shadow: 
    0 15px 40px rgba(0, 0, 0, 0.3),
    0 0 20px rgba(247, 147, 30, 0.1);
  border-color: rgba(247, 147, 30, 0.3);
}

.trainer-card:hover::before {
  transform: scaleX(1);
}

[data-theme="light"] .trainer-card:hover {
  box-shadow: 
    0 15px 40px rgba(0, 0, 0, 0.15),
    0 0 20px rgba(247, 147, 30, 0.1);
}

.trainer-image-wrapper {
  width: 180px;
  height: 180px;
  margin: 0 auto 24px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--primary);
  box-shadow: 0 8px 24px rgba(247, 147, 30, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.trainer-card:hover .trainer-image-wrapper {
  transform: scale(1.05);
  box-shadow: 0 12px 32px rgba(247, 147, 30, 0.3);
}

.trainer-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.trainer-card:hover .trainer-image {
  transform: scale(1.1);
}

.trainer-name {
  color: var(--text-primary);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 12px;
  transition: color 0.3s ease;
}

.trainer-title {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 20px;
  flex-grow: 1;
  transition: color 0.3s ease;
}

[data-theme="light"] .trainer-title {
  color: var(--text-primary);
}

.trainer-socials {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: auto;
}

.trainer-social-link {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  font-size: 1.1rem;
  transition: all 0.3s ease;
  text-decoration: none;
}

.trainer-social-link:hover {
  background: var(--gradient);
  border-color: transparent;
  color: var(--bg-primary);
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(247, 147, 30, 0.3);
}

/* Why Section */
#why img {
  width: 100%;
  max-width: 450px;
  box-shadow: 0 30px 60px var(--shadow-color);
  transition: box-shadow 0.3s ease;
}

[data-theme="light"] #why img {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

#why .section-title {
  color: var(--text-primary);
  transition: color 0.3s ease;
}

/* Course Card */
.course-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, background 0.3s ease;
  position: relative;
  overflow: hidden;
}

[data-theme="light"] .course-card {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.course-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transform: scaleX(0);
  transition: transform 0.4s ease;
  border-radius: 0 0 3px 3px;
}

.course-card::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(247, 147, 30, 0.1) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

/* Hover effects only on desktop */
@media (min-width: 768px) {
  .course-card {
    transition: all 0.4s ease;
  }
}

.course-card:hover {
  transform: translateY(-8px);
  box-shadow: 
    0 15px 40px rgba(0, 0, 0, 0.3),
    0 0 20px rgba(247, 147, 30, 0.1);
  border-color: rgba(247, 147, 30, 0.3);
}

.course-card:hover::before {
  transform: scaleX(1);
}

.course-card:hover::after {
  opacity: 1;
}

[data-theme="light"] .course-card:hover {
  box-shadow: 
    0 15px 40px rgba(0, 0, 0, 0.15),
    0 0 20px rgba(247, 147, 30, 0.1);
}

.course-card img {
  width: 100%;
  height: 250px;
  object-fit: contain;
  background: var(--bg-secondary);
  border-radius: 16px;
  transition: transform 0.3s ease, background 0.3s ease;
}

[data-theme="light"] .course-card img {
  background: rgba(247, 147, 30, 0.05);
}

.course-card:hover img {
  transform: scale(1.03);
}

.course-card h4 {
  color: var(--text-primary);
  margin-top: 8px;
  transition: color 0.3s ease;
}

.course-card p {
  font-size: 0.95rem;
  line-height: 1.6;
  flex-grow: 1;
}

/* Course Meta (Duration & Price) */
.course-meta {
  display: flex;
  gap: 20px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.course-meta span {
  display: flex;
  align-items: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.course-meta i {
  color: var(--primary);
  margin-right: 6px;
}

.rtl .course-meta i {
  margin-right: 0;
  margin-left: 6px;
}

#why img {
  width: 100%;
  max-width: 450px;
  box-shadow: 0 30px 60px var(--shadow-color);
  transition: box-shadow 0.3s ease;
}

[data-theme="light"] #why img {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

#why .section-title {
  color: var(--text-primary);
  transition: color 0.3s ease;
}

#why-list {
  margin-top: 24px;
}

#why-list li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.6;
  transition: color 0.3s ease;
}

[data-theme="light"] #why-list li {
  color: var(--text-primary);
}

#why-list li i {
  color: var(--primary);
  font-size: 1.2rem;
  margin-top: 3px;
  flex-shrink: 0;
  transition: color 0.3s ease;
}

#why-list li span {
  color: inherit;
}

/* CTA Section */
#courses-cta {
  padding-bottom: 100px;
}

#courses-cta .glass-card {
  max-width: 700px;
  margin: 0 auto;
  background: var(--bg-card);
  position: relative;
  overflow: hidden;
  transition: background 0.3s ease;
}

#courses-cta .glass-card::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(247, 147, 30, 0.1) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

/* Hover effects only on desktop */
@media (min-width: 768px) {
  #courses-cta .glass-card {
    transition: all 0.4s ease;
  }
}

#courses-cta .glass-card:hover {
  border-color: rgba(247, 147, 30, 0.3);
  box-shadow: 
    0 15px 40px rgba(0, 0, 0, 0.3),
    0 0 20px rgba(247, 147, 30, 0.1);
}

#courses-cta .glass-card:hover::after {
  opacity: 1;
}

[data-theme="light"] #courses-cta .glass-card {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] #courses-cta .glass-card:hover {
  box-shadow: 
    0 15px 40px rgba(0, 0, 0, 0.15),
    0 0 20px rgba(247, 147, 30, 0.1);
}

/* Responsive */
@media (max-width: 991px) {
  #why img {
    max-width: 100%;
    margin-bottom: 30px;
  }
}

@media (max-width: 575px) {
  .course-card {
    padding: 18px;
  }
  
  .course-meta {
    gap: 12px;
  }

  .trainer-card {
    padding: 24px 20px;
  }

  .trainer-image-wrapper {
    width: 150px;
    height: 150px;
    margin-bottom: 20px;
  }

  .trainer-name {
    font-size: 1.3rem;
  }

  .trainer-title {
    font-size: 0.9rem;
  }
}


/* Discount Badge */
.discount-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  padding: 6px 14px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.85rem;
  box-shadow: 
    0 4px 12px rgba(247, 147, 30, 0.3),
    0 2px 6px rgba(0, 0, 0, 0.2);
  z-index: 10;
  animation: float-badge 3s ease-in-out infinite;
  display: flex;
  align-items: center;
  gap: 5px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  letter-spacing: 0.5px;
}

.rtl .discount-badge {
  right: auto;
  left: 16px;
}

.discount-badge i {
  font-size: 0.8rem;
  animation: rotate-icon 4s linear infinite;
}

@keyframes float-badge {
  0%, 100% {
    transform: translateY(0) scale(1);
    box-shadow: 
      0 4px 12px rgba(247, 147, 30, 0.3),
      0 2px 6px rgba(0, 0, 0, 0.2);
  }
  50% {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 
      0 8px 20px rgba(247, 147, 30, 0.5),
      0 4px 10px rgba(0, 0, 0, 0.25);
  }
}

@keyframes rotate-icon {
  0%, 90%, 100% {
    transform: rotate(0deg);
  }
  95% {
    transform: rotate(-15deg);
  }
}

.course-card:hover .discount-badge {
  animation: float-badge 3s ease-in-out infinite, shimmer 1.5s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.2);
  }
}