/* --- COURSE GRID --- */
.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.course-card {
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid #f1f5f9;
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
}

.course-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 60px rgba(36, 58, 106, 0.12);
}

/* Image Wrapper */
.course-image-wrapper {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.course-image-wrapper img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.6s ease;
}

.course-card:hover .course-image-wrapper img {
    transform: scale(1.1);
}

.dept-floating-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: #E4002B;
    color: white;
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    z-index: 5;
    letter-spacing: 0.5px;
}

/* Content Area */
.course-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.course-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: #243A6A;
    line-height: 1.3;
    margin-bottom: 12px;
}

.course-excerpt {
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 20px;
}

/* Meta Bar */
.course-meta {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 15px;
    border-top: 1px solid #f1f5f9;
}

.duration-pill {
    font-size: 0.85rem;
    font-weight: 700;
    color: #243A6A;
}

.details-link {
    background: #243A6A;
    color: white;
    padding: 8px 18px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 700;
    transition: 0.3s;
}

.course-card:hover .details-link {
    background: #E4002B;
    box-shadow: 0 5px 15px rgba(228, 0, 43, 0.3);
}

/* MOBILE OPTIMIZATION */
@media (max-width: 640px) {
    .course-image-wrapper { height: 180px; }
    .course-title { font-size: 1.15rem; }
    .course-grid { gap: 20px; }
}

/* --- COURSE NEON CARDS --- */
.course-neon-card {
    backdrop-filter: blur(8px);
    box-shadow: 0 20px 40px -20px rgba(0,0,0,0.5);
}

.course-neon-card:hover {
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.7), 
                0 0 15px rgba(228, 0, 43, 0.1);
}

/* Fix mobile padding and title size */
@media (max-width: 768px) {
    .featured-courses-section {
        padding-top: 40px !important;
        padding-bottom: 40px !important;
    }
    
    .course-neon-card .p-8 {
        padding: 24px !important;
    }

    .course-neon-card h3 {
        font-size: 1.25rem !important;
    }

    /* Remove the 'island' feel of the section on small screens */
    .featured-courses-section h2 {
        font-size: 2.25rem !important;
        margin-bottom: 8px;
    }
}