/* ─── CARD GRID ─── */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
}

.course-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    border: 0.5px solid var(--border-main);
    display: flex;
    flex-direction: column;
    transition:
        transform 0.25s,
        box-shadow 0.25s;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 36px rgba(33, 102, 178, 0.15);
}

.card-img {
    position: relative;
    height: 150px;
    overflow: hidden;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.course-card:hover .card-img img {
    transform: scale(1.06);
}

.card-img::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: linear-gradient(to top, #fff, transparent);
}

/* BADGE */
.badge-featured {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(
        135deg,
        var(--secondary),
        var(--secondary-hover)
    );
    color: var(--secondary-text);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.8px;
    padding: 3px 9px;
    border-radius: 20px;
    z-index: 2;
}

/* BODY */
.card-body {
    padding: 12px 14px 0;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.course-title {
    font-family: "Playfair Display", serif;
    font-size: 1rem;
    color: var(--dark);
    text-align: center;
    margin-bottom: 10px;
    line-height: 1.3;
}

/* META */
.meta-row {
    display: flex;
    border-bottom: 0.5px solid var(--border-light);
    margin-bottom: 12px;
    justify-content: center;
}

.meta-item {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 7px 3px;
    font-size: 11px;
    color: #5a6a8a;
}

.meta-item + .meta-item {
    border-left: 0.5px solid var(--border-light);
}

.meta-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
    flex-shrink: 0;
}

/* HIGHLIGHTS */
.hl-label {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--primary);
    text-align: center;
    margin-bottom: 8px;
}

.hl-item {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    padding: 6px 9px;
    border-radius: 8px;
    background: var(--light);
    margin-bottom: 5px;
}

.hl-check {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--primary);
    flex-shrink: 0;
    margin-top: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hl-check::after {
    content: "";
    display: block;
    width: 5px;
    height: 3px;
    border-left: 1.5px solid #fff;
    border-bottom: 1.5px solid #fff;
    transform: rotate(-45deg) translateY(-1px);
}

.hl-item span {
    font-size: 11.5px;
    color: #4a5672;
    line-height: 1.4;
}

.hl-extra {
    display: none;
}

.hl-open .hl-extra {
    display: flex;
}

/* TOGGLE */
.toggle-btn {
    width: 100%;
    background: none;
    border: none;
    font-size: 11.5px;
    color: var(--primary);
    cursor: pointer;
    padding: 4px 0 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.toggle-btn .arr {
    display: inline-block;
    transition: transform 0.3s;
}

/* FOOT */
.spacer {
    flex: 1;
}

.card-foot {
    padding: 10px 14px 14px;
}

/* BUTTON */
.btn-demo {
    display: block;
    width: 100%;
    padding: 10px;
    border-radius: 50px;
    background: var(--primary);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-demo:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    opacity: 1;
    color: #fff;
}

.btn-demo:focus {
    box-shadow: 0 0 0 3px var(--primary-focus-shadow);
}

/* courses notes css */

.note-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.pdf-preview {
    height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    text-decoration: none;
}

.pdf-preview i {
    font-size: 60px;
    color: #dc3545;
    margin-bottom: 10px;
}

.pdf-preview span {
    font-size: 18px;
    font-weight: 600;
    color: #dc3545;
}
