/* * This stylesheet is for our custom course card.
 * It's designed to be clean, modern, and visually appealing.
 */

/* Define CSS variables for easy color customization */
:root {
    --card-bg-color: #ffffff;
    --primary-color: #6a11cb;
    --secondary-color: #2575fc;
    --text-color: #333333;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --hover-overlay-color: rgba(0, 0, 0, 0.6);
}

/* Style the anchor link to act as a block element */
.ccc-card-link {
    text-decoration: none;
    display: block;
    width: 100%;
    height: 100%;
}

/* Style the main card container */
.ccc-course-card {
    position: relative;
    background: var(--card-bg-color);
    border-radius: 12px;
    box-shadow: 0 4px 15px var(--shadow-color);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    min-height: 250px; /* Ensure a consistent height */
}

/* Scale up and add a stronger shadow on hover */
.ccc-course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

/* Style the image section */
.ccc-card-image {
    width: 100%;
    height: 150px;
    background-size: cover;
    background-position: center;
    border-bottom: 2px solid var(--secondary-color);
}

/* Style the content section */
.ccc-card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

/* Style the course title */
.ccc-card-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
}

/* Add an overlay for the hover effect */
.ccc-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--hover-overlay-color);
    opacity: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s ease;
    pointer-events: none; /* Allows clicks to pass through to the link */
}

/* Show the overlay on hover */
.ccc-course-card:hover .ccc-card-overlay {
    opacity: 1;
}

/* Style the text inside the overlay */
.ccc-card-text {
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: bold;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

/* Animate the text inside the overlay on hover */
.ccc-course-card:hover .ccc-card-text {
    transform: scale(1);
}