/* Popular Course Styling */
.popular-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    box-shadow: 0 3px 10px rgba(255, 107, 107, 0.4);
    z-index: 10;
    animation: pulse 2s infinite;
}

.popular-badge i {
    margin-right: 5px;
    animation: sparkle 1.5s ease-in-out infinite alternate;
}

@keyframes pulse {
    0% {
        box-shadow: 0 3px 10px rgba(255, 107, 107, 0.4);
    }
    50% {
        box-shadow: 0 3px 15px rgba(255, 107, 107, 0.6);
    }
    100% {
        box-shadow: 0 3px 10px rgba(255, 107, 107, 0.4);
    }
}

@keyframes sparkle {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.2);
    }
}

.course-image-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
}

.course-image-wrapper:hover .popular-badge {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

/* Enhanced course cards for popular courses */
.item:has(.popular-badge) {
    border: 2px solid #ffd700;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.3);
    transition: all 0.3s ease;
}

.item:has(.popular-badge):hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
}

/* Popular section styling */
.section-heading h2 {
    position: relative;
}

.section-heading h2:after {
    content: '⭐';
    position: absolute;
    right: -30px;
    top: 0;
    font-size: 0.8em;
    animation: rotate 3s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .popular-badge {
        font-size: 10px;
        padding: 6px 10px;
    }
    
    .section-heading h2:after {
        display: none;
    }
}