.best-rated-courses-section {
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  background-color: var(--secondary);
  border-radius: 48px;
  padding: 24px 48px 48px;
  margin-right: -48px;
  margin-left: -48px;
  position: relative;
  overflow: visible;
}

/* ======================================
   FLOATING ICON - ANIMATED
====================================== */
.best-rated-courses-section__floating-icon {
  position: absolute;
  width: 208px;
  height: 208px;
  bottom: -48px;
  z-index: 10;

  /* Main floating animation */
  animation:
    floatUpDown 4s ease-in-out infinite,
    gentleRotate 8s ease-in-out infinite,
    scalePulse 6s ease-in-out infinite;

  /* Smooth transitions */
  transition: all 0.4s ease;
}

.best-rated-courses-section__floating-icon img {
  max-width: 100%;
  max-height: 100%;

  /* Add drop shadow for depth */
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.15));
  transition: all 0.4s ease;
}

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

/* Float Up and Down */
@keyframes floatUpDown {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-25px);
  }
}

/* Gentle Rotation */
@keyframes gentleRotate {

  0%,
  100% {
    transform: rotate(-5deg);
  }

  50% {
    transform: rotate(5deg);
  }
}

/* Scale Pulse */
@keyframes scalePulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }
}

/* ======================================
   COMBINED ANIMATION (Recommended)
====================================== */
.best-rated-courses-section__floating-icon {
  animation: floatAndRotate 6s ease-in-out infinite;
}

@keyframes floatAndRotate {
  0% {
    transform: translateY(0) rotate(-3deg) scale(1);
  }

  25% {
    transform: translateY(-15px) rotate(0deg) scale(1.02);
  }

  50% {
    transform: translateY(-25px) rotate(3deg) scale(1.05);
  }

  75% {
    transform: translateY(-15px) rotate(0deg) scale(1.02);
  }

  100% {
    transform: translateY(0) rotate(-3deg) scale(1);
  }
}

/* ======================================
   GLOW EFFECT AROUND ICON
====================================== */
.best-rated-courses-section__floating-icon::before {
  content: '';
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  background: radial-gradient(circle,
      rgba(255, 255, 255, 0.2) 0%,
      transparent 70%);
  animation: glowPulse 3s ease-in-out infinite;
  pointer-events: none;
}

@keyframes glowPulse {

  0%,
  100% {
    opacity: 0.3;
    transform: scale(0.9);
  }

  50% {
    opacity: 0.6;
    transform: scale(1.1);
  }
}

