/* ==========================================
   GRID GENERAL – estilo tipo Udemy / Domestika
========================================== */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 32px;
    padding-top: 12px;
}

/* ==========================================
   TARJETA BASE
========================================== */
.course-card {
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid #eceff3;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
    transition: transform .25s ease, box-shadow .25s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.course-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.12);
}

/* Imagen */
.card-image-wrapper {
    position: relative;
}

.masonry-thumb {
    width: 100%;
    height: 190px;
    object-fit: cover;
    background: #f2f4f7;
}

/* ==========================================
   BADGES DE NIVEL (colores mejorados)
========================================== */

.badge-nivel {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    z-index: 10;
    backdrop-filter: blur(6px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* Paleta más consistente con Logos Academy */
.badge-nivel.basico {
    background: #220E7A;  /* Azul oscuro Logos */
}

.badge-nivel.intermedio {
    background: #0ECF96;  /* Verde turquesa Logos */
}

.badge-nivel.avanzado {
    background: #F5A608;  /* Oro Logos */
}

/* ==========================================
   CUERPO DE LA TARJETA
========================================== */

.card-body {
    padding: 20px 20px 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1.25;
    color: #111827;
    margin-bottom: 10px;
}

.card-desc {
    font-size: 0.88rem;
    color: #5f6470;
    line-height: 1.45;
    flex: 1;
}

/* ==========================================
   ACCIONES
========================================== */

.card-actions {
    margin-top: 16px;
    display: flex;
    gap: 12px;
}

/* Botón ver curso */
.btn-ver,
.btn-ficha {
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

/* Ver curso */
.btn-ver {
    background: rgba(20, 220, 160, 0.16);
    color: #047857; /* Verde pro */
}

.btn-ver:hover {
    background: rgba(20, 220, 160, 0.30);
}

/* Ficha técnica */
.btn-ficha {
    background: rgba(37, 99, 235, 0.14);
    color: #1d4ed8;
}

.btn-ficha:hover {
    background: rgba(37, 99, 235, 0.22);
}
