/* HERO */

.ricas-courses__hero {
    position: relative;
    width: 100%;
    height: 420px;
}

.ricas-courses__hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ricas-courses__hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ricas-courses__title {
    color: #fff;
    font-size: 42px;
    font-weight: 700;
}


/* OVERLAY (TRANSPARENT) */

.ricas-courses__overlay {
    margin-top: -80px;
    position: relative;
    z-index: 2;
    margin-bottom: 80px;
}

.ricas-courses__container {
    width: 88%;
    margin: auto;
}


/* GRID */

.ricas-courses__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    align-items: stretch;
}


/* CARD */

.ricas-courses__card {
    background: transparent;
    display: flex;
    flex-direction: column;
    height: 100%;
}


/* IMAGE (TOP PART OVERLAP) */

.ricas-courses__card-img {
    width: 100%;
    height: 190px;
    object-fit: cover;
    border-radius: 12px 12px 0 0;
}


/* BODY (VISIBLE SECTION BELOW) */

.ricas-courses__card-body {
    background: #fff;
    padding: 20px;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.08);

    display: flex;
    flex-direction: column;
    height: 100%;
}

.ricas-courses__card-content {
    flex: 1;
}


/* TITLE */
.ricas-courses__card-title {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 15px;
    color: #0b1f3a;

    line-height: 1.4;
}

/* META */

.ricas-courses__meta {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;

}

.ricas-courses__meta-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 500;
}

.ricas-courses__meta-item img {
    width: 20px;
    height: 20px;
}


/* LINK */

.ricas-courses__link {
    font-size: 26;
    font-weight: 800;
    text-decoration: none;
    color: #000;

    display: block;
    text-align: center;
    margin-top: auto;
}

/* MOBILE */

@media (max-width: 768px) {

    .ricas-courses__hero {
        height: 300px;
    }

    .ricas-courses__title {
        font-size: 28px;
    }

    .ricas-courses__overlay {
        margin-top: -60px; /* reduced, your previous was overkill */
    }

    /* FIX GRID → STACK */
    .ricas-courses__grid {
        display: grid;
        grid-template-columns: 1fr; /* single column */
        gap: 20px;
    }

    /* REMOVE scroll behavior completely */
    .ricas-courses__card {
        width: 100%;
        min-width: 0; /* kill that 280px nonsense */
    }

    /* IMAGE better proportion */
    .ricas-courses__card-img {
        height: 180px;
    }

    /* TEXT scaling */
    .ricas-courses__card-title {
        font-size: 18px;
    }

    .ricas-courses__meta-item {
        font-size: 16px;
    }

    .ricas-courses__link {
        font-size: 18px;
    }
}