/* ======================================
   ORBITING PARTICLES (Optional)
====================================== */
.best-rated-courses-section__floating-icon::after {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  background: var(--primary, #E64A19);
  border-radius: 50%;
  top: 50%;
  left: 50%;
  animation: orbitParticle 4s linear infinite;
  box-shadow: 0 0 10px var(--primary, #E64A19);
}

@keyframes orbitParticle {
  0% {
    transform: rotate(0deg) translateX(120px) rotate(0deg);
  }

  100% {
    transform: rotate(360deg) translateX(120px) rotate(-360deg);
  }
}

/* ======================================
   HOVER EFFECTS
====================================== */
.best-rated-courses-section__floating-icon:hover {
  animation-play-state: paused;
}

.best-rated-courses-section__floating-icon:hover img {
  transform: scale(1.1) rotate(10deg);
  filter: drop-shadow(0 30px 50px rgba(0, 0, 0, 0.25));
}

/* ======================================
   SPARKLE EFFECTS (Extra Decorations)
====================================== */
.floating-icon-sparkle {
  position: absolute;
  width: 8px;
  height: 8px;
  background: #ffffff;
  border-radius: 50%;
  pointer-events: none;
  animation: sparkle 2s ease-in-out infinite;
}

.floating-icon-sparkle:nth-child(1) {
  top: 10%;
  left: 20%;
  animation-delay: 0s;
}

.floating-icon-sparkle:nth-child(2) {
  top: 30%;
  right: 10%;
  width: 6px;
  height: 6px;
  animation-delay: 0.5s;
}

.floating-icon-sparkle:nth-child(3) {
  bottom: 20%;
  left: 10%;
  width: 10px;
  height: 10px;
  animation-delay: 1s;
}

.floating-icon-sparkle:nth-child(4) {
  bottom: 40%;
  right: 20%;
  width: 5px;
  height: 5px;
  animation-delay: 1.5s;
}

@keyframes sparkle {

  0%,
  100% {
    opacity: 0;
    transform: scale(0);
  }

  50% {
    opacity: 1;
    transform: scale(1);
  }
}

/* ======================================
   BOUNCE VARIATION
====================================== */
.best-rated-courses-section__floating-icon.bounce {
  animation: bounceFloat 2s ease-in-out infinite;
}

@keyframes bounceFloat {

  0%,
  100% {
    transform: translateY(0);
    animation-timing-function: ease-out;
  }

  50% {
    transform: translateY(-30px);
    animation-timing-function: ease-in;
  }
}

/* ======================================
   SWING VARIATION
====================================== */
.best-rated-courses-section__floating-icon.swing {
  transform-origin: top center;
  animation: swingFloat 3s ease-in-out infinite;
}

@keyframes swingFloat {

  0%,
  100% {
    transform: rotate(-8deg);
  }

  50% {
    transform: rotate(8deg);
  }
}

/* ======================================
   3D FLIP VARIATION
====================================== */
.best-rated-courses-section__floating-icon.flip3d {
  animation: flip3DFloat 6s ease-in-out infinite;
  perspective: 1000px;
}

@keyframes flip3DFloat {

  0%,
  100% {
    transform: translateY(0) rotateY(0deg);
  }

  25% {
    transform: translateY(-15px) rotateY(15deg);
  }

  50% {
    transform: translateY(-25px) rotateY(0deg);
  }

  75% {
    transform: translateY(-15px) rotateY(-15deg);
  }
}

/* ======================================
   WAVE VARIATION
====================================== */
.best-rated-courses-section__floating-icon.wave {
  animation: waveFloat 4s ease-in-out infinite;
}

@keyframes waveFloat {

  0%,
  100% {
    transform: translateY(0) translateX(0);
  }

  25% {
    transform: translateY(-15px) translateX(10px);
  }

  50% {
    transform: translateY(-25px) translateX(0);
  }

  75% {
    transform: translateY(-15px) translateX(-10px);
  }
}

/* ======================================
   PULSE RING EFFECT
====================================== */
.best-rated-courses-section__floating-icon .pulse-ring {
  position: absolute;
  inset: 0;
  border: 2px solid var(--primary, #E64A19);
  border-radius: 50%;
  animation: pulseRingExpand 2s ease-out infinite;
  pointer-events: none;
}

.best-rated-courses-section__floating-icon .pulse-ring:nth-child(2) {
  animation-delay: 0.5s;
}

.best-rated-courses-section__floating-icon .pulse-ring:nth-child(3) {
  animation-delay: 1s;
}

@keyframes pulseRingExpand {
  0% {
    transform: scale(0.8);
    opacity: 1;
  }

  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

/* ======================================
   RESPONSIVE - TABLET
====================================== */
@media (max-width: 1199px) {
  .best-rated-courses-section__floating-icon {
    width: 180px;
    height: 180px;
    bottom: -40px;
  }

  /* Slower animation on tablet */
  .best-rated-courses-section__floating-icon {
    animation: floatAndRotate 8s ease-in-out infinite;
  }
}

/* ======================================
   RESPONSIVE - MOBILE
====================================== */
@media (max-width: 991px) {
  .best-rated-courses-section {
    height: auto;
    margin-right: -24px;
    margin-left: -24px;
    padding: 48px 24px;
    border-radius: 32px;
  }

  .best-rated-courses-section__floating-icon {
    display: none;
  }
}

/* ======================================
   SHOW ON LARGER MOBILE (Optional)
====================================== */
@media (min-width: 768px) and (max-width: 991px) {
  .best-rated-courses-section__floating-icon {
    display: block;
    width: 140px;
    height: 140px;
    bottom: -30px;
    right: 20px;

    /* Simpler animation for tablet */
    animation: simpleFloat 4s ease-in-out infinite;
  }

  .best-rated-courses-section__floating-icon::before,
  .best-rated-courses-section__floating-icon::after {
    display: none;
  }

  @keyframes simpleFloat {

    0%,
    100% {
      transform: translateY(0);
    }

    50% {
      transform: translateY(-15px);
    }
  }
}

/* ======================================
   ACCESSIBILITY - REDUCED MOTION
====================================== */
@media (prefers-reduced-motion: reduce) {

  .best-rated-courses-section__floating-icon,
  .best-rated-courses-section__floating-icon::before,
  .best-rated-courses-section__floating-icon::after,
  .best-rated-courses-section__floating-icon img,
  .floating-icon-sparkle,
  .pulse-ring {
    animation: none !important;
    transition: none !important;
  }
}