/* ========================================= */
/* SHARED COURSE CARDS - Home & Courses Page */
/* ========================================= */

.course-grid-new {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.course-card-new {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    border: 1px solid #f3f4f6;
    width: calc(33.333% - 1.34rem);
    min-width: 300px;
    max-width: 420px;
}

.course-card-new:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.course-card-new.hidden {
    display: none;
}

.card-top-bar {
    height: 5px;
    background: #a51c30;
}

.card-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px 20px 0;
}

.level-badge {
    background: #dcfce7;
    color: #166534;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.price-section {
    text-align: right;
}

.course-price-new {
    color: #a51c30;
    font-size: 28px;
    font-weight: 700;
    display: block;
}

.course-duration {
    color: #9ca3af;
    font-size: 15px;
    display: block;
    margin-top: 2px;
}

.card-body {
    padding: 16px 20px 20px;
    flex: 1;
}

.course-title-new {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 10px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.course-description {
    color: #6b7280;
    font-size: 17px;
    line-height: 1.6;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.students-count {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6b7280;
    font-size: 15px;
    margin-bottom: 14px;
}

.students-count i {
    color: #a51c30;
}

.key-modules {
    margin-bottom: 0;
}

.modules-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    color: #374151;
    font-weight: 600;
    margin-bottom: 8px;
}

.modules-label i {
    color: #a51c30;
}

.module-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.module-tag {
    background: #fef2f2;
    color: #991b1b;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid #fecaca;
}

.more-modules {
    color: #a51c30;
    font-size: 14px;
    font-weight: 600;
    padding: 6px 0;
}

.card-footer {
    padding: 16px 20px;
    border-top: 1px solid #f3f4f6;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.view-details-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    background: #f8fafc;
    color: #374151;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid #e5e7eb;
}

.view-details-btn:hover {
    background: #f1f5f9;
    color: #111827;
}

.enroll-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    background: #a51c30;
    color: #ffffff;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.enroll-btn:hover {
    background: #a51c30;
    color: #ffffff;
    transform: translateY(-1px);
    /* box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3); */
}

/* Responsive */
@media (max-width: 1200px) {
    .course-card-new {
        width: calc(50% - 1rem);
        min-width: 280px;
    }
}

@media (max-width: 768px) {
    .course-card-new {
        width: 100%;
        max-width: 100%;
    }

    .course-grid-new {
        gap: 1.5rem;
    }

    .course-price-new {
        font-size: 26px;
    }

    .course-title-new {
        font-size: 20px;
    }
}
