/* Grid */
.emc-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);  /* ← ahora 4 columnas */
    gap: 24px;
}

/* Tarjeta */
.emc-card {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-radius: 16px;
    padding: 30px 25px;
    text-align: center;
    --emc-bg: #eef2f7;
    --emc-gradient-start: #1a2b4c;
    --emc-gradient-end: #3a6cb6;
    transition: all 0.4s ease;
}

/* Capa de fondo (estado normal) */
.emc-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: var(--emc-bg);
    transition: background 0.4s ease;
    z-index: 0;
}

/* Capa de contenido */
.emc-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Icono */
.emc-icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    margin-bottom: 16px;
    transition: all 0.4s ease;
    background-color: rgba(58,108,182,0.1);
}

.emc-icon {
    display: inline-flex;
    color: #3a6cb6;
    transition: color 0.4s ease;
}

/* Título */
.emc-title {
    margin: 0 0 8px;
    font-weight: 700;
    font-size: 18px;
    color: #1a2b4c;
    transition: color 0.4s ease;
}

/* Texto corto */
.emc-short {
    margin: 0;
    font-size: 14px;
    color: #666;
    line-height: 1.4;
    transition: all 0.4s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Texto largo (oculto por defecto) */
.emc-long {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.4s ease;
    color: #fff;
    font-size: 14px;
    line-height: 1.5;
    margin-top: 0;
}

/* ---- HOVER ---- */
.emc-card:hover .emc-bg {
    background: linear-gradient(135deg, var(--emc-gradient-start) 0%, var(--emc-gradient-end) 100%);
}

.emc-card:hover .emc-icon-wrap {
    opacity: 0;
    transform: translateY(-20px);
    margin-bottom: 0;
    max-height: 0;
    padding: 0;
}

.emc-card:hover .emc-short {
    opacity: 0;
    transform: translateY(-10px);
    max-height: 0;
    margin: 0;
}

.emc-card:hover .emc-long {
    opacity: 1;
    max-height: 200px;
    margin-top: 16px;
}

/* Responsivo */
@media (max-width: 992px) {
    .emc-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 600px) {
    .emc-grid {
        grid-template-columns: 1fr;
    }
}