/* =========================================
   Image-Based Courses Section Styles
========================================= */

.bg-light-modern {
    background-color: #f4f6f9; /* Very soft grayish-blue for modern look */
}

.badge-popular {
    background-color: rgba(220, 53, 69, 0.9);
} /* Bootstrap Danger */
.badge-job {
    background-color: rgba(13, 110, 253, 0.9);
} /* Bootstrap Primary */
.badge-recommended {
    background-color: rgba(25, 135, 84, 0.9);
} /* Bootstrap Success */

/* Content Area */
.course-content {
    padding: 25px 25px 30px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.course-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 12px;
}

.course-desc {
    color: #6c757d;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 20px;
    flex-grow: 1; /* Pushes the button to the bottom */
}

/* Course Meta (Duration) */
.course-meta {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.duration-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: #f8f9fa;
    color: #495057;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid #e9ecef;
}

.duration-badge i {
    color: #0d6efd;
}

/* Call to Action Button */
.btn-enroll {
    background-color: #ffffff;
    color: #0d6efd;
    border: 2px solid #0d6efd;
    font-weight: 700;
    padding: 10px 20px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.modern-course-card:hover .btn-enroll {
    background-color: #0d6efd;
    color: #ffffff;
    box-shadow: 0 5px 15px rgba(13, 110, 253, 0.3);
}

/* Card Container & Styling */
.course-card {
    border: none;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    transition: all 0.4s ease;
    overflow: hidden; /* Contains the image corners */
}

/* Hover Effects */
.course-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

/* Image Area */
.course-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 14px 14px 0 0;
}

.course-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.course-card:hover .course-image {
    transform: scale(1.08);
}

/* Badges */
.badge-floating {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 6px 14px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 20px;
    color: #fff;
    z-index: 2;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.badge-popular {
    background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
}
.badge-new {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}
.badge-trending {
    background: linear-gradient(135deg, #f2994a 0%, #f2c94c 100%);
}

/* Typography */
.course-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.course-description {
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 1rem;
    /* Force to exactly 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Meta Information (Duration & Level) */
.course-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #4b5563;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f3f4f6;
    margin-bottom: 1rem;
}

.meta-icon {
    color: #6366f1;
    margin-right: 5px;
}

.level-badge {
    background: #eef2ff;
    color: #4f46e5;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.75rem;
}

/* Buttons */
.btn-view-details {
    border: 1px solid #d1d5db;
    color: #374151;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-view-details:hover {
    background-color: #f3f4f6;
    color: #111827;
}

.btn-enroll-now {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: #ffffff;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-enroll-now:hover {
    color: white;
    box-shadow: 0 6px 15px rgba(99, 102, 241, 0.4);
    transform: translateY(-2px);
}
