/* Grid Container */
#ka .courselist-items {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin: 10px 0 30px 0;
}

/* Grid Item */
#ka .courselist-item.grid-item {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-bottom: 0;
}

/* Card Styling */
#ka .courselist-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: #fff;
}

#ka .courselist-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* Card Image */
#ka .card-image {
    position: relative;
    height: 180px;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

#ka .card-image .image-inner {
    display: block;
    width: 100%;
    height: 100%;
}
/*
#ka .card-location-tag {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.85em;
    display: flex;
    align-items: center;
    gap: 5px;
}

#ka .card-location-tag i {
    font-size: 1.1em;
}*

/* Card Content */
#ka .card-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 20px;
}

#ka .card-content-upper {
    flex-grow: 1;
    position: relative;
}

#ka .card-content-lower {
    margin-top: auto;
}

/* Title Area */
#ka .card-content .title-area {
    margin-bottom: 15px;
}

#ka .card-content .course-title {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin: 0;
    font-size: 1.2em;
    line-height: 1.3;
}

#ka .card-content .course-title a {
    color: #333;
    text-decoration: none;
    flex: 1;
}


/* Excerpt */
#ka .card-excerpt {
    margin-bottom: 15px;
    font-size: 0.9em;
    color: #666;
    line-height: 1.5;
}

/* Course Details */
#ka .card-details {
    margin-bottom: 15px;
}

#ka .card-details-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

#ka .card-details-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: #555;
    font-size: var(--ka-font-xs);
}

#ka .card-details-list i {
    background-color: #777;
    height: var(--ka-font-s);
    width: var(--ka-font-base);
}

/* Separator */
#ka .card-separator {
    height: 1px;
    background-color: #eee;
    margin: 15px 0;
}

/* Footer Area */
#ka .card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

#ka .card-price {
    font-size: 1.1em;
    color: #333;
}

#ka .card-price strong {
    font-weight: 600;
}

/* Button */
#ka .card-footer .courselist-button {
    padding: 8px 16px;
    border-radius: 4px;
    border: none;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 0.9em;
}

/* Availability tag */
#ka .card-availability {
    padding: 3px 8px;
    border-radius: 4px;
    margin-left: 10px;
    white-space: nowrap;
    font-size: var(--ka-font-xs);
    background-color: #e6f7e6;
    color: #2e7d32;
    font-weight: 500;
    z-index: 2;
}
#ka .card-availability.full {
    background-color: #ffe1e0;
    color: #c74444;
}

#ka .card-availability.on-demand {
    background-color: #f5f5f5;
    color: #666;
}
#ka .course-availability {
    position: absolute;
    right: 0;
    top: -1px;
}
#ka .course-availability span.course-available:before {
    margin: 0;
}

/* Position absolute only when inside card-image */
#ka .card-image .card-availability {
    position: absolute;
    top: 12px;
    right: 12px;
}

#ka span.course-available {
    color: #2e7d32;
}
#ka span.course-available:before {
    margin: 0 5px 0 0;
}

#ka span.course-available.on-demand:before {
    background-color: #999;
}

/* Location styling */
#ka .card-location {
    margin-bottom: 15px;
    font-size: var(--ka-font-xs);
    color: var(--ka-color-lighter);
    text-transform: uppercase;
}

#ka .card-location strong {
    font-weight: 600;
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
    #ka .courselist-items {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    #ka .courselist-items {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    #ka .courselist-items {
        grid-template-columns: 1fr;
    }
    
    #ka .card-footer {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    #ka .card-footer .courselist-button {
        width: 100%;
    }
}
