/* --- No Courses State (Empty Card Styles) --- */

.iw-content-card {
    /* General container styling inherited from dashboard shell */
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin-top: 30px;
    padding: 30px 20px;
}

.iw-no-courses-card {
    /* Specific styling for the 'No Courses' message card */
    background: #f8f5f0; /* Light background from Dakhool style */
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    text-align: center;
    padding: 50px 20px;
    margin-top: 30px;
}

.iw-no-courses-icon {
    /* Trophy icon style */
    font-size: 50px;
    color: #7f1102; /* Secondary Colour (Deep Red) */
    margin-bottom: 20px;
}

.iw-no-courses-content h2 {
    color: #234e52; /* Primary Colour (Deep Teal) */
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.iw-no-courses-content p {
    color: #234e52; 
    opacity: 0.8;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Ensure the main container has some spacing/padding */
.iw-completed-courses-container {
    padding: 15px 0; 
}


/* --- Courses Grid Layout --- */
.iw-courses-grid {
    display: grid;
    /* Forces exactly two columns on larger screens */
    grid-template-columns: repeat(2, 1fr); 
    gap: 25px;
    margin-top: 30px;
}

/* --- DAKHOOL CARD STYLING (The Core Look) --- */

.iw-course-card {
    /* Base Card Styling - Match Dakhool enrollment card */
    background: white;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s ease;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid #e8ddd0;
}

.iw-course-card:before {
    /* Shadow shimmer effect on card */
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 40%;
    height: 200%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transform: rotate(30deg);
    transition: all 0.6s ease;
    z-index: 1;
}

.iw-course-card:hover:before {
    right: 120%;
}

.iw-course-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12);
}

.iw-course-thumbnail {
    height: 180px;
    overflow: hidden;
    position: relative;
}

.iw-course-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.iw-course-card:hover .iw-course-thumbnail img {
    transform: scale(1.08);
}

/* --- BADGES (Completed Status) --- */

.live-badge {
    /* Reused Dakhool Live Badge style for "Finished" */
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    align-items: center;
    background: #234e52; /* Primary Colour */
    color: white;
    padding: 6px 14px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 700;
    z-index: 2;
    box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}

.iw-status-badge {
    /* Status Badge Style */
    position: absolute;
    top: 15px;
    left: 15px;
    background: #a3be8c; /* Fourth Colour (Pale Green for Completed) */
    color: #234e52;
    padding: 6px 12px;
    border-radius: 18px;
    font-size: 0.85rem;
    font-weight: 700;
    display: inline-block;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    z-index: 2;
}

/* --- CONTENT AND META --- */

.iw-course-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.iw-course-instructor {
    color: #7f1102; /* Secondary Colour */
    font-weight: 600;
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.iw-course-title {
    font-size: 1.2rem;
    color: #234e52; /* Primary Colour */
    margin: 0 0 12px 0;
    font-weight: 800;
    line-height: 1.3;
    min-height: 60px; /* Ensures consistent alignment */
    flex-grow: 1;
}

.course-meta {
    /* Meta tags container from dakhool.css */
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 15px;
    border-top: 1px solid #eee; /* Added separator for style */
    padding-top: 10px;
}

.course-tag {
    /* Individual tags from dakhool.css */
    background: #f0f0f0;
    color: #234e52; /* Primary Colour */
    padding: 5px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* --- ACTIONS (Buttons) --- */

.iw-course-actions {
    /* Action container from dakhool.css */
    display: flex;
    gap: 12px;
    margin-top: auto;
}

.iw-course-button {
    /* Base Button Styling (Dakhool style) */
    flex: 1;
    padding: 12px;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 700;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 45px;
    border: none;
    position: relative;
    overflow: hidden;
    font-size: 0.95rem;
}

.iw-course-button.islamic-btn.primary {
    /* Feedback button (Secondary Color - Red/Maroon) */
    background: linear-gradient(135deg, #7f1102 0%, #6a0e01 100%);
    color: white;
    box-shadow: 0 5px 15px rgba(127, 17, 2, 0.25);
}

.iw-course-button.islamic-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(127, 17, 2, 0.35);
}

.iw-course-button.islamic-btn.reset {
    /* Get Certificate button (Tertiary Color - Gold/Tan) */
    background: linear-gradient(135deg, #d4a373 0%, #c2915e 100%);
    color: white;
    box-shadow: 0 5px 15px rgba(212, 163, 115, 0.25);
    flex-basis: 45%;
}

.iw-course-button.islamic-btn.reset:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(212, 163, 115, 0.35);
}


/* --- RESPONSIVE ADJUSTMENTS --- */

@media (max-width: 991px) {
    /* Tablet/Desktop: 2 columns */
    .iw-courses-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 767px) {
    /* Smaller Tablet/Large Mobile: 1 column */
    .iw-courses-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575px) {
    /* Mobile stacked buttons */
    .iw-course-actions {
        flex-direction: column;
        gap: 8px;
    }
}
