/* css/courses.css */

/* 1. GRID LAYOUT */
#courseGrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    padding: 20px 0;
}

/* 2. COURSE CARD DESIGN */
.course-card {
    background: rgba(30, 41, 59, 0.7); /* Darker Glass */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s ease;
    position: relative;
    backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.course-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border-color: var(--color-primary);
}

/* Image Area */
.card-thumb-wrapper {
    position: relative;
    height: 190px;
    overflow: hidden;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.course-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.course-card:hover .course-image {
    transform: scale(1.05);
}

/* BEAUTIFUL BADGE ON IMAGE */
.badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* Badge Colors */
.badge-blue {
    background: rgba(14, 165, 233, 0.9);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
}
.badge-purple {
    background: rgba(139, 92, 246, 0.9);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
}
.badge-green {
    background: rgba(34, 197, 94, 0.9);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
}

/* Card Body */
.course-info {
    padding: 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.course-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #fff;
    line-height: 1.4;
    min-height: 56px; /* 2 lines height */
    font-family: 'Outfit', sans-serif;
}

/* Rating Row */
.rating-row {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
    color: #cbd5e1;
    margin-bottom: 20px;
}
.rating-row i { color: #fbbf24; }

/* 3. FOOTER & BUTTONS */
.course-footer {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* 🔥 NEW: Styles for Old Price Display */
.price-wrapper {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.old-price {
    font-size: 0.85rem;
    text-decoration: line-through;
    color: #94a3b8; /* Muted Color */
    margin-bottom: 2px;
    font-weight: 500;
}

.price-tag {
    font-size: 1.2rem;
    font-weight: 700;
    color: #38bdf8; /* Blue for paid */
}
.price-tag.free {
    color: #22c55e; /* Green for free */
}

/* PREMIUM BUTTON */
.btn-view-details {
    padding: 10px 20px;
    font-size: 0.9rem;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
    transition: 0.3s;
}

.btn-view-details:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(14, 165, 233, 0.5);
    background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
}

/* Loader */
.loader-box {
    text-align: center; 
    color: var(--color-text-muted); 
    grid-column: 1 / -1; 
    padding: 50px;
}