/* ==========================================================================
   Course price (<x-course-price>) + equal-height course cards.
   Loaded on every public page from layouts/app.blade.php.
   ========================================================================== */

/* ---------- Price: now / was / -% pill ---------- */
.course-price {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: 10px;
    row-gap: 4px;
    line-height: 1.15;
}

.course-price__now {
    font-size: 22px;
    font-weight: 800;
    color: var(--theme, #004F44);
    white-space: nowrap;
}

.course-price__now.is-free {
    color: #16a34a;
}

.course-price__was {
    font-size: 15px;
    font-weight: 500;
    color: #6b7280;
    text-decoration: line-through;
    text-decoration-thickness: 1.5px;
    white-space: nowrap;
}

.course-price__pill {
    align-self: center;
    display: inline-block;
    padding: 3px 8px;
    border-radius: 999px;
    background: #fee2e2;
    color: #b91c1c;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
    white-space: nowrap;
}

/* Large version: course page sidebar */
.course-price--lg {
    justify-content: center;
    padding: 16px;
    border-radius: 12px;
    background: var(--bg, #f3f7f6);
}

.course-price--lg .course-price__now {
    font-size: 30px;
}

.course-price--lg .course-price__was {
    font-size: 18px;
}

.course-price--lg .course-price__save {
    flex-basis: 100%;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #b91c1c;
}

/* Homepage (Mentora) card footer is a narrow row next to "Enroll now". */
.mentora-course-footer {
    flex-wrap: wrap;
    gap: 10px 12px;
}

.mentora-course-price .course-price__now {
    font-size: 20px;
    color: var(--mentora-primary, var(--theme, #004F44));
}

.mentora-course-price .course-price__now.is-free {
    color: #16a34a;
}

.mentora-course-price .course-price__was {
    font-size: 14px;
}

/* ---------- Equal-height cards (Courses page + instructor page) ---------- */
.mhq-card-eq-col {
    display: flex;
}

.mhq-courses-box-items.mhq-card-eq {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
}

/* Same 16:9 frame for every image, whatever the upload's shape. */
.mhq-card-eq .mhq-courses-image {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 18px 18px 0 0;
    flex-shrink: 0;
}

.mhq-card-eq .mhq-courses-image > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mhq-card-eq .mhq-courses-content {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}

.mhq-card-eq .mhq-courses-content .star {
    min-height: 22px;
}

/* Titles take exactly two lines, so the rows below start at the same height. */
.mhq-card-eq .mhq-courses-content h3 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
    min-height: calc(2 * 1.3em);
}

.mhq-card-eq .mhq-courses-content .post-date {
    flex-wrap: wrap;
    gap: 10px 20px;
    min-height: 57px;
}

.mhq-card-eq .mhq-courses-content .post-date li {
    gap: 10px;
}

/* Instructor, then price, then the button — pinned to the bottom of every card. */
.mhq-card-eq .mhq-courses-content .client-info-area,
.mhq-courses-box-items.mhq-card-eq:hover .mhq-courses-content .client-info-area {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 14px;
    margin-top: auto;
}

.mhq-card-eq .mhq-courses-content .client-info-area .client-info {
    font-size: 16px;
}

.mhq-card-eq .mhq-courses-content .client-info-area .client-info .img img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.mhq-card-eq .mhq-courses-content .theme-btn,
.mhq-courses-box-items.mhq-card-eq:hover .mhq-courses-content .theme-btn {
    display: block;
    width: 100%;
    margin-top: 18px;
    padding: 14px 20px;
    text-align: center;
}

@media (max-width: 575px) {
    .course-price__now {
        font-size: 20px;
    }

    .course-price--lg .course-price__now {
        font-size: 26px;
    }

    .mhq-card-eq .mhq-courses-content .post-date {
        min-height: 0;
    }
}
